public CFBamISOCurrencyBuff lockDerived(
     CFBamAuthorization Authorization, CFBamISOCurrencyPKey PKey) {
   final String S_ProcName = "CFBamRamISOCurrency.readDerived() ";
   CFBamISOCurrencyPKey key = schema.getFactoryISOCurrency().newPKey();
   key.setRequiredId(PKey.getRequiredId());
   CFBamISOCurrencyBuff buff;
   if (dictByPKey.containsKey(key)) {
     buff = dictByPKey.get(key);
   } else {
     buff = null;
   }
   return (buff);
 }
  public void createISOCurrency(CFBamAuthorization Authorization, CFBamISOCurrencyBuff Buff) {
    final String S_ProcName = "createISOCurrency";
    CFBamISOCurrencyPKey pkey = schema.getFactoryISOCurrency().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    Buff.setRequiredId(pkey.getRequiredId());
    CFBamISOCurrencyByCcyCdIdxKey keyCcyCdIdx = schema.getFactoryISOCurrency().newCcyCdIdxKey();
    keyCcyCdIdx.setRequiredISOCode(Buff.getRequiredISOCode());

    CFBamISOCurrencyByCcyNmIdxKey keyCcyNmIdx = schema.getFactoryISOCurrency().newCcyNmIdxKey();
    keyCcyNmIdx.setRequiredName(Buff.getRequiredName());

    // Validate unique indexes

    if (dictByPKey.containsKey(pkey)) {
      throw CFLib.getDefaultExceptionFactory()
          .newPrimaryKeyNotNewException(getClass(), S_ProcName, pkey);
    }

    if (dictByCcyCdIdx.containsKey(keyCcyCdIdx)) {
      throw CFLib.getDefaultExceptionFactory()
          .newUniqueIndexViolationException(
              getClass(), S_ProcName, "ISOCurrencyCodeIdx", keyCcyCdIdx);
    }

    if (dictByCcyNmIdx.containsKey(keyCcyNmIdx)) {
      throw CFLib.getDefaultExceptionFactory()
          .newUniqueIndexViolationException(
              getClass(), S_ProcName, "ISOCurrencyNameIdx", keyCcyNmIdx);
    }

    // Validate foreign keys

    // Proceed with adding the new record

    dictByPKey.put(pkey, Buff);

    dictByCcyCdIdx.put(keyCcyCdIdx, Buff);

    dictByCcyNmIdx.put(keyCcyNmIdx, Buff);
  }