List of usage examples for java.sql ResultSet CONCUR_READ_ONLY
int CONCUR_READ_ONLY
To view the source code for java.sql ResultSet CONCUR_READ_ONLY.
Click Source Link
ResultSet
object that may NOT be updated. From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AtomDefTable.java
public MSSBamAtomDefBuff readBuff(MSSBamAuthorization Authorization, MSSBamAnyObjPKey PKey) { final String S_ProcName = "readBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*from w ww. j a v a 2s .c o m*/ try { Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); String sql = S_sqlSelectAtomDefBuff + "WHERE " + "anyo.Id = " + Long.toString(Id) + " "; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); if (resultSet.next()) { MSSBamAtomDefBuff buff = unpackAtomDefResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-buff response, " + resultSet.getRow() + " rows selected"); } return (buff); } else { return (null); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AtomDefTable.java
public MSSBamAtomDefBuff[] readAllBuff(MSSBamAuthorization Authorization) { final String S_ProcName = "readAllBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*from w w w .j a va2 s . c o m*/ try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectAtomDefBuff + "WHERE " + "anyo.ClassCode = 'ATM' " + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamAtomDefBuff> buffList = new ArrayList<MSSBamAtomDefBuff>(); while (resultSet.next()) { MSSBamAtomDefBuff buff = unpackAtomDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamAtomDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AtomDefTable.java
public MSSBamAtomDefBuff readBuffByIdIdx(MSSBamAuthorization Authorization, long Id) { final String S_ProcName = "readBuffByIdIdx"; try {/*from www . j av a2s. co m*/ Connection cnx = schema.getCnx(); String sql = S_sqlSelectAtomDefBuff + "WHERE " + "anyo.Id = " + Long.toString(Id) + " "; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); if (resultSet.next()) { MSSBamAtomDefBuff buff = unpackAtomDefResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-buff response, " + resultSet.getRow() + " rows selected"); } return (buff); } else { return (null); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AtomDefTable.java
public MSSBamAtomDefBuff[] readBuffByTenantIdx(MSSBamAuthorization Authorization, long TenantId) { final String S_ProcName = "readBuffByTenantIdx"; try {//from w w w . j av a 2 s . co m Connection cnx = schema.getCnx(); String sql = S_sqlSelectAtomDefBuff + "WHERE " + "anyo.TenantId = " + Long.toString(TenantId) + " " + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamAtomDefBuff> buffList = new ArrayList<MSSBamAtomDefBuff>(); while (resultSet.next()) { MSSBamAtomDefBuff buff = unpackAtomDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamAtomDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AtomDefTable.java
public MSSBamAtomDefBuff[] readBuffByScopeIdx(MSSBamAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; try {// w ww. j a v a2 s . c o m Connection cnx = schema.getCnx(); String sql = S_sqlSelectAtomDefBuff + "WHERE " + ((ScopeId == null) ? "anyo.ScopeId is null " : "anyo.ScopeId = " + ScopeId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamAtomDefBuff> buffList = new ArrayList<MSSBamAtomDefBuff>(); while (resultSet.next()) { MSSBamAtomDefBuff buff = unpackAtomDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamAtomDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AtomDefTable.java
public MSSBamAtomDefBuff[] readBuffByAuthorIdx(MSSBamAuthorization Authorization, Long AuthorId) { final String S_ProcName = "readBuffByAuthorIdx"; try {/*from w ww.j av a 2s .c o m*/ Connection cnx = schema.getCnx(); String sql = S_sqlSelectAtomDefBuff + "WHERE " + ((AuthorId == null) ? "anyo.AuthorId is null " : "anyo.AuthorId = " + AuthorId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamAtomDefBuff> buffList = new ArrayList<MSSBamAtomDefBuff>(); while (resultSet.next()) { MSSBamAtomDefBuff buff = unpackAtomDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamAtomDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AtomDefTable.java
public MSSBamAtomDefBuff readBuffByUNameIdx(MSSBamAuthorization Authorization, Long ScopeId, String Name) { final String S_ProcName = "readBuffByUNameIdx"; try {/* ww w . ja va2 s . c o m*/ Connection cnx = schema.getCnx(); String sql = S_sqlSelectAtomDefBuff + "WHERE " + ((ScopeId == null) ? "anyo.ScopeId is null " : "anyo.ScopeId = " + ScopeId.toString() + " ") + "AND " + "anyo.Name = " + MSSBamPg8Schema.getQuotedString(Name) + " "; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); if (resultSet.next()) { MSSBamAtomDefBuff buff = unpackAtomDefResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-buff response, " + resultSet.getRow() + " rows selected"); } return (buff); } else { return (null); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AtomDefTable.java
public MSSBamAtomDefBuff[] readBuffByVContIdx(MSSBamAuthorization Authorization, long ValueContainerId) { final String S_ProcName = "readBuffByVContIdx"; try {//from w w w. ja v a2 s . c om Connection cnx = schema.getCnx(); String sql = S_sqlSelectAtomDefBuff + "WHERE " + "val.ValueContainerId = " + Long.toString(ValueContainerId) + " " + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamAtomDefBuff> buffList = new ArrayList<MSSBamAtomDefBuff>(); while (resultSet.next()) { MSSBamAtomDefBuff buff = unpackAtomDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamAtomDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AtomDefTable.java
public MSSBamAtomDefBuff[] readBuffByDataScopeIdx(MSSBamAuthorization Authorization, Short DataScopeId) { final String S_ProcName = "readBuffByDataScopeIdx"; try {//from w w w. j a v a 2 s . com Connection cnx = schema.getCnx(); String sql = S_sqlSelectAtomDefBuff + "WHERE " + ((DataScopeId == null) ? "val.DataScopeId is null " : "val.DataScopeId = " + DataScopeId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamAtomDefBuff> buffList = new ArrayList<MSSBamAtomDefBuff>(); while (resultSet.next()) { MSSBamAtomDefBuff buff = unpackAtomDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamAtomDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8AtomDefTable.java
public MSSBamAtomDefBuff[] readBuffByVAccSecIdx(MSSBamAuthorization Authorization, Short ViewAccessSecurityId) { final String S_ProcName = "readBuffByVAccSecIdx"; try {/*from ww w .ja va2 s . c o m*/ Connection cnx = schema.getCnx(); String sql = S_sqlSelectAtomDefBuff + "WHERE " + ((ViewAccessSecurityId == null) ? "val.ViewAccessSecurityId is null " : "val.ViewAccessSecurityId = " + ViewAccessSecurityId.toString() + " ") + "ORDER BY " + "anyo.Id ASC"; Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); List<MSSBamAtomDefBuff> buffList = new ArrayList<MSSBamAtomDefBuff>(); while (resultSet.next()) { MSSBamAtomDefBuff buff = unpackAtomDefResultSetToBuff(resultSet); buffList.add(buff); } return (buffList.toArray(new MSSBamAtomDefBuff[0])); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } }