public void deleteTaxByIdIdx(long TaxId) {
   CFAccTaxPKey pkey = ((ICFAccSchema) schema.getBackingStore()).getFactoryTax().newPKey();
   pkey.setRequiredTaxId(TaxId);
   ICFAccTaxObj obj = readTax(pkey);
   if (obj != null) {
     ICFAccTaxEditObj editObj = (ICFAccTaxEditObj) obj.getEdit();
     boolean editStarted;
     if (editObj == null) {
       editObj = (ICFAccTaxEditObj) 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);
   }
 }