public CFSecurityISOCountryCurrencyBuff lockBuff(
     CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyPKey PKey) {
   final String S_ProcName = "lockBuff";
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   ResultSet resultSet = null;
   try {
     Connection cnx = schema.getCnx();
     short ISOCountryId = PKey.getRequiredISOCountryId();
     short ISOCurrencyId = PKey.getRequiredISOCurrencyId();
     final String sql =
         "CALL sp_lock_iso_cntryccy( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " )";
     if (stmtLockBuffByPKey == null) {
       stmtLockBuffByPKey = cnx.prepareStatement(sql);
     }
     int argIdx = 1;
     stmtLockBuffByPKey.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtLockBuffByPKey.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString());
     stmtLockBuffByPKey.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString());
     stmtLockBuffByPKey.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtLockBuffByPKey.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId());
     stmtLockBuffByPKey.setShort(argIdx++, ISOCountryId);
     stmtLockBuffByPKey.setShort(argIdx++, ISOCurrencyId);
     resultSet = stmtLockBuffByPKey.executeQuery();
     if (resultSet.next()) {
       CFSecurityISOCountryCurrencyBuff buff = unpackISOCountryCurrencyResultSetToBuff(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) {
     throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
   } finally {
     if (resultSet != null) {
       try {
         resultSet.close();
       } catch (SQLException e) {
       }
       resultSet = null;
     }
   }
 }
 public CFSecurityISOCountryCurrencyBuff[] readDerivedByCountryIdx(
     CFSecurityAuthorization Authorization, short ISOCountryId) {
   final String S_ProcName = "readDerivedByCountryIdx";
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   CFSecurityISOCountryCurrencyBuff[] buffList = readBuffByCountryIdx(Authorization, ISOCountryId);
   return (buffList);
 }
 public CFSecurityISOCountryCurrencyBuff[] readAllDerived(CFSecurityAuthorization Authorization) {
   final String S_ProcName = "readAllDerived";
   CFSecurityISOCountryCurrencyBuff[] buffArray;
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   buffArray = readAllBuff(Authorization);
   return (buffArray);
 }
 public CFSecurityISOTimezoneBuff[] readDerivedByIso8601Idx(
     CFSecurityAuthorization Authorization, String Iso8601) {
   final String S_ProcName = "readDerivedByIso8601Idx";
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   CFSecurityISOTimezoneBuff[] buffList = readBuffByIso8601Idx(Authorization, Iso8601);
   return (buffList);
 }
 public CFSecurityISOCountryCurrencyBuff readDerivedByIdIdx(
     CFSecurityAuthorization Authorization, short ISOCountryId, short ISOCurrencyId) {
   final String S_ProcName = "CFSecurityDb2LUWISOCountryCurrencyTable.readDerivedByIdIdx() ";
   CFSecurityISOCountryCurrencyBuff buff;
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   buff = readBuffByIdIdx(Authorization, ISOCountryId, ISOCurrencyId);
   return (buff);
 }
 public CFSecurityISOCountryCurrencyBuff lockDerived(
     CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyPKey PKey) {
   final String S_ProcName = "lockDerived";
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   CFSecurityISOCountryCurrencyBuff buff;
   buff = lockBuff(Authorization, PKey);
   return (buff);
 }
 public CFSecurityISOTimezoneBuff readDerivedByUTZNameIdx(
     CFSecurityAuthorization Authorization, String TZName) {
   final String S_ProcName = "CFSecurityDb2LUWISOTimezoneTable.readDerivedByUTZNameIdx() ";
   CFSecurityISOTimezoneBuff buff;
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   buff = readBuffByUTZNameIdx(Authorization, TZName);
   return (buff);
 }
 public CFSecurityISOTimezoneBuff readDerived(
     CFSecurityAuthorization Authorization, CFSecurityISOTimezonePKey PKey) {
   final String S_ProcName = "readDerived";
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   CFSecurityISOTimezoneBuff buff;
   buff = readBuff(Authorization, PKey);
   return (buff);
 }
 public CFSecurityISOCountryCurrencyBuff[] readAllBuff(CFSecurityAuthorization Authorization) {
   final String S_ProcName = "readAllBuff";
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   ResultSet resultSet = null;
   try {
     Connection cnx = schema.getCnx();
     final String sql = "CALL sp_read_iso_cntryccy_all( ?, ?, ?, ?, ? )";
     if (stmtReadAllBuff == null) {
       stmtReadAllBuff = cnx.prepareStatement(sql);
     }
     int argIdx = 1;
     stmtReadAllBuff.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtReadAllBuff.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString());
     stmtReadAllBuff.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString());
     stmtReadAllBuff.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtReadAllBuff.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId());
     resultSet = stmtReadAllBuff.executeQuery();
     List<CFSecurityISOCountryCurrencyBuff> buffList =
         new LinkedList<CFSecurityISOCountryCurrencyBuff>();
     while (resultSet.next()) {
       CFSecurityISOCountryCurrencyBuff buff = unpackISOCountryCurrencyResultSetToBuff(resultSet);
       buffList.add(buff);
     }
     int idx = 0;
     CFSecurityISOCountryCurrencyBuff[] retBuff =
         new CFSecurityISOCountryCurrencyBuff[buffList.size()];
     Iterator<CFSecurityISOCountryCurrencyBuff> 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;
     }
   }
 }
 public void createISOTimezone(
     CFSecurityAuthorization Authorization, CFSecurityISOTimezoneBuff Buff) {
   final String S_ProcName = "createISOTimezone";
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   ResultSet resultSet = null;
   try {
     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();
     final String sql =
         "CALL sp_create_isotz( ?, ?, ?, ?, ?, ?"
             + ", "
             + "?"
             + ", "
             + "?"
             + ", "
             + "?"
             + ", "
             + "?"
             + ", "
             + "?"
             + ", "
             + "?"
             + " )";
     if (stmtCreateByPKey == null) {
       stmtCreateByPKey = cnx.prepareStatement(sql);
     }
     int argIdx = 1;
     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.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");
     }
     resultSet = stmtCreateByPKey.executeQuery();
     if (resultSet.next()) {
       CFSecurityISOTimezoneBuff 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().newDbException(getClass(), S_ProcName, e);
   } finally {
     if (resultSet != null) {
       try {
         resultSet.close();
       } catch (SQLException e) {
       }
       resultSet = null;
     }
   }
 }