public void deleteUuidDefByContPrevIdx(
     CFSecurityAuthorization Authorization, CFBamValueByContPrevIdxKey argKey) {
   final String S_ProcName = "deleteUuidDefByContPrevIdx";
   CFBamUuidDefBuff cur;
   LinkedList<CFBamUuidDefBuff> matchSet = new LinkedList<CFBamUuidDefBuff>();
   Iterator<CFBamUuidDefBuff> values = dictByPKey.values().iterator();
   while (values.hasNext()) {
     cur = values.next();
     if (argKey.equals(cur)) {
       matchSet.add(cur);
     }
   }
   Iterator<CFBamUuidDefBuff> iterMatch = matchSet.iterator();
   while (iterMatch.hasNext()) {
     cur = iterMatch.next();
     String subClassCode = cur.getClassCode();
     if ("UIDD".equals(subClassCode)) {
       schema.getTableUuidDef().deleteUuidDef(Authorization, cur);
     } else if ("UIDC".equals(subClassCode)) {
       schema.getTableUuidCol().deleteUuidCol(Authorization, (CFBamUuidColBuff) cur);
     } else if ("UIDT".equals(subClassCode)) {
       schema.getTableUuidType().deleteUuidType(Authorization, (CFBamUuidTypeBuff) cur);
     } else if ("IGUU".equals(subClassCode)) {
       schema.getTableUuidGen().deleteUuidGen(Authorization, (CFBamUuidGenBuff) cur);
     } else {
       throw CFLib.getDefaultExceptionFactory()
           .newUnsupportedClassException(
               getClass(),
               S_ProcName,
               "subClassCode",
               cur,
               "Instance of or subclass of UuidDef must not be \"" + subClassCode + "\"");
     }
   }
 }
 public CFBamUuidDefBuff lockBuff(CFSecurityAuthorization Authorization, CFBamValuePKey PKey) {
   final String S_ProcName = "lockBuff";
   CFBamUuidDefBuff buff = readDerived(Authorization, PKey);
   if ((buff != null) && (!buff.getClassCode().equals("UIDD"))) {
     buff = null;
   }
   return (buff);
 }
 public CFBamUuidDefBuff readBuffByUNameIdx(
     CFSecurityAuthorization Authorization, long TenantId, long ScopeId, String Name) {
   final String S_ProcName = "CFBamRamValue.readBuffByUNameIdx() ";
   CFBamUuidDefBuff buff = readDerivedByUNameIdx(Authorization, TenantId, ScopeId, Name);
   if ((buff != null) && buff.getClassCode().equals("VALU")) {
     return ((CFBamUuidDefBuff) buff);
   } else {
     return (null);
   }
 }
 public CFBamUuidDefBuff[] readAllBuff(CFSecurityAuthorization Authorization) {
   final String S_ProcName = "CFBamRamUuidDef.readAllBuff";
   CFBamUuidDefBuff buff;
   ArrayList<CFBamUuidDefBuff> filteredList = new ArrayList<CFBamUuidDefBuff>();
   CFBamUuidDefBuff[] buffList = readAllDerived(Authorization);
   for (int idx = 0; idx < buffList.length; idx++) {
     buff = buffList[idx];
     if ((buff != null) && buff.getClassCode().equals("UIDD")) {
       filteredList.add(buff);
     }
   }
   return (filteredList.toArray(new CFBamUuidDefBuff[0]));
 }
 public CFBamUuidDefBuff[] readBuffByNextIdx(
     CFSecurityAuthorization Authorization, Long NextTenantId, Long NextId) {
   final String S_ProcName = "CFBamRamValue.readBuffByNextIdx() ";
   CFBamUuidDefBuff buff;
   ArrayList<CFBamUuidDefBuff> filteredList = new ArrayList<CFBamUuidDefBuff>();
   CFBamUuidDefBuff[] buffList = readDerivedByNextIdx(Authorization, NextTenantId, NextId);
   for (int idx = 0; idx < buffList.length; idx++) {
     buff = buffList[idx];
     if ((buff != null) && buff.getClassCode().equals("VALU")) {
       filteredList.add((CFBamUuidDefBuff) buff);
     }
   }
   return (filteredList.toArray(new CFBamUuidDefBuff[0]));
 }
  public void createUuidDef(CFSecurityAuthorization Authorization, CFBamUuidDefBuff Buff) {
    final String S_ProcName = "createUuidDef";
    schema.getTableAtom().createAtom(Authorization, Buff);
    CFBamValuePKey pkey = schema.getFactoryValue().newPKey();
    pkey.setClassCode(Buff.getClassCode());
    pkey.setRequiredTenantId(Buff.getRequiredTenantId());
    pkey.setRequiredId(Buff.getRequiredId());
    // Validate unique indexes

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

    // Validate foreign keys

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

    // Proceed with adding the new record

    dictByPKey.put(pkey, Buff);
  }