throws DmsException, ElementNotFoundException, ClassNotFoundException, InstantiationException,
IllegalAccessException, ClassCastException, IllegalStateException {
Dms oDms = oSes.getDms();
Document d = oDms.getDocument(sDocId);
Log.out.debug("TaxPayer.delete(AtrilSession, "+sDocId+")");
if (null==d) throw new ElementNotFoundException("Document "+sDocId+" not found");
List <Document> oAlwed = oDms.query("AllowedTaxPayer$taxpayer='"+sDocId+"'");
List <Document> oDnied = oDms.query("DeniedTaxPayer$taxpayer='"+sDocId+"'");
for(Document a : oAlwed)
BaseModelObject.delete(oSes, a.id());
for(Document n : oDnied)