public class BeanResult<T> extends ArrayList<T>
modCount| Constructor and Description |
|---|
BeanResult(Class<T> beanType,
DBCommand cmd)
Create a bean result from a command object.
|
BeanResult(Class<T> beanType,
DBRowSet rowset)
Creates a bean result for a Table, View or Query from the supplied columns.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
autoSelectColumns(DBRowSet rowset)
Selects all columns for a given rowset
|
int |
fetch(DBContext context)
Executes the query and fetches the result
|
int |
fetch(DBContext context,
int maxItems)
Executes the query and fetches the result
|
DBCommand |
getCommand()
Returns the current command
Used to add constraints, order, grouping etc.
|
protected boolean |
isPropertyAcessible(Method[] methods,
String property,
DataType dataType)
Checks if the property is accessible i.e. has a getter method on the beanType
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streampublic BeanResult(Class<T> beanType, DBCommand cmd)
beanType - the bean typecmd - the commandpublic BeanResult(Class<T> beanType, DBRowSet rowset)
beanType - the of Trowset - the rowsetpublic DBCommand getCommand()
public int fetch(DBContext context, int maxItems)
context - the database contextmaxItems - the maximum number of items to querypublic final int fetch(DBContext context)
context - the database contextprotected void autoSelectColumns(DBRowSet rowset)
rowset - the rowset for which to select all columnsprotected boolean isPropertyAcessible(Method[] methods, String property, DataType dataType)
methods - the beanType methodsproperty - the property to checkdataType - the dataTypeCopyright © 2008–2023 Apache Software Foundation. All rights reserved.