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