Example usage for java.sql CallableStatement setShort

List of usage examples for java.sql CallableStatement setShort

Introduction

In this page you can find the example usage for java.sql CallableStatement setShort.

Prototype

void setShort(String parameterName, short x) throws SQLException;

Source Link

Document

Sets the designated parameter to the given Java short value.

Usage

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswOracle.CFFswOracleISOTimezoneTable.java

public void createISOTimezone(CFFswAuthorization Authorization, CFFswISOTimezoneBuff Buff) {
    final String S_ProcName = "createISOTimezone";
    if (!schema.isTransactionOpen()) {
        throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName,
                "Transaction not open");
    }// w ww.  j  a v a2 s  . c  om
    ResultSet resultSet = null;
    CallableStatement stmtCreateByPKey = null;
    try {
        short ISOTimezoneId = Buff.getRequiredISOTimezoneId();
        String Iso8601 = Buff.getRequiredIso8601();
        String TZName = Buff.getRequiredTZName();
        short TZHourOffset = Buff.getRequiredTZHourOffset();
        short TZMinOffset = Buff.getRequiredTZMinOffset();
        String Description = Buff.getRequiredDescription();
        boolean Visible = Buff.getRequiredVisible();
        Connection cnx = schema.getCnx();
        stmtCreateByPKey = cnx.prepareCall(
                "begin " + schema.getLowerDbSchemaName() + ".crt_isotz( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", "
                        + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); 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++, "ITZN");
        stmtCreateByPKey.setShort(argIdx++, ISOTimezoneId);
        stmtCreateByPKey.setString(argIdx++, Iso8601);
        stmtCreateByPKey.setString(argIdx++, TZName);
        stmtCreateByPKey.setShort(argIdx++, TZHourOffset);
        stmtCreateByPKey.setShort(argIdx++, TZMinOffset);
        stmtCreateByPKey.setString(argIdx++, Description);
        if (Visible) {
            stmtCreateByPKey.setString(argIdx++, "Y");
        } else {
            stmtCreateByPKey.setString(argIdx++, "N");
        }
        stmtCreateByPKey.execute();
        resultSet = (ResultSet) stmtCreateByPKey.getObject(1);
        if (resultSet == null) {
            throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                    "crt_isotz() did not return a result set");
        }
        try {
            if (resultSet.next()) {
                CFFswISOTimezoneBuff createdBuff = unpackISOTimezoneResultSetToBuff(resultSet);
                if (resultSet.next()) {
                    resultSet.last();
                    throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                            "Did not expect multi-record response, " + resultSet.getRow() + " rows selected");
                }
                Buff.setRequiredISOTimezoneId(createdBuff.getRequiredISOTimezoneId());
                Buff.setRequiredIso8601(createdBuff.getRequiredIso8601());
                Buff.setRequiredTZName(createdBuff.getRequiredTZName());
                Buff.setRequiredTZHourOffset(createdBuff.getRequiredTZHourOffset());
                Buff.setRequiredTZMinOffset(createdBuff.getRequiredTZMinOffset());
                Buff.setRequiredDescription(createdBuff.getRequiredDescription());
                Buff.setRequiredVisible(createdBuff.getRequiredVisible());
                Buff.setRequiredRevision(createdBuff.getRequiredRevision());
                Buff.setCreatedByUserId(createdBuff.getCreatedByUserId());
                Buff.setCreatedAt(createdBuff.getCreatedAt());
                Buff.setUpdatedByUserId(createdBuff.getUpdatedByUserId());
                Buff.setUpdatedAt(createdBuff.getUpdatedAt());
            } 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_isotz() 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.CFEnSyntaxOracleISOTimezoneTable.java

