public CFSecurityISOLanguageBuff[] readAllBuff(CFSecurityAuthorization Authorization) {
   final String S_ProcName = "CFInternetRamISOLanguage.readAllBuff";
   CFSecurityISOLanguageBuff buff;
   ArrayList<CFSecurityISOLanguageBuff> filteredList = new ArrayList<CFSecurityISOLanguageBuff>();
   CFSecurityISOLanguageBuff[] buffList = readAllDerived(Authorization);
   for (int idx = 0; idx < buffList.length; idx++) {
     buff = buffList[idx];
     if ((buff != null) && buff.getClassCode().equals("ISLN")) {
       filteredList.add(buff);
     }
   }
   return (filteredList.toArray(new CFSecurityISOLanguageBuff[0]));
 }
 public CFSecurityServiceBuff[] readBuffByTypeIdx(
     CFSecurityAuthorization Authorization, int ServiceTypeId) {
   final String S_ProcName = "CFBamRamService.readBuffByTypeIdx() ";
   CFSecurityServiceBuff buff;
   ArrayList<CFSecurityServiceBuff> filteredList = new ArrayList<CFSecurityServiceBuff>();
   CFSecurityServiceBuff[] buffList = readDerivedByTypeIdx(Authorization, ServiceTypeId);
   for (int idx = 0; idx < buffList.length; idx++) {
     buff = buffList[idx];
     if ((buff != null) && buff.getClassCode().equals("HSVC")) {
       filteredList.add((CFSecurityServiceBuff) buff);
     }
   }
   return (filteredList.toArray(new CFSecurityServiceBuff[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 CFSecuritySecGroupMemberBuff[] readAllBuff(CFSecurityAuthorization Authorization) {
   final String S_ProcName = "CFFreeSwitchRamSecGroupMember.readAllBuff";
   CFSecuritySecGroupMemberBuff buff;
   ArrayList<CFSecuritySecGroupMemberBuff> filteredList =
       new ArrayList<CFSecuritySecGroupMemberBuff>();
   CFSecuritySecGroupMemberBuff[] buffList = readAllDerived(Authorization);
   for (int idx = 0; idx < buffList.length; idx++) {
     buff = buffList[idx];
     if ((buff != null) && buff.getClassCode().equals("SGMB")) {
       filteredList.add(buff);
     }
   }
   return (filteredList.toArray(new CFSecuritySecGroupMemberBuff[0]));
 }
 public CFDbTestOptFullRangeBuff[] readBuffByTenantIdx(
     CFSecurityAuthorization Authorization, long TenantId) {
   final String S_ProcName = "CFDbTestRamOptFullRange.readBuffByTenantIdx() ";
   CFDbTestOptFullRangeBuff buff;
   ArrayList<CFDbTestOptFullRangeBuff> filteredList = new ArrayList<CFDbTestOptFullRangeBuff>();
   CFDbTestOptFullRangeBuff[] buffList = readDerivedByTenantIdx(Authorization, TenantId);
   for (int idx = 0; idx < buffList.length; idx++) {
     buff = buffList[idx];
     if ((buff != null) && buff.getClassCode().equals("OFLR")) {
       filteredList.add((CFDbTestOptFullRangeBuff) buff);
     }
   }
   return (filteredList.toArray(new CFDbTestOptFullRangeBuff[0]));
 }
 public CFDbTestLoaderBehaviourBuff[] readAllBuff(CFSecurityAuthorization Authorization) {
   final String S_ProcName = "CFDbTestRamLoaderBehaviour.readAllBuff";
   CFDbTestLoaderBehaviourBuff buff;
   ArrayList<CFDbTestLoaderBehaviourBuff> filteredList =
       new ArrayList<CFDbTestLoaderBehaviourBuff>();
   CFDbTestLoaderBehaviourBuff[] buffList = readAllDerived(Authorization);
   for (int idx = 0; idx < buffList.length; idx++) {
     buff = buffList[idx];
     if ((buff != null) && buff.getClassCode().equals("LDBV")) {
       filteredList.add(buff);
     }
   }
   return (filteredList.toArray(new CFDbTestLoaderBehaviourBuff[0]));
 }
 public CFSecuritySecFormBuff[] readBuffBySecAppIdx(
     CFSecurityAuthorization Authorization, long ClusterId, int SecAppId) {
   final String S_ProcName = "CFInternetRamSecForm.readBuffBySecAppIdx() ";
   CFSecuritySecFormBuff buff;
   ArrayList<CFSecuritySecFormBuff> filteredList = new ArrayList<CFSecuritySecFormBuff>();
   CFSecuritySecFormBuff[] buffList = readDerivedBySecAppIdx(Authorization, ClusterId, SecAppId);
   for (int idx = 0; idx < buffList.length; idx++) {
     buff = buffList[idx];
     if ((buff != null) && buff.getClassCode().equals("SFRM")) {
       filteredList.add((CFSecuritySecFormBuff) buff);
     }
   }
   return (filteredList.toArray(new CFSecuritySecFormBuff[0]));
 }
 public CFBamUuidDefBuff[] readDerivedByContNextIdx(
     CFSecurityAuthorization Authorization, long TenantId, long ScopeId, Long NextId) {
   final String S_ProcName = "CFBamRamValue.readDerivedByContNextIdx";
   CFBamValueBuff buffList[] =
       schema.getTableValue().readDerivedByContNextIdx(Authorization, TenantId, ScopeId, NextId);
   if (buffList == null) {
     return (null);
   } else {
     CFBamValueBuff buff;
     ArrayList<CFBamUuidDefBuff> filteredList = new ArrayList<CFBamUuidDefBuff>();
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       if ((buff != null) && (buff instanceof CFBamUuidDefBuff)) {
         filteredList.add((CFBamUuidDefBuff) buff);
       }
     }
     return (filteredList.toArray(new CFBamUuidDefBuff[0]));
   }
 }
 public CFBamUuidDefBuff[] readDerivedByVAccSecIdx(
     CFSecurityAuthorization Authorization, ICFBamSchema.AccessSecurityEnum ViewAccessSecurity) {
   final String S_ProcName = "CFBamRamValue.readDerivedByVAccSecIdx";
   CFBamValueBuff buffList[] =
       schema.getTableValue().readDerivedByVAccSecIdx(Authorization, ViewAccessSecurity);
   if (buffList == null) {
     return (null);
   } else {
     CFBamValueBuff buff;
     ArrayList<CFBamUuidDefBuff> filteredList = new ArrayList<CFBamUuidDefBuff>();
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       if ((buff != null) && (buff instanceof CFBamUuidDefBuff)) {
         filteredList.add((CFBamUuidDefBuff) buff);
       }
     }
     return (filteredList.toArray(new CFBamUuidDefBuff[0]));
   }
 }
 public List<ICFSecuritySecDeviceObj> readSecDeviceByUserIdx(UUID SecUserId, boolean forceRead) {
   final String S_ProcName = "readSecDeviceByUserIdx";
   CFSecuritySecDeviceByUserIdxKey key =
       ((ICFAsteriskSchema) schema.getBackingStore()).getFactorySecDevice().newUserIdxKey();
   key.setRequiredSecUserId(SecUserId);
   Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj> dict;
   if (indexByUserIdx == null) {
     indexByUserIdx =
         new HashMap<
             CFSecuritySecDeviceByUserIdxKey,
             Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj>>();
   }
   if ((!forceRead) && indexByUserIdx.containsKey(key)) {
     dict = indexByUserIdx.get(key);
   } else {
     dict = new HashMap<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj>();
     // Allow other threads to dirty-read while we're loading
     indexByUserIdx.put(key, dict);
     ICFSecuritySecDeviceObj obj;
     CFSecuritySecDeviceBuff[] buffList =
         ((ICFAsteriskSchema) schema.getBackingStore())
             .getTableSecDevice()
             .readDerivedByUserIdx(schema.getAuthorization(), SecUserId);
     CFSecuritySecDeviceBuff buff;
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       obj = schema.getSecDeviceTableObj().newInstance();
       obj.setPKey(((ICFAsteriskSchema) schema.getBackingStore()).getFactorySecDevice().newPKey());
       obj.setBuff(buff);
       ICFSecuritySecDeviceObj realized = (ICFSecuritySecDeviceObj) obj.realize();
     }
   }
   Comparator<ICFSecuritySecDeviceObj> cmp =
       new Comparator<ICFSecuritySecDeviceObj>() {
         public int compare(ICFSecuritySecDeviceObj lhs, ICFSecuritySecDeviceObj rhs) {
           if (lhs == null) {
             if (rhs == null) {
               return (0);
             } else {
               return (-1);
             }
           } else if (rhs == null) {
             return (1);
           } else {
             CFSecuritySecDevicePKey lhsPKey = lhs.getPKey();
             CFSecuritySecDevicePKey rhsPKey = rhs.getPKey();
             int ret = lhsPKey.compareTo(rhsPKey);
             return (ret);
           }
         }
       };
   int len = dict.size();
   ICFSecuritySecDeviceObj arr[] = new ICFSecuritySecDeviceObj[len];
   Iterator<ICFSecuritySecDeviceObj> 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<ICFSecuritySecDeviceObj> arrayList = new ArrayList<ICFSecuritySecDeviceObj>(len);
   for (idx = 0; idx < len; idx++) {
     arrayList.add(arr[idx]);
   }
   List<ICFSecuritySecDeviceObj> sortedList = arrayList;
   return (sortedList);
 }
 public List<ICFSecuritySecDeviceObj> readAllSecDevice(boolean forceRead) {
   final String S_ProcName = "readAllSecDevice";
   if ((allSecDevice == null) || forceRead) {
     Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj> map =
         new HashMap<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj>();
     allSecDevice = map;
     CFSecuritySecDeviceBuff[] buffList =
         ((ICFAsteriskSchema) schema.getBackingStore())
             .getTableSecDevice()
             .readAllDerived(schema.getAuthorization());
     CFSecuritySecDeviceBuff buff;
     ICFSecuritySecDeviceObj obj;
     for (int idx = 0; idx < buffList.length; idx++) {
       buff = buffList[idx];
       obj = newInstance();
       obj.setPKey(((ICFAsteriskSchema) schema.getBackingStore()).getFactorySecDevice().newPKey());
       obj.setBuff(buff);
       ICFSecuritySecDeviceObj realized = (ICFSecuritySecDeviceObj) obj.realize();
     }
   }
   Comparator<ICFSecuritySecDeviceObj> cmp =
       new Comparator<ICFSecuritySecDeviceObj>() {
         public int compare(ICFSecuritySecDeviceObj lhs, ICFSecuritySecDeviceObj rhs) {
           if (lhs == null) {
             if (rhs == null) {
               return (0);
             } else {
               return (-1);
             }
           } else if (rhs == null) {
             return (1);
           } else {
             CFSecuritySecDevicePKey lhsPKey = lhs.getPKey();
             CFSecuritySecDevicePKey rhsPKey = rhs.getPKey();
             int ret = lhsPKey.compareTo(rhsPKey);
             return (ret);
           }
         }
       };
   int len = allSecDevice.size();
   ICFSecuritySecDeviceObj arr[] = new ICFSecuritySecDeviceObj[len];
   Iterator<ICFSecuritySecDeviceObj> valIter = allSecDevice.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<ICFSecuritySecDeviceObj> arrayList = new ArrayList<ICFSecuritySecDeviceObj>(len);
   for (idx = 0; idx < len; idx++) {
     arrayList.add(arr[idx]);
   }
   List<ICFSecuritySecDeviceObj> sortedList = arrayList;
   return (sortedList);
 }