@Override @Loggable(value = LogLevel.TRACE) public List<PaymentRecord> getPaymentRecords(User user) throws AccountManagementException { try { return accountService.getPaymentRecords(user); } catch (AccountServiceException e) { throw new AccountManagementException(e.getMessage(), e.getCause()); } }
@Override @Loggable(value = LogLevel.TRACE) public CustInfo getCustInfo(User user) throws AccountManagementException { try { return accountService.getCustInfo(user); } catch (AccountServiceException e) { throw new AccountManagementException(e.getMessage(), e.getCause()); } }
@Override @Loggable(value = LogLevel.TRACE) public void updateEmail(Account account) throws AccountManagementException { try { accountService.updateEmail(account); CacheManager.clear(CacheKey.ACCOUNTS); } catch (AccountServiceException e) { throw new AccountManagementException(e.getMessage(), e.getCause()); } }
@Override @Loggable(value = LogLevel.TRACE) public CustTopUp setTopUp(User user, double amount, Account account) throws AccountManagementException { try { return accountService.setTopUp(user, amount, account); } catch (AccountServiceException e) { throw new AccountManagementException(e.getMessage(), e.getCause()); } }
@Override @Loggable(value = LogLevel.TRACE) public List<UsageDetail> getChargeHistory(User user, int accountNumber) throws AccountManagementException { try { return accountService.getChargeHistory(user, accountNumber); } catch (AccountServiceException e) { throw new AccountManagementException(e.getMessage(), e.getCause()); } }
@Override @Loggable(value = LogLevel.TRACE) public Account createShellAccount(User user) throws AccountManagementException, AddressManagementException { try { Account account = accountService.createShellAccount(user); return account; } catch (AccountServiceException e) { throw new AccountManagementException(e.getMessage(), e.getCause()); } }
@Override @Loggable(value = LogLevel.TRACE) public Account getAccount(int accountNumber) throws AccountManagementException { Account account = getAccountFromCache(accountNumber); if (account != null) { return account; } else { try { return accountService.getAccount(accountNumber); } catch (AccountServiceException e) { throw new AccountManagementException(e.getMessage(), e.getCause()); } } }