List of usage examples for java.sql CallableStatement getLong
long getLong(String parameterName) throws SQLException;
BIGINT
parameter as a long
in the Java programming language. From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstSybase.CFAstSybaseTenantTable.java
public long nextTSecGroupIncludeIdGen(CFAstAuthorization Authorization, CFAstTenantPKey PKey) { final String S_ProcName = "nextTSecGroupIncludeIdGen"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Not in a transaction"); }/*from w w w . ja v a2s .c om*/ Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); CallableStatement stmtSelectNextTSecGroupIncludeIdGen = null; try { String sql = "{ call sp_next_tsecgroupincludeidgen( ?" + ", " + "?" + " ) }"; stmtSelectNextTSecGroupIncludeIdGen = cnx.prepareCall(sql); int argIdx = 1; stmtSelectNextTSecGroupIncludeIdGen.registerOutParameter(argIdx++, java.sql.Types.BIGINT); stmtSelectNextTSecGroupIncludeIdGen.setLong(argIdx++, Id); stmtSelectNextTSecGroupIncludeIdGen.execute(); long nextId = stmtSelectNextTSecGroupIncludeIdGen.getLong(1); return (nextId); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtSelectNextTSecGroupIncludeIdGen != null) { try { stmtSelectNextTSecGroupIncludeIdGen.close(); } catch (SQLException e) { } stmtSelectNextTSecGroupIncludeIdGen = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSybase.CFAsteriskSybaseClusterTable.java
public long nextServiceIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) { final String S_ProcName = "nextServiceIdGen"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Not in a transaction"); }//from ww w .ja v a 2 s . c o m Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); CallableStatement stmtSelectNextServiceIdGen = null; try { String sql = "{ call sp_next_serviceidgen( ?" + ", " + "?" + " ) }"; stmtSelectNextServiceIdGen = cnx.prepareCall(sql); int argIdx = 1; stmtSelectNextServiceIdGen.registerOutParameter(argIdx++, java.sql.Types.BIGINT); stmtSelectNextServiceIdGen.setLong(argIdx++, Id); stmtSelectNextServiceIdGen.execute(); long nextId = stmtSelectNextServiceIdGen.getLong(1); return (nextId); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtSelectNextServiceIdGen != null) { try { stmtSelectNextServiceIdGen.close(); } catch (SQLException e) { } stmtSelectNextServiceIdGen = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSybase.CFAsteriskSybaseClusterTable.java
public long nextHostNodeIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) { final String S_ProcName = "nextHostNodeIdGen"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Not in a transaction"); }/*from www.j a va 2s . co m*/ Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); CallableStatement stmtSelectNextHostNodeIdGen = null; try { String sql = "{ call sp_next_hostnodeidgen( ?" + ", " + "?" + " ) }"; stmtSelectNextHostNodeIdGen = cnx.prepareCall(sql); int argIdx = 1; stmtSelectNextHostNodeIdGen.registerOutParameter(argIdx++, java.sql.Types.BIGINT); stmtSelectNextHostNodeIdGen.setLong(argIdx++, Id); stmtSelectNextHostNodeIdGen.execute(); long nextId = stmtSelectNextHostNodeIdGen.getLong(1); return (nextId); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtSelectNextHostNodeIdGen != null) { try { stmtSelectNextHostNodeIdGen.close(); } catch (SQLException e) { } stmtSelectNextHostNodeIdGen = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstSybase.CFAstSybaseClusterTable.java
public long nextServiceIdGen(CFAstAuthorization Authorization, CFAstClusterPKey PKey) { final String S_ProcName = "nextServiceIdGen"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Not in a transaction"); }/* w w w. j a v a 2s . com*/ Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); CallableStatement stmtSelectNextServiceIdGen = null; try { String sql = "{ call sp_next_serviceidgen( ?" + ", " + "?" + " ) }"; stmtSelectNextServiceIdGen = cnx.prepareCall(sql); int argIdx = 1; stmtSelectNextServiceIdGen.registerOutParameter(argIdx++, java.sql.Types.BIGINT); stmtSelectNextServiceIdGen.setLong(argIdx++, Id); stmtSelectNextServiceIdGen.execute(); long nextId = stmtSelectNextServiceIdGen.getLong(1); return (nextId); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtSelectNextServiceIdGen != null) { try { stmtSelectNextServiceIdGen.close(); } catch (SQLException e) { } stmtSelectNextServiceIdGen = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstSybase.CFAstSybaseClusterTable.java
public long nextHostNodeIdGen(CFAstAuthorization Authorization, CFAstClusterPKey PKey) { final String S_ProcName = "nextHostNodeIdGen"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Not in a transaction"); }/*from ww w . j a v a 2 s.com*/ Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); CallableStatement stmtSelectNextHostNodeIdGen = null; try { String sql = "{ call sp_next_hostnodeidgen( ?" + ", " + "?" + " ) }"; stmtSelectNextHostNodeIdGen = cnx.prepareCall(sql); int argIdx = 1; stmtSelectNextHostNodeIdGen.registerOutParameter(argIdx++, java.sql.Types.BIGINT); stmtSelectNextHostNodeIdGen.setLong(argIdx++, Id); stmtSelectNextHostNodeIdGen.execute(); long nextId = stmtSelectNextHostNodeIdGen.getLong(1); return (nextId); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtSelectNextHostNodeIdGen != null) { try { stmtSelectNextHostNodeIdGen.close(); } catch (SQLException e) { } stmtSelectNextHostNodeIdGen = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSybase.CFAsteriskSybaseClusterTable.java
public long nextSecGroupFormIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) { final String S_ProcName = "nextSecGroupFormIdGen"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Not in a transaction"); }/* www . j a v a2s. c o m*/ Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); CallableStatement stmtSelectNextSecGroupFormIdGen = null; try { String sql = "{ call sp_next_secgroupformidgen( ?" + ", " + "?" + " ) }"; stmtSelectNextSecGroupFormIdGen = cnx.prepareCall(sql); int argIdx = 1; stmtSelectNextSecGroupFormIdGen.registerOutParameter(argIdx++, java.sql.Types.BIGINT); stmtSelectNextSecGroupFormIdGen.setLong(argIdx++, Id); stmtSelectNextSecGroupFormIdGen.execute(); long nextId = stmtSelectNextSecGroupFormIdGen.getLong(1); return (nextId); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtSelectNextSecGroupFormIdGen != null) { try { stmtSelectNextSecGroupFormIdGen.close(); } catch (SQLException e) { } stmtSelectNextSecGroupFormIdGen = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSybase.CFAsteriskSybaseClusterTable.java
public long nextSecGroupMemberIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) { final String S_ProcName = "nextSecGroupMemberIdGen"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Not in a transaction"); }/* w w w .j ava 2s. c o m*/ Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); CallableStatement stmtSelectNextSecGroupMemberIdGen = null; try { String sql = "{ call sp_next_secgroupmemberidgen( ?" + ", " + "?" + " ) }"; stmtSelectNextSecGroupMemberIdGen = cnx.prepareCall(sql); int argIdx = 1; stmtSelectNextSecGroupMemberIdGen.registerOutParameter(argIdx++, java.sql.Types.BIGINT); stmtSelectNextSecGroupMemberIdGen.setLong(argIdx++, Id); stmtSelectNextSecGroupMemberIdGen.execute(); long nextId = stmtSelectNextSecGroupMemberIdGen.getLong(1); return (nextId); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtSelectNextSecGroupMemberIdGen != null) { try { stmtSelectNextSecGroupMemberIdGen.close(); } catch (SQLException e) { } stmtSelectNextSecGroupMemberIdGen = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstSybase.CFAstSybaseClusterTable.java
public long nextSecGroupFormIdGen(CFAstAuthorization Authorization, CFAstClusterPKey PKey) { final String S_ProcName = "nextSecGroupFormIdGen"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Not in a transaction"); }// w w w . ja v a 2s . co m Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); CallableStatement stmtSelectNextSecGroupFormIdGen = null; try { String sql = "{ call sp_next_secgroupformidgen( ?" + ", " + "?" + " ) }"; stmtSelectNextSecGroupFormIdGen = cnx.prepareCall(sql); int argIdx = 1; stmtSelectNextSecGroupFormIdGen.registerOutParameter(argIdx++, java.sql.Types.BIGINT); stmtSelectNextSecGroupFormIdGen.setLong(argIdx++, Id); stmtSelectNextSecGroupFormIdGen.execute(); long nextId = stmtSelectNextSecGroupFormIdGen.getLong(1); return (nextId); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtSelectNextSecGroupFormIdGen != null) { try { stmtSelectNextSecGroupFormIdGen.close(); } catch (SQLException e) { } stmtSelectNextSecGroupFormIdGen = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSybase.CFAsteriskSybaseClusterTable.java
public long nextSecGroupIncludeIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) { final String S_ProcName = "nextSecGroupIncludeIdGen"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Not in a transaction"); }// w ww . j av a 2s .com Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); CallableStatement stmtSelectNextSecGroupIncludeIdGen = null; try { String sql = "{ call sp_next_secgroupincludeidgen( ?" + ", " + "?" + " ) }"; stmtSelectNextSecGroupIncludeIdGen = cnx.prepareCall(sql); int argIdx = 1; stmtSelectNextSecGroupIncludeIdGen.registerOutParameter(argIdx++, java.sql.Types.BIGINT); stmtSelectNextSecGroupIncludeIdGen.setLong(argIdx++, Id); stmtSelectNextSecGroupIncludeIdGen.execute(); long nextId = stmtSelectNextSecGroupIncludeIdGen.getLong(1); return (nextId); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtSelectNextSecGroupIncludeIdGen != null) { try { stmtSelectNextSecGroupIncludeIdGen.close(); } catch (SQLException e) { } stmtSelectNextSecGroupIncludeIdGen = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstSybase.CFAstSybaseClusterTable.java
public long nextSecGroupMemberIdGen(CFAstAuthorization Authorization, CFAstClusterPKey PKey) { final String S_ProcName = "nextSecGroupMemberIdGen"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Not in a transaction"); }// ww w . ja v a 2 s .co m Connection cnx = schema.getCnx(); long Id = PKey.getRequiredId(); CallableStatement stmtSelectNextSecGroupMemberIdGen = null; try { String sql = "{ call sp_next_secgroupmemberidgen( ?" + ", " + "?" + " ) }"; stmtSelectNextSecGroupMemberIdGen = cnx.prepareCall(sql); int argIdx = 1; stmtSelectNextSecGroupMemberIdGen.registerOutParameter(argIdx++, java.sql.Types.BIGINT); stmtSelectNextSecGroupMemberIdGen.setLong(argIdx++, Id); stmtSelectNextSecGroupMemberIdGen.execute(); long nextId = stmtSelectNextSecGroupMemberIdGen.getLong(1); return (nextId); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtSelectNextSecGroupMemberIdGen != null) { try { stmtSelectNextSecGroupMemberIdGen.close(); } catch (SQLException e) { } stmtSelectNextSecGroupMemberIdGen = null; } } }