public void deleteSecDevice(ICFSecuritySecDeviceObj Obj) {
   ICFSecuritySecDeviceObj obj = Obj;
   ((ICFAsteriskSchema) schema.getBackingStore())
       .getTableSecDevice()
       .deleteSecDevice(schema.getAuthorization(), obj.getSecDeviceBuff());
   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 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 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 void forgetServiceType(ICFSecurityServiceTypeObj Obj, boolean forgetSubObjects) {
    ICFSecurityServiceTypeObj obj = Obj;
    CFSecurityServiceTypePKey pkey = obj.getPKey();
    if (members.containsKey(pkey)) {
      ICFSecurityServiceTypeObj keepObj = members.get(pkey);
      // Detach object from alternate, duplicate, all and PKey indexes

      if (indexByUDescrIdx != null) {
        CFSecurityServiceTypeByUDescrIdxKey keyUDescrIdx =
            ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey();
        keyUDescrIdx.setRequiredDescription(keepObj.getRequiredDescription());
        indexByUDescrIdx.remove(keyUDescrIdx);
      }

      if (allServiceType != null) {
        allServiceType.remove(keepObj.getPKey());
      }
      members.remove(pkey);
      if (forgetSubObjects) {
        ((ICFSecuritySchemaObj) schema)
            .getServiceTableObj()
            .forgetServiceByTypeIdx(keepObj.getRequiredServiceTypeId());
      }
    }
  }
 public void deleteTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj) {
   ICFSecurityTSecGroupMemberObj obj = Obj;
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableTSecGroupMember()
       .deleteTSecGroupMember(schema.getAuthorization(), obj.getTSecGroupMemberBuff());
   obj.forget(true);
 }
 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 deleteSecApp(ICFSecuritySecAppObj Obj) {
   ICFSecuritySecAppObj obj = Obj;
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableSecApp()
       .deleteSecApp(schema.getAuthorization(), obj.getSecAppBuff());
   obj.forget(true);
 }
 public ICFSecuritySecDeviceObj updateSecDevice(ICFSecuritySecDeviceObj Obj) {
   ICFSecuritySecDeviceObj obj = Obj;
   ((ICFAsteriskSchema) schema.getBackingStore())
       .getTableSecDevice()
       .updateSecDevice(schema.getAuthorization(), Obj.getSecDeviceBuff());
   obj = (ICFSecuritySecDeviceObj) Obj.realize();
   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 ICFSecurityTSecGroupMemberObj updateTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj) {
   ICFSecurityTSecGroupMemberObj obj = Obj;
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableTSecGroupMember()
       .updateTSecGroupMember(schema.getAuthorization(), Obj.getTSecGroupMemberBuff());
   obj = (ICFSecurityTSecGroupMemberObj) Obj.realize();
   return (obj);
 }
  public void forgetTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj, boolean forgetSubObjects) {
    ICFSecurityTSecGroupMemberObj obj = Obj;
    CFSecurityTSecGroupMemberPKey pkey = obj.getPKey();
    if (members.containsKey(pkey)) {
      ICFSecurityTSecGroupMemberObj keepObj = members.get(pkey);
      // Detach object from alternate, duplicate, all and PKey indexes

      if (indexByTenantIdx != null) {
        CFSecurityTSecGroupMemberByTenantIdxKey keyTenantIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newTenantIdxKey();
        keyTenantIdx.setRequiredTenantId(keepObj.getRequiredTenantId());
        Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj> mapTenantIdx =
            indexByTenantIdx.get(keyTenantIdx);
        if (mapTenantIdx != null) {
          mapTenantIdx.remove(keepObj.getPKey());
        }
      }

      if (indexByGroupIdx != null) {
        CFSecurityTSecGroupMemberByGroupIdxKey keyGroupIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newGroupIdxKey();
        keyGroupIdx.setRequiredTenantId(keepObj.getRequiredTenantId());
        keyGroupIdx.setRequiredTSecGroupId(keepObj.getRequiredTSecGroupId());
        Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj> mapGroupIdx =
            indexByGroupIdx.get(keyGroupIdx);
        if (mapGroupIdx != null) {
          mapGroupIdx.remove(keepObj.getPKey());
        }
      }

      if (indexByUserIdx != null) {
        CFSecurityTSecGroupMemberByUserIdxKey keyUserIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUserIdxKey();
        keyUserIdx.setRequiredSecUserId(keepObj.getRequiredSecUserId());
        Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj> mapUserIdx =
            indexByUserIdx.get(keyUserIdx);
        if (mapUserIdx != null) {
          mapUserIdx.remove(keepObj.getPKey());
        }
      }

      if (indexByUUserIdx != null) {
        CFSecurityTSecGroupMemberByUUserIdxKey keyUUserIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey();
        keyUUserIdx.setRequiredTenantId(keepObj.getRequiredTenantId());
        keyUUserIdx.setRequiredTSecGroupId(keepObj.getRequiredTSecGroupId());
        keyUUserIdx.setRequiredSecUserId(keepObj.getRequiredSecUserId());
        indexByUUserIdx.remove(keyUUserIdx);
      }

      if (allTSecGroupMember != null) {
        allTSecGroupMember.remove(keepObj.getPKey());
      }
      members.remove(pkey);
      if (forgetSubObjects) {}
    }
  }
 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 ICFSecurityServiceTypeObj realizeServiceType(ICFSecurityServiceTypeObj Obj) {
    ICFSecurityServiceTypeObj obj = Obj;
    CFSecurityServiceTypePKey pkey = obj.getPKey();
    ICFSecurityServiceTypeObj keepObj = null;
    if (members.containsKey(pkey) && (null != members.get(pkey))) {
      ICFSecurityServiceTypeObj existingObj = members.get(pkey);
      keepObj = existingObj;

      /*
       *	We always rebind the data because if we're being called, some index has
       *	been updated and is refreshing it's data, which may or may not have changed
       */

      // Detach object from alternate and duplicate indexes, leave PKey alone

      if (indexByUDescrIdx != null) {
        CFSecurityServiceTypeByUDescrIdxKey keyUDescrIdx =
            ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey();
        keyUDescrIdx.setRequiredDescription(keepObj.getRequiredDescription());
        indexByUDescrIdx.remove(keyUDescrIdx);
      }

      keepObj.setBuff(Obj.getBuff());
      // Attach new object to alternate and duplicate indexes -- PKey stay stable

      if (indexByUDescrIdx != null) {
        CFSecurityServiceTypeByUDescrIdxKey keyUDescrIdx =
            ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey();
        keyUDescrIdx.setRequiredDescription(keepObj.getRequiredDescription());
        indexByUDescrIdx.put(keyUDescrIdx, keepObj);
      }
      if (allServiceType != null) {
        allServiceType.put(keepObj.getPKey(), keepObj);
      }
    } else {
      keepObj = obj;
      keepObj.setIsNew(false);
      // Attach new object to PKey, all, alternate, and duplicate indexes
      members.put(keepObj.getPKey(), keepObj);
      if (allServiceType != null) {
        allServiceType.put(keepObj.getPKey(), keepObj);
      }

      if (indexByUDescrIdx != null) {
        CFSecurityServiceTypeByUDescrIdxKey keyUDescrIdx =
            ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newUDescrIdxKey();
        keyUDescrIdx.setRequiredDescription(keepObj.getRequiredDescription());
        indexByUDescrIdx.put(keyUDescrIdx, keepObj);
      }
    }
    return (keepObj);
  }
 public void deleteSecDeviceByIdIdx(UUID SecUserId, String DevName) {
   CFSecuritySecDevicePKey pkey =
       ((ICFAsteriskSchema) schema.getBackingStore()).getFactorySecDevice().newPKey();
   pkey.setRequiredSecUserId(SecUserId);
   pkey.setRequiredDevName(DevName);
   ICFSecuritySecDeviceObj obj = readSecDevice(pkey);
   if (obj != null) {
     ICFSecuritySecDeviceEditObj editObj = (ICFSecuritySecDeviceEditObj) obj.getEdit();
     boolean editStarted;
     if (editObj == null) {
       editObj = (ICFSecuritySecDeviceEditObj) obj.beginEdit();
       if (editObj != null) {
         editStarted = true;
       } else {
         editStarted = false;
       }
     } else {
       editStarted = false;
     }
     if (editObj != null) {
       editObj.delete();
       if (editStarted) {
         editObj.endEdit();
       }
     }
     obj.forget(true);
   }
 }
  public void forgetTSecGroupMemberByUserIdx(UUID SecUserId) {
    if (indexByUserIdx == null) {
      return;
    }
    CFSecurityTSecGroupMemberByUserIdxKey key =
        ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUserIdxKey();
    key.setRequiredSecUserId(SecUserId);
    if (indexByUserIdx.containsKey(key)) {
      Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj> mapUserIdx =
          indexByUserIdx.get(key);
      if (mapUserIdx != null) {
        List<ICFSecurityTSecGroupMemberObj> toForget =
            new LinkedList<ICFSecurityTSecGroupMemberObj>();
        ICFSecurityTSecGroupMemberObj cur = null;
        Iterator<ICFSecurityTSecGroupMemberObj> iter = mapUserIdx.values().iterator();
        while (iter.hasNext()) {
          cur = iter.next();
          toForget.add(cur);
        }
        iter = toForget.iterator();
        while (iter.hasNext()) {
          cur = iter.next();
          cur.forget(true);
        }
      }

      indexByUserIdx.remove(key);
    }
  }
 public void deleteSecAppByIdIdx(long ClusterId, int SecAppId) {
   CFSecuritySecAppPKey pkey =
       ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newPKey();
   pkey.setRequiredClusterId(ClusterId);
   pkey.setRequiredSecAppId(SecAppId);
   ICFSecuritySecAppObj obj = readSecApp(pkey);
   if (obj != null) {
     ICFSecuritySecAppEditObj editObj = (ICFSecuritySecAppEditObj) obj.getEdit();
     boolean editStarted;
     if (editObj == null) {
       editObj = (ICFSecuritySecAppEditObj) obj.beginEdit();
       if (editObj != null) {
         editStarted = true;
       } else {
         editStarted = false;
       }
     } else {
       editStarted = false;
     }
     if (editObj != null) {
       editObj.delete();
       if (editStarted) {
         editObj.endEdit();
       }
     }
     obj.forget(true);
   }
 }
 public ICFSecurityServiceTypeObj readServiceTypeByIdIdx(int ServiceTypeId, boolean forceRead) {
   CFSecurityServiceTypePKey pkey =
       ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newPKey();
   pkey.setRequiredServiceTypeId(ServiceTypeId);
   ICFSecurityServiceTypeObj obj = readServiceType(pkey, forceRead);
   return (obj);
 }
 public void deleteServiceTypeByIdIdx(int ServiceTypeId) {
   CFSecurityServiceTypePKey pkey =
       ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newPKey();
   pkey.setRequiredServiceTypeId(ServiceTypeId);
   ICFSecurityServiceTypeObj obj = readServiceType(pkey);
   if (obj != null) {
     ICFSecurityServiceTypeEditObj editObj = (ICFSecurityServiceTypeEditObj) obj.getEdit();
     boolean editStarted;
     if (editObj == null) {
       editObj = (ICFSecurityServiceTypeEditObj) obj.beginEdit();
       if (editObj != null) {
         editStarted = true;
       } else {
         editStarted = false;
       }
     } else {
       editStarted = false;
     }
     if (editObj != null) {
       editObj.delete();
       if (editStarted) {
         editObj.endEdit();
       }
     }
     obj.forget(true);
   }
 }
  public void forgetSecDevice(ICFSecuritySecDeviceObj Obj, boolean forgetSubObjects) {
    ICFSecuritySecDeviceObj obj = Obj;
    CFSecuritySecDevicePKey pkey = obj.getPKey();
    if (members.containsKey(pkey)) {
      ICFSecuritySecDeviceObj keepObj = members.get(pkey);
      // Detach object from alternate, duplicate, all and PKey indexes

      if (indexByUserIdx != null) {
        CFSecuritySecDeviceByUserIdxKey keyUserIdx =
            ((ICFAsteriskSchema) schema.getBackingStore()).getFactorySecDevice().newUserIdxKey();
        keyUserIdx.setRequiredSecUserId(keepObj.getRequiredSecUserId());
        Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj> mapUserIdx =
            indexByUserIdx.get(keyUserIdx);
        if (mapUserIdx != null) {
          mapUserIdx.remove(keepObj.getPKey());
        }
      }

      if (allSecDevice != null) {
        allSecDevice.remove(keepObj.getPKey());
      }
      members.remove(pkey);
      if (forgetSubObjects) {}
    }
  }
  public void forgetSecAppByClusterIdx(long ClusterId) {
    if (indexByClusterIdx == null) {
      return;
    }
    CFSecuritySecAppByClusterIdxKey key =
        ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey();
    key.setRequiredClusterId(ClusterId);
    if (indexByClusterIdx.containsKey(key)) {
      Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> mapClusterIdx = indexByClusterIdx.get(key);
      if (mapClusterIdx != null) {
        List<ICFSecuritySecAppObj> toForget = new LinkedList<ICFSecuritySecAppObj>();
        ICFSecuritySecAppObj cur = null;
        Iterator<ICFSecuritySecAppObj> iter = mapClusterIdx.values().iterator();
        while (iter.hasNext()) {
          cur = iter.next();
          toForget.add(cur);
        }
        iter = toForget.iterator();
        while (iter.hasNext()) {
          cur = iter.next();
          cur.forget(true);
        }
      }

      indexByClusterIdx.remove(key);
    }
  }
 public void deleteTSecGroupMemberByIdIdx(long TenantId, long TSecGroupMemberId) {
   CFSecurityTSecGroupMemberPKey pkey =
       ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey();
   pkey.setRequiredTenantId(TenantId);
   pkey.setRequiredTSecGroupMemberId(TSecGroupMemberId);
   ICFSecurityTSecGroupMemberObj obj = readTSecGroupMember(pkey);
   if (obj != null) {
     ICFSecurityTSecGroupMemberEditObj editObj = (ICFSecurityTSecGroupMemberEditObj) obj.getEdit();
     boolean editStarted;
     if (editObj == null) {
       editObj = (ICFSecurityTSecGroupMemberEditObj) obj.beginEdit();
       if (editObj != null) {
         editStarted = true;
       } else {
         editStarted = false;
       }
     } else {
       editStarted = false;
     }
     if (editObj != null) {
       editObj.delete();
       if (editStarted) {
         editObj.endEdit();
       }
     }
     obj.forget(true);
   }
 }
 public ICFSecuritySecAppObj readSecAppByIdIdx(long ClusterId, int SecAppId, boolean forceRead) {
   CFSecuritySecAppPKey pkey =
       ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newPKey();
   pkey.setRequiredClusterId(ClusterId);
   pkey.setRequiredSecAppId(SecAppId);
   ICFSecuritySecAppObj obj = readSecApp(pkey, forceRead);
   return (obj);
 }
 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 ICFSecuritySecDeviceObj readSecDeviceByIdIdx(
     UUID SecUserId, String DevName, boolean forceRead) {
   CFSecuritySecDevicePKey pkey =
       ((ICFAsteriskSchema) schema.getBackingStore()).getFactorySecDevice().newPKey();
   pkey.setRequiredSecUserId(SecUserId);
   pkey.setRequiredDevName(DevName);
   ICFSecuritySecDeviceObj obj = readSecDevice(pkey, forceRead);
   return (obj);
 }
 public ICFSecurityTSecGroupMemberObj readTSecGroupMemberByIdIdx(
     long TenantId, long TSecGroupMemberId, boolean forceRead) {
   CFSecurityTSecGroupMemberPKey pkey =
       ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey();
   pkey.setRequiredTenantId(TenantId);
   pkey.setRequiredTSecGroupMemberId(TSecGroupMemberId);
   ICFSecurityTSecGroupMemberObj obj = readTSecGroupMember(pkey, forceRead);
   return (obj);
 }
 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 CFSecurityISOCountryBuff getBuff() {
   if (buff == null) {
     if (isNew) {
       buff = ((ICFAsteriskSchema) schema.getBackingStore()).getFactoryISOCountry().newBuff();
     } else {
       // Read the data buff via the backing store
       buff =
           ((ICFAsteriskSchema) schema.getBackingStore())
               .getTableISOCountry()
               .readDerivedByIdIdx(
                   ((ICFAsteriskSchemaObj) schema).getAuthorization(),
                   getPKey().getRequiredISOCountryId());
       if (buff != null) {
         copyBuffToPKey();
       }
     }
   }
   return (buff);
 }