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.CFEnSyntaxMySql.CFEnSyntaxMySqlEnPrepositionTable.java
public void deleteEnPrepositionByUNameIdx(CFEnSyntaxAuthorization Authorization, Long argScopeId, String argName) {/*from ww w. j a v a 2s.co m*/ final String S_ProcName = "deleteEnPrepositionByUNameIdx"; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "call " + schema.getLowerDbSchemaName() + ".sp_delete_enprep_by_unameidx( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " )"; if (stmtDeleteByUNameIdx == null) { stmtDeleteByUNameIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argScopeId != null) { stmtDeleteByUNameIdx.setLong(argIdx++, argScopeId.longValue()); } else { stmtDeleteByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtDeleteByUNameIdx.setString(argIdx++, argName); stmtDeleteByUNameIdx.executeUpdate(); } 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 deleteEnIntensifierByUNameIdx(CFEnSyntaxAuthorization Authorization, Long argScopeId, String argName) {/* w w w . j a v a2 s . c om*/ final String S_ProcName = "deleteEnIntensifierByUNameIdx"; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "call " + schema.getLowerDbSchemaName() + ".sp_delete_enintens_by_unameidx( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " )"; if (stmtDeleteByUNameIdx == null) { stmtDeleteByUNameIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByUNameIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByUNameIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argScopeId != null) { stmtDeleteByUNameIdx.setLong(argIdx++, argScopeId.longValue()); } else { stmtDeleteByUNameIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtDeleteByUNameIdx.setString(argIdx++, argName); stmtDeleteByUNameIdx.executeUpdate(); } 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.CFEnSyntaxOracleEnglishParseTable.java
public CFEnSyntaxEnglishParseBuff[] readDerivedByScopeIdx(CFEnSyntaxAuthorization Authorization, Long ScopeId) { final String S_ProcName = "readDerivedByScopeIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }//from w w w . j ava 2 s . c o m ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; CallableStatement stmtReadClassCodeByScopeIdx = null; try { Connection cnx = schema.getCnx(); stmtReadClassCodeByScopeIdx = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".rd_enparseccbyscopeidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadClassCodeByScopeIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadClassCodeByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (ScopeId != null) { stmtReadClassCodeByScopeIdx.setLong(argIdx++, ScopeId.longValue()); } else { stmtReadClassCodeByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } stmtReadClassCodeByScopeIdx.execute(); resultSet = (ResultSet) stmtReadClassCodeByScopeIdx.getObject(1); if (resultSet != null) { try { while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { } } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } if (stmtReadClassCodeByScopeIdx != null) { try { stmtReadClassCodeByScopeIdx.close(); } catch (SQLException e) { } stmtReadClassCodeByScopeIdx = null; } } List<CFEnSyntaxEnglishParseBuff> resultList = new LinkedList<CFEnSyntaxEnglishParseBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("ENPS")) { CFEnSyntaxEnglishParseBuff[] subList = readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENDS")) { CFEnSyntaxEnDiscourseBuff[] subList = schema.getTableEnDiscourse().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENSN")) { CFEnSyntaxEnSentenceBuff[] subList = schema.getTableEnSentence().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENCL")) { CFEnSyntaxEnClauseBuff[] subList = schema.getTableEnClause().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENPH")) { CFEnSyntaxEnPhraseBuff[] subList = schema.getTableEnPhrase().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENWD")) { CFEnSyntaxEnWordBuff[] subList = schema.getTableEnWord().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENPR")) { CFEnSyntaxEnPrepositionBuff[] subList = schema.getTableEnPreposition() .readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENMP")) { CFEnSyntaxEnMorphemeBuff[] subList = schema.getTableEnMorpheme().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENSJ")) { CFEnSyntaxEnSubjectBuff[] subList = schema.getTableEnSubject().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENOB")) { CFEnSyntaxEnObjectBuff[] subList = schema.getTableEnObject().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENCM")) { CFEnSyntaxEnComplementBuff[] subList = schema.getTableEnComplement() .readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENVL")) { CFEnSyntaxEnAdverbialBuff[] subList = schema.getTableEnAdverbial().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENAD")) { CFEnSyntaxEnAdjectiveBuff[] subList = schema.getTableEnAdjective().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENTS")) { CFEnSyntaxEnTenseBuff[] subList = schema.getTableEnTense().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENAX")) { CFEnSyntaxEnAuxiliaryBuff[] subList = schema.getTableEnAuxiliary().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENCN")) { CFEnSyntaxEnConnectiveBuff[] subList = schema.getTableEnConnective() .readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENDT")) { CFEnSyntaxEnDeterminerBuff[] subList = schema.getTableEnDeterminer() .readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENHD")) { CFEnSyntaxEnHeadBuff[] subList = schema.getTableEnHead().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("ENIN")) { CFEnSyntaxEnIntensifierBuff[] subList = schema.getTableEnIntensifier() .readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("EMOD")) { CFEnSyntaxEnModifierBuff[] subList = schema.getTableEnModifier().readBuffByScopeIdx(Authorization, ScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFEnSyntaxEnglishParseBuff[] retBuff = new CFEnSyntaxEnglishParseBuff[resultList.size()]; Iterator<CFEnSyntaxEnglishParseBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleEnHeadTable.java
public void deleteEnHeadByScopeIdx(CFEnSyntaxAuthorization Authorization, Long argScopeId) { final String S_ProcName = "deleteEnHeadByScopeIdx"; ResultSet resultSet = null;//from w w w . j av a2s. c om try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerDbSchemaName() + ".dl_enheadbyscopeidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByScopeIdx == null) { stmtDeleteByScopeIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argScopeId != null) { stmtDeleteByScopeIdx.setLong(argIdx++, argScopeId.longValue()); } else { stmtDeleteByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } int rowsUpdated = stmtDeleteByScopeIdx.executeUpdate(); } 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.CFEnSyntaxOracleEnWordTable.java
public void deleteEnWordByScopeIdx(CFEnSyntaxAuthorization Authorization, Long argScopeId) { final String S_ProcName = "deleteEnWordByScopeIdx"; ResultSet resultSet = null;//from ww w .j a v a2s . c om try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerDbSchemaName() + ".dl_enwordbyscopeidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByScopeIdx == null) { stmtDeleteByScopeIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argScopeId != null) { stmtDeleteByScopeIdx.setLong(argIdx++, argScopeId.longValue()); } else { stmtDeleteByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } int rowsUpdated = stmtDeleteByScopeIdx.executeUpdate(); } 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.cfacc.v2_0.CFAccMSSql.CFAccMSSqlAccountTable.java
public void updateAccount(CFAccAuthorization Authorization, CFAccAccountBuff Buff) { final String S_ProcName = "updateAccount"; ResultSet resultSet = null;/* ww w .ja va 2 s . c om*/ try { long TenantId = Buff.getRequiredTenantId(); long Id = Buff.getRequiredId(); String AccountCode = Buff.getRequiredAccountCode(); String Description = Buff.getRequiredDescription(); short CurrencyId = Buff.getRequiredCurrencyId(); BigDecimal Balance = Buff.getRequiredBalance(); Long RollupTenantId = Buff.getOptionalRollupTenantId(); Long RollupAccountId = Buff.getOptionalRollupAccountId(); int Revision = Buff.getRequiredRevision(); Connection cnx = schema.getCnx(); String sql = "exec sp_update_acct ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?"; if (stmtUpdateByPKey == null) { stmtUpdateByPKey = cnx.prepareStatement(sql); } int argIdx = 1; stmtUpdateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtUpdateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtUpdateByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtUpdateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtUpdateByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtUpdateByPKey.setString(argIdx++, "ACCT"); stmtUpdateByPKey.setLong(argIdx++, TenantId); stmtUpdateByPKey.setLong(argIdx++, Id); stmtUpdateByPKey.setString(argIdx++, AccountCode); stmtUpdateByPKey.setString(argIdx++, Description); stmtUpdateByPKey.setShort(argIdx++, CurrencyId); stmtUpdateByPKey.setBigDecimal(argIdx++, Balance); if (RollupTenantId != null) { stmtUpdateByPKey.setLong(argIdx++, RollupTenantId.longValue()); } else { stmtUpdateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } if (RollupAccountId != null) { stmtUpdateByPKey.setLong(argIdx++, RollupAccountId.longValue()); } else { stmtUpdateByPKey.setNull(argIdx++, java.sql.Types.BIGINT); } stmtUpdateByPKey.setInt(argIdx++, Revision); stmtUpdateByPKey.execute(); boolean moreResults = true; resultSet = null; while (resultSet == null) { try { moreResults = stmtUpdateByPKey.getMoreResults(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } if (moreResults) { try { resultSet = stmtUpdateByPKey.getResultSet(); } catch (SQLException e) { } } else if (-1 == stmtUpdateByPKey.getUpdateCount()) { break; } } if (resultSet == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "resultSet"); } if (resultSet.next()) { CFAccAccountBuff updatedBuff = unpackAccountResultSetToBuff(resultSet); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } Buff.setRequiredAccountCode(updatedBuff.getRequiredAccountCode()); Buff.setRequiredDescription(updatedBuff.getRequiredDescription()); Buff.setRequiredCurrencyId(updatedBuff.getRequiredCurrencyId()); Buff.setRequiredBalance(updatedBuff.getRequiredBalance()); Buff.setOptionalRollupTenantId(updatedBuff.getOptionalRollupTenantId()); Buff.setOptionalRollupAccountId(updatedBuff.getOptionalRollupAccountId()); Buff.setRequiredRevision(updatedBuff.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.CFEnSyntaxOracleEnTenseTable.java
public void deleteEnTenseByScopeIdx(CFEnSyntaxAuthorization Authorization, Long argScopeId) { final String S_ProcName = "deleteEnTenseByScopeIdx"; ResultSet resultSet = null;/*from ww w . j a v a 2 s. co m*/ try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerDbSchemaName() + ".dl_entensebyscopeidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByScopeIdx == null) { stmtDeleteByScopeIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argScopeId != null) { stmtDeleteByScopeIdx.setLong(argIdx++, argScopeId.longValue()); } else { stmtDeleteByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } int rowsUpdated = stmtDeleteByScopeIdx.executeUpdate(); } 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.CFEnSyntaxOracleEnObjectTable.java
public void deleteEnObjectByScopeIdx(CFEnSyntaxAuthorization Authorization, Long argScopeId) { final String S_ProcName = "deleteEnObjectByScopeIdx"; ResultSet resultSet = null;// w w w .j av a 2 s . c o m try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerDbSchemaName() + ".dl_enobjbyscopeidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByScopeIdx == null) { stmtDeleteByScopeIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argScopeId != null) { stmtDeleteByScopeIdx.setLong(argIdx++, argScopeId.longValue()); } else { stmtDeleteByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } int rowsUpdated = stmtDeleteByScopeIdx.executeUpdate(); } 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.CFEnSyntaxOracleEnClauseTable.java
public void deleteEnClauseByScopeIdx(CFEnSyntaxAuthorization Authorization, Long argScopeId) { final String S_ProcName = "deleteEnClauseByScopeIdx"; ResultSet resultSet = null;// w w w.j a v a 2s. c om try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerDbSchemaName() + ".dl_enclausebyscopeidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByScopeIdx == null) { stmtDeleteByScopeIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argScopeId != null) { stmtDeleteByScopeIdx.setLong(argIdx++, argScopeId.longValue()); } else { stmtDeleteByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } int rowsUpdated = stmtDeleteByScopeIdx.executeUpdate(); } 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.CFEnSyntaxOracleEnPhraseTable.java
public void deleteEnPhraseByScopeIdx(CFEnSyntaxAuthorization Authorization, Long argScopeId) { final String S_ProcName = "deleteEnPhraseByScopeIdx"; ResultSet resultSet = null;// w w w .j av a 2 s. com try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerDbSchemaName() + ".dl_enphrasebyscopeidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByScopeIdx == null) { stmtDeleteByScopeIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByScopeIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByScopeIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argScopeId != null) { stmtDeleteByScopeIdx.setLong(argIdx++, argScopeId.longValue()); } else { stmtDeleteByScopeIdx.setNull(argIdx++, java.sql.Types.BIGINT); } int rowsUpdated = stmtDeleteByScopeIdx.executeUpdate(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }