1 21 22 package org.opensubsystems.core.persist.db; 23 24 import java.sql.Connection ; 25 import java.sql.PreparedStatement ; 26 import java.sql.SQLException ; 27 28 import org.opensubsystems.core.error.OSSException; 29 30 76 public abstract class DatabaseReadMultipleOperation extends DatabaseReadOperation 77 { 78 80 86 public DatabaseReadMultipleOperation( 87 DatabaseFactoryImpl factory 88 ) 89 { 90 this(factory, null, null); 91 } 92 93 102 public DatabaseReadMultipleOperation( 103 DatabaseFactoryImpl factory, 104 String strQueryToPrepare, 105 DatabaseSchema schema 106 ) 107 { 108 super(factory, strQueryToPrepare, schema, factory.getDataType()); 109 } 110 111 113 127 protected PreparedStatement prepareQuery( 128 DatabaseFactoryImpl dbfactory, 129 Connection cntConnection, 130 String strQuery 131 ) throws OSSException, 132 SQLException 133 { 134 PreparedStatement pstmQuery = null; 135 136 if ((strQuery != null) && (strQuery.length() > 0)) 137 { 138 pstmQuery = cntConnection.prepareStatement(strQuery, 139 dbfactory.getTypeSelectListResultSet(), 140 dbfactory.getConcurrencySelectListResultSet()); 141 } 142 143 return pstmQuery; 144 } 145 } 146 | Popular Tags |