public void createISOTimezone(CFEnSyntaxAuthorization Authorization, CFEnSyntaxISOTimezoneBuff Buff) {
    final String S_ProcName = "createISOTimezone";
    if (!schema.isTransactionOpen()) {
        throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName,
                "Transaction not open");
    }//w w w  .  j  av  a 2s . c o m
    ResultSet resultSet = null;
    CallableStatement stmtCreateByPKey = null;
    try {
        short ISOTimezoneId = Buff.getRequiredISOTimezoneId();
        String Iso8601 = Buff.getRequiredIso8601();
        String TZName = Buff.getRequiredTZName();
        short TZHourOffset = Buff.getRequiredTZHourOffset();
        short TZMinOffset = Buff.getRequiredTZMinOffset();
        String Description = Buff.getRequiredDescription();
        boolean Visible = Buff.getRequiredVisible();
        Connection cnx = schema.getCnx();
        stmtCreateByPKey = cnx.prepareCall(
                "begin " + schema.getLowerDbSchemaName() + ".crt_isotz( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", "
                        + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); 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++, "ITZN");
        stmtCreateByPKey.setShort(argIdx++, ISOTimezoneId);
        stmtCreateByPKey.setString(argIdx++, Iso8601);
        stmtCreateByPKey.setString(argIdx++, TZName);
        stmtCreateByPKey.setShort(argIdx++, TZHourOffset);
        stmtCreateByPKey.setShort(argIdx++, TZMinOffset);
        stmtCreateByPKey.setString(argIdx++, Description);
        if (Visible) {
            stmtCreateByPKey.setString(argIdx++, "Y");
        } else {
            stmtCreateByPKey.setString(argIdx++, "N");
        }
        stmtCreateByPKey.execute();
        resultSet = (ResultSet) stmtCreateByPKey.getObject(1);
        if (resultSet == null) {
            throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                    "crt_isotz() did not return a result set");
        }
        try {
            if (resultSet.next()) {
                CFEnSyntaxISOTimezoneBuff createdBuff = unpackISOTimezoneResultSetToBuff(resultSet);
                if (resultSet.next()) {
                    resultSet.last();
                    throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                            "Did not expect multi-record response, " + resultSet.getRow() + " rows selected");
                }
                Buff.setRequiredISOTimezoneId(createdBuff.getRequiredISOTimezoneId());
                Buff.setRequiredIso8601(createdBuff.getRequiredIso8601());
                Buff.setRequiredTZName(createdBuff.getRequiredTZName());
                Buff.setRequiredTZHourOffset(createdBuff.getRequiredTZHourOffset());
                Buff.setRequiredTZMinOffset(createdBuff.getRequiredTZMinOffset());
                Buff.setRequiredDescription(createdBuff.getRequiredDescription());
                Buff.setRequiredVisible(createdBuff.getRequiredVisible());
                Buff.setRequiredRevision(createdBuff.getRequiredRevision());
                Buff.setCreatedByUserId(createdBuff.getCreatedByUserId());
                Buff.setCreatedAt(createdBuff.getCreatedAt());
                Buff.setUpdatedByUserId(createdBuff.getUpdatedByUserId());
                Buff.setUpdatedAt(createdBuff.getUpdatedAt());
            } 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_isotz() 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.cfacc.v2_0.CFAccOracle.CFAccOracleAccountConfigTable.java

public CFAccAccountConfigBuff[] readBuffByDefCcyIdx(CFAccAuthorization Authorization, short DefaultCurrencyId) {
    final String S_ProcName = "readBuffByDefCcyIdx";
    ResultSet resultSet = null;//from  w  w w.j a  v  a  2  s  .  com
    Connection cnx = schema.getCnx();
    CallableStatement stmtReadBuffByDefCcyIdx = null;
    List<CFAccAccountConfigBuff> buffList = new LinkedList<CFAccAccountConfigBuff>();
    try {
        stmtReadBuffByDefCcyIdx = cnx.prepareCall("begin " + schema.getLowerSchemaDbName()
                + ".rd_acct_cfgbydefccyidx( ?, ?, ?, ?, ?, ?" + ", " + "?" + " ); end;");
        int argIdx = 1;
        stmtReadBuffByDefCcyIdx.registerOutParameter(argIdx++, OracleTypes.CURSOR);
        stmtReadBuffByDefCcyIdx.setLong(argIdx++,
                (Authorization == null) ? 0 : Authorization.getSecClusterId());
        stmtReadBuffByDefCcyIdx.setString(argIdx++,
                (Authorization == null) ? "" : Authorization.getSecUserId().toString());
        stmtReadBuffByDefCcyIdx.setString(argIdx++,
                (Authorization == null) ? "" : Authorization.getSecSessionId().toString());
        stmtReadBuffByDefCcyIdx.setLong(argIdx++,
                (Authorization == null) ? 0 : Authorization.getSecClusterId());
        stmtReadBuffByDefCcyIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId());
        stmtReadBuffByDefCcyIdx.setShort(argIdx++, DefaultCurrencyId);
        stmtReadBuffByDefCcyIdx.execute();
        resultSet = (ResultSet) stmtReadBuffByDefCcyIdx.getObject(1);
        if (resultSet != null) {
            try {
                while (resultSet.next()) {
                    CFAccAccountConfigBuff buff = unpackAccountConfigResultSetToBuff(resultSet);
                    buffList.add(buff);
                }
                try {
                    resultSet.close();
                } catch (SQLException e) {
                }
                resultSet = null;
            } catch (SQLException e) {
            }
        }
        int idx = 0;
        CFAccAccountConfigBuff[] retBuff = new CFAccAccountConfigBuff[buffList.size()];
        Iterator<CFAccAccountConfigBuff> 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 (stmtReadBuffByDefCcyIdx != null) {
            try {
                stmtReadBuffByDefCcyIdx.close();
            } catch (SQLException e) {
            }
            stmtReadBuffByDefCcyIdx = null;
        }
    }
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleISOTimezoneTable.java

