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 copyPKeyToBuff() {
   if (buff != null) {
     buff.setRequiredId(getPKey().getRequiredId());
   }
   if (edit != null) {
     edit.copyPKeyToBuff();
   }
 }