public void deleteSecAppByClusterIdx(long ClusterId) { CFSecuritySecAppByClusterIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey(); key.setRequiredClusterId(ClusterId); if (indexByClusterIdx == null) { indexByClusterIdx = new HashMap< CFSecuritySecAppByClusterIdxKey, Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj>>(); } if (indexByClusterIdx.containsKey(key)) { Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> dict = indexByClusterIdx.get(key); ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .deleteSecAppByClusterIdx(schema.getAuthorization(), ClusterId); Iterator<ICFSecuritySecAppObj> iter = dict.values().iterator(); ICFSecuritySecAppObj obj; List<ICFSecuritySecAppObj> toForget = new LinkedList<ICFSecuritySecAppObj>(); 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 { ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .deleteSecAppByClusterIdx(schema.getAuthorization(), ClusterId); } }
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 void deleteSecApp(ICFSecuritySecAppObj Obj) { ICFSecuritySecAppObj obj = Obj; ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .deleteSecApp(schema.getAuthorization(), obj.getSecAppBuff()); obj.forget(true); }
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 forgetSecAppByIdIdx(long ClusterId, int SecAppId) { if (members == null) { return; } CFSecuritySecAppPKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newPKey(); key.setRequiredClusterId(ClusterId); key.setRequiredSecAppId(SecAppId); if (members.containsKey(key)) { ICFSecuritySecAppObj probed = members.get(key); if (probed != null) { probed.forget(true); } } }
public void minimizeMemory() { allSecApp = null; indexByClusterIdx = null; indexByUJEEMountIdx = null; List<ICFSecuritySecAppObj> toForget = new LinkedList<ICFSecuritySecAppObj>(); ICFSecuritySecAppObj cur = null; Iterator<ICFSecuritySecAppObj> 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 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); } }