public void updateISOTimezone(CFAccAuthorization Authorization, CFAccISOTimezoneBuff Buff) {
    final String S_ProcName = "updateISOTimezone";
    ResultSet resultSet = null;//from  www  .j a va2  s .  com
    Connection cnx = schema.getCnx();
    CallableStatement stmtUpdateByPKey = null;
    List<CFAccISOTimezoneBuff> buffList = new LinkedList<CFAccISOTimezoneBuff>();
    try {
        short ISOTimezoneId = Buff.getRequiredISOTimezoneId();
        String Iso8601 = Buff.getRequiredIso8601();
        String TZName = Buff.getRequiredTZName();
        short TZHourOffset = Buff.getRequiredTZHourOffset();
        short TZMinOffset = Buff.getRequiredTZMinOffset();
        String Description = Buff.getRequiredDescription();
        boolean Visible = Buff.getRequiredVisible();
        int Revision = Buff.getRequiredRevision();
        stmtUpdateByPKey = cnx.prepareCall("begin " + schema.getLowerSchemaDbName()
                + ".upd_isotz( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", "
                + "?" + ", " + "?" + ", " + "?" + ", " + "? ); end;");
        int argIdx = 1;
        stmtUpdateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR);
        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++, "ITZN");
        stmtUpdateByPKey.setShort(argIdx++, ISOTimezoneId);
        stmtUpdateByPKey.setString(argIdx++, Iso8601);
        stmtUpdateByPKey.setString(argIdx++, TZName);
        stmtUpdateByPKey.setShort(argIdx++, TZHourOffset);
        stmtUpdateByPKey.setShort(argIdx++, TZMinOffset);
        stmtUpdateByPKey.setString(argIdx++, Description);
        if (Visible) {
            stmtUpdateByPKey.setString(argIdx++, "Y");
        } else {
            stmtUpdateByPKey.setString(argIdx++, "N");
        }
        stmtUpdateByPKey.setInt(argIdx++, Revision);
        stmtUpdateByPKey.execute();
        resultSet = (ResultSet) stmtUpdateByPKey.getObject(1);
        if (resultSet != null) {
            try {
                if (resultSet.next()) {
                    CFAccISOTimezoneBuff updatedBuff = unpackISOTimezoneResultSetToBuff(resultSet);
                    if (resultSet.next()) {
                        resultSet.last();
                        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                                "Did not expect multi-record response, " + resultSet.getRow()
                                        + " rows selected");
                    }
                    Buff.setRequiredIso8601(updatedBuff.getRequiredIso8601());
                    Buff.setRequiredTZName(updatedBuff.getRequiredTZName());
                    Buff.setRequiredTZHourOffset(updatedBuff.getRequiredTZHourOffset());
                    Buff.setRequiredTZMinOffset(updatedBuff.getRequiredTZMinOffset());
                    Buff.setRequiredDescription(updatedBuff.getRequiredDescription());
                    Buff.setRequiredVisible(updatedBuff.getRequiredVisible());
                    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().newRuntimeException(getClass(), S_ProcName,
                        "upd_isotz() did not return a valid result cursor");
            } finally {
                if (resultSet != null) {
                    try {
                        resultSet.close();
                    } catch (SQLException e) {
                    }
                    resultSet = null;
                }
            }
        } else {
            throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                    "upd_isotz() did not return a result cursor");
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
    } finally {
        if (resultSet != null) {
            try {
                resultSet.close();
            } catch (SQLException e) {
            }
            resultSet = null;
        }
        if (stmtUpdateByPKey != null) {
            try {
                stmtUpdateByPKey.close();
            } catch (SQLException e) {
            }
            stmtUpdateByPKey = null;
        }
    }
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstOracle.CFAstOracleISOTimezoneTable.java

