Created
January 8, 2014 22:47
-
-
Save wspeirs/8326023 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QueryRunner runner = new QueryRunner(dataSource); | |
// Use the BeanListHandler implementation to convert all | |
// ResultSet rows into a List of Person JavaBeans. | |
ResultSetHandler<List<Person>> handler = new BeanListHandler<Person>(Person.class); | |
// Execute the SQL statement and return the results in a List of | |
// Person objects generated by the BeanListHandler. | |
List<Person> persons = runner.query("SELECT * FROM Person").execute(handler); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment