Avoid deprecated methods

This commit is contained in:
Carlos Ruiz 2006-12-12 03:30:52 +00:00
parent 2f90dd736a
commit 1fe9575e43
4 changed files with 8 additions and 8 deletions

View File

@ -353,7 +353,7 @@ public class ImportAccount extends SvrProcess
+ "WHERE AD_Tree_ID=? AND Node_ID=?"; + "WHERE AD_Tree_ID=? AND Node_ID=?";
//begin e-evolution vpj-cd 15 nov 2005 PostgreSQL //begin e-evolution vpj-cd 15 nov 2005 PostgreSQL
//PreparedStatement updateStmt = DB.prepareStatement(updateSQL, get_TrxName()); //PreparedStatement updateStmt = DB.prepareStatement(updateSQL, get_TrxName());
PreparedStatement updateStmt = DB.prepareStatement(updateSQL, ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE); PreparedStatement updateStmt = DB.prepareStatement(updateSQL, ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE, get_TrxName());
//end //end
// //
while (rs.next()) while (rs.next())

View File

@ -82,7 +82,7 @@ public class M_Product_Category_Acct_Copy extends SvrProcess
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
try try
{ {
pstmt = DB.prepareStatement(sql); pstmt = DB.prepareStatement(sql, get_TrxName());
ResultSet rs = pstmt.executeQuery(); ResultSet rs = pstmt.executeQuery();
while (rs.next()) while (rs.next())
{ {
@ -102,7 +102,7 @@ public class M_Product_Category_Acct_Copy extends SvrProcess
+ "AND EXISTS (SELECT * FROM M_Product p " + "AND EXISTS (SELECT * FROM M_Product p "
+ "WHERE p.M_Product_ID=M_Product_Acct.M_Product_ID " + "WHERE p.M_Product_ID=M_Product_Acct.M_Product_ID "
+ "AND p.M_Product_Category_ID= " + rs.getInt("M_PRODUCT_CATEGORY_ID") + ")"; + "AND p.M_Product_Category_ID= " + rs.getInt("M_PRODUCT_CATEGORY_ID") + ")";
cntu = DB.executeUpdate(sqlupd); cntu = DB.executeUpdate(sqlupd, get_TrxName());
totu += cntu; totu += cntu;
// Insert new Products // Insert new Products
sqlins = "INSERT INTO M_Product_Acct " sqlins = "INSERT INTO M_Product_Acct "
@ -126,7 +126,7 @@ public class M_Product_Category_Acct_Copy extends SvrProcess
+ "AND NOT EXISTS (SELECT * FROM M_Product_Acct pa " + "AND NOT EXISTS (SELECT * FROM M_Product_Acct pa "
+ "WHERE pa.M_Product_ID=p.M_Product_ID " + "WHERE pa.M_Product_ID=p.M_Product_ID "
+ "AND pa.C_AcctSchema_ID=" + rs.getInt("C_ACCTSCHEMA_ID") + ")"; + "AND pa.C_AcctSchema_ID=" + rs.getInt("C_ACCTSCHEMA_ID") + ")";
cnti = DB.executeUpdate(sqlins); cnti = DB.executeUpdate(sqlins, get_TrxName());
toti += cnti; toti += cnti;
log.info("Product = " + cntu + " / " + cnti); log.info("Product = " + cntu + " / " + cnti);
} }

View File

@ -597,7 +597,7 @@ class DataSourceImpl implements DataSource {
} }
public void setMaxConnections(int arg0) { public void setMaxConnections(int arg0) {
impl.setMaxConnections(arg0); impl.setMaxPoolSize(arg0);
} }
public void setMaxIdleTime(int arg0) { public void setMaxIdleTime(int arg0) {

View File

@ -67,7 +67,7 @@ public class PostgresConvertTest
" 'ropa de cache para damas' FROM DUAL"); " 'ropa de cache para damas' FROM DUAL");
try try
{ {
PreparedStatement pstmt = DB.prepareStatement(sql.toString()); PreparedStatement pstmt = DB.prepareStatement(sql.toString(), null);
ResultSet rs = pstmt.executeQuery(); ResultSet rs = pstmt.executeQuery();
} }
catch(SQLException e) catch(SQLException e)