public ListIterator<ICFLibAnyObj> enumerateDetails(MssCFGenContext genContext) {
    final String S_ProcName = "CFFreeSwitchMssCFIterateFSSFConferenceProfile.enumerateDetails() ";

    if (genContext == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), S_ProcName, 1, "genContext");
    }

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), S_ProcName, 1, "genContext.getGenDef()");
    }

    List<ICFLibAnyObj> list = new LinkedList<ICFLibAnyObj>();

    if (genDef instanceof ICFFreeSwitchFSSFConferenceObj) {
      Iterator<ICFFreeSwitchFSSFConferenceProfileObj> elements =
          ((ICFFreeSwitchFSSFConferenceObj) genDef).getOptionalComponentsProfile().iterator();
      while (elements.hasNext()) {
        list.add(elements.next());
      }
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(
              getClass(),
              S_ProcName,
              "genContext.getGenDef()",
              genDef,
              "ICFFreeSwitchFSSFConferenceObj");
    }

    return (list.listIterator());
  }
  public ListIterator<ICFLibAnyObj> enumerateDetails(MssCFGenContext genContext) {
    final String S_ProcName = "CFInternetMssCFIterateSecUserSecProxy.enumerateDetails() ";

    if (genContext == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), S_ProcName, 1, "genContext");
    }

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), S_ProcName, 1, "genContext.getGenDef()");
    }

    List<ICFLibAnyObj> list = new LinkedList<ICFLibAnyObj>();

    if (genDef instanceof ICFInternetSecUserObj) {
      Iterator<ICFSecuritySecSessionObj> elements =
          ((ICFInternetSecUserObj) genDef).getOptionalChildrenSecProxy().iterator();
      while (elements.hasNext()) {
        list.add(elements.next());
      }
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(
              getClass(), S_ProcName, "genContext.getGenDef()", genDef, "ICFInternetSecUserObj");
    }

    return (list.listIterator());
  }
 public void setBuff(CFGenKbISOCountryLanguageBuff value) {
   if (!((value == null) || (value instanceof CFGenKbISOCountryLanguageBuff))) {
     throw CFLib.getDefaultExceptionFactory()
         .newUnsupportedClassException(
             getClass(), "setBuff", "value", value, "CFGenKbISOCountryLanguageBuff");
   }
   buff = value;
   copyBuffToPKey();
   requiredContainerCountry = null;
   requiredParentLanguage = null;
 }
 public ICFGenKbISOCountryLanguageEditObj beginEdit() {
   if (edit != null) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), "beginEdit", "An edit is already open");
   }
   ICFGenKbISOCountryLanguageObj lockobj;
   if (getIsNew()) {
     lockobj = (ICFGenKbISOCountryLanguageObj) this;
   } else {
     lockobj = schema.getISOCountryLanguageTableObj().lockISOCountryLanguage(getPKey());
   }
   edit = schema.getISOCountryLanguageTableObj().newEditInstance(lockobj);
   return ((ICFGenKbISOCountryLanguageEditObj) edit);
 }
 public void setBuff(CFGenKbGelInstructionBuff value) {
   if (!((value == null) || (value instanceof CFGenKbGelReferenceBuff))) {
     throw CFLib.getDefaultExceptionFactory()
         .newUnsupportedClassException(
             getClass(), "setBuff", "value", value, "CFGenKbGelReferenceBuff");
   }
   buff = value;
   copyBuffToPKey();
   requiredOwnerTenant = null;
   requiredParentCartridge = null;
   optionalContainerCaller = null;
   optionalLookupPrev = null;
   optionalLookupNext = null;
 }
 public ICFGenKbSecGroupIncludeObj lockSecGroupInclude(CFGenKbSecGroupIncludePKey pkey) {
   ICFGenKbSecGroupIncludeObj locked = null;
   CFGenKbSecGroupIncludeBuff lockBuff =
       schema
           .getBackingStore()
           .getTableSecGroupInclude()
           .lockDerived(schema.getAuthorization(), pkey);
   if (lockBuff != null) {
     locked = schema.getSecGroupIncludeTableObj().newInstance();
     locked.setPKey(schema.getBackingStore().getFactorySecGroupInclude().newPKey());
     locked.setBuff(lockBuff);
     locked = (ICFGenKbSecGroupIncludeObj) locked.realize();
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newCollisionDetectedException(getClass(), "lockSecGroupInclude", pkey);
   }
   return (locked);
 }
  public void deleteISOCountryCurrency(
      CFGenKbAuthorization Authorization, CFGenKbISOCountryCurrencyBuff Buff) {
    final String S_ProcName = "CFGenKbRamISOCountryCurrencyTable.deleteISOCountryCurrency() ";
    CFGenKbISOCountryCurrencyPKey pkey = schema.getFactoryISOCountryCurrency().newPKey();
    pkey.setRequiredISOCountryId(Buff.getRequiredISOCountryId());
    pkey.setRequiredISOCurrencyId(Buff.getRequiredISOCurrencyId());
    CFGenKbISOCountryCurrencyBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
      return;
    }
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
      throw CFLib.getDefaultExceptionFactory()
          .newCollisionDetectedException(getClass(), "deleteISOCountryCurrency", pkey);
    }
    CFGenKbISOCountryCurrencyByCountryIdxKey keyCountryIdx =
        schema.getFactoryISOCountryCurrency().newCountryIdxKey();
    keyCountryIdx.setRequiredISOCountryId(existing.getRequiredISOCountryId());

    CFGenKbISOCountryCurrencyByCurrencyIdxKey keyCurrencyIdx =
        schema.getFactoryISOCountryCurrency().newCurrencyIdxKey();
    keyCurrencyIdx.setRequiredISOCurrencyId(existing.getRequiredISOCurrencyId());

    // Validate reverse foreign keys

    // Delete is valid

    Map<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff> subdict;

    dictByPKey.remove(pkey);

    subdict = dictByCountryIdx.get(keyCountryIdx);
    subdict.remove(pkey);

    subdict = dictByCurrencyIdx.get(keyCurrencyIdx);
    subdict.remove(pkey);
  }
 public List<ICFGenKbSecGroupIncludeObj> readSecGroupIncludeByIncludeIdx(
     long ClusterId, int IncludeGroupId, boolean forceRead) {
   final String S_ProcName = "readSecGroupIncludeByIncludeIdx";
   CFGenKbSecGroupIncludeByIncludeIdxKey key =
       schema.getBackingStore().getFactorySecGroupInclude().newIncludeIdxKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredIncludeGroupId(IncludeGroupId);
   Map<CFGenKbSecGroupIncludePKey, ICFGenKbSecGroupIncludeObj> dict;
   if (indexByIncludeIdx == null) {
     indexByIncludeIdx =
         new HashMap<
             CFGenKbSecGroupIncludeByIncludeIdxKey,
             Map<CFGenKbSecGroupIncludePKey, ICFGenKbSecGroupIncludeObj>>();
   }
   if ((!forceRead) && indexByIncludeIdx.containsKey(key)) {
     dict = indexByIncludeIdx.get(key);
   } else {
     dict = new HashMap<CFGenKbSecGroupIncludePKey, ICFGenKbSecGroupIncludeObj>();
     // Allow other threads to dirty-read while we're loading
     indexByIncludeIdx.put(key, dict);
     ICFGenKbSecGroupIncludeObj obj;
     CFGenKbSecGroupIncludeBuff[] buffList =
         schema
             .getBackingStore()
             .getTableSecGroupInclude()
             .readDerivedByIncludeIdx(schema.getAuthorization(), ClusterId, IncludeGroupId);
     CFGenKbSecGroupIncludeBuff buff;
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       obj = schema.getSecGroupIncludeTableObj().newInstance();
       obj.setPKey(schema.getBackingStore().getFactorySecGroupInclude().newPKey());
       obj.setBuff(buff);
       ICFGenKbSecGroupIncludeObj realized = (ICFGenKbSecGroupIncludeObj) obj.realize();
     }
   }
   Comparator<ICFGenKbSecGroupIncludeObj> cmp =
       new Comparator<ICFGenKbSecGroupIncludeObj>() {
         public int compare(ICFGenKbSecGroupIncludeObj lhs, ICFGenKbSecGroupIncludeObj rhs) {
           if (lhs == null) {
             if (rhs == null) {
               return (0);
             } else {
               return (-1);
             }
           } else if (rhs == null) {
             return (1);
           } else {
             CFGenKbSecGroupIncludePKey lhsPKey = lhs.getPKey();
             CFGenKbSecGroupIncludePKey rhsPKey = rhs.getPKey();
             int ret = lhsPKey.compareTo(rhsPKey);
             return (ret);
           }
         }
       };
   int len = dict.size();
   ICFGenKbSecGroupIncludeObj arr[] = new ICFGenKbSecGroupIncludeObj[len];
   Iterator<ICFGenKbSecGroupIncludeObj> valIter = dict.values().iterator();
   int idx = 0;
   while ((idx < len) && valIter.hasNext()) {
     arr[idx++] = valIter.next();
   }
   if (idx < len) {
     throw CFLib.getDefaultExceptionFactory()
         .newArgumentUnderflowException(getClass(), S_ProcName, 0, "idx", idx, len);
   } else if (valIter.hasNext()) {
     throw CFLib.getDefaultExceptionFactory()
         .newArgumentOverflowException(getClass(), S_ProcName, 0, "idx", idx, len);
   }
   Arrays.sort(arr, cmp);
   ArrayList<ICFGenKbSecGroupIncludeObj> arrayList =
       new ArrayList<ICFGenKbSecGroupIncludeObj>(len);
   for (idx = 0; idx < len; idx++) {
     arrayList.add(arr[idx]);
   }
   List<ICFGenKbSecGroupIncludeObj> sortedList = arrayList;
   return (sortedList);
 }
 public List<ICFGenKbSecGroupIncludeObj> readAllSecGroupInclude(boolean forceRead) {
   final String S_ProcName = "readAllSecGroupInclude";
   if ((allSecGroupInclude == null) || forceRead) {
     Map<CFGenKbSecGroupIncludePKey, ICFGenKbSecGroupIncludeObj> map =
         new HashMap<CFGenKbSecGroupIncludePKey, ICFGenKbSecGroupIncludeObj>();
     allSecGroupInclude = map;
     CFGenKbSecGroupIncludeBuff[] buffList =
         schema
             .getBackingStore()
             .getTableSecGroupInclude()
             .readAllDerived(schema.getAuthorization());
     CFGenKbSecGroupIncludeBuff buff;
     ICFGenKbSecGroupIncludeObj obj;
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       obj = newInstance();
       obj.setPKey(schema.getBackingStore().getFactorySecGroupInclude().newPKey());
       obj.setBuff(buff);
       ICFGenKbSecGroupIncludeObj realized = (ICFGenKbSecGroupIncludeObj) obj.realize();
     }
   }
   Comparator<ICFGenKbSecGroupIncludeObj> cmp =
       new Comparator<ICFGenKbSecGroupIncludeObj>() {
         public int compare(ICFGenKbSecGroupIncludeObj lhs, ICFGenKbSecGroupIncludeObj rhs) {
           if (lhs == null) {
             if (rhs == null) {
               return (0);
             } else {
               return (-1);
             }
           } else if (rhs == null) {
             return (1);
           } else {
             CFGenKbSecGroupIncludePKey lhsPKey = lhs.getPKey();
             CFGenKbSecGroupIncludePKey rhsPKey = rhs.getPKey();
             int ret = lhsPKey.compareTo(rhsPKey);
             return (ret);
           }
         }
       };
   int len = allSecGroupInclude.size();
   ICFGenKbSecGroupIncludeObj arr[] = new ICFGenKbSecGroupIncludeObj[len];
   Iterator<ICFGenKbSecGroupIncludeObj> valIter = allSecGroupInclude.values().iterator();
   int idx = 0;
   while ((idx < len) && valIter.hasNext()) {
     arr[idx++] = valIter.next();
   }
   if (idx < len) {
     throw CFLib.getDefaultExceptionFactory()
         .newArgumentUnderflowException(getClass(), S_ProcName, 0, "idx", idx, len);
   } else if (valIter.hasNext()) {
     throw CFLib.getDefaultExceptionFactory()
         .newArgumentOverflowException(getClass(), S_ProcName, 0, "idx", idx, len);
   }
   Arrays.sort(arr, cmp);
   ArrayList<ICFGenKbSecGroupIncludeObj> arrayList =
       new ArrayList<ICFGenKbSecGroupIncludeObj>(len);
   for (idx = 0; idx < len; idx++) {
     arrayList.add(arr[idx]);
   }
   List<ICFGenKbSecGroupIncludeObj> sortedList = arrayList;
   return (sortedList);
 }
 public CFGenKbISOCountryCurrencyBuff lastISOCountryCurrencyCursor(CFGenKbCursor Cursor) {
   throw CFLib.getDefaultExceptionFactory()
       .newNotImplementedYetException(getClass(), "lastISOCountryCurrencyCursor");
 }
  public void createISOCountryCurrency(
      CFGenKbAuthorization Authorization, CFGenKbISOCountryCurrencyBuff Buff) {
    final String S_ProcName = "createISOCountryCurrency";
    CFGenKbISOCountryCurrencyPKey pkey = schema.getFactoryISOCountryCurrency().newPKey();
    pkey.setRequiredISOCountryId(Buff.getRequiredISOCountryId());
    pkey.setRequiredISOCurrencyId(Buff.getRequiredISOCurrencyId());
    Buff.setRequiredISOCountryId(pkey.getRequiredISOCountryId());
    Buff.setRequiredISOCurrencyId(pkey.getRequiredISOCurrencyId());
    CFGenKbISOCountryCurrencyByCountryIdxKey keyCountryIdx =
        schema.getFactoryISOCountryCurrency().newCountryIdxKey();
    keyCountryIdx.setRequiredISOCountryId(Buff.getRequiredISOCountryId());

    CFGenKbISOCountryCurrencyByCurrencyIdxKey keyCurrencyIdx =
        schema.getFactoryISOCountryCurrency().newCurrencyIdxKey();
    keyCurrencyIdx.setRequiredISOCurrencyId(Buff.getRequiredISOCurrencyId());

    // Validate unique indexes

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

    // Validate foreign keys

    {
      boolean allNull = true;
      allNull = false;
      if (!allNull) {
        if (null
            == schema
                .getTableISOCountry()
                .readDerivedByIdIdx(Authorization, Buff.getRequiredISOCountryId())) {
          throw CFLib.getDefaultExceptionFactory()
              .newUnresolvedRelationException(
                  getClass(),
                  S_ProcName,
                  "Container",
                  "ISOCountryCurrencyCountry",
                  "ISOCountry",
                  null);
        }
      }
    }

    // Proceed with adding the new record

    dictByPKey.put(pkey, Buff);

    Map<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff> subdictCountryIdx;
    if (dictByCountryIdx.containsKey(keyCountryIdx)) {
      subdictCountryIdx = dictByCountryIdx.get(keyCountryIdx);
    } else {
      subdictCountryIdx =
          new HashMap<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff>();
      dictByCountryIdx.put(keyCountryIdx, subdictCountryIdx);
    }
    subdictCountryIdx.put(pkey, Buff);

    Map<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff> subdictCurrencyIdx;
    if (dictByCurrencyIdx.containsKey(keyCurrencyIdx)) {
      subdictCurrencyIdx = dictByCurrencyIdx.get(keyCurrencyIdx);
    } else {
      subdictCurrencyIdx =
          new HashMap<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff>();
      dictByCurrencyIdx.put(keyCurrencyIdx, subdictCurrencyIdx);
    }
    subdictCurrencyIdx.put(pkey, Buff);
  }
  public void updateISOCountryCurrency(
      CFGenKbAuthorization Authorization, CFGenKbISOCountryCurrencyBuff Buff) {
    CFGenKbISOCountryCurrencyPKey pkey = schema.getFactoryISOCountryCurrency().newPKey();
    pkey.setRequiredISOCountryId(Buff.getRequiredISOCountryId());
    pkey.setRequiredISOCurrencyId(Buff.getRequiredISOCurrencyId());
    CFGenKbISOCountryCurrencyBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newStaleCacheDetectedException(
              getClass(),
              "updateISOCountryCurrency",
              "Existing record not found",
              "ISOCountryCurrency",
              pkey);
    }
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
      throw CFLib.getDefaultExceptionFactory()
          .newCollisionDetectedException(getClass(), "updateISOCountryCurrency", pkey);
    }
    Buff.setRequiredRevision(Buff.getRequiredRevision() + 1);
    CFGenKbISOCountryCurrencyByCountryIdxKey existingKeyCountryIdx =
        schema.getFactoryISOCountryCurrency().newCountryIdxKey();
    existingKeyCountryIdx.setRequiredISOCountryId(existing.getRequiredISOCountryId());

    CFGenKbISOCountryCurrencyByCountryIdxKey newKeyCountryIdx =
        schema.getFactoryISOCountryCurrency().newCountryIdxKey();
    newKeyCountryIdx.setRequiredISOCountryId(Buff.getRequiredISOCountryId());

    CFGenKbISOCountryCurrencyByCurrencyIdxKey existingKeyCurrencyIdx =
        schema.getFactoryISOCountryCurrency().newCurrencyIdxKey();
    existingKeyCurrencyIdx.setRequiredISOCurrencyId(existing.getRequiredISOCurrencyId());

    CFGenKbISOCountryCurrencyByCurrencyIdxKey newKeyCurrencyIdx =
        schema.getFactoryISOCountryCurrency().newCurrencyIdxKey();
    newKeyCurrencyIdx.setRequiredISOCurrencyId(Buff.getRequiredISOCurrencyId());

    // Check unique indexes

    // Validate foreign keys

    {
      boolean allNull = true;

      if (allNull) {
        if (null
            == schema
                .getTableISOCountry()
                .readDerivedByIdIdx(Authorization, Buff.getRequiredISOCountryId())) {
          throw CFLib.getDefaultExceptionFactory()
              .newUnresolvedRelationException(
                  getClass(),
                  "updateISOCountryCurrency",
                  "Container",
                  "ISOCountryCurrencyCountry",
                  "ISOCountry",
                  null);
        }
      }
    }

    // Update is valid

    Map<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff> subdict;

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

    subdict = dictByCountryIdx.get(existingKeyCountryIdx);
    if (subdict != null) {
      subdict.remove(pkey);
    }
    if (dictByCountryIdx.containsKey(newKeyCountryIdx)) {
      subdict = dictByCountryIdx.get(newKeyCountryIdx);
    } else {
      subdict = new HashMap<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff>();
      dictByCountryIdx.put(newKeyCountryIdx, subdict);
    }
    subdict.put(pkey, Buff);

    subdict = dictByCurrencyIdx.get(existingKeyCurrencyIdx);
    if (subdict != null) {
      subdict.remove(pkey);
    }
    if (dictByCurrencyIdx.containsKey(newKeyCurrencyIdx)) {
      subdict = dictByCurrencyIdx.get(newKeyCurrencyIdx);
    } else {
      subdict = new HashMap<CFGenKbISOCountryCurrencyPKey, CFGenKbISOCountryCurrencyBuff>();
      dictByCurrencyIdx.put(newKeyCurrencyIdx, subdict);
    }
    subdict.put(pkey, Buff);
  }