public class DBBeanListFactoryImpl<T> extends Object implements DBBeanListFactory<T>
| Modifier and Type | Field and Description |
|---|---|
protected Constructor<T> |
constructor |
protected List<? extends DBColumnExpr> |
constructorParams |
protected Class<?>[] |
parameterTypes |
protected List<? extends DBColumnExpr> |
setterColumns |
| Modifier | Constructor and Description |
|---|---|
|
DBBeanListFactoryImpl(Class<T> beanType,
Column[] keyColumns,
List<? extends DBColumnExpr> selectColumns)
Constructs a DBRecordListFactoryImpl based on an DBRecord class
|
|
DBBeanListFactoryImpl(Class<T> beanType,
List<? extends DBColumnExpr> selectColumns)
Constructs a DBRecordListFactoryImpl based on an DBRecord class
|
protected |
DBBeanListFactoryImpl(Class<T> beanType,
List<? extends DBColumnExpr> keyColumns,
List<? extends DBColumnExpr> selectColumns)
Constructs a DBRecordListFactoryImpl based on an DBRecord class
|
|
DBBeanListFactoryImpl(Constructor<T> constructor,
List<? extends DBColumnExpr> constructorParams,
List<? extends DBColumnExpr> setterColumns)
Constructs a DBRecordListFactoryImpl based on an DBRecord constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
completeQuery(List<T> list) |
protected static <T> Constructor<T> |
findBeanConstructor(Class<T> beanType) |
protected static <T> Constructor<T> |
findBeanConstructor(Class<T> beanType,
List<? extends DBColumnExpr> params)
Finds a suitable constructor for the beanClass
|
Class<?> |
getBeanType() |
protected static Class<?>[] |
getParameterTypes(Constructor<?> constructor) |
T |
newItem(int rownum,
DBRecordData recData) |
List<T> |
newList(int capacity) |
void |
prepareQuery(DBCommandExpr cmd,
DBContext context) |
protected final Constructor<T> constructor
protected final Class<?>[] parameterTypes
protected final List<? extends DBColumnExpr> constructorParams
protected final List<? extends DBColumnExpr> setterColumns
public DBBeanListFactoryImpl(Constructor<T> constructor, List<? extends DBColumnExpr> constructorParams, List<? extends DBColumnExpr> setterColumns)
constructor - the constructor to be used to create the beanconstructorParams - (optional) the columns to be used for the constructor. Must match the constructor!setterColumns - (optional) the columns to be set through setter methods. List may include constructorParamspublic DBBeanListFactoryImpl(Class<T> beanType, List<? extends DBColumnExpr> selectColumns)
beanType - the bean type to be instantiatedselectColumns - (optional) the columns to be selectedprotected DBBeanListFactoryImpl(Class<T> beanType, List<? extends DBColumnExpr> keyColumns, List<? extends DBColumnExpr> selectColumns)
beanType - the bean type to be instantiatedkeyColumns - (optional) the columns to be used for the constructorselectColumns - (optional) the columns to be set through setter methods. List may include constructorParamspublic DBBeanListFactoryImpl(Class<T> beanType, Column[] keyColumns, List<? extends DBColumnExpr> selectColumns)
beanType - the bean type to be instantiatedkeyColumns - (optional) the columns to be used for the constructor. Important: Must be a DBColumn array!selectColumns - (optional) the columns to be set through setter methods. List may include constructorParamsprotected static <T> Constructor<T> findBeanConstructor(Class<T> beanType, List<? extends DBColumnExpr> params)
beanType - the bean class to instantiateparams - the constructor paramsprotected static <T> Constructor<T> findBeanConstructor(Class<T> beanType)
protected static Class<?>[] getParameterTypes(Constructor<?> constructor)
public Class<?> getBeanType()
getBeanType in interface DBBeanListFactory<T>public void prepareQuery(DBCommandExpr cmd, DBContext context)
prepareQuery in interface DBBeanListFactory<T>public List<T> newList(int capacity)
newList in interface DBBeanListFactory<T>public T newItem(int rownum, DBRecordData recData)
newItem in interface DBBeanListFactory<T>public void completeQuery(List<T> list)
completeQuery in interface DBBeanListFactory<T>Copyright © 2008–2023 Apache Software Foundation. All rights reserved.