Skip to content

Instantly share code, notes, and snippets.

@Gwoks
Created April 21, 2018 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gwoks/2817190401d737835d755fa54e523a9c to your computer and use it in GitHub Desktop.
Save Gwoks/2817190401d737835d755fa54e523a9c to your computer and use it in GitHub Desktop.
public class RestMapper implements RowMapper<Rest>{
@Override
public Rest mapRow(ResultSet rs, int rowNum) throws SQLException {
Rest rest = new Rest();
rest.setId(rs.getInt("id"));
rest.setKey(rs.getString("key"));
rest.setValue(rs.getString("value"));
RestResult restResult = new RestResult();
restResult.setId(rs.getInt("id"));
restResult.setRand(rs.getInt("rand"));
return rest;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment