@Override public boolean withdraw(double amount, String description) { boolean isDone = false; if (this.getBalance() >= amount) { super.withdraw(amount, description); isDone = true; } return isDone; }
@Transactional public Account save(Account account) { account.setPassword(passwordEncoder.encode(account.getPassword())); entityManager.persist(account); return account; }
public boolean addAccount(Account account) { account.setPerson(this); return accounts.add(account); }
public Account removeAccount(Account account) { getAccounts().remove(account); account.setAccountstate(null); return account; }
public Account addAccount(Account account) { getAccounts().add(account); account.setAccountstate(this); return account; }