Пример #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 void remove(Account account) {
   String query = "DELETE FROM Account WHERE ID = ?";
   int affectedRows = jdbcTemplate.update(query, account.getId());
 }