List of usage examples for java.sql CallableStatement getObject
Object getObject(String parameterName) throws SQLException;
Object
in the Java programming language. From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnModifierTable.java
public CFEnSyntaxEnModifierBuff[] readAllBuff(CFEnSyntaxAuthorization Authorization) { final String S_ProcName = "readAllBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }// ww w. j ava2s. c om ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadAllBuff = null; try { CFEnSyntaxEnModifierBuff buff = null; List<CFEnSyntaxEnModifierBuff> buffList = new LinkedList<CFEnSyntaxEnModifierBuff>(); stmtReadAllBuff = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".rd_enmodifall( ?, ?, ?, ?, ?, ? ) ); end;"); int argIdx = 1; stmtReadAllBuff.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadAllBuff.execute(); resultSet = (ResultSet) stmtReadAllBuff.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { buff = unpackEnModifierResultSetToBuff(resultSet); buffList.add(buff); } } catch (SQLException e) { // Oracle may return an invalid resultSet if the rowset is empty } } int idx = 0; CFEnSyntaxEnModifierBuff[] retBuff = new CFEnSyntaxEnModifierBuff[buffList.size()]; Iterator<CFEnSyntaxEnModifierBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadAllBuff != null) { try { stmtReadAllBuff.close(); } catch (SQLException e) { } stmtReadAllBuff = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnMorphemeTable.java
public CFEnSyntaxEnMorphemeBuff[] readAllBuff(CFEnSyntaxAuthorization Authorization) { final String S_ProcName = "readAllBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }// w w w.j av a 2s . co m ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadAllBuff = null; try { CFEnSyntaxEnMorphemeBuff buff = null; List<CFEnSyntaxEnMorphemeBuff> buffList = new LinkedList<CFEnSyntaxEnMorphemeBuff>(); stmtReadAllBuff = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".rd_enmorphall( ?, ?, ?, ?, ?, ? ) ); end;"); int argIdx = 1; stmtReadAllBuff.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadAllBuff.execute(); resultSet = (ResultSet) stmtReadAllBuff.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { buff = unpackEnMorphemeResultSetToBuff(resultSet); buffList.add(buff); } } catch (SQLException e) { // Oracle may return an invalid resultSet if the rowset is empty } } int idx = 0; CFEnSyntaxEnMorphemeBuff[] retBuff = new CFEnSyntaxEnMorphemeBuff[buffList.size()]; Iterator<CFEnSyntaxEnMorphemeBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadAllBuff != null) { try { stmtReadAllBuff.close(); } catch (SQLException e) { } stmtReadAllBuff = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleISOCountryTable.java
public CFEnSyntaxISOCountryBuff[] readAllBuff(CFEnSyntaxAuthorization Authorization) { final String S_ProcName = "readAllBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*from ww w. ja v a2s .com*/ ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadAllBuff = null; try { CFEnSyntaxISOCountryBuff buff = null; List<CFEnSyntaxISOCountryBuff> buffList = new LinkedList<CFEnSyntaxISOCountryBuff>(); stmtReadAllBuff = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".rd_iso_cntryall( ?, ?, ?, ?, ?, ? ) ); end;"); int argIdx = 1; stmtReadAllBuff.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadAllBuff.execute(); resultSet = (ResultSet) stmtReadAllBuff.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { buff = unpackISOCountryResultSetToBuff(resultSet); buffList.add(buff); } } catch (SQLException e) { // Oracle may return an invalid resultSet if the rowset is empty } } int idx = 0; CFEnSyntaxISOCountryBuff[] retBuff = new CFEnSyntaxISOCountryBuff[buffList.size()]; Iterator<CFEnSyntaxISOCountryBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadAllBuff != null) { try { stmtReadAllBuff.close(); } catch (SQLException e) { } stmtReadAllBuff = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnAuxiliaryTable.java
public CFEnSyntaxEnAuxiliaryBuff[] readAllBuff(CFEnSyntaxAuthorization Authorization) { final String S_ProcName = "readAllBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }// w ww . j a v a 2s . c o m ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadAllBuff = null; try { CFEnSyntaxEnAuxiliaryBuff buff = null; List<CFEnSyntaxEnAuxiliaryBuff> buffList = new LinkedList<CFEnSyntaxEnAuxiliaryBuff>(); stmtReadAllBuff = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".rd_enauxall( ?, ?, ?, ?, ?, ? ) ); end;"); int argIdx = 1; stmtReadAllBuff.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadAllBuff.execute(); resultSet = (ResultSet) stmtReadAllBuff.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { buff = unpackEnAuxiliaryResultSetToBuff(resultSet); buffList.add(buff); } } catch (SQLException e) { // Oracle may return an invalid resultSet if the rowset is empty } } int idx = 0; CFEnSyntaxEnAuxiliaryBuff[] retBuff = new CFEnSyntaxEnAuxiliaryBuff[buffList.size()]; Iterator<CFEnSyntaxEnAuxiliaryBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadAllBuff != null) { try { stmtReadAllBuff.close(); } catch (SQLException e) { } stmtReadAllBuff = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskOracle.CFAsteriskOracleTSecGroupTable.java
public CFSecurityTSecGroupBuff[] readAllBuff(CFSecurityAuthorization Authorization) { final String S_ProcName = "readAllBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }// w w w . j a v a 2s . c om ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadAllBuff = null; try { CFSecurityTSecGroupBuff buff = null; List<CFSecurityTSecGroupBuff> buffList = new LinkedList<CFSecurityTSecGroupBuff>(); stmtReadAllBuff = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".rd_tsecgrpall( ?, ?, ?, ?, ?, ? ) ); end;"); int argIdx = 1; stmtReadAllBuff.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadAllBuff.execute(); resultSet = (ResultSet) stmtReadAllBuff.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { buff = unpackTSecGroupResultSetToBuff(resultSet); buffList.add(buff); } } catch (SQLException e) { // Oracle may return an invalid resultSet if the rowset is empty } } int idx = 0; CFSecurityTSecGroupBuff[] retBuff = new CFSecurityTSecGroupBuff[buffList.size()]; Iterator<CFSecurityTSecGroupBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadAllBuff != null) { try { stmtReadAllBuff.close(); } catch (SQLException e) { } stmtReadAllBuff = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnDiscourseTable.java
public CFEnSyntaxEnDiscourseBuff[] readAllBuff(CFEnSyntaxAuthorization Authorization) { final String S_ProcName = "readAllBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/* w w w .ja v a 2s . c om*/ ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadAllBuff = null; try { CFEnSyntaxEnDiscourseBuff buff = null; List<CFEnSyntaxEnDiscourseBuff> buffList = new LinkedList<CFEnSyntaxEnDiscourseBuff>(); stmtReadAllBuff = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".rd_endiscall( ?, ?, ?, ?, ?, ? ) ); end;"); int argIdx = 1; stmtReadAllBuff.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadAllBuff.execute(); resultSet = (ResultSet) stmtReadAllBuff.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { buff = unpackEnDiscourseResultSetToBuff(resultSet); buffList.add(buff); } } catch (SQLException e) { // Oracle may return an invalid resultSet if the rowset is empty } } int idx = 0; CFEnSyntaxEnDiscourseBuff[] retBuff = new CFEnSyntaxEnDiscourseBuff[buffList.size()]; Iterator<CFEnSyntaxEnDiscourseBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadAllBuff != null) { try { stmtReadAllBuff.close(); } catch (SQLException e) { } stmtReadAllBuff = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnAdjectiveTable.java
public CFEnSyntaxEnAdjectiveBuff[] readAllBuff(CFEnSyntaxAuthorization Authorization) { final String S_ProcName = "readAllBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*from w w w . j av a 2s. com*/ ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadAllBuff = null; try { CFEnSyntaxEnAdjectiveBuff buff = null; List<CFEnSyntaxEnAdjectiveBuff> buffList = new LinkedList<CFEnSyntaxEnAdjectiveBuff>(); stmtReadAllBuff = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".rd_enadjecall( ?, ?, ?, ?, ?, ? ) ); end;"); int argIdx = 1; stmtReadAllBuff.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadAllBuff.execute(); resultSet = (ResultSet) stmtReadAllBuff.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { buff = unpackEnAdjectiveResultSetToBuff(resultSet); buffList.add(buff); } } catch (SQLException e) { // Oracle may return an invalid resultSet if the rowset is empty } } int idx = 0; CFEnSyntaxEnAdjectiveBuff[] retBuff = new CFEnSyntaxEnAdjectiveBuff[buffList.size()]; Iterator<CFEnSyntaxEnAdjectiveBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadAllBuff != null) { try { stmtReadAllBuff.close(); } catch (SQLException e) { } stmtReadAllBuff = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnAdverbialTable.java
public CFEnSyntaxEnAdverbialBuff[] readAllBuff(CFEnSyntaxAuthorization Authorization) { final String S_ProcName = "readAllBuff"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*w ww. j a v a2s. com*/ ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadAllBuff = null; try { CFEnSyntaxEnAdverbialBuff buff = null; List<CFEnSyntaxEnAdverbialBuff> buffList = new LinkedList<CFEnSyntaxEnAdverbialBuff>(); stmtReadAllBuff = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".rd_enadvblall( ?, ?, ?, ?, ?, ? ) ); end;"); int argIdx = 1; stmtReadAllBuff.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadAllBuff.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadAllBuff.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadAllBuff.execute(); resultSet = (ResultSet) stmtReadAllBuff.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { buff = unpackEnAdverbialResultSetToBuff(resultSet); buffList.add(buff); } } catch (SQLException e) { // Oracle may return an invalid resultSet if the rowset is empty } } int idx = 0; CFEnSyntaxEnAdverbialBuff[] retBuff = new CFEnSyntaxEnAdverbialBuff[buffList.size()]; Iterator<CFEnSyntaxEnAdverbialBuff> iter = buffList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadAllBuff != null) { try { stmtReadAllBuff.close(); } catch (SQLException e) { } stmtReadAllBuff = null; } } }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleURLProtocolTable.java
public CFAccURLProtocolBuff readBuffByIdIdx(CFAccAuthorization Authorization, short URLProtocolId) { final String S_ProcName = "readBuffByIdIdx"; ResultSet resultSet = null;/*w w w.ja v a2s . c o m*/ Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByIdIdx = null; try { stmtReadBuffByIdIdx = cnx.prepareCall("begin " + schema.getLowerSchemaDbName() + ".rd_urlprotobyididx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByIdIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByIdIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByIdIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByIdIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByIdIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByIdIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadBuffByIdIdx.setShort(argIdx++, URLProtocolId); stmtReadBuffByIdIdx.execute(); resultSet = (ResultSet) stmtReadBuffByIdIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFAccURLProtocolBuff buff = unpackURLProtocolResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } return (buff); } else { return (null); } } catch (SQLException e) { return (null); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadBuffByIdIdx != null) { try { stmtReadBuffByIdIdx.close(); } catch (SQLException e) { } stmtReadBuffByIdIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstOracle.CFAstOracleURLProtocolTable.java
public CFAstURLProtocolBuff readBuffByIdIdx(CFAstAuthorization Authorization, short URLProtocolId) { final String S_ProcName = "readBuffByIdIdx"; ResultSet resultSet = null;// w w w . j a v a 2 s . com Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByIdIdx = null; try { stmtReadBuffByIdIdx = cnx.prepareCall("begin " + schema.getLowerSchemaDbName() + ".rd_urlprotobyididx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByIdIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByIdIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByIdIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByIdIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByIdIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByIdIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadBuffByIdIdx.setShort(argIdx++, URLProtocolId); stmtReadBuffByIdIdx.execute(); resultSet = (ResultSet) stmtReadBuffByIdIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFAstURLProtocolBuff buff = unpackURLProtocolResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } return (buff); } else { return (null); } } catch (SQLException e) { return (null); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadBuffByIdIdx != null) { try { stmtReadBuffByIdIdx.close(); } catch (SQLException e) { } stmtReadBuffByIdIdx = null; } } }