public void updateISOTimezone(CFAstAuthorization Authorization, CFAstISOTimezoneBuff Buff) {
    final String S_ProcName = "updateISOTimezone";
    ResultSet resultSet = null;//from ww w.  j a  v a 2 s  .  c o  m
    Connection cnx = schema.getCnx();
    CallableStatement stmtUpdateByPKey = null;
    List<CFAstISOTimezoneBuff> buffList = new LinkedList<CFAstISOTimezoneBuff>();
    try {
        short ISOTimezoneId = Buff.getRequiredISOTimezoneId();
        String Iso8601 = Buff.getRequiredIso8601();
        String TZName = Buff.getRequiredTZName();
        short TZHourOffset = Buff.getRequiredTZHourOffset();
        short TZMinOffset = Buff.getRequiredTZMinOffset();
        String Description = Buff.getRequiredDescription();
        boolean Visible = Buff.getRequiredVisible();
        int Revision = Buff.getRequiredRevision();
        stmtUpdateByPKey = cnx.prepareCall("begin " + schema.getLowerSchemaDbName()
                + ".upd_isotz( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", "
                + "?" + ", " + "?" + ", " + "?" + ", " + "? ); end;");
        int argIdx = 1;
        stmtUpdateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR);
        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++, "ITZN");
        stmtUpdateByPKey.setShort(argIdx++, ISOTimezoneId);
        stmtUpdateByPKey.setString(argIdx++, Iso8601);
        stmtUpdateByPKey.setString(argIdx++, TZName);
        stmtUpdateByPKey.setShort(argIdx++, TZHourOffset);
        stmtUpdateByPKey.setShort(argIdx++, TZMinOffset);
        stmtUpdateByPKey.setString(argIdx++, Description);
        if (Visible) {
            stmtUpdateByPKey.setString(argIdx++, "Y");
        } else {
            stmtUpdateByPKey.setString(argIdx++, "N");
        }
        stmtUpdateByPKey.setInt(argIdx++, Revision);
        stmtUpdateByPKey.execute();
        resultSet = (ResultSet) stmtUpdateByPKey.getObject(1);
        if (resultSet != null) {
            try {
                if (resultSet.next()) {
                    CFAstISOTimezoneBuff updatedBuff = unpackISOTimezoneResultSetToBuff(resultSet);
                    if (resultSet.next()) {
                        resultSet.last();
                        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                                "Did not expect multi-record response, " + resultSet.getRow()
                                        + " rows selected");
                    }
                    Buff.setRequiredIso8601(updatedBuff.getRequiredIso8601());
                    Buff.setRequiredTZName(updatedBuff.getRequiredTZName());
                    Buff.setRequiredTZHourOffset(updatedBuff.getRequiredTZHourOffset());
                    Buff.setRequiredTZMinOffset(updatedBuff.getRequiredTZMinOffset());
                    Buff.setRequiredDescription(updatedBuff.getRequiredDescription());
                    Buff.setRequiredVisible(updatedBuff.getRequiredVisible());
                    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().newRuntimeException(getClass(), S_ProcName,
                        "upd_isotz() did not return a valid result cursor");
            } finally {
                if (resultSet != null) {
                    try {
                        resultSet.close();
                    } catch (SQLException e) {
                    }
                    resultSet = null;
                }
            }
        } else {
            throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                    "upd_isotz() did not return a result cursor");
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
    } finally {
        if (resultSet != null) {
            try {
                resultSet.close();
            } catch (SQLException e) {
            }
            resultSet = null;
        }
        if (stmtUpdateByPKey != null) {
            try {
                stmtUpdateByPKey.close();
            } catch (SQLException e) {
            }
            stmtUpdateByPKey = null;
        }
    }
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstOracle.CFAstOracleISOTimezoneTable.java

