List of usage examples for java.sql CallableStatement setInt
void setInt(String parameterName, int x) throws SQLException;
int
value. From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleSecGroupMemberTable.java
public void deleteSecGroupMember(CFAccAuthorization Authorization, CFAccSecGroupMemberBuff Buff) { final String S_ProcName = "deleteSecGroupMember"; Connection cnx = schema.getCnx(); CallableStatement stmtDeleteByPKey = null; try {/*from ww w.j a v a 2 s .co m*/ long ClusterId = Buff.getRequiredClusterId(); long SecGroupMemberId = Buff.getRequiredSecGroupMemberId(); stmtDeleteByPKey = cnx.prepareCall("begin " + schema.getLowerSchemaDbName() + ".dl_secmemb( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByPKey.setLong(argIdx++, ClusterId); stmtDeleteByPKey.setLong(argIdx++, SecGroupMemberId); stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision()); ; stmtDeleteByPKey.execute(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtDeleteByPKey != null) { try { stmtDeleteByPKey.close(); } catch (SQLException e) { } stmtDeleteByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstOracle.CFAstOracleSecGroupMemberTable.java
public void deleteSecGroupMember(CFAstAuthorization Authorization, CFAstSecGroupMemberBuff Buff) { final String S_ProcName = "deleteSecGroupMember"; Connection cnx = schema.getCnx(); CallableStatement stmtDeleteByPKey = null; try {//ww w . j a v a2 s. c o m long ClusterId = Buff.getRequiredClusterId(); long SecGroupMemberId = Buff.getRequiredSecGroupMemberId(); stmtDeleteByPKey = cnx.prepareCall("begin " + schema.getLowerSchemaDbName() + ".dl_secmemb( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByPKey.setLong(argIdx++, ClusterId); stmtDeleteByPKey.setLong(argIdx++, SecGroupMemberId); stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision()); ; stmtDeleteByPKey.execute(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtDeleteByPKey != null) { try { stmtDeleteByPKey.close(); } catch (SQLException e) { } stmtDeleteByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstOracle.CFAstOracleSecGroupMemberTable.java
public void deleteSecGroupMember(CFAstAuthorization Authorization, CFAstSecGroupMemberBuff Buff) { final String S_ProcName = "deleteSecGroupMember"; Connection cnx = schema.getCnx(); CallableStatement stmtDeleteByPKey = null; try {/*from w w w . j av a 2 s.c o m*/ long ClusterId = Buff.getRequiredClusterId(); long SecGroupMemberId = Buff.getRequiredSecGroupMemberId(); stmtDeleteByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".dl_secmemb( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByPKey.setLong(argIdx++, ClusterId); stmtDeleteByPKey.setLong(argIdx++, SecGroupMemberId); stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision()); ; stmtDeleteByPKey.execute(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtDeleteByPKey != null) { try { stmtDeleteByPKey.close(); } catch (SQLException e) { } stmtDeleteByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleTSecGroupMemberTable.java
public void deleteTSecGroupMember(CFAccAuthorization Authorization, CFAccTSecGroupMemberBuff Buff) { final String S_ProcName = "deleteTSecGroupMember"; Connection cnx = schema.getCnx(); CallableStatement stmtDeleteByPKey = null; try {//w w w . jav a2s. com long TenantId = Buff.getRequiredTenantId(); long TSecGroupMemberId = Buff.getRequiredTSecGroupMemberId(); stmtDeleteByPKey = cnx.prepareCall("begin " + schema.getLowerSchemaDbName() + ".dl_tsecmemb( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByPKey.setLong(argIdx++, TenantId); stmtDeleteByPKey.setLong(argIdx++, TSecGroupMemberId); stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision()); ; stmtDeleteByPKey.execute(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtDeleteByPKey != null) { try { stmtDeleteByPKey.close(); } catch (SQLException e) { } stmtDeleteByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstOracle.CFAstOracleTSecGroupMemberTable.java
public void deleteTSecGroupMember(CFAstAuthorization Authorization, CFAstTSecGroupMemberBuff Buff) { final String S_ProcName = "deleteTSecGroupMember"; Connection cnx = schema.getCnx(); CallableStatement stmtDeleteByPKey = null; try {//from w ww.j a va2 s .c om long TenantId = Buff.getRequiredTenantId(); long TSecGroupMemberId = Buff.getRequiredTSecGroupMemberId(); stmtDeleteByPKey = cnx.prepareCall("begin " + schema.getLowerSchemaDbName() + ".dl_tsecmemb( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByPKey.setLong(argIdx++, TenantId); stmtDeleteByPKey.setLong(argIdx++, TSecGroupMemberId); stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision()); ; stmtDeleteByPKey.execute(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtDeleteByPKey != null) { try { stmtDeleteByPKey.close(); } catch (SQLException e) { } stmtDeleteByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstOracle.CFAstOracleTSecGroupMemberTable.java
public void deleteTSecGroupMember(CFAstAuthorization Authorization, CFAstTSecGroupMemberBuff Buff) { final String S_ProcName = "deleteTSecGroupMember"; Connection cnx = schema.getCnx(); CallableStatement stmtDeleteByPKey = null; try {/*ww w .j a v a 2 s . c o m*/ long TenantId = Buff.getRequiredTenantId(); long TSecGroupMemberId = Buff.getRequiredTSecGroupMemberId(); stmtDeleteByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".dl_tsecmemb( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByPKey.setLong(argIdx++, TenantId); stmtDeleteByPKey.setLong(argIdx++, TSecGroupMemberId); stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision()); ; stmtDeleteByPKey.execute(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtDeleteByPKey != null) { try { stmtDeleteByPKey.close(); } catch (SQLException e) { } stmtDeleteByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleAddressTagTable.java
public void deleteAddressTag(CFAccAuthorization Authorization, CFAccAddressTagBuff Buff) { final String S_ProcName = "deleteAddressTag"; Connection cnx = schema.getCnx(); CallableStatement stmtDeleteByPKey = null; try {//from w ww .ja v a 2 s . co m long TenantId = Buff.getRequiredTenantId(); long AddressId = Buff.getRequiredAddressId(); long TagId = Buff.getRequiredTagId(); stmtDeleteByPKey = cnx .prepareCall("begin " + schema.getLowerSchemaDbName() + ".dl_ctcaddrtag( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByPKey.setLong(argIdx++, TenantId); stmtDeleteByPKey.setLong(argIdx++, AddressId); stmtDeleteByPKey.setLong(argIdx++, TagId); stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision()); ; stmtDeleteByPKey.execute(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtDeleteByPKey != null) { try { stmtDeleteByPKey.close(); } catch (SQLException e) { } stmtDeleteByPKey = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskOracle.CFAsteriskOracleSecGroupMemberTable.java
public CFSecuritySecGroupMemberBuff readBuffByUUserIdx(CFSecurityAuthorization Authorization, long ClusterId, int SecGroupId, UUID SecUserId) { final String S_ProcName = "readBuffByUUserIdx"; ResultSet resultSet = null;/* www . j a v a 2 s .c om*/ Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUUserIdx = null; try { stmtReadBuffByUUserIdx = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".rd_secmembbyuuseridx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUUserIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUUserIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUUserIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUUserIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUUserIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUUserIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadBuffByUUserIdx.setLong(argIdx++, ClusterId); stmtReadBuffByUUserIdx.setInt(argIdx++, SecGroupId); stmtReadBuffByUUserIdx.setString(argIdx++, SecUserId.toString()); stmtReadBuffByUUserIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUUserIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFSecuritySecGroupMemberBuff buff = unpackSecGroupMemberResultSetToBuff(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 (stmtReadBuffByUUserIdx != null) { try { stmtReadBuffByUUserIdx.close(); } catch (SQLException e) { } stmtReadBuffByUUserIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskOracle.CFAsteriskOracleTSecGroupMemberTable.java
public CFSecurityTSecGroupMemberBuff readBuffByUUserIdx(CFSecurityAuthorization Authorization, long TenantId, int TSecGroupId, UUID SecUserId) { final String S_ProcName = "readBuffByUUserIdx"; ResultSet resultSet = null;/*from w w w . j av a2 s .c o m*/ Connection cnx = schema.getCnx(); CallableStatement stmtReadBuffByUUserIdx = null; try { stmtReadBuffByUUserIdx = cnx.prepareCall( "begin " + schema.getLowerDbSchemaName() + ".rd_tsecmembbyuuseridx( ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtReadBuffByUUserIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR); stmtReadBuffByUUserIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUUserIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadBuffByUUserIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadBuffByUUserIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadBuffByUUserIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadBuffByUUserIdx.setLong(argIdx++, TenantId); stmtReadBuffByUUserIdx.setInt(argIdx++, TSecGroupId); stmtReadBuffByUUserIdx.setString(argIdx++, SecUserId.toString()); stmtReadBuffByUUserIdx.execute(); resultSet = (ResultSet) stmtReadBuffByUUserIdx.getObject(1); if (resultSet == null) { return (null); } try { if (resultSet.next()) { CFSecurityTSecGroupMemberBuff buff = unpackTSecGroupMemberResultSetToBuff(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 (stmtReadBuffByUUserIdx != null) { try { stmtReadBuffByUUserIdx.close(); } catch (SQLException e) { } stmtReadBuffByUUserIdx = null; } } }
From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswOracle.CFFswOracleFSSFGatewayTable.java
public void deleteFSSFGateway(CFFswAuthorization Authorization, CFFswFSSFGatewayBuff Buff) { final String S_ProcName = "deleteFSSFGateway"; Connection cnx = schema.getCnx(); CallableStatement stmtDeleteByPKey = null; try {/*from ww w . j a v a 2 s . c o m*/ long TenantId = Buff.getRequiredTenantId(); long FSSFGatewayId = Buff.getRequiredFSSFGatewayId(); stmtDeleteByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName() + ".dl_fssfgateway( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); end;"); int argIdx = 1; stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByPKey.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByPKey.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtDeleteByPKey.setLong(argIdx++, TenantId); stmtDeleteByPKey.setLong(argIdx++, FSSFGatewayId); stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision()); ; stmtDeleteByPKey.execute(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (stmtDeleteByPKey != null) { try { stmtDeleteByPKey.close(); } catch (SQLException e) { } stmtDeleteByPKey = null; } } }