Exemplo n.º 1
0
  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();
  }
Exemplo n.º 2
0
 private void init(EntryType entryType, Money amount, Account account) {
   checkParameters(entryType, amount, account);
   super.setEntryType(entryType);
   super.setOriginalAmount(amount);
   super.setAccount(account);
 }