public class BeanMapper<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> BeanMapper<T> |
getInstance() |
T |
toBean(ResultSet pResultSet,
Class<T> pBeanClass)
Maps the record, the given ResultSet currently points to, to a Bean.
|
List<T> |
toBeanList(ResultSet pResultSet,
Class<T> pBeanClass)
Maps the given ResultSet to a list of Beans.
|
Map<String,Object> |
toMap(T pBean)
Converts the given Bean to a Map, containing a mapping from the attribute name to
the attributes value.
|
public static <T> BeanMapper<T> getInstance()
public T toBean(ResultSet pResultSet, Class<T> pBeanClass) throws SQLException
pResultSet - the ResultSet subject to conversion to a BeanpBeanClass - the type of the BeanSQLExceptionpublic List<T> toBeanList(ResultSet pResultSet, Class<T> pBeanClass) throws SQLException
pResultSet - the ResultSet subject to conversion to a Bean listpBeanClass - the type of the BeanSQLExceptionpublic Map<String,Object> toMap(T pBean)
pBean - the Bean subject to conversionCopyright © 2013. All rights reserved.