public void deleteTSecGroupMemberByUUserIdx(long TenantId, int TSecGroupId, UUID SecUserId) {
   if (indexByUUserIdx == null) {
     indexByUUserIdx =
         new HashMap<CFSecurityTSecGroupMemberByUUserIdxKey, ICFSecurityTSecGroupMemberObj>();
   }
   CFSecurityTSecGroupMemberByUUserIdxKey key =
       ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey();
   key.setRequiredTenantId(TenantId);
   key.setRequiredTSecGroupId(TSecGroupId);
   key.setRequiredSecUserId(SecUserId);
   ICFSecurityTSecGroupMemberObj obj = null;
   if (indexByUUserIdx.containsKey(key)) {
     obj = indexByUUserIdx.get(key);
     ((ICFCrmSchema) schema.getBackingStore())
         .getTableTSecGroupMember()
         .deleteTSecGroupMemberByUUserIdx(
             schema.getAuthorization(), TenantId, TSecGroupId, SecUserId);
     obj.forget(true);
   } else {
     ((ICFCrmSchema) schema.getBackingStore())
         .getTableTSecGroupMember()
         .deleteTSecGroupMemberByUUserIdx(
             schema.getAuthorization(), TenantId, TSecGroupId, SecUserId);
   }
 }
 public void deleteSecDeviceByUserIdx(UUID SecUserId) {
   CFSecuritySecDeviceByUserIdxKey key =
       ((ICFAsteriskSchema) schema.getBackingStore()).getFactorySecDevice().newUserIdxKey();
   key.setRequiredSecUserId(SecUserId);
   if (indexByUserIdx == null) {
     indexByUserIdx =
         new HashMap<
             CFSecuritySecDeviceByUserIdxKey,
             Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj>>();
   }
   if (indexByUserIdx.containsKey(key)) {
     Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj> dict = indexByUserIdx.get(key);
     ((ICFAsteriskSchema) schema.getBackingStore())
         .getTableSecDevice()
         .deleteSecDeviceByUserIdx(schema.getAuthorization(), SecUserId);
     Iterator<ICFSecuritySecDeviceObj> iter = dict.values().iterator();
     ICFSecuritySecDeviceObj obj;
     List<ICFSecuritySecDeviceObj> toForget = new LinkedList<ICFSecuritySecDeviceObj>();
     while (iter.hasNext()) {
       obj = iter.next();
       toForget.add(obj);
     }
     iter = toForget.iterator();
     while (iter.hasNext()) {
       obj = iter.next();
       obj.forget(true);
     }
     indexByUserIdx.remove(key);
   } else {
     ((ICFAsteriskSchema) schema.getBackingStore())
         .getTableSecDevice()
         .deleteSecDeviceByUserIdx(schema.getAuthorization(), SecUserId);
   }
 }
 public void deleteSecApp(ICFSecuritySecAppObj Obj) {
   ICFSecuritySecAppObj obj = Obj;
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableSecApp()
       .deleteSecApp(schema.getAuthorization(), obj.getSecAppBuff());
   obj.forget(true);
 }
 public void loadData(boolean forceReload) {
   ICFSecuritySchemaObj schemaObj = (ICFSecuritySchemaObj) javafxSchema.getSchema();
   if ((containingCluster == null) || forceReload) {
     CFSecurityAuthorization auth = schemaObj.getAuthorization();
     long containingClusterId = auth.getSecClusterId();
     containingCluster = schemaObj.getClusterTableObj().readClusterByIdIdx(containingClusterId);
   }
   if ((listOfSysCluster == null) || forceReload) {
     observableListOfSysCluster = null;
     listOfSysCluster =
         schemaObj
             .getSysClusterTableObj()
             .readSysClusterByClusterIdx(containingCluster.getRequiredId(), javafxIsInitializing);
     if (listOfSysCluster != null) {
       observableListOfSysCluster = FXCollections.observableArrayList(listOfSysCluster);
       observableListOfSysCluster.sort(compareSysClusterByQualName);
     } else {
       observableListOfSysCluster = FXCollections.observableArrayList();
     }
     dataTable.setItems(observableListOfSysCluster);
     // Hack from stackoverflow to fix JavaFX TableView refresh issue
     ((TableColumn) dataTable.getColumns().get(0)).setVisible(false);
     ((TableColumn) dataTable.getColumns().get(0)).setVisible(true);
   }
 }
 public void deleteSecDevice(ICFSecuritySecDeviceObj Obj) {
   ICFSecuritySecDeviceObj obj = Obj;
   ((ICFAsteriskSchema) schema.getBackingStore())
       .getTableSecDevice()
       .deleteSecDevice(schema.getAuthorization(), obj.getSecDeviceBuff());
   obj.forget(true);
 }
 public ICFSecurityTSecGroupMemberObj readTSecGroupMemberByUUserIdx(
     long TenantId, int TSecGroupId, UUID SecUserId, boolean forceRead) {
   if (indexByUUserIdx == null) {
     indexByUUserIdx =
         new HashMap<CFSecurityTSecGroupMemberByUUserIdxKey, ICFSecurityTSecGroupMemberObj>();
   }
   CFSecurityTSecGroupMemberByUUserIdxKey key =
       ((ICFCrmSchema) 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 =
         ((ICFCrmSchema) schema.getBackingStore())
             .getTableTSecGroupMember()
             .readDerivedByUUserIdx(schema.getAuthorization(), TenantId, TSecGroupId, SecUserId);
     if (buff != null) {
       obj = schema.getTSecGroupMemberTableObj().newInstance();
       obj.setPKey(
           ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecurityTSecGroupMemberObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUUserIdx.put(key, null);
     }
   }
   return (obj);
 }
 public ICFSecuritySecAppObj readSecAppByUJEEMountIdx(
     long ClusterId, String JEEMountName, boolean forceRead) {
   if (indexByUJEEMountIdx == null) {
     indexByUJEEMountIdx = new HashMap<CFSecuritySecAppByUJEEMountIdxKey, ICFSecuritySecAppObj>();
   }
   CFSecuritySecAppByUJEEMountIdxKey key =
       ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredJEEMountName(JEEMountName);
   ICFSecuritySecAppObj obj = null;
   if ((!forceRead) && indexByUJEEMountIdx.containsKey(key)) {
     obj = indexByUJEEMountIdx.get(key);
   } else {
     CFSecuritySecAppBuff buff =
         ((ICFCrmSchema) schema.getBackingStore())
             .getTableSecApp()
             .readDerivedByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName);
     if (buff != null) {
       obj = schema.getSecAppTableObj().newInstance();
       obj.setPKey(((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecuritySecAppObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUJEEMountIdx.put(key, null);
     }
   }
   return (obj);
 }
 public ICFSecurityServiceTypeObj readServiceTypeByUDescrIdx(
     String Description, boolean forceRead) {
   if (indexByUDescrIdx == null) {
     indexByUDescrIdx =
         new HashMap<CFSecurityServiceTypeByUDescrIdxKey, ICFSecurityServiceTypeObj>();
   }
   CFSecurityServiceTypeByUDescrIdxKey key =
       ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey();
   key.setRequiredDescription(Description);
   ICFSecurityServiceTypeObj obj = null;
   if ((!forceRead) && indexByUDescrIdx.containsKey(key)) {
     obj = indexByUDescrIdx.get(key);
   } else {
     CFSecurityServiceTypeBuff buff =
         ((ICFAccSchema) schema.getBackingStore())
             .getTableServiceType()
             .readDerivedByUDescrIdx(schema.getAuthorization(), Description);
     if (buff != null) {
       obj = schema.getServiceTypeTableObj().newInstance();
       obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecurityServiceTypeObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUDescrIdx.put(key, null);
     }
   }
   return (obj);
 }
 public void deleteTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj) {
   ICFSecurityTSecGroupMemberObj obj = Obj;
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableTSecGroupMember()
       .deleteTSecGroupMember(schema.getAuthorization(), obj.getTSecGroupMemberBuff());
   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 =
         ((ICFCrmSchema) schema.getBackingStore())
             .getTableTSecGroupMember()
             .readDerivedByIdIdx(
                 schema.getAuthorization(),
                 pkey.getRequiredTenantId(),
                 pkey.getRequiredTSecGroupMemberId());
     if (readBuff != null) {
       obj = schema.getTSecGroupMemberTableObj().newInstance();
       obj.setPKey(
           ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey());
       obj.setBuff(readBuff);
       obj = (ICFSecurityTSecGroupMemberObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       members.put(pkey, null);
     }
   }
   return (obj);
 }
 public ICFSecuritySecAppObj updateSecApp(ICFSecuritySecAppObj Obj) {
   ICFSecuritySecAppObj obj = Obj;
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableSecApp()
       .updateSecApp(schema.getAuthorization(), Obj.getSecAppBuff());
   obj = (ICFSecuritySecAppObj) Obj.realize();
   return (obj);
 }
 public ICFSecuritySecDeviceObj updateSecDevice(ICFSecuritySecDeviceObj Obj) {
   ICFSecuritySecDeviceObj obj = Obj;
   ((ICFAsteriskSchema) schema.getBackingStore())
       .getTableSecDevice()
       .updateSecDevice(schema.getAuthorization(), Obj.getSecDeviceBuff());
   obj = (ICFSecuritySecDeviceObj) Obj.realize();
   return (obj);
 }
 public ICFSecurityTSecGroupMemberObj updateTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj) {
   ICFSecurityTSecGroupMemberObj obj = Obj;
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableTSecGroupMember()
       .updateTSecGroupMember(schema.getAuthorization(), Obj.getTSecGroupMemberBuff());
   obj = (ICFSecurityTSecGroupMemberObj) Obj.realize();
   return (obj);
 }
 public ICFSecuritySecDeviceObj createSecDevice(ICFSecuritySecDeviceObj Obj) {
   ICFSecuritySecDeviceObj obj = Obj;
   CFSecuritySecDeviceBuff buff = obj.getSecDeviceBuff();
   ((ICFAsteriskSchema) schema.getBackingStore())
       .getTableSecDevice()
       .createSecDevice(schema.getAuthorization(), buff);
   obj.copyBuffToPKey();
   obj = obj.realize();
   return (obj);
 }
 public ICFSecurityTSecGroupMemberObj createTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj) {
   ICFSecurityTSecGroupMemberObj obj = Obj;
   CFSecurityTSecGroupMemberBuff buff = obj.getTSecGroupMemberBuff();
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableTSecGroupMember()
       .createTSecGroupMember(schema.getAuthorization(), buff);
   obj.copyBuffToPKey();
   obj = obj.realize();
   return (obj);
 }
 public ICFSecuritySecAppObj createSecApp(ICFSecuritySecAppObj Obj) {
   ICFSecuritySecAppObj obj = Obj;
   CFSecuritySecAppBuff buff = obj.getSecAppBuff();
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableSecApp()
       .createSecApp(schema.getAuthorization(), buff);
   obj.copyBuffToPKey();
   obj = obj.realize();
   return (obj);
 }
 public void deleteSecAppByUJEEMountIdx(long ClusterId, String JEEMountName) {
   if (indexByUJEEMountIdx == null) {
     indexByUJEEMountIdx = new HashMap<CFSecuritySecAppByUJEEMountIdxKey, ICFSecuritySecAppObj>();
   }
   CFSecuritySecAppByUJEEMountIdxKey key =
       ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredJEEMountName(JEEMountName);
   ICFSecuritySecAppObj obj = null;
   if (indexByUJEEMountIdx.containsKey(key)) {
     obj = indexByUJEEMountIdx.get(key);
     ((ICFCrmSchema) schema.getBackingStore())
         .getTableSecApp()
         .deleteSecAppByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName);
     obj.forget(true);
   } else {
     ((ICFCrmSchema) schema.getBackingStore())
         .getTableSecApp()
         .deleteSecAppByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName);
   }
 }
 public void deleteServiceTypeByUDescrIdx(String Description) {
   if (indexByUDescrIdx == null) {
     indexByUDescrIdx =
         new HashMap<CFSecurityServiceTypeByUDescrIdxKey, ICFSecurityServiceTypeObj>();
   }
   CFSecurityServiceTypeByUDescrIdxKey key =
       ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey();
   key.setRequiredDescription(Description);
   ICFSecurityServiceTypeObj obj = null;
   if (indexByUDescrIdx.containsKey(key)) {
     obj = indexByUDescrIdx.get(key);
     ((ICFAccSchema) schema.getBackingStore())
         .getTableServiceType()
         .deleteServiceTypeByUDescrIdx(schema.getAuthorization(), Description);
     obj.forget(true);
   } else {
     ((ICFAccSchema) schema.getBackingStore())
         .getTableServiceType()
         .deleteServiceTypeByUDescrIdx(schema.getAuthorization(), Description);
   }
 }
 public void deleteTSecGroupMemberByGroupIdx(long TenantId, int TSecGroupId) {
   CFSecurityTSecGroupMemberByGroupIdxKey key =
       ((ICFCrmSchema) 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);
     ((ICFCrmSchema) 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 {
     ((ICFCrmSchema) schema.getBackingStore())
         .getTableTSecGroupMember()
         .deleteTSecGroupMemberByGroupIdx(schema.getAuthorization(), TenantId, TSecGroupId);
   }
 }
 public ICFSecurityServiceTypeObj lockServiceType(CFSecurityServiceTypePKey pkey) {
   ICFSecurityServiceTypeObj locked = null;
   CFSecurityServiceTypeBuff lockBuff =
       ((ICFAccSchema) schema.getBackingStore())
           .getTableServiceType()
           .lockDerived(schema.getAuthorization(), pkey);
   if (lockBuff != null) {
     locked = schema.getServiceTypeTableObj().newInstance();
     locked.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newPKey());
     locked.setBuff(lockBuff);
     locked = (ICFSecurityServiceTypeObj) locked.realize();
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newCollisionDetectedException(getClass(), "lockServiceType", pkey);
   }
   return (locked);
 }
 public ICFSecurityTSecGroupMemberObj lockTSecGroupMember(CFSecurityTSecGroupMemberPKey pkey) {
   ICFSecurityTSecGroupMemberObj locked = null;
   CFSecurityTSecGroupMemberBuff lockBuff =
       ((ICFCrmSchema) schema.getBackingStore())
           .getTableTSecGroupMember()
           .lockDerived(schema.getAuthorization(), pkey);
   if (lockBuff != null) {
     locked = schema.getTSecGroupMemberTableObj().newInstance();
     locked.setPKey(
         ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey());
     locked.setBuff(lockBuff);
     locked = (ICFSecurityTSecGroupMemberObj) locked.realize();
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newCollisionDetectedException(getClass(), "lockTSecGroupMember", pkey);
   }
   return (locked);
 }
 public ICFSecurityServiceTypeObj readServiceType(
     CFSecurityServiceTypePKey pkey, boolean forceRead) {
   ICFSecurityServiceTypeObj obj = null;
   if ((!forceRead) && members.containsKey(pkey)) {
     obj = members.get(pkey);
   } else {
     CFSecurityServiceTypeBuff readBuff =
         ((ICFAccSchema) schema.getBackingStore())
             .getTableServiceType()
             .readDerivedByIdIdx(schema.getAuthorization(), pkey.getRequiredServiceTypeId());
     if (readBuff != null) {
       obj = schema.getServiceTypeTableObj().newInstance();
       obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newPKey());
       obj.setBuff(readBuff);
       obj = (ICFSecurityServiceTypeObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       members.put(pkey, null);
     }
   }
   return (obj);
 }
 public List<ICFSecurityTSecGroupMemberObj> readTSecGroupMemberByUserIdx(
     UUID SecUserId, boolean forceRead) {
   final String S_ProcName = "readTSecGroupMemberByUserIdx";
   CFSecurityTSecGroupMemberByUserIdxKey key =
       ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUserIdxKey();
   key.setRequiredSecUserId(SecUserId);
   Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj> dict;
   if (indexByUserIdx == null) {
     indexByUserIdx =
         new HashMap<
             CFSecurityTSecGroupMemberByUserIdxKey,
             Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj>>();
   }
   if ((!forceRead) && indexByUserIdx.containsKey(key)) {
     dict = indexByUserIdx.get(key);
   } else {
     dict = new HashMap<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj>();
     // Allow other threads to dirty-read while we're loading
     indexByUserIdx.put(key, dict);
     ICFSecurityTSecGroupMemberObj obj;
     CFSecurityTSecGroupMemberBuff[] buffList =
         ((ICFCrmSchema) schema.getBackingStore())
             .getTableTSecGroupMember()
             .readDerivedByUserIdx(schema.getAuthorization(), SecUserId);
     CFSecurityTSecGroupMemberBuff buff;
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       obj = schema.getTSecGroupMemberTableObj().newInstance();
       obj.setPKey(
           ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey());
       obj.setBuff(buff);
       ICFSecurityTSecGroupMemberObj realized = (ICFSecurityTSecGroupMemberObj) obj.realize();
     }
   }
   Comparator<ICFSecurityTSecGroupMemberObj> cmp =
       new Comparator<ICFSecurityTSecGroupMemberObj>() {
         public int compare(ICFSecurityTSecGroupMemberObj lhs, ICFSecurityTSecGroupMemberObj rhs) {
           if (lhs == null) {
             if (rhs == null) {
               return (0);
             } else {
               return (-1);
             }
           } else if (rhs == null) {
             return (1);
           } else {
             CFSecurityTSecGroupMemberPKey lhsPKey = lhs.getPKey();
             CFSecurityTSecGroupMemberPKey rhsPKey = rhs.getPKey();
             int ret = lhsPKey.compareTo(rhsPKey);
             return (ret);
           }
         }
       };
   int len = dict.size();
   ICFSecurityTSecGroupMemberObj arr[] = new ICFSecurityTSecGroupMemberObj[len];
   Iterator<ICFSecurityTSecGroupMemberObj> 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<ICFSecurityTSecGroupMemberObj> arrayList =
       new ArrayList<ICFSecurityTSecGroupMemberObj>(len);
   for (idx = 0; idx < len; idx++) {
     arrayList.add(arr[idx]);
   }
   List<ICFSecurityTSecGroupMemberObj> sortedList = arrayList;
   return (sortedList);
 }
 public List<ICFSecurityTSecGroupMemberObj> readAllTSecGroupMember(boolean forceRead) {
   final String S_ProcName = "readAllTSecGroupMember";
   if ((allTSecGroupMember == null) || forceRead) {
     Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj> map =
         new HashMap<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj>();
     allTSecGroupMember = map;
     CFSecurityTSecGroupMemberBuff[] buffList =
         ((ICFCrmSchema) schema.getBackingStore())
             .getTableTSecGroupMember()
             .readAllDerived(schema.getAuthorization());
     CFSecurityTSecGroupMemberBuff buff;
     ICFSecurityTSecGroupMemberObj obj;
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       obj = newInstance();
       obj.setPKey(
           ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey());
       obj.setBuff(buff);
       ICFSecurityTSecGroupMemberObj realized = (ICFSecurityTSecGroupMemberObj) obj.realize();
     }
   }
   Comparator<ICFSecurityTSecGroupMemberObj> cmp =
       new Comparator<ICFSecurityTSecGroupMemberObj>() {
         public int compare(ICFSecurityTSecGroupMemberObj lhs, ICFSecurityTSecGroupMemberObj rhs) {
           if (lhs == null) {
             if (rhs == null) {
               return (0);
             } else {
               return (-1);
             }
           } else if (rhs == null) {
             return (1);
           } else {
             CFSecurityTSecGroupMemberPKey lhsPKey = lhs.getPKey();
             CFSecurityTSecGroupMemberPKey rhsPKey = rhs.getPKey();
             int ret = lhsPKey.compareTo(rhsPKey);
             return (ret);
           }
         }
       };
   int len = allTSecGroupMember.size();
   ICFSecurityTSecGroupMemberObj arr[] = new ICFSecurityTSecGroupMemberObj[len];
   Iterator<ICFSecurityTSecGroupMemberObj> valIter = allTSecGroupMember.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<ICFSecurityTSecGroupMemberObj> arrayList =
       new ArrayList<ICFSecurityTSecGroupMemberObj>(len);
   for (idx = 0; idx < len; idx++) {
     arrayList.add(arr[idx]);
   }
   List<ICFSecurityTSecGroupMemberObj> sortedList = arrayList;
   return (sortedList);
 }