public void updateISOTimezone(CFAstAuthorization Authorization, CFAstISOTimezoneBuff Buff) {
    final String S_ProcName = "updateISOTimezone";
    ResultSet resultSet = null;//ww  w  .  j  a va 2s.c om
    Connection cnx = schema.getCnx();
    CallableStatement stmtUpdateByPKey = null;
    List<CFAstISOTimezoneBuff> buffList = new LinkedList<CFAstISOTimezoneBuff>();
    try {
        short ISOTimezoneId = Buff.getRequiredISOTimezoneId();
        String Iso8601 = Buff.getRequiredIso8601();
        String TZName = Buff.getRequiredTZName();
        short TZHourOffset = Buff.getRequiredTZHourOffset();
        short TZMinOffset = Buff.getRequiredTZMinOffset();
        String Description = Buff.getRequiredDescription();
        boolean Visible = Buff.getRequiredVisible();
        int Revision = Buff.getRequiredRevision();
        stmtUpdateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName()
                + ".upd_isotz( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", "
                + "?" + ", " + "?" + ", " + "?" + ", " + "? ); end;");
        int argIdx = 1;
        stmtUpdateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR);
        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++, "ITZN");
        stmtUpdateByPKey.setShort(argIdx++, ISOTimezoneId);
        stmtUpdateByPKey.setString(argIdx++, Iso8601);
        stmtUpdateByPKey.setString(argIdx++, TZName);
        stmtUpdateByPKey.setShort(argIdx++, TZHourOffset);
        stmtUpdateByPKey.setShort(argIdx++, TZMinOffset);
        stmtUpdateByPKey.setString(argIdx++, Description);
        if (Visible) {
            stmtUpdateByPKey.setString(argIdx++, "Y");
        } else {
            stmtUpdateByPKey.setString(argIdx++, "N");
        }
        stmtUpdateByPKey.setInt(argIdx++, Revision);
        stmtUpdateByPKey.execute();
        resultSet = (ResultSet) stmtUpdateByPKey.getObject(1);
        if (resultSet != null) {
            try {
                if (resultSet.next()) {
                    CFAstISOTimezoneBuff updatedBuff = unpackISOTimezoneResultSetToBuff(resultSet);
                    if (resultSet.next()) {
                        resultSet.last();
                        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                                "Did not expect multi-record response, " + resultSet.getRow()
                                        + " rows selected");
                    }
                    Buff.setRequiredIso8601(updatedBuff.getRequiredIso8601());
                    Buff.setRequiredTZName(updatedBuff.getRequiredTZName());
                    Buff.setRequiredTZHourOffset(updatedBuff.getRequiredTZHourOffset());
                    Buff.setRequiredTZMinOffset(updatedBuff.getRequiredTZMinOffset());
                    Buff.setRequiredDescription(updatedBuff.getRequiredDescription());
                    Buff.setRequiredVisible(updatedBuff.getRequiredVisible());
                    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().newRuntimeException(getClass(), S_ProcName,
                        "upd_isotz() did not return a valid result cursor");
            } finally {
                if (resultSet != null) {
                    try {
                        resultSet.close();
                    } catch (SQLException e) {
                    }
                    resultSet = null;
                }
            }
        } else {
            throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                    "upd_isotz() did not return a result cursor");
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
    } finally {
        if (resultSet != null) {
            try {
                resultSet.close();
            } catch (SQLException e) {
            }
            resultSet = null;
        }
        if (stmtUpdateByPKey != null) {
            try {
                stmtUpdateByPKey.close();
            } catch (SQLException e) {
            }
            stmtUpdateByPKey = null;
        }
    }
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswOracle.CFFswOracleISOTimezoneTable.java

