Beispiel #1
0
 public User mapRow(ResultSet resultSet, int i) throws SQLException {
   User user = new User();
   user.setUserName(resultSet.getString("NAME"));
   user.setPassWord(resultSet.getString("PASSWORD"));
   user.setRole(UserRole.prase(resultSet.getString("ROLE")));
   return user;
 }
Beispiel #2
0
 @Transactional
 public List<User> getUser(User user) {
   return jdbcTemplate.query(
       QUERY_USER_SQL,
       new Object[] {user.getUserName()},
       new int[] {Types.VARCHAR},
       new PersonRowMapper());
 }