Пример #1
0
  @Override
  public Account update(Account account) {
    String query = "UPDATE account SET currency= ?,balance= ? WHERE accountId = ?";

    jdbcTemplate.update(
        query, new Object[] {account.getCurrency(), account.getBalance(), account.getId()});
    return account;
  }
Пример #2
0
 @Override
 public Account createAccount(Account account) {
   String query = "insert into Account (clientId, typeId, currency, accountType) values (?,?,?,?)";
   jdbcTemplate.update(
       query,
       new Object[] {
         account.getClientId(),
         account.getTypeId(),
         account.getCurrency(),
         account.getAccountType()
       });
   return account;
 }