コード例 #1
0
  /**
   * If accounts can't cross charts, then we need to make sure the account number is unique.
   *
   * @param accountNumber
   * @return
   */
  protected boolean checkUniqueAccountNumber(String accountNumber) {
    boolean success = true;

    // while account is not allowed to cross chart
    // and with an account number that already exists
    if (!accountService.accountsCanCrossCharts()
        && !accountService.getAccountsForAccountNumber(accountNumber).isEmpty()) {
      success = false;
    }

    return success;
  }
コード例 #2
0
 @Override
 public boolean isValidAccount(String accountNumber) {
   Collection<Account> accounts = accountService.getAccountsForAccountNumber(accountNumber);
   return (accounts != null && !accounts.isEmpty());
 }