public void deleteTenantByClusterIdx(long ClusterId) {
   CFSecurityTenantByClusterIdxKey key =
       ((ICFSecuritySchema) schema.getBackingStore()).getFactoryTenant().newClusterIdxKey();
   key.setRequiredClusterId(ClusterId);
   if (indexByClusterIdx == null) {
     indexByClusterIdx =
         new HashMap<
             CFSecurityTenantByClusterIdxKey, Map<CFSecurityTenantPKey, ICFSecurityTenantObj>>();
   }
   if (indexByClusterIdx.containsKey(key)) {
     Map<CFSecurityTenantPKey, ICFSecurityTenantObj> dict = indexByClusterIdx.get(key);
     ((ICFSecuritySchema) schema.getBackingStore())
         .getTableTenant()
         .deleteTenantByClusterIdx(schema.getAuthorization(), ClusterId);
     Iterator<ICFSecurityTenantObj> iter = dict.values().iterator();
     ICFSecurityTenantObj obj;
     List<ICFSecurityTenantObj> toForget = new LinkedList<ICFSecurityTenantObj>();
     while (iter.hasNext()) {
       obj = iter.next();
       toForget.add(obj);
     }
     iter = toForget.iterator();
     while (iter.hasNext()) {
       obj = iter.next();
       obj.forget(true);
     }
     indexByClusterIdx.remove(key);
   } else {
     ((ICFSecuritySchema) schema.getBackingStore())
         .getTableTenant()
         .deleteTenantByClusterIdx(schema.getAuthorization(), ClusterId);
   }
 }
 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 deleteTenant(ICFSecurityTenantObj Obj) {
   ICFSecurityTenantObj obj = Obj;
   ((ICFSecuritySchema) schema.getBackingStore())
       .getTableTenant()
       .deleteTenant(schema.getAuthorization(), obj.getTenantBuff());
   obj.forget(true);
 }
  public void forgetTenantByClusterIdx(long ClusterId) {
    if (indexByClusterIdx == null) {
      return;
    }
    CFSecurityTenantByClusterIdxKey key =
        ((ICFSecuritySchema) schema.getBackingStore()).getFactoryTenant().newClusterIdxKey();
    key.setRequiredClusterId(ClusterId);
    if (indexByClusterIdx.containsKey(key)) {
      Map<CFSecurityTenantPKey, ICFSecurityTenantObj> mapClusterIdx = indexByClusterIdx.get(key);
      if (mapClusterIdx != null) {
        List<ICFSecurityTenantObj> toForget = new LinkedList<ICFSecurityTenantObj>();
        ICFSecurityTenantObj cur = null;
        Iterator<ICFSecurityTenantObj> 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 forgetTenantByIdIdx(long Id) {
   if (members == null) {
     return;
   }
   CFSecurityTenantPKey key =
       ((ICFSecuritySchema) schema.getBackingStore()).getFactoryTenant().newPKey();
   key.setRequiredId(Id);
   if (members.containsKey(key)) {
     ICFSecurityTenantObj probed = members.get(key);
     if (probed != null) {
       probed.forget(true);
     }
   }
 }
 public void minimizeMemory() {
   allTenant = null;
   indexByClusterIdx = null;
   indexByUNameIdx = null;
   List<ICFSecurityTenantObj> toForget = new LinkedList<ICFSecurityTenantObj>();
   ICFSecurityTenantObj cur = null;
   Iterator<ICFSecurityTenantObj> iter = members.values().iterator();
   while (iter.hasNext()) {
     cur = iter.next();
     toForget.add(cur);
   }
   iter = toForget.iterator();
   while (iter.hasNext()) {
     cur = iter.next();
     cur.forget();
   }
 }
  public void forgetTenantByUNameIdx(long ClusterId, String TenantName) {
    if (indexByUNameIdx == null) {
      return;
    }
    CFSecurityTenantByUNameIdxKey key =
        ((ICFSecuritySchema) schema.getBackingStore()).getFactoryTenant().newUNameIdxKey();
    key.setRequiredClusterId(ClusterId);
    key.setRequiredTenantName(TenantName);
    if (indexByUNameIdx.containsKey(key)) {
      ICFSecurityTenantObj probed = indexByUNameIdx.get(key);
      if (probed != null) {
        probed.forget(true);
      }

      indexByUNameIdx.remove(key);
    }
  }
 public void deleteTenantByUNameIdx(long ClusterId, String TenantName) {
   if (indexByUNameIdx == null) {
     indexByUNameIdx = new HashMap<CFSecurityTenantByUNameIdxKey, ICFSecurityTenantObj>();
   }
   CFSecurityTenantByUNameIdxKey key =
       ((ICFSecuritySchema) schema.getBackingStore()).getFactoryTenant().newUNameIdxKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredTenantName(TenantName);
   ICFSecurityTenantObj obj = null;
   if (indexByUNameIdx.containsKey(key)) {
     obj = indexByUNameIdx.get(key);
     ((ICFSecuritySchema) schema.getBackingStore())
         .getTableTenant()
         .deleteTenantByUNameIdx(schema.getAuthorization(), ClusterId, TenantName);
     obj.forget(true);
   } else {
     ((ICFSecuritySchema) schema.getBackingStore())
         .getTableTenant()
         .deleteTenantByUNameIdx(schema.getAuthorization(), ClusterId, TenantName);
   }
 }