public void deleteISOCurrency(CFBamAuthorization Authorization, CFBamISOCurrencyBuff Buff) {
    final String S_ProcName = "CFBamRamISOCurrencyTable.deleteISOCurrency() ";
    CFBamISOCurrencyPKey pkey = schema.getFactoryISOCurrency().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    CFBamISOCurrencyBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
      return;
    }
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
      throw CFLib.getDefaultExceptionFactory()
          .newCollisionDetectedException(getClass(), "deleteISOCurrency", pkey);
    }
    CFBamISOCurrencyByCcyCdIdxKey keyCcyCdIdx = schema.getFactoryISOCurrency().newCcyCdIdxKey();
    keyCcyCdIdx.setRequiredISOCode(existing.getRequiredISOCode());

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

    // Validate reverse foreign keys

    // Delete is valid

    schema
        .getTableISOCountryCurrency()
        .deleteISOCountryCurrencyByCurrencyIdx(Authorization, Buff.getRequiredId());
    Map<CFBamISOCurrencyPKey, CFBamISOCurrencyBuff> subdict;

    dictByPKey.remove(pkey);

    dictByCcyCdIdx.remove(keyCcyCdIdx);

    dictByCcyNmIdx.remove(keyCcyNmIdx);
  }
 public void deleteDelSubDep3ByDefSchemaIdx(
     CFBamAuthorization Authorization, Long argDefSchemaTenantId, Long argDefSchemaId) {
   CFBamDelDepByDefSchemaIdxKey key = schema.getFactoryDelDep().newDefSchemaIdxKey();
   key.setOptionalDefSchemaTenantId(argDefSchemaTenantId);
   key.setOptionalDefSchemaId(argDefSchemaId);
   deleteDelSubDep3ByDefSchemaIdx(Authorization, key);
 }
 public void deleteDelSubDep3ByTableIdx(
     CFBamAuthorization Authorization, long argRelationTenantId, long argRelationId) {
   CFBamDelDepByTableIdxKey key = schema.getFactoryDelDep().newTableIdxKey();
   key.setRequiredRelationTenantId(argRelationTenantId);
   key.setRequiredRelationId(argRelationId);
   deleteDelSubDep3ByTableIdx(Authorization, key);
 }
  public CFBamDelSubDep3Buff[] readDerivedByContDelDep2Idx(
      CFBamAuthorization Authorization, long ContTenantId, long ContDelDep2Id) {
    final String S_ProcName = "CFBamRamDelSubDep3.readDerivedByContDelDep2Idx() ";
    CFBamDelSubDep3ByContDelDep2IdxKey key = schema.getFactoryDelSubDep3().newContDelDep2IdxKey();
    key.setRequiredContTenantId(ContTenantId);
    key.setRequiredContDelDep2Id(ContDelDep2Id);

    CFBamDelSubDep3Buff[] recArray;
    if (dictByContDelDep2Idx.containsKey(key)) {
      Map<CFBamScopePKey, CFBamDelSubDep3Buff> subdictContDelDep2Idx =
          dictByContDelDep2Idx.get(key);
      recArray = new CFBamDelSubDep3Buff[subdictContDelDep2Idx.size()];
      Iterator<CFBamDelSubDep3Buff> iter = subdictContDelDep2Idx.values().iterator();
      int idx = 0;
      while (iter.hasNext()) {
        recArray[idx++] = iter.next();
      }
    } else {
      Map<CFBamScopePKey, CFBamDelSubDep3Buff> subdictContDelDep2Idx =
          new HashMap<CFBamScopePKey, CFBamDelSubDep3Buff>();
      dictByContDelDep2Idx.put(key, subdictContDelDep2Idx);
      recArray = new CFBamDelSubDep3Buff[0];
    }
    return (recArray);
  }
 public void deleteDelSubDep3ByContDelDep2Idx(
     CFBamAuthorization Authorization, long argContTenantId, long argContDelDep2Id) {
   CFBamDelSubDep3ByContDelDep2IdxKey key = schema.getFactoryDelSubDep3().newContDelDep2IdxKey();
   key.setRequiredContTenantId(argContTenantId);
   key.setRequiredContDelDep2Id(argContDelDep2Id);
   deleteDelSubDep3ByContDelDep2Idx(Authorization, key);
 }
 public void deleteDelSubDep3ByIdIdx(
     CFBamAuthorization Authorization, long argTenantId, long argId) {
   CFBamScopePKey key = schema.getFactoryScope().newPKey();
   key.setRequiredTenantId(argTenantId);
   key.setRequiredId(argId);
   deleteDelSubDep3ByIdIdx(Authorization, key);
 }
  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);
  }
 public CFBamDelSubDep3Buff lockDerived(CFBamAuthorization Authorization, CFBamScopePKey PKey) {
   final String S_ProcName = "CFBamRamDelSubDep3.readDerived() ";
   CFBamScopePKey key = schema.getFactoryScope().newPKey();
   key.setRequiredTenantId(PKey.getRequiredTenantId());
   key.setRequiredId(PKey.getRequiredId());
   CFBamDelSubDep3Buff buff;
   if (dictByPKey.containsKey(key)) {
     buff = dictByPKey.get(key);
   } else {
     buff = null;
   }
   return (buff);
 }
  public CFBamISOCurrencyBuff readDerivedByCcyNmIdx(CFBamAuthorization Authorization, String Name) {
    final String S_ProcName = "CFBamRamISOCurrency.readDerivedByCcyNmIdx() ";
    CFBamISOCurrencyByCcyNmIdxKey key = schema.getFactoryISOCurrency().newCcyNmIdxKey();
    key.setRequiredName(Name);

    CFBamISOCurrencyBuff buff;
    if (dictByCcyNmIdx.containsKey(key)) {
      buff = dictByCcyNmIdx.get(key);
    } else {
      buff = null;
    }
    return (buff);
  }
  public CFBamISOCurrencyBuff readDerivedByIdIdx(CFBamAuthorization Authorization, short Id) {
    final String S_ProcName = "CFBamRamISOCurrency.readDerivedByIdIdx() ";
    CFBamISOCurrencyPKey key = schema.getFactoryISOCurrency().newPKey();
    key.setRequiredId(Id);

    CFBamISOCurrencyBuff buff;
    if (dictByPKey.containsKey(key)) {
      buff = dictByPKey.get(key);
    } else {
      buff = null;
    }
    return (buff);
  }
  public void deleteDelSubDep3(CFBamAuthorization Authorization, CFBamDelSubDep3Buff Buff) {
    final String S_ProcName = "CFBamRamDelSubDep3Table.deleteDelSubDep3() ";
    CFBamScopePKey pkey = schema.getFactoryScope().newPKey();
    pkey.setRequiredTenantId(Buff.getRequiredTenantId());
    pkey.setRequiredId(Buff.getRequiredId());
    CFBamDelSubDep3Buff existing = dictByPKey.get(pkey);
    if (existing == null) {
      return;
    }
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
      throw CFLib.getDefaultExceptionFactory()
          .newCollisionDetectedException(getClass(), "deleteDelSubDep3", pkey);
    }
    CFBamDelSubDep3ByContDelDep2IdxKey keyContDelDep2Idx =
        schema.getFactoryDelSubDep3().newContDelDep2IdxKey();
    keyContDelDep2Idx.setRequiredContTenantId(existing.getRequiredContTenantId());
    keyContDelDep2Idx.setRequiredContDelDep2Id(existing.getRequiredContDelDep2Id());

    CFBamDelSubDep3ByUNameIdxKey keyUNameIdx = schema.getFactoryDelSubDep3().newUNameIdxKey();
    keyUNameIdx.setRequiredContTenantId(existing.getRequiredContTenantId());
    keyUNameIdx.setRequiredContDelDep2Id(existing.getRequiredContDelDep2Id());
    keyUNameIdx.setRequiredName(existing.getRequiredName());

    // Validate reverse foreign keys

    // Delete is valid

    Map<CFBamScopePKey, CFBamDelSubDep3Buff> subdict;

    dictByPKey.remove(pkey);

    subdict = dictByContDelDep2Idx.get(keyContDelDep2Idx);
    subdict.remove(pkey);

    dictByUNameIdx.remove(keyUNameIdx);

    schema.getTableDelDep().deleteDelDep(Authorization, Buff);
  }
  public CFBamDelSubDep3Buff readDerivedByUNameIdx(
      CFBamAuthorization Authorization, long ContTenantId, long ContDelDep2Id, String Name) {
    final String S_ProcName = "CFBamRamDelSubDep3.readDerivedByUNameIdx() ";
    CFBamDelSubDep3ByUNameIdxKey key = schema.getFactoryDelSubDep3().newUNameIdxKey();
    key.setRequiredContTenantId(ContTenantId);
    key.setRequiredContDelDep2Id(ContDelDep2Id);
    key.setRequiredName(Name);

    CFBamDelSubDep3Buff buff;
    if (dictByUNameIdx.containsKey(key)) {
      buff = dictByUNameIdx.get(key);
    } else {
      buff = null;
    }
    return (buff);
  }
  public CFBamCursor openDelSubDep3CursorByContDelDep2Idx(
      CFBamAuthorization Authorization, long ContTenantId, long ContDelDep2Id) {
    CFBamCursor cursor;
    CFBamDelSubDep3ByContDelDep2IdxKey key = schema.getFactoryDelSubDep3().newContDelDep2IdxKey();
    key.setRequiredContTenantId(ContTenantId);
    key.setRequiredContDelDep2Id(ContDelDep2Id);

    if (dictByContDelDep2Idx.containsKey(key)) {
      Map<CFBamScopePKey, CFBamDelSubDep3Buff> subdictContDelDep2Idx =
          dictByContDelDep2Idx.get(key);
      cursor = new CFBamRamDelSubDep3Cursor(Authorization, schema, subdictContDelDep2Idx.values());
    } else {
      cursor =
          new CFBamRamDelSubDep3Cursor(Authorization, schema, new ArrayList<CFBamDelSubDep3Buff>());
    }
    return (cursor);
  }
 public CFBamDelSubDep3Buff[] readDerivedByTableIdx(
     CFBamAuthorization Authorization, long RelationTenantId, long RelationId) {
   final String S_ProcName = "CFBamRamDelDep.readDerivedByTableIdx() ";
   CFBamDelDepBuff buffList[] =
       schema.getTableDelDep().readDerivedByTableIdx(Authorization, RelationTenantId, RelationId);
   if (buffList == null) {
     return (null);
   } else {
     CFBamDelDepBuff buff;
     ArrayList<CFBamDelSubDep3Buff> filteredList = new ArrayList<CFBamDelSubDep3Buff>();
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       if ((buff != null) && (buff instanceof CFBamDelSubDep3Buff)) {
         filteredList.add((CFBamDelSubDep3Buff) buff);
       }
     }
     return (filteredList.toArray(new CFBamDelSubDep3Buff[0]));
   }
 }
 public void deleteISOCurrencyByCcyNmIdx(CFBamAuthorization Authorization, String argName) {
   CFBamISOCurrencyByCcyNmIdxKey key = schema.getFactoryISOCurrency().newCcyNmIdxKey();
   key.setRequiredName(argName);
   deleteISOCurrencyByCcyNmIdx(Authorization, key);
 }
 public void deleteISOCurrencyByIdIdx(CFBamAuthorization Authorization, short argId) {
   CFBamISOCurrencyPKey key = schema.getFactoryISOCurrency().newPKey();
   key.setRequiredId(argId);
   deleteISOCurrencyByIdIdx(Authorization, key);
 }
  public void updateISOCurrency(CFBamAuthorization Authorization, CFBamISOCurrencyBuff Buff) {
    CFBamISOCurrencyPKey pkey = schema.getFactoryISOCurrency().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    CFBamISOCurrencyBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newStaleCacheDetectedException(
              getClass(), "updateISOCurrency", "Existing record not found", "ISOCurrency", pkey);
    }
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
      throw CFLib.getDefaultExceptionFactory()
          .newCollisionDetectedException(getClass(), "updateISOCurrency", pkey);
    }
    Buff.setRequiredRevision(Buff.getRequiredRevision() + 1);
    CFBamISOCurrencyByCcyCdIdxKey existingKeyCcyCdIdx =
        schema.getFactoryISOCurrency().newCcyCdIdxKey();
    existingKeyCcyCdIdx.setRequiredISOCode(existing.getRequiredISOCode());

    CFBamISOCurrencyByCcyCdIdxKey newKeyCcyCdIdx = schema.getFactoryISOCurrency().newCcyCdIdxKey();
    newKeyCcyCdIdx.setRequiredISOCode(Buff.getRequiredISOCode());

    CFBamISOCurrencyByCcyNmIdxKey existingKeyCcyNmIdx =
        schema.getFactoryISOCurrency().newCcyNmIdxKey();
    existingKeyCcyNmIdx.setRequiredName(existing.getRequiredName());

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

    // Check unique indexes

    if (!existingKeyCcyCdIdx.equals(newKeyCcyCdIdx)) {
      if (dictByCcyCdIdx.containsKey(newKeyCcyCdIdx)) {
        throw CFLib.getDefaultExceptionFactory()
            .newUniqueIndexViolationException(
                getClass(), "updateISOCurrency", "ISOCurrencyCodeIdx", newKeyCcyCdIdx);
      }
    }

    if (!existingKeyCcyNmIdx.equals(newKeyCcyNmIdx)) {
      if (dictByCcyNmIdx.containsKey(newKeyCcyNmIdx)) {
        throw CFLib.getDefaultExceptionFactory()
            .newUniqueIndexViolationException(
                getClass(), "updateISOCurrency", "ISOCurrencyNameIdx", newKeyCcyNmIdx);
      }
    }

    // Validate foreign keys

    // Update is valid

    Map<CFBamISOCurrencyPKey, CFBamISOCurrencyBuff> subdict;

    dictByPKey.remove(pkey);
    dictByPKey.put(pkey, Buff);

    dictByCcyCdIdx.remove(existingKeyCcyCdIdx);
    dictByCcyCdIdx.put(newKeyCcyCdIdx, Buff);

    dictByCcyNmIdx.remove(existingKeyCcyNmIdx);
    dictByCcyNmIdx.put(newKeyCcyNmIdx, Buff);
  }
  public void createDelSubDep3(CFBamAuthorization Authorization, CFBamDelSubDep3Buff Buff) {
    final String S_ProcName = "createDelSubDep3";
    schema.getTableDelDep().createDelDep(Authorization, Buff);
    CFBamScopePKey pkey = schema.getFactoryScope().newPKey();
    pkey.setClassCode(Buff.getClassCode());
    pkey.setRequiredTenantId(Buff.getRequiredTenantId());
    pkey.setRequiredId(Buff.getRequiredId());
    CFBamDelSubDep3ByContDelDep2IdxKey keyContDelDep2Idx =
        schema.getFactoryDelSubDep3().newContDelDep2IdxKey();
    keyContDelDep2Idx.setRequiredContTenantId(Buff.getRequiredContTenantId());
    keyContDelDep2Idx.setRequiredContDelDep2Id(Buff.getRequiredContDelDep2Id());

    CFBamDelSubDep3ByUNameIdxKey keyUNameIdx = schema.getFactoryDelSubDep3().newUNameIdxKey();
    keyUNameIdx.setRequiredContTenantId(Buff.getRequiredContTenantId());
    keyUNameIdx.setRequiredContDelDep2Id(Buff.getRequiredContDelDep2Id());
    keyUNameIdx.setRequiredName(Buff.getRequiredName());

    // Validate unique indexes

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

    if (dictByUNameIdx.containsKey(keyUNameIdx)) {
      throw CFLib.getDefaultExceptionFactory()
          .newUniqueIndexViolationException(
              getClass(), S_ProcName, "DelSubDep3UNameIdx", keyUNameIdx);
    }

    // Validate foreign keys

    {
      boolean allNull = true;
      allNull = false;
      allNull = false;
      if (!allNull) {
        if (null
            == schema
                .getTableDelDep()
                .readDerivedByIdIdx(
                    Authorization, Buff.getRequiredTenantId(), Buff.getRequiredId())) {
          throw CFLib.getDefaultExceptionFactory()
              .newUnresolvedRelationException(
                  getClass(), S_ProcName, "Superclass", "SuperClass", "DelDep", null);
        }
      }
    }

    {
      boolean allNull = true;
      allNull = false;
      allNull = false;
      if (!allNull) {
        if (null
            == schema
                .getTableDelSubDep2()
                .readDerivedByIdIdx(
                    Authorization,
                    Buff.getRequiredContTenantId(),
                    Buff.getRequiredContDelDep2Id())) {
          throw CFLib.getDefaultExceptionFactory()
              .newUnresolvedRelationException(
                  getClass(), S_ProcName, "Container", "ContDelSubDep3", "DelSubDep2", null);
        }
      }
    }

    // Proceed with adding the new record

    dictByPKey.put(pkey, Buff);

    Map<CFBamScopePKey, CFBamDelSubDep3Buff> subdictContDelDep2Idx;
    if (dictByContDelDep2Idx.containsKey(keyContDelDep2Idx)) {
      subdictContDelDep2Idx = dictByContDelDep2Idx.get(keyContDelDep2Idx);
    } else {
      subdictContDelDep2Idx = new HashMap<CFBamScopePKey, CFBamDelSubDep3Buff>();
      dictByContDelDep2Idx.put(keyContDelDep2Idx, subdictContDelDep2Idx);
    }
    subdictContDelDep2Idx.put(pkey, Buff);

    dictByUNameIdx.put(keyUNameIdx, Buff);
  }
  public void updateDelSubDep3(CFBamAuthorization Authorization, CFBamDelSubDep3Buff Buff) {
    schema.getTableDelDep().updateDelDep(Authorization, Buff);
    CFBamScopePKey pkey = schema.getFactoryScope().newPKey();
    pkey.setRequiredTenantId(Buff.getRequiredTenantId());
    pkey.setRequiredId(Buff.getRequiredId());
    CFBamDelSubDep3Buff existing = dictByPKey.get(pkey);
    if (existing == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newStaleCacheDetectedException(
              getClass(), "updateDelSubDep3", "Existing record not found", "DelSubDep3", pkey);
    }
    CFBamDelSubDep3ByContDelDep2IdxKey existingKeyContDelDep2Idx =
        schema.getFactoryDelSubDep3().newContDelDep2IdxKey();
    existingKeyContDelDep2Idx.setRequiredContTenantId(existing.getRequiredContTenantId());
    existingKeyContDelDep2Idx.setRequiredContDelDep2Id(existing.getRequiredContDelDep2Id());

    CFBamDelSubDep3ByContDelDep2IdxKey newKeyContDelDep2Idx =
        schema.getFactoryDelSubDep3().newContDelDep2IdxKey();
    newKeyContDelDep2Idx.setRequiredContTenantId(Buff.getRequiredContTenantId());
    newKeyContDelDep2Idx.setRequiredContDelDep2Id(Buff.getRequiredContDelDep2Id());

    CFBamDelSubDep3ByUNameIdxKey existingKeyUNameIdx =
        schema.getFactoryDelSubDep3().newUNameIdxKey();
    existingKeyUNameIdx.setRequiredContTenantId(existing.getRequiredContTenantId());
    existingKeyUNameIdx.setRequiredContDelDep2Id(existing.getRequiredContDelDep2Id());
    existingKeyUNameIdx.setRequiredName(existing.getRequiredName());

    CFBamDelSubDep3ByUNameIdxKey newKeyUNameIdx = schema.getFactoryDelSubDep3().newUNameIdxKey();
    newKeyUNameIdx.setRequiredContTenantId(Buff.getRequiredContTenantId());
    newKeyUNameIdx.setRequiredContDelDep2Id(Buff.getRequiredContDelDep2Id());
    newKeyUNameIdx.setRequiredName(Buff.getRequiredName());

    // Check unique indexes

    if (!existingKeyUNameIdx.equals(newKeyUNameIdx)) {
      if (dictByUNameIdx.containsKey(newKeyUNameIdx)) {
        throw CFLib.getDefaultExceptionFactory()
            .newUniqueIndexViolationException(
                getClass(), "updateDelSubDep3", "DelSubDep3UNameIdx", newKeyUNameIdx);
      }
    }

    // Validate foreign keys

    {
      boolean allNull = true;

      if (allNull) {
        if (null
            == schema
                .getTableDelDep()
                .readDerivedByIdIdx(
                    Authorization, Buff.getRequiredTenantId(), Buff.getRequiredId())) {
          throw CFLib.getDefaultExceptionFactory()
              .newUnresolvedRelationException(
                  getClass(), "updateDelSubDep3", "Superclass", "SuperClass", "DelDep", null);
        }
      }
    }

    {
      boolean allNull = true;

      if (allNull) {
        if (null
            == schema
                .getTableDelSubDep2()
                .readDerivedByIdIdx(
                    Authorization,
                    Buff.getRequiredContTenantId(),
                    Buff.getRequiredContDelDep2Id())) {
          throw CFLib.getDefaultExceptionFactory()
              .newUnresolvedRelationException(
                  getClass(),
                  "updateDelSubDep3",
                  "Container",
                  "ContDelSubDep3",
                  "DelSubDep2",
                  null);
        }
      }
    }

    // Update is valid

    Map<CFBamScopePKey, CFBamDelSubDep3Buff> subdict;

    dictByPKey.remove(pkey);
    dictByPKey.put(pkey, Buff);

    subdict = dictByContDelDep2Idx.get(existingKeyContDelDep2Idx);
    if (subdict != null) {
      subdict.remove(pkey);
    }
    if (dictByContDelDep2Idx.containsKey(newKeyContDelDep2Idx)) {
      subdict = dictByContDelDep2Idx.get(newKeyContDelDep2Idx);
    } else {
      subdict = new HashMap<CFBamScopePKey, CFBamDelSubDep3Buff>();
      dictByContDelDep2Idx.put(newKeyContDelDep2Idx, subdict);
    }
    subdict.put(pkey, Buff);

    dictByUNameIdx.remove(existingKeyUNameIdx);
    dictByUNameIdx.put(newKeyUNameIdx, Buff);
  }