public ICFSecuritySecAppObj readSecAppByUJEEMountIdx(
     long ClusterId, String JEEMountName, boolean forceRead) {
   if (indexByUJEEMountIdx == null) {
     indexByUJEEMountIdx = new HashMap<CFSecuritySecAppByUJEEMountIdxKey, ICFSecuritySecAppObj>();
   }
   CFSecuritySecAppByUJEEMountIdxKey key =
       ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredJEEMountName(JEEMountName);
   ICFSecuritySecAppObj obj = null;
   if ((!forceRead) && indexByUJEEMountIdx.containsKey(key)) {
     obj = indexByUJEEMountIdx.get(key);
   } else {
     CFSecuritySecAppBuff buff =
         ((ICFCrmSchema) schema.getBackingStore())
             .getTableSecApp()
             .readDerivedByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName);
     if (buff != null) {
       obj = schema.getSecAppTableObj().newInstance();
       obj.setPKey(((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecuritySecAppObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByUJEEMountIdx.put(key, null);
     }
   }
   return (obj);
 }
  public void forgetSecAppByUJEEMountIdx(long ClusterId, String JEEMountName) {
    if (indexByUJEEMountIdx == null) {
      return;
    }
    CFSecuritySecAppByUJEEMountIdxKey key =
        ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey();
    key.setRequiredClusterId(ClusterId);
    key.setRequiredJEEMountName(JEEMountName);
    if (indexByUJEEMountIdx.containsKey(key)) {
      ICFSecuritySecAppObj probed = indexByUJEEMountIdx.get(key);
      if (probed != null) {
        probed.forget(true);
      }

      indexByUJEEMountIdx.remove(key);
    }
  }
 public void deleteSecAppByUJEEMountIdx(long ClusterId, String JEEMountName) {
   if (indexByUJEEMountIdx == null) {
     indexByUJEEMountIdx = new HashMap<CFSecuritySecAppByUJEEMountIdxKey, ICFSecuritySecAppObj>();
   }
   CFSecuritySecAppByUJEEMountIdxKey key =
       ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredJEEMountName(JEEMountName);
   ICFSecuritySecAppObj obj = null;
   if (indexByUJEEMountIdx.containsKey(key)) {
     obj = indexByUJEEMountIdx.get(key);
     ((ICFCrmSchema) schema.getBackingStore())
         .getTableSecApp()
         .deleteSecAppByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName);
     obj.forget(true);
   } else {
     ((ICFCrmSchema) schema.getBackingStore())
         .getTableSecApp()
         .deleteSecAppByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName);
   }
 }
  public void forgetSecApp(ICFSecuritySecAppObj Obj, boolean forgetSubObjects) {
    ICFSecuritySecAppObj obj = Obj;
    CFSecuritySecAppPKey pkey = obj.getPKey();
    if (members.containsKey(pkey)) {
      ICFSecuritySecAppObj keepObj = members.get(pkey);
      // Detach object from alternate, duplicate, all and PKey indexes

      if (indexByClusterIdx != null) {
        CFSecuritySecAppByClusterIdxKey keyClusterIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey();
        keyClusterIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> mapClusterIdx =
            indexByClusterIdx.get(keyClusterIdx);
        if (mapClusterIdx != null) {
          mapClusterIdx.remove(keepObj.getPKey());
        }
      }

      if (indexByUJEEMountIdx != null) {
        CFSecuritySecAppByUJEEMountIdxKey keyUJEEMountIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey();
        keyUJEEMountIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        keyUJEEMountIdx.setRequiredJEEMountName(keepObj.getRequiredJEEMountName());
        indexByUJEEMountIdx.remove(keyUJEEMountIdx);
      }

      if (allSecApp != null) {
        allSecApp.remove(keepObj.getPKey());
      }
      members.remove(pkey);
      if (forgetSubObjects) {
        ((ICFSecuritySchemaObj) schema)
            .getSecFormTableObj()
            .forgetSecFormBySecAppIdx(
                keepObj.getRequiredClusterId(), keepObj.getRequiredSecAppId());
      }
    }
  }
  public ICFSecuritySecAppObj realizeSecApp(ICFSecuritySecAppObj Obj) {
    ICFSecuritySecAppObj obj = Obj;
    CFSecuritySecAppPKey pkey = obj.getPKey();
    ICFSecuritySecAppObj keepObj = null;
    if (members.containsKey(pkey) && (null != members.get(pkey))) {
      ICFSecuritySecAppObj 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 (indexByClusterIdx != null) {
        CFSecuritySecAppByClusterIdxKey keyClusterIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey();
        keyClusterIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> mapClusterIdx =
            indexByClusterIdx.get(keyClusterIdx);
        if (mapClusterIdx != null) {
          mapClusterIdx.remove(keepObj.getPKey());
        }
      }

      if (indexByUJEEMountIdx != null) {
        CFSecuritySecAppByUJEEMountIdxKey keyUJEEMountIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey();
        keyUJEEMountIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        keyUJEEMountIdx.setRequiredJEEMountName(keepObj.getRequiredJEEMountName());
        indexByUJEEMountIdx.remove(keyUJEEMountIdx);
      }

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

      if (indexByClusterIdx != null) {
        CFSecuritySecAppByClusterIdxKey keyClusterIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey();
        keyClusterIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> mapClusterIdx =
            indexByClusterIdx.get(keyClusterIdx);
        if (mapClusterIdx != null) {
          mapClusterIdx.put(keepObj.getPKey(), keepObj);
        }
      }

      if (indexByUJEEMountIdx != null) {
        CFSecuritySecAppByUJEEMountIdxKey keyUJEEMountIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey();
        keyUJEEMountIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        keyUJEEMountIdx.setRequiredJEEMountName(keepObj.getRequiredJEEMountName());
        indexByUJEEMountIdx.put(keyUJEEMountIdx, keepObj);
      }
      if (allSecApp != null) {
        allSecApp.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 (allSecApp != null) {
        allSecApp.put(keepObj.getPKey(), keepObj);
      }

      if (indexByClusterIdx != null) {
        CFSecuritySecAppByClusterIdxKey keyClusterIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey();
        keyClusterIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> mapClusterIdx =
            indexByClusterIdx.get(keyClusterIdx);
        if (mapClusterIdx != null) {
          mapClusterIdx.put(keepObj.getPKey(), keepObj);
        }
      }

      if (indexByUJEEMountIdx != null) {
        CFSecuritySecAppByUJEEMountIdxKey keyUJEEMountIdx =
            ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey();
        keyUJEEMountIdx.setRequiredClusterId(keepObj.getRequiredClusterId());
        keyUJEEMountIdx.setRequiredJEEMountName(keepObj.getRequiredJEEMountName());
        indexByUJEEMountIdx.put(keyUJEEMountIdx, keepObj);
      }
    }
    return (keepObj);
  }