I have my rowmapper like:
private static final class UserRowMapper implements RowMapper<User> {
User user = new User();
user.setId(rs.getInt("id"));
user.setUserType( (UserType)rs.getInt("userType")); // ?????
return user;
}
So I am trying to cast the integer value in the db for userType to the enumeration UserType.
Why doesn't this work?