void delete() { check(this, RolePredicates.MANAGER_PREDICATE); if (!canBeDeleted()) { throw new DomainException("error.accounting.Entry.belongs.to.receipt"); } super.setAccount(null); super.setAccountingTransaction(null); setRootDomainObject(null); super.deleteDomainObject(); }
private void init(EntryType entryType, Money amount, Account account) { checkParameters(entryType, amount, account); super.setEntryType(entryType); super.setOriginalAmount(amount); super.setAccount(account); }