public void updateISOTimezone(CFFswAuthorization Authorization, CFFswISOTimezoneBuff Buff) {
    final String S_ProcName = "updateISOTimezone";
    ResultSet resultSet = null;/*from   ww w. j a  v  a  2s .c  o  m*/
    Connection cnx = schema.getCnx();
    CallableStatement stmtUpdateByPKey = null;
    List<CFFswISOTimezoneBuff> buffList = new LinkedList<CFFswISOTimezoneBuff>();
    try {
        short ISOTimezoneId = Buff.getRequiredISOTimezoneId();
        String Iso8601 = Buff.getRequiredIso8601();
        String TZName = Buff.getRequiredTZName();
        short TZHourOffset = Buff.getRequiredTZHourOffset();
        short TZMinOffset = Buff.getRequiredTZMinOffset();
        String Description = Buff.getRequiredDescription();
        boolean Visible = Buff.getRequiredVisible();
        int Revision = Buff.getRequiredRevision();
        stmtUpdateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName()
                + ".upd_isotz( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", "
                + "?" + ", " + "?" + ", " + "?" + ", " + "? ); end;");
        int argIdx = 1;
        stmtUpdateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR);
        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++, "ITZN");
        stmtUpdateByPKey.setShort(argIdx++, ISOTimezoneId);
        stmtUpdateByPKey.setString(argIdx++, Iso8601);
        stmtUpdateByPKey.setString(argIdx++, TZName);
        stmtUpdateByPKey.setShort(argIdx++, TZHourOffset);
        stmtUpdateByPKey.setShort(argIdx++, TZMinOffset);
        stmtUpdateByPKey.setString(argIdx++, Description);
        if (Visible) {
            stmtUpdateByPKey.setString(argIdx++, "Y");
        } else {
            stmtUpdateByPKey.setString(argIdx++, "N");
        }
        stmtUpdateByPKey.setInt(argIdx++, Revision);
        stmtUpdateByPKey.execute();
        resultSet = (ResultSet) stmtUpdateByPKey.getObject(1);
        if (resultSet != null) {
            try {
                if (resultSet.next()) {
                    CFFswISOTimezoneBuff updatedBuff = unpackISOTimezoneResultSetToBuff(resultSet);
                    if (resultSet.next()) {
                        resultSet.last();
                        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                                "Did not expect multi-record response, " + resultSet.getRow()
                                        + " rows selected");
                    }
                    Buff.setRequiredIso8601(updatedBuff.getRequiredIso8601());
                    Buff.setRequiredTZName(updatedBuff.getRequiredTZName());
                    Buff.setRequiredTZHourOffset(updatedBuff.getRequiredTZHourOffset());
                    Buff.setRequiredTZMinOffset(updatedBuff.getRequiredTZMinOffset());
                    Buff.setRequiredDescription(updatedBuff.getRequiredDescription());
                    Buff.setRequiredVisible(updatedBuff.getRequiredVisible());
                    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().newRuntimeException(getClass(), S_ProcName,
                        "upd_isotz() did not return a valid result cursor");
            } finally {
                if (resultSet != null) {
                    try {
                        resultSet.close();
                    } catch (SQLException e) {
                    }
                    resultSet = null;
                }
            }
        } else {
            throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                    "upd_isotz() did not return a result cursor");
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
    } finally {
        if (resultSet != null) {
            try {
                resultSet.close();
            } catch (SQLException e) {
            }
            resultSet = null;
        }
        if (stmtUpdateByPKey != null) {
            try {
                stmtUpdateByPKey.close();
            } catch (SQLException e) {
            }
            stmtUpdateByPKey = null;
        }
    }
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskOracle.CFAsteriskOracleISOTimezoneTable.java

