public User mapRow(ResultSet rs, int rowNum) throws SQLException { User user = new User(); user.setId(rs.getInt("id")); user.setFirstName(rs.getString("firstname")); user.setLastName(rs.getString("lastname")); return user; }
@Override public void insert(User user) { if (user != null) { log.debug("Processing user: "******"insert into user (firstname, lastname) values (?, ?)", user.getFirstName(), user.getLastName()); } else { log.debug("Domain user is null!"); } }