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.CFEnSyntaxOracleEnDiscourseTable.java
public void createEnDiscourse(CFEnSyntaxAuthorization Authorization, CFEnSyntaxEnDiscourseBuff Buff) { final String S_ProcName = "createEnDiscourse"; ResultSet resultSet = null;//from ww w. j av a 2 s . c o m CallableStatement stmtCreateByPKey = null; try { String ClassCode = Buff.getClassCode(); Long ScopeId = Buff.getOptionalScopeId(); String Name = Buff.getRequiredName(); Connection cnx = schema.getCnx(); stmtCreateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".crt_endisc( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtCreateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, ClassCode); if (ScopeId != null) { stmtCreateByPKey.setLong(argIdx++, ScopeId.longValue()); } else { stmtCreateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtCreateByPKey.setString(argIdx++, Name); stmtCreateByPKey.execute(); resultSet = (ResultSet) stmtCreateByPKey.getObject(1); if (resultSet == null) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_endisc() did not return a result set"); } try { if (resultSet.next()) { CFEnSyntaxEnDiscourseBuff createdBuff = unpackEnDiscourseResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredId(createdBuff.getRequiredId()); Buff.setOptionalScopeId(createdBuff.getOptionalScopeId()); Buff.setRequiredName(createdBuff.getRequiredName()); Buff.setRequiredRevision(createdBuff.getRequiredRevision()); } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected a single-record response, " + resultSet.getRow() + " rows selected"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_endisc() did not return a valid result set"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtCreateByPKey != null) { try { stmtCreateByPKey.close(); } catch (SQLException e) { } stmtCreateByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnAdjectiveTable.java
public void createEnAdjective(CFEnSyntaxAuthorization Authorization, CFEnSyntaxEnAdjectiveBuff Buff) { final String S_ProcName = "createEnAdjective"; ResultSet resultSet = null;//w w w . ja v a2 s . c o m CallableStatement stmtCreateByPKey = null; try { String ClassCode = Buff.getClassCode(); Long ScopeId = Buff.getOptionalScopeId(); String Name = Buff.getRequiredName(); Connection cnx = schema.getCnx(); stmtCreateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".crt_enadjec( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtCreateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, ClassCode); if (ScopeId != null) { stmtCreateByPKey.setLong(argIdx++, ScopeId.longValue()); } else { stmtCreateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtCreateByPKey.setString(argIdx++, Name); stmtCreateByPKey.execute(); resultSet = (ResultSet) stmtCreateByPKey.getObject(1); if (resultSet == null) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_enadjec() did not return a result set"); } try { if (resultSet.next()) { CFEnSyntaxEnAdjectiveBuff createdBuff = unpackEnAdjectiveResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredId(createdBuff.getRequiredId()); Buff.setOptionalScopeId(createdBuff.getOptionalScopeId()); Buff.setRequiredName(createdBuff.getRequiredName()); Buff.setRequiredRevision(createdBuff.getRequiredRevision()); } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected a single-record response, " + resultSet.getRow() + " rows selected"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_enadjec() did not return a valid result set"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtCreateByPKey != null) { try { stmtCreateByPKey.close(); } catch (SQLException e) { } stmtCreateByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnAdverbialTable.java
public void createEnAdverbial(CFEnSyntaxAuthorization Authorization, CFEnSyntaxEnAdverbialBuff Buff) { final String S_ProcName = "createEnAdverbial"; ResultSet resultSet = null;//from www . j a v a2s. c o m CallableStatement stmtCreateByPKey = null; try { String ClassCode = Buff.getClassCode(); Long ScopeId = Buff.getOptionalScopeId(); String Name = Buff.getRequiredName(); Connection cnx = schema.getCnx(); stmtCreateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".crt_enadvbl( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtCreateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, ClassCode); if (ScopeId != null) { stmtCreateByPKey.setLong(argIdx++, ScopeId.longValue()); } else { stmtCreateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtCreateByPKey.setString(argIdx++, Name); stmtCreateByPKey.execute(); resultSet = (ResultSet) stmtCreateByPKey.getObject(1); if (resultSet == null) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_enadvbl() did not return a result set"); } try { if (resultSet.next()) { CFEnSyntaxEnAdverbialBuff createdBuff = unpackEnAdverbialResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredId(createdBuff.getRequiredId()); Buff.setOptionalScopeId(createdBuff.getOptionalScopeId()); Buff.setRequiredName(createdBuff.getRequiredName()); Buff.setRequiredRevision(createdBuff.getRequiredRevision()); } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected a single-record response, " + resultSet.getRow() + " rows selected"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_enadvbl() did not return a valid result set"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtCreateByPKey != null) { try { stmtCreateByPKey.close(); } catch (SQLException e) { } stmtCreateByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxMySql.CFEnSyntaxMySqlEnPrepositionTable.java
public void createEnPreposition(CFEnSyntaxAuthorization Authorization, CFEnSyntaxEnPrepositionBuff Buff) { final String S_ProcName = "createEnPreposition"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/* ww w . j a v a 2 s . c o m*/ ResultSet resultSet = null; try { String ClassCode = Buff.getClassCode(); Long ScopeId = Buff.getOptionalScopeId(); String Name = Buff.getRequiredName(); Connection cnx = schema.getCnx(); String sql = "call " + schema.getLowerDbSchemaName() + ".sp_create_enprep( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " )"; if (stmtCreateByPKey == null) { stmtCreateByPKey = cnx.prepareStatement(sql); } int argIdx = 1; stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, ClassCode); if (ScopeId != null) { stmtCreateByPKey.setLong(argIdx++, ScopeId.longValue()); } else { stmtCreateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtCreateByPKey.setString(argIdx++, Name); try { resultSet = stmtCreateByPKey.executeQuery(); } catch (SQLException e) { if (e.getErrorCode() != 1329) { throw e; } resultSet = null; } if ((resultSet != null) && resultSet.next()) { CFEnSyntaxEnPrepositionBuff createdBuff = unpackEnPrepositionResultSetToBuff(resultSet); if ((resultSet != null) && resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredId(createdBuff.getRequiredId()); Buff.setOptionalScopeId(createdBuff.getOptionalScopeId()); Buff.setRequiredName(createdBuff.getRequiredName()); Buff.setRequiredRevision(createdBuff.getRequiredRevision()); } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected a single-record response, " + resultSet.getRow() + " rows selected"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxMySql.CFEnSyntaxMySqlEnIntensifierTable.java
public void createEnIntensifier(CFEnSyntaxAuthorization Authorization, CFEnSyntaxEnIntensifierBuff Buff) { final String S_ProcName = "createEnIntensifier"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }//from w ww . j a va 2 s .c o m ResultSet resultSet = null; try { String ClassCode = Buff.getClassCode(); Long ScopeId = Buff.getOptionalScopeId(); String Name = Buff.getRequiredName(); Connection cnx = schema.getCnx(); String sql = "call " + schema.getLowerDbSchemaName() + ".sp_create_enintens( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " )"; if (stmtCreateByPKey == null) { stmtCreateByPKey = cnx.prepareStatement(sql); } int argIdx = 1; stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, ClassCode); if (ScopeId != null) { stmtCreateByPKey.setLong(argIdx++, ScopeId.longValue()); } else { stmtCreateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtCreateByPKey.setString(argIdx++, Name); try { resultSet = stmtCreateByPKey.executeQuery(); } catch (SQLException e) { if (e.getErrorCode() != 1329) { throw e; } resultSet = null; } if ((resultSet != null) && resultSet.next()) { CFEnSyntaxEnIntensifierBuff createdBuff = unpackEnIntensifierResultSetToBuff(resultSet); if ((resultSet != null) && resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredId(createdBuff.getRequiredId()); Buff.setOptionalScopeId(createdBuff.getOptionalScopeId()); Buff.setRequiredName(createdBuff.getRequiredName()); Buff.setRequiredRevision(createdBuff.getRequiredRevision()); } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected a single-record response, " + resultSet.getRow() + " rows selected"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnConnectiveTable.java
public void createEnConnective(CFEnSyntaxAuthorization Authorization, CFEnSyntaxEnConnectiveBuff Buff) { final String S_ProcName = "createEnConnective"; ResultSet resultSet = null;/*from w w w . jav a 2s .c o m*/ CallableStatement stmtCreateByPKey = null; try { String ClassCode = Buff.getClassCode(); Long ScopeId = Buff.getOptionalScopeId(); String Name = Buff.getRequiredName(); Connection cnx = schema.getCnx(); stmtCreateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".crt_enconn( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtCreateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, ClassCode); if (ScopeId != null) { stmtCreateByPKey.setLong(argIdx++, ScopeId.longValue()); } else { stmtCreateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtCreateByPKey.setString(argIdx++, Name); stmtCreateByPKey.execute(); resultSet = (ResultSet) stmtCreateByPKey.getObject(1); if (resultSet == null) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_enconn() did not return a result set"); } try { if (resultSet.next()) { CFEnSyntaxEnConnectiveBuff createdBuff = unpackEnConnectiveResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredId(createdBuff.getRequiredId()); Buff.setOptionalScopeId(createdBuff.getOptionalScopeId()); Buff.setRequiredName(createdBuff.getRequiredName()); Buff.setRequiredRevision(createdBuff.getRequiredRevision()); } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected a single-record response, " + resultSet.getRow() + " rows selected"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_enconn() did not return a valid result set"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtCreateByPKey != null) { try { stmtCreateByPKey.close(); } catch (SQLException e) { } stmtCreateByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnComplementTable.java
public void createEnComplement(CFEnSyntaxAuthorization Authorization, CFEnSyntaxEnComplementBuff Buff) { final String S_ProcName = "createEnComplement"; ResultSet resultSet = null;//from w w w .j a v a 2 s. co m CallableStatement stmtCreateByPKey = null; try { String ClassCode = Buff.getClassCode(); Long ScopeId = Buff.getOptionalScopeId(); String Name = Buff.getRequiredName(); Connection cnx = schema.getCnx(); stmtCreateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".crt_encompl( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtCreateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, ClassCode); if (ScopeId != null) { stmtCreateByPKey.setLong(argIdx++, ScopeId.longValue()); } else { stmtCreateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtCreateByPKey.setString(argIdx++, Name); stmtCreateByPKey.execute(); resultSet = (ResultSet) stmtCreateByPKey.getObject(1); if (resultSet == null) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_encompl() did not return a result set"); } try { if (resultSet.next()) { CFEnSyntaxEnComplementBuff createdBuff = unpackEnComplementResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredId(createdBuff.getRequiredId()); Buff.setOptionalScopeId(createdBuff.getOptionalScopeId()); Buff.setRequiredName(createdBuff.getRequiredName()); Buff.setRequiredRevision(createdBuff.getRequiredRevision()); } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected a single-record response, " + resultSet.getRow() + " rows selected"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_encompl() did not return a valid result set"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtCreateByPKey != null) { try { stmtCreateByPKey.close(); } catch (SQLException e) { } stmtCreateByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnDeterminerTable.java
public void createEnDeterminer(CFEnSyntaxAuthorization Authorization, CFEnSyntaxEnDeterminerBuff Buff) { final String S_ProcName = "createEnDeterminer"; ResultSet resultSet = null;/* ww w . j a v a 2s . c om*/ CallableStatement stmtCreateByPKey = null; try { String ClassCode = Buff.getClassCode(); Long ScopeId = Buff.getOptionalScopeId(); String Name = Buff.getRequiredName(); Connection cnx = schema.getCnx(); stmtCreateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".crt_endeter( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtCreateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, ClassCode); if (ScopeId != null) { stmtCreateByPKey.setLong(argIdx++, ScopeId.longValue()); } else { stmtCreateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtCreateByPKey.setString(argIdx++, Name); stmtCreateByPKey.execute(); resultSet = (ResultSet) stmtCreateByPKey.getObject(1); if (resultSet == null) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_endeter() did not return a result set"); } try { if (resultSet.next()) { CFEnSyntaxEnDeterminerBuff createdBuff = unpackEnDeterminerResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredId(createdBuff.getRequiredId()); Buff.setOptionalScopeId(createdBuff.getOptionalScopeId()); Buff.setRequiredName(createdBuff.getRequiredName()); Buff.setRequiredRevision(createdBuff.getRequiredRevision()); } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected a single-record response, " + resultSet.getRow() + " rows selected"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_endeter() did not return a valid result set"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtCreateByPKey != null) { try { stmtCreateByPKey.close(); } catch (SQLException e) { } stmtCreateByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnPrepositionTable.java
public void createEnPreposition(CFEnSyntaxAuthorization Authorization, CFEnSyntaxEnPrepositionBuff Buff) { final String S_ProcName = "createEnPreposition"; ResultSet resultSet = null;//from w ww .ja v a2 s .c om CallableStatement stmtCreateByPKey = null; try { String ClassCode = Buff.getClassCode(); Long ScopeId = Buff.getOptionalScopeId(); String Name = Buff.getRequiredName(); Connection cnx = schema.getCnx(); stmtCreateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".crt_enprep( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtCreateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, ClassCode); if (ScopeId != null) { stmtCreateByPKey.setLong(argIdx++, ScopeId.longValue()); } else { stmtCreateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtCreateByPKey.setString(argIdx++, Name); stmtCreateByPKey.execute(); resultSet = (ResultSet) stmtCreateByPKey.getObject(1); if (resultSet == null) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_enprep() did not return a result set"); } try { if (resultSet.next()) { CFEnSyntaxEnPrepositionBuff createdBuff = unpackEnPrepositionResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredId(createdBuff.getRequiredId()); Buff.setOptionalScopeId(createdBuff.getOptionalScopeId()); Buff.setRequiredName(createdBuff.getRequiredName()); Buff.setRequiredRevision(createdBuff.getRequiredRevision()); } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected a single-record response, " + resultSet.getRow() + " rows selected"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_enprep() did not return a valid result set"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtCreateByPKey != null) { try { stmtCreateByPKey.close(); } catch (SQLException e) { } stmtCreateByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnIntensifierTable.java
public void createEnIntensifier(CFEnSyntaxAuthorization Authorization, CFEnSyntaxEnIntensifierBuff Buff) { final String S_ProcName = "createEnIntensifier"; ResultSet resultSet = null;/* w w w . j a va2 s . c o m*/ CallableStatement stmtCreateByPKey = null; try { String ClassCode = Buff.getClassCode(); Long ScopeId = Buff.getOptionalScopeId(); String Name = Buff.getRequiredName(); Connection cnx = schema.getCnx(); stmtCreateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".crt_enintens( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtCreateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtCreateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtCreateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtCreateByPKey.setString(argIdx++, ClassCode); if (ScopeId != null) { stmtCreateByPKey.setLong(argIdx++, ScopeId.longValue()); } else { stmtCreateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtCreateByPKey.setString(argIdx++, Name); stmtCreateByPKey.execute(); resultSet = (ResultSet) stmtCreateByPKey.getObject(1); if (resultSet == null) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_enintens() did not return a result set"); } try { if (resultSet.next()) { CFEnSyntaxEnIntensifierBuff createdBuff = unpackEnIntensifierResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredId(createdBuff.getRequiredId()); Buff.setOptionalScopeId(createdBuff.getOptionalScopeId()); Buff.setRequiredName(createdBuff.getRequiredName()); Buff.setRequiredRevision(createdBuff.getRequiredRevision()); } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected a single-record response, " + resultSet.getRow() + " rows selected"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "crt_enintens() did not return a valid result set"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtCreateByPKey != null) { try { stmtCreateByPKey.close(); } catch (SQLException e) { } stmtCreateByPKey = null; } } }