public static < T > List < T > queryBeanList ( String poolName , String sql , Class < T > beanType , Object [ ] params ) throws YankSQLException { List < T > returnList = null ; try { BeanListHandler < T > resultSetHandler = new BeanListHandler < T > ( beanType , new BasicRowProcessor ( new YankBeanProcessor < T > ( beanType ) ) ) ; returnList = new QueryRunner ( YANK_POOL_MANAGER . getConnectionPool ( poolName ) ) . query ( sql , resultSetHandler , params ) ; } catch ( SQLException e ) { handleSQLException ( e , poolName , sql ) ; } return returnList ; }
Return a List of Beans given an SQL statement