public void deleteTSecGroupMemberByUUserIdx(long TenantId, int TSecGroupId, UUID SecUserId) {
   if (indexByUUserIdx == null) {
     indexByUUserIdx =
         new HashMap<CFSecurityTSecGroupMemberByUUserIdxKey, ICFSecurityTSecGroupMemberObj>();
   }
   CFSecurityTSecGroupMemberByUUserIdxKey key =
       ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey();
   key.setRequiredTenantId(TenantId);
   key.setRequiredTSecGroupId(TSecGroupId);
   key.setRequiredSecUserId(SecUserId);
   ICFSecurityTSecGroupMemberObj obj = null;
   if (indexByUUserIdx.containsKey(key)) {
     obj = indexByUUserIdx.get(key);
     ((ICFBamSchema) schema.getBackingStore())
         .getTableTSecGroupMember()
         .deleteTSecGroupMemberByUUserIdx(
             schema.getAuthorization(), TenantId, TSecGroupId, SecUserId);
     obj.forget(true);
   } else {
     ((ICFBamSchema) schema.getBackingStore())
         .getTableTSecGroupMember()
         .deleteTSecGroupMemberByUUserIdx(
             schema.getAuthorization(), TenantId, TSecGroupId, SecUserId);
   }
 }
 public void deleteTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj) {
   ICFSecurityTSecGroupMemberObj obj = Obj;
   ((ICFBamSchema) schema.getBackingStore())
       .getTableTSecGroupMember()
       .deleteTSecGroupMember(schema.getAuthorization(), obj.getTSecGroupMemberBuff());
   obj.forget(true);
 }
 public ICFSecurityTSecGroupMemberObj readTSecGroupMemberByUUserIdx(
     long TenantId, int TSecGroupId, UUID SecUserId, boolean forceRead) {
   if (indexByUUserIdx == null) {
     indexByUUserIdx =
         new HashMap<CFSecurityTSecGroupMemberByUUserIdxKey, ICFSecurityTSecGroupMemberObj>();
   }
   CFSecurityTSecGroupMemberByUUserIdxKey key =
       ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey();
   key.setRequiredTenantId(TenantId);
   key.setRequiredTSecGroupId(TSecGroupId);
   key.setRequiredSecUserId(SecUserId);
   ICFSecurityTSecGroupMemberObj obj = null;
   if ((!forceRead) && indexByUUserIdx.containsKey(key)) {
     obj = indexByUUserIdx.get(key);
   } else {
     CFSecurityTSecGroupMemberBuff buff =
         ((ICFBamSchema) schema.getBackingStore())
             .getTableTSecGroupMember()
             .readDerivedByUUserIdx(schema.getAuthorization(), TenantId, TSecGroupId, SecUserId);
     if (buff != null) {
       obj = schema.getTSecGroupMemberTableObj().newInstance();
       obj.setPKey(
           ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecurityTSecGroupMemberObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUUserIdx.put(key, null);
     }
   }
   return (obj);
 }
 public void deleteISOCountryCurrency(ICFSecurityISOCountryCurrencyObj Obj) {
   ICFSecurityISOCountryCurrencyObj obj = Obj;
   ((ICFInternetSchema) schema.getBackingStore())
       .getTableISOCountryCurrency()
       .deleteISOCountryCurrency(schema.getAuthorization(), obj.getISOCountryCurrencyBuff());
   obj.forget(true);
 }
 public ICFSecurityTSecGroupMemberObj readTSecGroupMember(
     CFSecurityTSecGroupMemberPKey pkey, boolean forceRead) {
   ICFSecurityTSecGroupMemberObj obj = null;
   if ((!forceRead) && members.containsKey(pkey)) {
     obj = members.get(pkey);
   } else {
     CFSecurityTSecGroupMemberBuff readBuff =
         ((ICFBamSchema) schema.getBackingStore())
             .getTableTSecGroupMember()
             .readDerivedByIdIdx(
                 schema.getAuthorization(),
                 pkey.getRequiredTenantId(),
                 pkey.getRequiredTSecGroupMemberId());
     if (readBuff != null) {
       obj = schema.getTSecGroupMemberTableObj().newInstance();
       obj.setPKey(
           ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey());
       obj.setBuff(readBuff);
       obj = (ICFSecurityTSecGroupMemberObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       members.put(pkey, null);
     }
   }
   return (obj);
 }
 public ICFSecurityISOCountryCurrencyObj readISOCountryCurrency(
     CFSecurityISOCountryCurrencyPKey pkey, boolean forceRead) {
   ICFSecurityISOCountryCurrencyObj obj = null;
   if ((!forceRead) && members.containsKey(pkey)) {
     obj = members.get(pkey);
   } else {
     CFSecurityISOCountryCurrencyBuff readBuff =
         ((ICFInternetSchema) schema.getBackingStore())
             .getTableISOCountryCurrency()
             .readDerivedByIdIdx(
                 schema.getAuthorization(),
                 pkey.getRequiredISOCountryId(),
                 pkey.getRequiredISOCurrencyId());
     if (readBuff != null) {
       obj = schema.getISOCountryCurrencyTableObj().newInstance();
       obj.setPKey(
           ((ICFInternetSchema) schema.getBackingStore())
               .getFactoryISOCountryCurrency()
               .newPKey());
       obj.setBuff(readBuff);
       obj = (ICFSecurityISOCountryCurrencyObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       members.put(pkey, null);
     }
   }
   return (obj);
 }
 public ICFSecurityTSecGroupMemberObj updateTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj) {
   ICFSecurityTSecGroupMemberObj obj = Obj;
   ((ICFBamSchema) schema.getBackingStore())
       .getTableTSecGroupMember()
       .updateTSecGroupMember(schema.getAuthorization(), Obj.getTSecGroupMemberBuff());
   obj = (ICFSecurityTSecGroupMemberObj) Obj.realize();
   return (obj);
 }
 public ICFSecurityISOCountryCurrencyObj updateISOCountryCurrency(
     ICFSecurityISOCountryCurrencyObj Obj) {
   ICFSecurityISOCountryCurrencyObj obj = Obj;
   ((ICFInternetSchema) schema.getBackingStore())
       .getTableISOCountryCurrency()
       .updateISOCountryCurrency(schema.getAuthorization(), Obj.getISOCountryCurrencyBuff());
   obj = (ICFSecurityISOCountryCurrencyObj) Obj.realize();
   return (obj);
 }
 public ICFSecurityTSecGroupMemberObj createTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj) {
   ICFSecurityTSecGroupMemberObj obj = Obj;
   CFSecurityTSecGroupMemberBuff buff = obj.getTSecGroupMemberBuff();
   ((ICFBamSchema) schema.getBackingStore())
       .getTableTSecGroupMember()
       .createTSecGroupMember(schema.getAuthorization(), buff);
   obj.copyBuffToPKey();
   obj = obj.realize();
   return (obj);
 }
 public ICFSecurityISOCountryCurrencyObj createISOCountryCurrency(
     ICFSecurityISOCountryCurrencyObj Obj) {
   ICFSecurityISOCountryCurrencyObj obj = Obj;
   CFSecurityISOCountryCurrencyBuff buff = obj.getISOCountryCurrencyBuff();
   ((ICFInternetSchema) schema.getBackingStore())
       .getTableISOCountryCurrency()
       .createISOCountryCurrency(schema.getAuthorization(), buff);
   obj.copyBuffToPKey();
   obj = obj.realize();
   return (obj);
 }
 public void deleteISOCountryCurrencyByCurrencyIdx(short ISOCurrencyId) {
   CFSecurityISOCountryCurrencyByCurrencyIdxKey key =
       ((ICFInternetSchema) schema.getBackingStore())
           .getFactoryISOCountryCurrency()
           .newCurrencyIdxKey();
   key.setRequiredISOCurrencyId(ISOCurrencyId);
   if (indexByCurrencyIdx == null) {
     indexByCurrencyIdx =
         new HashMap<
             CFSecurityISOCountryCurrencyByCurrencyIdxKey,
             Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj>>();
   }
   if (indexByCurrencyIdx.containsKey(key)) {
     Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj> dict =
         indexByCurrencyIdx.get(key);
     ((ICFInternetSchema) schema.getBackingStore())
         .getTableISOCountryCurrency()
         .deleteISOCountryCurrencyByCurrencyIdx(schema.getAuthorization(), ISOCurrencyId);
     Iterator<ICFSecurityISOCountryCurrencyObj> iter = dict.values().iterator();
     ICFSecurityISOCountryCurrencyObj obj;
     List<ICFSecurityISOCountryCurrencyObj> toForget =
         new LinkedList<ICFSecurityISOCountryCurrencyObj>();
     while (iter.hasNext()) {
       obj = iter.next();
       toForget.add(obj);
     }
     iter = toForget.iterator();
     while (iter.hasNext()) {
       obj = iter.next();
       obj.forget(true);
     }
     indexByCurrencyIdx.remove(key);
   } else {
     ((ICFInternetSchema) schema.getBackingStore())
         .getTableISOCountryCurrency()
         .deleteISOCountryCurrencyByCurrencyIdx(schema.getAuthorization(), ISOCurrencyId);
   }
 }
 public void deleteTSecGroupMemberByGroupIdx(long TenantId, int TSecGroupId) {
   CFSecurityTSecGroupMemberByGroupIdxKey key =
       ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newGroupIdxKey();
   key.setRequiredTenantId(TenantId);
   key.setRequiredTSecGroupId(TSecGroupId);
   if (indexByGroupIdx == null) {
     indexByGroupIdx =
         new HashMap<
             CFSecurityTSecGroupMemberByGroupIdxKey,
             Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj>>();
   }
   if (indexByGroupIdx.containsKey(key)) {
     Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj> dict =
         indexByGroupIdx.get(key);
     ((ICFBamSchema) schema.getBackingStore())
         .getTableTSecGroupMember()
         .deleteTSecGroupMemberByGroupIdx(schema.getAuthorization(), TenantId, TSecGroupId);
     Iterator<ICFSecurityTSecGroupMemberObj> iter = dict.values().iterator();
     ICFSecurityTSecGroupMemberObj obj;
     List<ICFSecurityTSecGroupMemberObj> toForget =
         new LinkedList<ICFSecurityTSecGroupMemberObj>();
     while (iter.hasNext()) {
       obj = iter.next();
       toForget.add(obj);
     }
     iter = toForget.iterator();
     while (iter.hasNext()) {
       obj = iter.next();
       obj.forget(true);
     }
     indexByGroupIdx.remove(key);
   } else {
     ((ICFBamSchema) schema.getBackingStore())
         .getTableTSecGroupMember()
         .deleteTSecGroupMemberByGroupIdx(schema.getAuthorization(), TenantId, TSecGroupId);
   }
 }
 public CFSecuritySysClusterBuff getBuff() {
   if (buff == null) {
     if (isNew) {
       buff = ((ICFAsteriskSchema) schema.getBackingStore()).getFactorySysCluster().newBuff();
     } else {
       // Read the data buff via the backing store
       buff =
           ((ICFAsteriskSchema) schema.getBackingStore())
               .getTableSysCluster()
               .readDerivedByIdIdx(schema.getAuthorization(), getPKey().getRequiredSingletonId());
       if (buff != null) {
         copyBuffToPKey();
       }
     }
   }
   return (buff);
 }
 public ICFSecurityTSecGroupMemberObj lockTSecGroupMember(CFSecurityTSecGroupMemberPKey pkey) {
   ICFSecurityTSecGroupMemberObj locked = null;
   CFSecurityTSecGroupMemberBuff lockBuff =
       ((ICFBamSchema) schema.getBackingStore())
           .getTableTSecGroupMember()
           .lockDerived(schema.getAuthorization(), pkey);
   if (lockBuff != null) {
     locked = schema.getTSecGroupMemberTableObj().newInstance();
     locked.setPKey(
         ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey());
     locked.setBuff(lockBuff);
     locked = (ICFSecurityTSecGroupMemberObj) locked.realize();
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newCollisionDetectedException(getClass(), "lockTSecGroupMember", pkey);
   }
   return (locked);
 }
 public ICFSecurityISOCountryCurrencyObj lockISOCountryCurrency(
     CFSecurityISOCountryCurrencyPKey pkey) {
   ICFSecurityISOCountryCurrencyObj locked = null;
   CFSecurityISOCountryCurrencyBuff lockBuff =
       ((ICFInternetSchema) schema.getBackingStore())
           .getTableISOCountryCurrency()
           .lockDerived(schema.getAuthorization(), pkey);
   if (lockBuff != null) {
     locked = schema.getISOCountryCurrencyTableObj().newInstance();
     locked.setPKey(
         ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountryCurrency().newPKey());
     locked.setBuff(lockBuff);
     locked = (ICFSecurityISOCountryCurrencyObj) locked.realize();
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newCollisionDetectedException(getClass(), "lockISOCountryCurrency", pkey);
   }
   return (locked);
 }
 public List<ICFSecurityISOCountryCurrencyObj> readISOCountryCurrencyByCurrencyIdx(
     short ISOCurrencyId, boolean forceRead) {
   final String S_ProcName = "readISOCountryCurrencyByCurrencyIdx";
   CFSecurityISOCountryCurrencyByCurrencyIdxKey key =
       ((ICFInternetSchema) schema.getBackingStore())
           .getFactoryISOCountryCurrency()
           .newCurrencyIdxKey();
   key.setRequiredISOCurrencyId(ISOCurrencyId);
   Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj> dict;
   if (indexByCurrencyIdx == null) {
     indexByCurrencyIdx =
         new HashMap<
             CFSecurityISOCountryCurrencyByCurrencyIdxKey,
             Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj>>();
   }
   if ((!forceRead) && indexByCurrencyIdx.containsKey(key)) {
     dict = indexByCurrencyIdx.get(key);
   } else {
     dict = new HashMap<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj>();
     // Allow other threads to dirty-read while we're loading
     indexByCurrencyIdx.put(key, dict);
     ICFSecurityISOCountryCurrencyObj obj;
     CFSecurityISOCountryCurrencyBuff[] buffList =
         ((ICFInternetSchema) schema.getBackingStore())
             .getTableISOCountryCurrency()
             .readDerivedByCurrencyIdx(schema.getAuthorization(), ISOCurrencyId);
     CFSecurityISOCountryCurrencyBuff buff;
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       obj = schema.getISOCountryCurrencyTableObj().newInstance();
       obj.setPKey(
           ((ICFInternetSchema) schema.getBackingStore())
               .getFactoryISOCountryCurrency()
               .newPKey());
       obj.setBuff(buff);
       ICFSecurityISOCountryCurrencyObj realized =
           (ICFSecurityISOCountryCurrencyObj) obj.realize();
     }
   }
   Comparator<ICFSecurityISOCountryCurrencyObj> cmp =
       new Comparator<ICFSecurityISOCountryCurrencyObj>() {
         public int compare(
             ICFSecurityISOCountryCurrencyObj lhs, ICFSecurityISOCountryCurrencyObj rhs) {
           if (lhs == null) {
             if (rhs == null) {
               return (0);
             } else {
               return (-1);
             }
           } else if (rhs == null) {
             return (1);
           } else {
             CFSecurityISOCountryCurrencyPKey lhsPKey = lhs.getPKey();
             CFSecurityISOCountryCurrencyPKey rhsPKey = rhs.getPKey();
             int ret = lhsPKey.compareTo(rhsPKey);
             return (ret);
           }
         }
       };
   int len = dict.size();
   ICFSecurityISOCountryCurrencyObj arr[] = new ICFSecurityISOCountryCurrencyObj[len];
   Iterator<ICFSecurityISOCountryCurrencyObj> 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<ICFSecurityISOCountryCurrencyObj> arrayList =
       new ArrayList<ICFSecurityISOCountryCurrencyObj>(len);
   for (idx = 0; idx < len; idx++) {
     arrayList.add(arr[idx]);
   }
   List<ICFSecurityISOCountryCurrencyObj> sortedList = arrayList;
   return (sortedList);
 }
 public List<ICFSecurityISOCountryCurrencyObj> readAllISOCountryCurrency(boolean forceRead) {
   final String S_ProcName = "readAllISOCountryCurrency";
   if ((allISOCountryCurrency == null) || forceRead) {
     Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj> map =
         new HashMap<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj>();
     allISOCountryCurrency = map;
     CFSecurityISOCountryCurrencyBuff[] buffList =
         ((ICFInternetSchema) schema.getBackingStore())
             .getTableISOCountryCurrency()
             .readAllDerived(schema.getAuthorization());
     CFSecurityISOCountryCurrencyBuff buff;
     ICFSecurityISOCountryCurrencyObj obj;
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       obj = newInstance();
       obj.setPKey(
           ((ICFInternetSchema) schema.getBackingStore())
               .getFactoryISOCountryCurrency()
               .newPKey());
       obj.setBuff(buff);
       ICFSecurityISOCountryCurrencyObj realized =
           (ICFSecurityISOCountryCurrencyObj) obj.realize();
     }
   }
   Comparator<ICFSecurityISOCountryCurrencyObj> cmp =
       new Comparator<ICFSecurityISOCountryCurrencyObj>() {
         public int compare(
             ICFSecurityISOCountryCurrencyObj lhs, ICFSecurityISOCountryCurrencyObj rhs) {
           if (lhs == null) {
             if (rhs == null) {
               return (0);
             } else {
               return (-1);
             }
           } else if (rhs == null) {
             return (1);
           } else {
             CFSecurityISOCountryCurrencyPKey lhsPKey = lhs.getPKey();
             CFSecurityISOCountryCurrencyPKey rhsPKey = rhs.getPKey();
             int ret = lhsPKey.compareTo(rhsPKey);
             return (ret);
           }
         }
       };
   int len = allISOCountryCurrency.size();
   ICFSecurityISOCountryCurrencyObj arr[] = new ICFSecurityISOCountryCurrencyObj[len];
   Iterator<ICFSecurityISOCountryCurrencyObj> valIter = allISOCountryCurrency.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<ICFSecurityISOCountryCurrencyObj> arrayList =
       new ArrayList<ICFSecurityISOCountryCurrencyObj>(len);
   for (idx = 0; idx < len; idx++) {
     arrayList.add(arr[idx]);
   }
   List<ICFSecurityISOCountryCurrencyObj> sortedList = arrayList;
   return (sortedList);
 }