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 deleteSecDevice(ICFSecuritySecDeviceObj Obj) {
   ICFSecuritySecDeviceObj obj = Obj;
   ((ICFSecuritySchema) schema.getBackingStore())
       .getTableSecDevice()
       .deleteSecDevice(schema.getAuthorization(), obj.getSecDeviceBuff());
   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 deleteISOCountry(ICFSecurityISOCountryObj Obj) {
   ICFSecurityISOCountryObj obj = Obj;
   ((ICFInternetSchema) schema.getBackingStore())
       .getTableISOCountry()
       .deleteISOCountry(schema.getAuthorization(), obj.getISOCountryBuff());
   obj.forget(true);
 }
 public void deleteSecGroupInclude(ICFSecuritySecGroupIncludeObj Obj) {
   ICFSecuritySecGroupIncludeObj obj = Obj;
   ((ICFInternetSchema) schema.getBackingStore())
       .getTableSecGroupInclude()
       .deleteSecGroupInclude(schema.getAuthorization(), obj.getSecGroupIncludeBuff());
   obj.forget(true);
 }
 public void deleteSecDeviceByUserIdx(UUID SecUserId) {
   CFSecuritySecDeviceByUserIdxKey key =
       ((ICFSecuritySchema) 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);
     ((ICFSecuritySchema) 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 {
     ((ICFSecuritySchema) schema.getBackingStore())
         .getTableSecDevice()
         .deleteSecDeviceByUserIdx(schema.getAuthorization(), SecUserId);
   }
 }
 public void deleteSecGroupIncludeByUIncludeIdx(
     long ClusterId, int SecGroupId, int IncludeGroupId) {
   if (indexByUIncludeIdx == null) {
     indexByUIncludeIdx =
         new HashMap<CFSecuritySecGroupIncludeByUIncludeIdxKey, ICFSecuritySecGroupIncludeObj>();
   }
   CFSecuritySecGroupIncludeByUIncludeIdxKey key =
       ((ICFInternetSchema) schema.getBackingStore())
           .getFactorySecGroupInclude()
           .newUIncludeIdxKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredSecGroupId(SecGroupId);
   key.setRequiredIncludeGroupId(IncludeGroupId);
   ICFSecuritySecGroupIncludeObj obj = null;
   if (indexByUIncludeIdx.containsKey(key)) {
     obj = indexByUIncludeIdx.get(key);
     ((ICFInternetSchema) schema.getBackingStore())
         .getTableSecGroupInclude()
         .deleteSecGroupIncludeByUIncludeIdx(
             schema.getAuthorization(), ClusterId, SecGroupId, IncludeGroupId);
     obj.forget(true);
   } else {
     ((ICFInternetSchema) schema.getBackingStore())
         .getTableSecGroupInclude()
         .deleteSecGroupIncludeByUIncludeIdx(
             schema.getAuthorization(), ClusterId, SecGroupId, IncludeGroupId);
   }
 }
 public void deleteTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj) {
   ICFSecurityTSecGroupMemberObj obj = Obj;
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableTSecGroupMember()
       .deleteTSecGroupMember(schema.getAuthorization(), obj.getTSecGroupMemberBuff());
   obj.forget(true);
 }
 public ICFSecurityTenantObj getSystemTenant() {
   boolean transactionStarted = schema.beginTransaction();
   ICFSecurityTenantObj tenantObj;
   try {
     schema.getAuditActionTableObj().bootstrapAuditActions();
     ICFSecurityClusterObj clusterObj = schema.getClusterTableObj().getSystemCluster();
     tenantObj = readTenantByUNameIdx(clusterObj.getRequiredId(), "system");
     if (tenantObj == null) {
       tenantObj = newInstance();
       ICFSecurityTenantEditObj tenantEdit = tenantObj.beginEdit();
       tenantEdit.setRequiredContainerCluster(clusterObj);
       tenantEdit.setRequiredTenantName("system");
       tenantObj = tenantEdit.create();
       tenantEdit.endEdit();
     }
     if (transactionStarted) {
       schema.commit();
     }
   } catch (RuntimeException e) {
     if (transactionStarted) {
       try {
         schema.rollback();
       } catch (Exception e2) {
       }
     }
     throw e;
   }
   return (tenantObj);
 }
 public void deleteTenant(ICFSecurityTenantObj Obj) {
   ICFSecurityTenantObj obj = Obj;
   ((ICFSecuritySchema) schema.getBackingStore())
       .getTableTenant()
       .deleteTenant(schema.getAuthorization(), obj.getTenantBuff());
   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 ICFSecuritySecGroupIncludeObj readSecGroupInclude(
     CFSecuritySecGroupIncludePKey pkey, boolean forceRead) {
   ICFSecuritySecGroupIncludeObj obj = null;
   if ((!forceRead) && members.containsKey(pkey)) {
     obj = members.get(pkey);
   } else {
     CFSecuritySecGroupIncludeBuff readBuff =
         ((ICFInternetSchema) schema.getBackingStore())
             .getTableSecGroupInclude()
             .readDerivedByIdIdx(
                 schema.getAuthorization(),
                 pkey.getRequiredClusterId(),
                 pkey.getRequiredSecGroupIncludeId());
     if (readBuff != null) {
       obj = schema.getSecGroupIncludeTableObj().newInstance();
       obj.setPKey(
           ((ICFInternetSchema) schema.getBackingStore()).getFactorySecGroupInclude().newPKey());
       obj.setBuff(readBuff);
       obj = (ICFSecuritySecGroupIncludeObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       members.put(pkey, null);
     }
   }
   return (obj);
 }
 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 ICFSecurityTSecGroupMemberObj updateTSecGroupMember(ICFSecurityTSecGroupMemberObj Obj) {
   ICFSecurityTSecGroupMemberObj obj = Obj;
   ((ICFCrmSchema) schema.getBackingStore())
       .getTableTSecGroupMember()
       .updateTSecGroupMember(schema.getAuthorization(), Obj.getTSecGroupMemberBuff());
   obj = (ICFSecurityTSecGroupMemberObj) Obj.realize();
   return (obj);
 }
 public ICFSecurityISOCountryObj updateISOCountry(ICFSecurityISOCountryObj Obj) {
   ICFSecurityISOCountryObj obj = Obj;
   ((ICFInternetSchema) schema.getBackingStore())
       .getTableISOCountry()
       .updateISOCountry(schema.getAuthorization(), Obj.getISOCountryBuff());
   obj = (ICFSecurityISOCountryObj) Obj.realize();
   return (obj);
 }
 public ICFSecurityTenantObj updateTenant(ICFSecurityTenantObj Obj) {
   ICFSecurityTenantObj obj = Obj;
   ((ICFSecuritySchema) schema.getBackingStore())
       .getTableTenant()
       .updateTenant(schema.getAuthorization(), Obj.getTenantBuff());
   obj = (ICFSecurityTenantObj) Obj.realize();
   return (obj);
 }
 public ICFSecuritySecDeviceObj updateSecDevice(ICFSecuritySecDeviceObj Obj) {
   ICFSecuritySecDeviceObj obj = Obj;
   ((ICFSecuritySchema) schema.getBackingStore())
       .getTableSecDevice()
       .updateSecDevice(schema.getAuthorization(), Obj.getSecDeviceBuff());
   obj = (ICFSecuritySecDeviceObj) 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 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 ICFSecurityISOCountryObj createISOCountry(ICFSecurityISOCountryObj Obj) {
   ICFSecurityISOCountryObj obj = Obj;
   CFSecurityISOCountryBuff buff = obj.getISOCountryBuff();
   ((ICFInternetSchema) schema.getBackingStore())
       .getTableISOCountry()
       .createISOCountry(schema.getAuthorization(), buff);
   obj.copyBuffToPKey();
   obj = obj.realize();
   return (obj);
 }
 public ICFSecuritySecDeviceObj createSecDevice(ICFSecuritySecDeviceObj Obj) {
   ICFSecuritySecDeviceObj obj = Obj;
   CFSecuritySecDeviceBuff buff = obj.getSecDeviceBuff();
   ((ICFSecuritySchema) schema.getBackingStore())
       .getTableSecDevice()
       .createSecDevice(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 deleteTenantByIdIdx(long Id) {
   CFSecurityTenantPKey pkey =
       ((ICFSecuritySchema) schema.getBackingStore()).getFactoryTenant().newPKey();
   pkey.setRequiredId(Id);
   ICFSecurityTenantObj obj = readTenant(pkey);
   if (obj != null) {
     ICFSecurityTenantEditObj editObj = (ICFSecurityTenantEditObj) obj.getEdit();
     boolean editStarted;
     if (editObj == null) {
       editObj = (ICFSecurityTenantEditObj) 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 deleteSecDeviceByIdIdx(UUID SecUserId, String DevName) {
   CFSecuritySecDevicePKey pkey =
       ((ICFSecuritySchema) 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 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 void forgetSecDeviceByUserIdx(UUID SecUserId) {
    if (indexByUserIdx == null) {
      return;
    }
    CFSecuritySecDeviceByUserIdxKey key =
        ((ICFSecuritySchema) schema.getBackingStore()).getFactorySecDevice().newUserIdxKey();
    key.setRequiredSecUserId(SecUserId);
    if (indexByUserIdx.containsKey(key)) {
      Map<CFSecuritySecDevicePKey, ICFSecuritySecDeviceObj> mapUserIdx = indexByUserIdx.get(key);
      if (mapUserIdx != null) {
        List<ICFSecuritySecDeviceObj> toForget = new LinkedList<ICFSecuritySecDeviceObj>();
        ICFSecuritySecDeviceObj cur = null;
        Iterator<ICFSecuritySecDeviceObj> 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 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 =
            ((ICFSecuritySchema) 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 ICFSecurityTenantObj readTenantByIdIdx(long Id, boolean forceRead) {
   CFSecurityTenantPKey pkey =
       ((ICFSecuritySchema) schema.getBackingStore()).getFactoryTenant().newPKey();
   pkey.setRequiredId(Id);
   ICFSecurityTenantObj obj = readTenant(pkey, forceRead);
   return (obj);
 }
 public void deleteSecGroupIncludeByIdIdx(long ClusterId, long SecGroupIncludeId) {
   CFSecuritySecGroupIncludePKey pkey =
       ((ICFInternetSchema) schema.getBackingStore()).getFactorySecGroupInclude().newPKey();
   pkey.setRequiredClusterId(ClusterId);
   pkey.setRequiredSecGroupIncludeId(SecGroupIncludeId);
   ICFSecuritySecGroupIncludeObj obj = readSecGroupInclude(pkey);
   if (obj != null) {
     ICFSecuritySecGroupIncludeEditObj editObj = (ICFSecuritySecGroupIncludeEditObj) obj.getEdit();
     boolean editStarted;
     if (editObj == null) {
       editObj = (ICFSecuritySecGroupIncludeEditObj) 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 forgetSecGroupIncludeByIncludeIdx(long ClusterId, int IncludeGroupId) {
    if (indexByIncludeIdx == null) {
      return;
    }
    CFSecuritySecGroupIncludeByIncludeIdxKey key =
        ((ICFInternetSchema) schema.getBackingStore())
            .getFactorySecGroupInclude()
            .newIncludeIdxKey();
    key.setRequiredClusterId(ClusterId);
    key.setRequiredIncludeGroupId(IncludeGroupId);
    if (indexByIncludeIdx.containsKey(key)) {
      Map<CFSecuritySecGroupIncludePKey, ICFSecuritySecGroupIncludeObj> mapIncludeIdx =
          indexByIncludeIdx.get(key);
      if (mapIncludeIdx != null) {
        List<ICFSecuritySecGroupIncludeObj> toForget =
            new LinkedList<ICFSecuritySecGroupIncludeObj>();
        ICFSecuritySecGroupIncludeObj cur = null;
        Iterator<ICFSecuritySecGroupIncludeObj> iter = mapIncludeIdx.values().iterator();
        while (iter.hasNext()) {
          cur = iter.next();
          toForget.add(cur);
        }
        iter = toForget.iterator();
        while (iter.hasNext()) {
          cur = iter.next();
          cur.forget(true);
        }
      }

      indexByIncludeIdx.remove(key);
    }
  }