@Test public void findUsersByUsername() { final Users users = usersJdbcRepository.findUsersByUsername("abc"); assertNull(users); }
@Override public Users findUsersByUsername(String username) { final String sql = " select u.* from users u where u.archived = false and u.username = ? "; final List<Users> usersList = jdbcTemplate.query(sql, usersRowMapper, username); return usersList.isEmpty() ? null : usersList.get(0); }
UsersJdbcRepository extends AbstractJdbcRepository implements UsersRepository { @Override public Users findUsersByUsername(String username) { final String sql = " select u.* from users u where u.archived = false and u.username = ? "; final List<Users> usersList = jdbcTemplate.query(sql, usersRowMapper, username); return usersList.isEmpty() ? null : usersList.get(0); } }
UsersJdbcRepository extends AbstractJdbcRepository implements UsersRepository { @Override public Users findUsersByUsername(String username) { final String sql = " select u.* from users u where u.archived = false and u.username = ? "; final List<Users> usersList = jdbcTemplate.query(sql, usersRowMapper, username); return usersList.isEmpty() ? null : usersList.get(0); }  }
UsersJdbcRepository extends AbstractJdbcRepository implements UsersRepository { @Override public Users findUsersByUsername(String username) { final String sql = " select u.* from users u where u.archived = false and u.username = ? "; final List<Users> usersList = jdbcTemplate.query(sql, usersRowMapper, username); return usersList.isEmpty() ? null : usersList.get(0); }  @Override Users findUsersByUsername(String username); @Override List<Roles> findRolesByUsername(String username); }
UsersJdbcRepository extends AbstractJdbcRepository implements UsersRepository { @Override public Users findUsersByUsername(String username) { final String sql = " select u.* from users u where u.archived = false and u.username = ? "; final List<Users> usersList = jdbcTemplate.query(sql, usersRowMapper, username); return usersList.isEmpty() ? null : usersList.get(0); }  @Override Users findUsersByUsername(String username); @Override List<Roles> findRolesByUsername(String username);  }