public void deleteClearTopDepByIdIdx(long TenantId, long Id) { CFBamScopePKey pkey = schema.getBackingStore().getFactoryScope().newPKey(); pkey.setRequiredTenantId(TenantId); pkey.setRequiredId(Id); ICFBamScopeObj obj = readClearTopDep(pkey); if (obj != null) { ICFBamClearTopDepEditObj editObj = (ICFBamClearTopDepEditObj) obj.getEdit(); boolean editStarted; if (editObj == null) { editObj = (ICFBamClearTopDepEditObj) 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); } }