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.CFEnSyntaxOracleEnObjectTable.java
public CFEnSyntaxEnObjectBuff[] readBuffByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; ResultSet resultSet = null;/*from www. j a va 2 s .c o m*/ Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByScopeIdx = null; List<CFEnSyntaxEnObjectBuff> buffList = new LinkedList<CFEnSyntaxEnObjectBuff>(); try { stmtReadBuffByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enobjbyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByScopeIdx.execute(); resultSet = (ResultSet) stmtReadBuffByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { CFEnSyntaxEnObjectBuff buff = unpackEnObjectResultSetToBuff(resultSet); buffList.add(buff); } try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } catch (SQLException e) { } } int idx = 0; CFEnSyntaxEnObjectBuff[] retBuff = new CFEnSyntaxEnObjectBuff[buffList.size()]; Iterator<CFEnSyntaxEnObjectBuff> 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 (stmtReadBuffByScopeIdx != null) { try { stmtReadBuffByScopeIdx.close(); } catch (SQLException e) { } stmtReadBuffByScopeIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnClauseTable.java
public CFEnSyntaxEnClauseBuff[] readBuffByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; ResultSet resultSet = null;//ww w.j av a 2s . c o m Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByScopeIdx = null; List<CFEnSyntaxEnClauseBuff> buffList = new LinkedList<CFEnSyntaxEnClauseBuff>(); try { stmtReadBuffByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enclausebyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByScopeIdx.execute(); resultSet = (ResultSet) stmtReadBuffByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { CFEnSyntaxEnClauseBuff buff = unpackEnClauseResultSetToBuff(resultSet); buffList.add(buff); } try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } catch (SQLException e) { } } int idx = 0; CFEnSyntaxEnClauseBuff[] retBuff = new CFEnSyntaxEnClauseBuff[buffList.size()]; Iterator<CFEnSyntaxEnClauseBuff> 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 (stmtReadBuffByScopeIdx != null) { try { stmtReadBuffByScopeIdx.close(); } catch (SQLException e) { } stmtReadBuffByScopeIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnPhraseTable.java
public CFEnSyntaxEnPhraseBuff[] readBuffByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; ResultSet resultSet = null;/*from w w w.jav a2 s . c o m*/ Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByScopeIdx = null; List<CFEnSyntaxEnPhraseBuff> buffList = new LinkedList<CFEnSyntaxEnPhraseBuff>(); try { stmtReadBuffByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enphrasebyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByScopeIdx.execute(); resultSet = (ResultSet) stmtReadBuffByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { CFEnSyntaxEnPhraseBuff buff = unpackEnPhraseResultSetToBuff(resultSet); buffList.add(buff); } try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } catch (SQLException e) { } } int idx = 0; CFEnSyntaxEnPhraseBuff[] retBuff = new CFEnSyntaxEnPhraseBuff[buffList.size()]; Iterator<CFEnSyntaxEnPhraseBuff> 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 (stmtReadBuffByScopeIdx != null) { try { stmtReadBuffByScopeIdx.close(); } catch (SQLException e) { } stmtReadBuffByScopeIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnSubjectTable.java
public CFEnSyntaxEnSubjectBuff[] readBuffByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; ResultSet resultSet = null;// w w w . j a v a 2 s . c o m Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByScopeIdx = null; List<CFEnSyntaxEnSubjectBuff> buffList = new LinkedList<CFEnSyntaxEnSubjectBuff>(); try { stmtReadBuffByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_ensubjbyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByScopeIdx.execute(); resultSet = (ResultSet) stmtReadBuffByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { CFEnSyntaxEnSubjectBuff buff = unpackEnSubjectResultSetToBuff(resultSet); buffList.add(buff); } try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } catch (SQLException e) { } } int idx = 0; CFEnSyntaxEnSubjectBuff[] retBuff = new CFEnSyntaxEnSubjectBuff[buffList.size()]; Iterator<CFEnSyntaxEnSubjectBuff> 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 (stmtReadBuffByScopeIdx != null) { try { stmtReadBuffByScopeIdx.close(); } catch (SQLException e) { } stmtReadBuffByScopeIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnSentenceTable.java
public CFEnSyntaxEnSentenceBuff[] readBuffByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; ResultSet resultSet = null;/*www . ja v a2s .c o m*/ Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByScopeIdx = null; List<CFEnSyntaxEnSentenceBuff> buffList = new LinkedList<CFEnSyntaxEnSentenceBuff>(); try { stmtReadBuffByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_ensentbyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByScopeIdx.execute(); resultSet = (ResultSet) stmtReadBuffByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { CFEnSyntaxEnSentenceBuff buff = unpackEnSentenceResultSetToBuff(resultSet); buffList.add(buff); } try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } catch (SQLException e) { } } int idx = 0; CFEnSyntaxEnSentenceBuff[] retBuff = new CFEnSyntaxEnSentenceBuff[buffList.size()]; Iterator<CFEnSyntaxEnSentenceBuff> 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 (stmtReadBuffByScopeIdx != null) { try { stmtReadBuffByScopeIdx.close(); } catch (SQLException e) { } stmtReadBuffByScopeIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnModifierTable.java
public CFEnSyntaxEnModifierBuff[] readBuffByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; ResultSet resultSet = null;/*from w w w . ja v a 2 s. com*/ Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByScopeIdx = null; List<CFEnSyntaxEnModifierBuff> buffList = new LinkedList<CFEnSyntaxEnModifierBuff>(); try { stmtReadBuffByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enmodifbyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByScopeIdx.execute(); resultSet = (ResultSet) stmtReadBuffByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { CFEnSyntaxEnModifierBuff buff = unpackEnModifierResultSetToBuff(resultSet); buffList.add(buff); } try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } catch (SQLException e) { } } 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 (stmtReadBuffByScopeIdx != null) { try { stmtReadBuffByScopeIdx.close(); } catch (SQLException e) { } stmtReadBuffByScopeIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnMorphemeTable.java
public CFEnSyntaxEnMorphemeBuff[] readBuffByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; ResultSet resultSet = null;//w w w . ja va 2 s . co m Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByScopeIdx = null; List<CFEnSyntaxEnMorphemeBuff> buffList = new LinkedList<CFEnSyntaxEnMorphemeBuff>(); try { stmtReadBuffByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enmorphbyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByScopeIdx.execute(); resultSet = (ResultSet) stmtReadBuffByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { CFEnSyntaxEnMorphemeBuff buff = unpackEnMorphemeResultSetToBuff(resultSet); buffList.add(buff); } try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } catch (SQLException e) { } } 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 (stmtReadBuffByScopeIdx != null) { try { stmtReadBuffByScopeIdx.close(); } catch (SQLException e) { } stmtReadBuffByScopeIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnAuxiliaryTable.java
public CFEnSyntaxEnAuxiliaryBuff[] readBuffByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; ResultSet resultSet = null;//w w w . jav a 2s. com Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByScopeIdx = null; List<CFEnSyntaxEnAuxiliaryBuff> buffList = new LinkedList<CFEnSyntaxEnAuxiliaryBuff>(); try { stmtReadBuffByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enauxbyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByScopeIdx.execute(); resultSet = (ResultSet) stmtReadBuffByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { CFEnSyntaxEnAuxiliaryBuff buff = unpackEnAuxiliaryResultSetToBuff(resultSet); buffList.add(buff); } try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } catch (SQLException e) { } } 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 (stmtReadBuffByScopeIdx != null) { try { stmtReadBuffByScopeIdx.close(); } catch (SQLException e) { } stmtReadBuffByScopeIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnDiscourseTable.java
public CFEnSyntaxEnDiscourseBuff[] readBuffByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; ResultSet resultSet = null;// ww w . ja v a 2 s . co m Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByScopeIdx = null; List<CFEnSyntaxEnDiscourseBuff> buffList = new LinkedList<CFEnSyntaxEnDiscourseBuff>(); try { stmtReadBuffByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_endiscbyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByScopeIdx.execute(); resultSet = (ResultSet) stmtReadBuffByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { CFEnSyntaxEnDiscourseBuff buff = unpackEnDiscourseResultSetToBuff(resultSet); buffList.add(buff); } try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } catch (SQLException e) { } } 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 (stmtReadBuffByScopeIdx != null) { try { stmtReadBuffByScopeIdx.close(); } catch (SQLException e) { } stmtReadBuffByScopeIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnAdjectiveTable.java
public CFEnSyntaxEnAdjectiveBuff[] readBuffByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readBuffByScopeIdx"; ResultSet resultSet = null;//from w w w .j ava 2 s . c om Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByScopeIdx = null; List<CFEnSyntaxEnAdjectiveBuff> buffList = new LinkedList<CFEnSyntaxEnAdjectiveBuff>(); try { stmtReadBuffByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enadjecbyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadBuffByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadBuffByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadBuffByScopeIdx.execute(); resultSet = (ResultSet) stmtReadBuffByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { CFEnSyntaxEnAdjectiveBuff buff = unpackEnAdjectiveResultSetToBuff(resultSet); buffList.add(buff); } try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } catch (SQLException e) { } } 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 (stmtReadBuffByScopeIdx != null) { try { stmtReadBuffByScopeIdx.close(); } catch (SQLException e) { } stmtReadBuffByScopeIdx = null; } } }