public void deleteDataScopeByIdIdx(short Id) { CFBamDataScopePKey pkey = ((ICFBamSchema) schema.getBackingStore()).getFactoryDataScope().newPKey(); pkey.setRequiredId(Id); ICFBamDataScopeObj obj = readDataScope(pkey); if (obj != null) { ICFBamDataScopeEditObj editObj = (ICFBamDataScopeEditObj) obj.getEdit(); boolean editStarted; if (editObj == null) { editObj = (ICFBamDataScopeEditObj) 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 deleteDataScope(ICFBamDataScopeObj Obj) { ICFBamDataScopeObj obj = Obj; ((ICFBamSchema) schema.getBackingStore()) .getTableDataScope() .deleteDataScope(schema.getAuthorization(), obj.getDataScopeBuff()); obj.forget(true); }
public void forgetDataScopeByIdIdx(short Id) { if (members == null) { return; } CFBamDataScopePKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryDataScope().newPKey(); key.setRequiredId(Id); if (members.containsKey(key)) { ICFBamDataScopeObj probed = members.get(key); if (probed != null) { probed.forget(true); } } }
public void forgetDataScopeByUNameIdx(String Name) { if (indexByUNameIdx == null) { return; } CFBamDataScopeByUNameIdxKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryDataScope().newUNameIdxKey(); key.setRequiredName(Name); if (indexByUNameIdx.containsKey(key)) { ICFBamDataScopeObj probed = indexByUNameIdx.get(key); if (probed != null) { probed.forget(true); } indexByUNameIdx.remove(key); } }
public void minimizeMemory() { allDataScope = null; indexByUNameIdx = null; List<ICFBamDataScopeObj> toForget = new LinkedList<ICFBamDataScopeObj>(); ICFBamDataScopeObj cur = null; Iterator<ICFBamDataScopeObj> iter = members.values().iterator(); while (iter.hasNext()) { cur = iter.next(); if (cur.getEdit() == null) { toForget.add(cur); } } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(); } }
public void deleteDataScopeByUNameIdx(String Name) { if (indexByUNameIdx == null) { indexByUNameIdx = new HashMap<CFBamDataScopeByUNameIdxKey, ICFBamDataScopeObj>(); } CFBamDataScopeByUNameIdxKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryDataScope().newUNameIdxKey(); key.setRequiredName(Name); ICFBamDataScopeObj obj = null; if (indexByUNameIdx.containsKey(key)) { obj = indexByUNameIdx.get(key); ((ICFBamSchema) schema.getBackingStore()) .getTableDataScope() .deleteDataScopeByUNameIdx(schema.getAuthorization(), Name); obj.forget(true); } else { ((ICFBamSchema) schema.getBackingStore()) .getTableDataScope() .deleteDataScopeByUNameIdx(schema.getAuthorization(), Name); } }