public void deleteDomainByIdIdx(long TenantId, long Id) { CFInternetDomainBasePKey pkey = ((ICFBamSchema) schema.getBackingStore()).getFactoryDomainBase().newPKey(); pkey.setRequiredTenantId(TenantId); pkey.setRequiredId(Id); ICFInternetDomainObj obj = readDomain(pkey); if (obj != null) { ICFInternetDomainEditObj editObj = (ICFInternetDomainEditObj) obj.getEdit(); boolean editStarted; if (editObj == null) { editObj = (ICFInternetDomainEditObj) 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); } }