public void updateISOTimezone(CFSecurityAuthorization Authorization, CFSecurityISOTimezoneBuff Buff) {
    final String S_ProcName = "updateISOTimezone";
    ResultSet resultSet = null;/*from ww w  .  j a  va 2s .  c om*/
    Connection cnx = schema.getCnx();
    CallableStatement stmtUpdateByPKey = null;
    List<CFSecurityISOTimezoneBuff> buffList = new LinkedList<CFSecurityISOTimezoneBuff>();
    try {
        short ISOTimezoneId = Buff.getRequiredISOTimezoneId();
        String Iso8601 = Buff.getRequiredIso8601();
        String TZName = Buff.getRequiredTZName();
        short TZHourOffset = Buff.getRequiredTZHourOffset();
        short TZMinOffset = Buff.getRequiredTZMinOffset();
        String Description = Buff.getRequiredDescription();
        boolean Visible = Buff.getRequiredVisible();
        int Revision = Buff.getRequiredRevision();
        stmtUpdateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName()
                + ".upd_isotz( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", "
                + "?" + ", " + "?" + ", " + "?" + ", " + "? ); end;");
        int argIdx = 1;
        stmtUpdateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR);
        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++, "ITZN");
        stmtUpdateByPKey.setShort(argIdx++, ISOTimezoneId);
        stmtUpdateByPKey.setString(argIdx++, Iso8601);
        stmtUpdateByPKey.setString(argIdx++, TZName);
        stmtUpdateByPKey.setShort(argIdx++, TZHourOffset);
        stmtUpdateByPKey.setShort(argIdx++, TZMinOffset);
        stmtUpdateByPKey.setString(argIdx++, Description);
        if (Visible) {
            stmtUpdateByPKey.setString(argIdx++, "Y");
        } else {
            stmtUpdateByPKey.setString(argIdx++, "N");
        }
        stmtUpdateByPKey.setInt(argIdx++, Revision);
        stmtUpdateByPKey.execute();
        resultSet = (ResultSet) stmtUpdateByPKey.getObject(1);
        if (resultSet != null) {
            try {
                if (resultSet.next()) {
                    CFSecurityISOTimezoneBuff updatedBuff = unpackISOTimezoneResultSetToBuff(resultSet);
                    if (resultSet.next()) {
                        resultSet.last();
                        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                                "Did not expect multi-record response, " + resultSet.getRow()
                                        + " rows selected");
                    }
                    Buff.setRequiredIso8601(updatedBuff.getRequiredIso8601());
                    Buff.setRequiredTZName(updatedBuff.getRequiredTZName());
                    Buff.setRequiredTZHourOffset(updatedBuff.getRequiredTZHourOffset());
                    Buff.setRequiredTZMinOffset(updatedBuff.getRequiredTZMinOffset());
                    Buff.setRequiredDescription(updatedBuff.getRequiredDescription());
                    Buff.setRequiredVisible(updatedBuff.getRequiredVisible());
                    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().newRuntimeException(getClass(), S_ProcName,
                        "upd_isotz() did not return a valid result cursor");
            } finally {
                if (resultSet != null) {
                    try {
                        resultSet.close();
                    } catch (SQLException e) {
                    }
                    resultSet = null;
                }
            }
        } else {
            throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                    "upd_isotz() did not return a result cursor");
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
    } finally {
        if (resultSet != null) {
            try {
                resultSet.close();
            } catch (SQLException e) {
            }
            resultSet = null;
        }
        if (stmtUpdateByPKey != null) {
            try {
                stmtUpdateByPKey.close();
            } catch (SQLException e) {
            }
            stmtUpdateByPKey = null;
        }
    }
}

From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleISOTimezoneTable.java

public void updateISOTimezone(CFEnSyntaxAuthorization Authorization, CFEnSyntaxISOTimezoneBuff Buff) {
    final String S_ProcName = "updateISOTimezone";
    ResultSet resultSet = null;/*from  www  .ja va2  s .co  m*/
    Connection cnx = schema.getCnx();
    CallableStatement stmtUpdateByPKey = null;
    List<CFEnSyntaxISOTimezoneBuff> buffList = new LinkedList<CFEnSyntaxISOTimezoneBuff>();
    try {
        short ISOTimezoneId = Buff.getRequiredISOTimezoneId();
        String Iso8601 = Buff.getRequiredIso8601();
        String TZName = Buff.getRequiredTZName();
        short TZHourOffset = Buff.getRequiredTZHourOffset();
        short TZMinOffset = Buff.getRequiredTZMinOffset();
        String Description = Buff.getRequiredDescription();
        boolean Visible = Buff.getRequiredVisible();
        int Revision = Buff.getRequiredRevision();
        stmtUpdateByPKey = cnx.prepareCall("begin " + schema.getLowerDbSchemaName()
                + ".upd_isotz( ?, ?, ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", "
                + "?" + ", " + "?" + ", " + "?" + ", " + "? ); end;");
        int argIdx = 1;
        stmtUpdateByPKey.registerOutParameter(argIdx++, OracleTypes.CURSOR);
        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++, "ITZN");
        stmtUpdateByPKey.setShort(argIdx++, ISOTimezoneId);
        stmtUpdateByPKey.setString(argIdx++, Iso8601);
        stmtUpdateByPKey.setString(argIdx++, TZName);
        stmtUpdateByPKey.setShort(argIdx++, TZHourOffset);
        stmtUpdateByPKey.setShort(argIdx++, TZMinOffset);
        stmtUpdateByPKey.setString(argIdx++, Description);
        if (Visible) {
            stmtUpdateByPKey.setString(argIdx++, "Y");
        } else {
            stmtUpdateByPKey.setString(argIdx++, "N");
        }
        stmtUpdateByPKey.setInt(argIdx++, Revision);
        stmtUpdateByPKey.execute();
        resultSet = (ResultSet) stmtUpdateByPKey.getObject(1);
        if (resultSet != null) {
            try {
                if (resultSet.next()) {
                    CFEnSyntaxISOTimezoneBuff updatedBuff = unpackISOTimezoneResultSetToBuff(resultSet);
                    if (resultSet.next()) {
                        resultSet.last();
                        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                                "Did not expect multi-record response, " + resultSet.getRow()
                                        + " rows selected");
                    }
                    Buff.setRequiredIso8601(updatedBuff.getRequiredIso8601());
                    Buff.setRequiredTZName(updatedBuff.getRequiredTZName());
                    Buff.setRequiredTZHourOffset(updatedBuff.getRequiredTZHourOffset());
                    Buff.setRequiredTZMinOffset(updatedBuff.getRequiredTZMinOffset());
                    Buff.setRequiredDescription(updatedBuff.getRequiredDescription());
                    Buff.setRequiredVisible(updatedBuff.getRequiredVisible());
                    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().newRuntimeException(getClass(), S_ProcName,
                        "upd_isotz() did not return a valid result cursor");
            } finally {
                if (resultSet != null) {
                    try {
                        resultSet.close();
                    } catch (SQLException e) {
                    }
                    resultSet = null;
                }
            }
        } else {
            throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                    "upd_isotz() did not return a result cursor");
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
    } finally {
        if (resultSet != null) {
            try {
                resultSet.close();
            } catch (SQLException e) {
            }
            resultSet = null;
        }
        if (stmtUpdateByPKey != null) {
            try {
                stmtUpdateByPKey.close();
            } catch (SQLException e) {
            }
            stmtUpdateByPKey = null;
        }
    }
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleContactURLTable.java

