public List < ? > convertAllToDynamicBeans ( ResultSet rs ) throws SQLException { ResultSetMetaData rsmd = rs . getMetaData ( ) ; Map < String , ColumnMetaData > columnToPropertyMappings = createColumnToPropertyMappings ( rsmd ) ; Class < ? > beanClass = reuseOrBuildBeanClass ( rsmd , columnToPropertyMappings ) ; BeanProcessor beanProcessor = new BeanProcessor ( simpleColumnToPropertyMappings ( columnToPropertyMappings ) ) ; return beanProcessor . toBeanList ( rs , beanClass ) ; }
Convert all rows of the ResultSet to a list of beans of a dynamically generated class . It requires CGLIB .