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 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();
   }
 }