public void createContactURL(CFAccAuthorization Authorization, CFAccContactURLBuff Buff) {
    final String S_ProcName = "createContactURL";
    if (!schema.isTransactionOpen()) {
        throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName,
                "Transaction not open");
    }//  w  ww  .j  ava  2 s .  c  o m
    ResultSet resultSet = null;
    CallableStatement stmtCreateByPKey = null;
    try {
        long TenantId = Buff.getRequiredTenantId();
        long ContactId = Buff.getRequiredContactId();
        Short URLProtocolId = Buff.getOptionalURLProtocolId();
        String Name = Buff.getRequiredName();
        String URL = Buff.getRequiredURL();
        Connection cnx = schema.getCnx();
        stmtCreateByPKey = cnx
                .prepareCall("begin " + schema.getLowerSchemaDbName() + ".crt_ctcurl( ?, ?, ?, ?, ?, ?, ?"
                        + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + ", " + "?" + " ); 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++, "CURL");
        stmtCreateByPKey.setLong(argIdx++, TenantId);
        stmtCreateByPKey.setLong(argIdx++, ContactId);
        if (URLProtocolId != null) {
            stmtCreateByPKey.setShort(argIdx++, URLProtocolId.shortValue());
        } else {
            stmtCreateByPKey.setNull(argIdx++, java.sql.Types.SMALLINT);
        }
        stmtCreateByPKey.setString(argIdx++, Name);
        stmtCreateByPKey.setString(argIdx++, URL);
        stmtCreateByPKey.execute();
        resultSet = (ResultSet) stmtCreateByPKey.getObject(1);
        if (resultSet == null) {
            throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                    "crt_ctcurl() did not return a result set");
        }
        try {
            if (resultSet.next()) {
                CFAccContactURLBuff createdBuff = unpackContactURLResultSetToBuff(resultSet);
                if (resultSet.next()) {
                    resultSet.last();
                    throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                            "Did not expect multi-record response, " + resultSet.getRow() + " rows selected");
                }
                Buff.setRequiredTenantId(createdBuff.getRequiredTenantId());
                Buff.setRequiredContactURLId(createdBuff.getRequiredContactURLId());
                Buff.setRequiredContactId(createdBuff.getRequiredContactId());
                Buff.setOptionalURLProtocolId(createdBuff.getOptionalURLProtocolId());
                Buff.setRequiredName(createdBuff.getRequiredName());
                Buff.setRequiredURL(createdBuff.getRequiredURL());
                Buff.setRequiredRevision(createdBuff.getRequiredRevision());
                Buff.setCreatedByUserId(createdBuff.getCreatedByUserId());
                Buff.setCreatedAt(createdBuff.getCreatedAt());
                Buff.setUpdatedByUserId(createdBuff.getUpdatedByUserId());
                Buff.setUpdatedAt(createdBuff.getUpdatedAt());
            } 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_ctcurl() 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;
        }
    }
}