@Override
 public boolean insertNewTransaction(
     Long accountId,
     Double amount,
     String remark,
     String type,
     String userName,
     String accountType,
     Useraccounts accUserAccount,
     String isCritical) {
   try {
     transaction.setAccountId(accountId);
     transaction.setAmount(amount);
     transaction.setRemark(remark);
     transaction.setType(type);
     transaction.setTransactionID(UUID.randomUUID().toString());
     transaction.setAccType(accountType);
     transaction.setIsCritical(isCritical);
     return merchantDAO.insertNewTransaction(transaction, accUserAccount);
   } catch (Exception e) {
     System.out.println("Error in inserting merchant txn :: " + e);
     logger.error("Error in inserting merchant txn :: " + e);
     // do logging
     return false;
   }
 }
 public Useraccounts getUserAccountsInfoByAccountId(Long accountId) {
   return merchantDAO.getUserAccountsInfoByAccountId(accountId);
 }
 public Boolean updateBalance(Useraccounts merchAccount, double balance) {
   return merchantDAO.updateBalance(merchAccount, balance);
 }
 @Override
 public List<Useraccounts> getUserAccountsInfoByUserName(String userName) {
   return merchantDAO.getUserAccountsInfoByUserName(userName);
 }
 @Override
 public List<Transaction> getTransactionHistory(String userName) {
   return merchantDAO.getTransactionHistory(userName);
 }
 /* (non-Javadoc)
  * @see com.bankapp.services.MerchantService#isAccountValid(java.lang.Long)
  */
 @Override
 public boolean isAccountValid(Long accountId, String userName) {
   // merchant cannot put its a/c id for credit/deposit
   String user = merchantDAO.getUserName(accountId);
   return (user != null);
 }