public void forgetSecGroup(ICFSecuritySecGroupObj Obj, boolean forgetSubObjects) { ICFSecuritySecGroupObj obj = Obj; CFSecuritySecGroupPKey pkey = obj.getPKey(); if (members.containsKey(pkey)) { ICFSecuritySecGroupObj keepObj = members.get(pkey); // Detach object from alternate, duplicate, all and PKey indexes if (indexByClusterIdx != null) { CFSecuritySecGroupByClusterIdxKey keyClusterIdx = ((ICFSecuritySchema) schema.getBackingStore()).getFactorySecGroup().newClusterIdxKey(); keyClusterIdx.setRequiredClusterId(keepObj.getRequiredClusterId()); Map<CFSecuritySecGroupPKey, ICFSecuritySecGroupObj> mapClusterIdx = indexByClusterIdx.get(keyClusterIdx); if (mapClusterIdx != null) { mapClusterIdx.remove(keepObj.getPKey()); } } if (indexByUNameIdx != null) { CFSecuritySecGroupByUNameIdxKey keyUNameIdx = ((ICFSecuritySchema) schema.getBackingStore()).getFactorySecGroup().newUNameIdxKey(); keyUNameIdx.setRequiredClusterId(keepObj.getRequiredClusterId()); keyUNameIdx.setRequiredName(keepObj.getRequiredName()); indexByUNameIdx.remove(keyUNameIdx); } if (allSecGroup != null) { allSecGroup.remove(keepObj.getPKey()); } members.remove(pkey); if (forgetSubObjects) { ((ICFSecuritySchemaObj) schema) .getSecGroupIncludeTableObj() .forgetSecGroupIncludeByGroupIdx( keepObj.getRequiredClusterId(), keepObj.getRequiredSecGroupId()); ((ICFSecuritySchemaObj) schema) .getSecGroupMemberTableObj() .forgetSecGroupMemberByGroupIdx( keepObj.getRequiredClusterId(), keepObj.getRequiredSecGroupId()); ((ICFSecuritySchemaObj) schema) .getSecGroupIncludeTableObj() .forgetSecGroupIncludeByIncludeIdx( keepObj.getRequiredClusterId(), keepObj.getRequiredSecGroupId()); ((ICFSecuritySchemaObj) schema) .getSecGroupFormTableObj() .forgetSecGroupFormByGroupIdx( keepObj.getRequiredClusterId(), keepObj.getRequiredSecGroupId()); } } }
public void setRequiredContainerGroup(ICFSecuritySecGroupObj value) { if (buff == null) { getSecGroupFormBuff(); } requiredOwnerCluster = null; requiredContainerGroup = null; if (value != null) { getPKey().setRequiredClusterId(value.getRequiredClusterId()); getSecGroupFormBuff().setRequiredClusterId(value.getRequiredClusterId()); getSecGroupFormBuff().setRequiredSecGroupId(value.getRequiredSecGroupId()); } requiredContainerGroup = value; }
public ICFSecuritySecGroupObj getRequiredContainerGroup(boolean forceRead) { if (forceRead || (requiredContainerGroup == null)) { boolean anyMissing = false; if (!anyMissing) { ICFSecuritySecGroupObj obj = ((ICFAsteriskSchemaObj) getOrigAsSecGroupForm().getSchema()) .getSecGroupTableObj() .readSecGroupByIdIdx( getPKey().getRequiredClusterId(), getSecGroupFormBuff().getRequiredSecGroupId()); requiredContainerGroup = obj; if (obj != null) { getSecGroupFormBuff().setRequiredClusterId(obj.getRequiredClusterId()); getSecGroupFormBuff().setRequiredSecGroupId(obj.getRequiredSecGroupId()); requiredContainerGroup = obj; } } } return (requiredContainerGroup); }