<commit_before>package br.com.dbsoft.tmp;

import java.sql.Connection;
import java.sql.DriverManager;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import br.com.dbsoft.core.DBSSDK;
import br.com.dbsoft.error.DBSIOException;
import br.com.dbsoft.io.DBSDAO;
import br.com.dbsoft.util.DBSIO;
import br.com.dbsoft.util.DBSString;

public class TrocaNomes {
//	String url = "jdbc:mysql://ifeed.com.br:3306/ifeed?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
//	String url = "jdbc:mysql://ifeed.com.br:3306/dbsfnd?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
//	String url="jdbc:mysql://localhost:3306/dbsfnd?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
	String url="jdbc:mysql://localhost:3306/ifeed?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
//	String url="jdbc:mysql://192.168.0.106:3306/dbsfnd?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
//	String url="jdbc:mysql://192.168.0.106:3306/ifeed?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
//	String url="jdbc:oracle:thin:@192.168.0.20:1521:xe";
	String user="root";
	String password="<PASSWORD>";
//	String user="dbsoft";
//	String password="<PASSWORD>";	
	Connection wConexao;

	@Before
	public void setup() throws Exception {
		Class.forName(DBSSDK.JDBC_DRIVER.MYSQL);
		//Class.forName(DBSSDK.JDBC_DRIVER.ORACLE);
		wConexao = DriverManager.getConnection(url, user, password);
		wConexao.setAutoCommit(false);
	}
	
	@After
	public void tearDown() throws Exception {
		wConexao.close();
	}
	
	@Test
	public void trocaAtivoTipo(){
		try {
			@SuppressWarnings("rawtypes")
			DBSDAO xDAO = new DBSDAO(wConexao, "ATV_ATIVO_TIPO");
			xDAO.open("Select * from ATV_ATIVO_TIPO");
			xDAO.moveBeforeFirstRow();
			while(xDAO.moveNextRow()){
//				System.out.println(xDAO.getValue("ATIVO_TIPO") + ":" + DBSString.corretorOrtografico(DBSString.toProper((String) xDAO.getValue("ATIVO_TIPO"))));
				xDAO.setValue("ATIVO_TIPO", DBSString.corretorOrtografico(DBSString.toProper((String) xDAO.getValue("ATIVO_TIPO"))));
				xDAO.executeUpdate();

			}
			DBSIO.endTrans(wConexao, true);
			xDAO.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}	
	
//	@Test
	public void trocaProdutoTipo(){
		try {
			@SuppressWarnings("rawtypes")
			DBSDAO xDAO = new DBSDAO(wConexao, "GR_PRODUTO_TIPO");
			xDAO.open("Select * from GR_PRODUTO_TIPO");
			xDAO.moveBeforeFirstRow();<commit_msg>Documentação<commit_after>package br.com.dbsoft.tmp;

import java.sql.Connection;
import java.sql.DriverManager;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import br.com.dbsoft.core.DBSSDK;
import br.com.dbsoft.error.DBSIOException;
import br.com.dbsoft.io.DBSDAO;
import br.com.dbsoft.util.DBSIO;
import br.com.dbsoft.util.DBSString;

public class TrocaNomes {
//	String url = "jdbc:mysql://ifeed.com.br:3306/ifeed?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
//	String url = "jdbc:mysql://ifeed.com.br:3306/dbsfnd?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
//	String url="jdbc:mysql://localhost:3306/dbsfnd?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
	String url="jdbc:mysql://localhost:3306/ifeed?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
//	String url="jdbc:mysql://192.168.0.106:3306/dbsfnd?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
//	String url="jdbc:mysql://192.168.0.106:3306/ifeed?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true";
//	String url="jdbc:oracle:thin:@192.168.0.20:1521:xe";
	String user="root";
	String password="<PASSWORD>";
//	String user="dbsoft";
//	String password="<PASSWORD>";	
	Connection wConexao;

	@Before
	public void setup() throws Exception {
		Class.forName(DBSSDK.JDBC_DRIVER.MYSQL);
		//Class.forName(DBSSDK.JDBC_DRIVER.ORACLE);
		wConexao = DriverManager.getConnection(url, user, password);
		wConexao.setAutoCommit(false);
	}
	
	@After
	public void tearDown() throws Exception {
		wConexao.close();
	}
	
	@Test
	public void trocaAtivoTipo(){
		try {
			@SuppressWarnings("rawtypes")
			DBSDAO xDAO = new DBSDAO(wConexao, "COR_ATIVIDADE_CLASSE");
			xDAO.open("Select * from COR_ATIVIDADE_CLASSE");
			xDAO.moveBeforeFirstRow();
			while(xDAO.moveNextRow()){
//				System.out.println(xDAO.getValue("ATIVO_TIPO") + ":" + DBSString.corretorOrtografico(DBSString.toProper((String) xDAO.getValue("ATIVO_TIPO"))));
				xDAO.setValue("ATIVIDADE_CLASSE", DBSString.corretorOrtografico(DBSString.toProper((String) xDAO.getValue("ATIVIDADE_CLASSE"))));
				xDAO.executeUpdate();

			}
			DBSIO.endTrans(wConexao, true);
			xDAO.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}	
	
//	@Test
	public void trocaProdutoTipo(){
		try {
			@SuppressWarnings("rawtypes")
			DBSDAO xDAO = new DBSDAO(wConexao, "GR_PRODUTO_TIPO");
			xDAO.open("Select * from GR_PRODUTO_TIPO");
			xDAO.moveBeforeFirstRow();
{'fraction_non_alphanumeric': 0.1474346373107922, 'fraction_numerical': 0.022410064871240417, 'mean_word_length': 6.116083916083916, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7383931', 'n_tokens_mistral': 2132, 'n_tokens_neox': 1937, 'n_words': 231}