List of usage examples for java.sql Types BIGINT
int BIGINT
To view the source code for java.sql Types BIGINT.
Click Source Link
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIGINT
.
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnMorphemeTable.java
public CFEnSyntaxEnMorphemeBuff readBuffByUNameIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId, String Name) {//from w w w .ja v a2 s . co m final String S_ProcName = "readBuffByUNameIdx"; ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUNameIdx = null; try { stmtReadBuffByUNameIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enmorphbyunameidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUNameIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByUNameIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByUNameIdx.setString(argIdx++, Name); stmtReadBuffByUNameIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUNameIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFEnSyntaxEnMorphemeBuff buff = unpackEnMorphemeResultSetToBuff(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 (stmtReadBuffByUNameIdx != null) { try { stmtReadBuffByUNameIdx.close(); } catch (SQLException e) { } stmtReadBuffByUNameIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnAuxiliaryTable.java
public CFEnSyntaxEnAuxiliaryBuff readBuffByUNameIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId, String Name) {/*from ww w . j av a 2s .c o m*/ final String S_ProcName = "readBuffByUNameIdx"; ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUNameIdx = null; try { stmtReadBuffByUNameIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enauxbyunameidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUNameIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByUNameIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByUNameIdx.setString(argIdx++, Name); stmtReadBuffByUNameIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUNameIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFEnSyntaxEnAuxiliaryBuff buff = unpackEnAuxiliaryResultSetToBuff(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 (stmtReadBuffByUNameIdx != null) { try { stmtReadBuffByUNameIdx.close(); } catch (SQLException e) { } stmtReadBuffByUNameIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnDiscourseTable.java
public CFEnSyntaxEnDiscourseBuff readBuffByUNameIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId, String Name) {/*from www.j av a2s . co m*/ final String S_ProcName = "readBuffByUNameIdx"; ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUNameIdx = null; try { stmtReadBuffByUNameIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_endiscbyunameidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUNameIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByUNameIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByUNameIdx.setString(argIdx++, Name); stmtReadBuffByUNameIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUNameIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFEnSyntaxEnDiscourseBuff buff = unpackEnDiscourseResultSetToBuff(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 (stmtReadBuffByUNameIdx != null) { try { stmtReadBuffByUNameIdx.close(); } catch (SQLException e) { } stmtReadBuffByUNameIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnAdjectiveTable.java
public CFEnSyntaxEnAdjectiveBuff readBuffByUNameIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId, String Name) {//from ww w . j ava2 s . co m final String S_ProcName = "readBuffByUNameIdx"; ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUNameIdx = null; try { stmtReadBuffByUNameIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enadjecbyunameidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUNameIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByUNameIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByUNameIdx.setString(argIdx++, Name); stmtReadBuffByUNameIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUNameIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFEnSyntaxEnAdjectiveBuff buff = unpackEnAdjectiveResultSetToBuff(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 (stmtReadBuffByUNameIdx != null) { try { stmtReadBuffByUNameIdx.close(); } catch (SQLException e) { } stmtReadBuffByUNameIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnAdverbialTable.java
public CFEnSyntaxEnAdverbialBuff readBuffByUNameIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId, String Name) {/* w w w. java2 s. c o m*/ final String S_ProcName = "readBuffByUNameIdx"; ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUNameIdx = null; try { stmtReadBuffByUNameIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enadvblbyunameidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUNameIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByUNameIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByUNameIdx.setString(argIdx++, Name); stmtReadBuffByUNameIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUNameIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFEnSyntaxEnAdverbialBuff buff = unpackEnAdverbialResultSetToBuff(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 (stmtReadBuffByUNameIdx != null) { try { stmtReadBuffByUNameIdx.close(); } catch (SQLException e) { } stmtReadBuffByUNameIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnConnectiveTable.java
public CFEnSyntaxEnConnectiveBuff readBuffByUNameIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId, String Name) {/*ww w. ja v a2 s . com*/ final String S_ProcName = "readBuffByUNameIdx"; ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUNameIdx = null; try { stmtReadBuffByUNameIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enconnbyunameidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUNameIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByUNameIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByUNameIdx.setString(argIdx++, Name); stmtReadBuffByUNameIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUNameIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFEnSyntaxEnConnectiveBuff buff = unpackEnConnectiveResultSetToBuff(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 (stmtReadBuffByUNameIdx != null) { try { stmtReadBuffByUNameIdx.close(); } catch (SQLException e) { } stmtReadBuffByUNameIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnComplementTable.java
public CFEnSyntaxEnComplementBuff readBuffByUNameIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId, String Name) {//from w w w .j ava 2 s .com final String S_ProcName = "readBuffByUNameIdx"; ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUNameIdx = null; try { stmtReadBuffByUNameIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_encomplbyunameidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUNameIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByUNameIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByUNameIdx.setString(argIdx++, Name); stmtReadBuffByUNameIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUNameIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFEnSyntaxEnComplementBuff buff = unpackEnComplementResultSetToBuff(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 (stmtReadBuffByUNameIdx != null) { try { stmtReadBuffByUNameIdx.close(); } catch (SQLException e) { } stmtReadBuffByUNameIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnDeterminerTable.java
public CFEnSyntaxEnDeterminerBuff readBuffByUNameIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId, String Name) {/*ww w . ja v a 2 s . c o m*/ final String S_ProcName = "readBuffByUNameIdx"; ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUNameIdx = null; try { stmtReadBuffByUNameIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_endeterbyunameidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUNameIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByUNameIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByUNameIdx.setString(argIdx++, Name); stmtReadBuffByUNameIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUNameIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFEnSyntaxEnDeterminerBuff buff = unpackEnDeterminerResultSetToBuff(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 (stmtReadBuffByUNameIdx != null) { try { stmtReadBuffByUNameIdx.close(); } catch (SQLException e) { } stmtReadBuffByUNameIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnPrepositionTable.java
public CFEnSyntaxEnPrepositionBuff readBuffByUNameIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId, String Name) {//from ww w. ja v a 2s .co m final String S_ProcName = "readBuffByUNameIdx"; ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUNameIdx = null; try { stmtReadBuffByUNameIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enprepbyunameidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUNameIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByUNameIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByUNameIdx.setString(argIdx++, Name); stmtReadBuffByUNameIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUNameIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFEnSyntaxEnPrepositionBuff buff = unpackEnPrepositionResultSetToBuff(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 (stmtReadBuffByUNameIdx != null) { try { stmtReadBuffByUNameIdx.close(); } catch (SQLException e) { } stmtReadBuffByUNameIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnIntensifierTable.java
public CFEnSyntaxEnIntensifierBuff readBuffByUNameIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId, String Name) {//from w w w . j av a 2s.c o m final String S_ProcName = "readBuffByUNameIdx"; ResultSet resultSet = null; Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUNameIdx = null; try { stmtReadBuffByUNameIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enintensbyunameidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUNameIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByUNameIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByUNameIdx.setString(argIdx++, Name); stmtReadBuffByUNameIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUNameIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFEnSyntaxEnIntensifierBuff buff = unpackEnIntensifierResultSetToBuff(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 (stmtReadBuffByUNameIdx != null) { try { stmtReadBuffByUNameIdx.close(); } catch (SQLException e) { } stmtReadBuffByUNameIdx = null; } } }