package siprp.higiene.relatorio.print;

import siprp.SingletonConstants;

import com.evolute.utils.Singleton;
import com.evolute.utils.db.DBManager;
import com.evolute.utils.db.JDBCManager;
import com.evolute.utils.db.keyretrievers.PostgresqlAutoKeyRetriever;
import com.evolute.utils.sql.Insert;
import com.evolute.utils.strings.UnicodeChecker;

public class RelatorioDBInit
{
	public static void initDB()
		throws Exception
	{
//		if( web )
//		{
//			String url = DBConstants.LOCAL_URL;
//			String user = DBConstants.LOCAL_USER;
//			String pwd = DBConstants.LOCAL_PASSWORD;
//			DBManager localManager = new JDBCManager( url, user, pwd, 10, 8, 8, null );
//			Singleton.setInstance( DBConstants.LOCAL_DBMANAGER, localManager );
//		}
//		else
//		{
			Singleton.setInstance( DBConstants.LOCAL_DBMANAGER, Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ) );
//		}
		
		Insert.setDefaultKeyRetriever( PostgresqlAutoKeyRetriever.RETRIEVER );
		UnicodeChecker.setUseDoubleSlash( true );
	}
}
