org.apache.empire.data.bean
Class BeanResult<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
org.apache.empire.data.bean.BeanResult<T>
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess
public class BeanResult<T>
- extends ArrayList<T>
BeanResult
This is a simple helper class that performs reading a list of beans from a query
Internally DBReader.getBeanList() is used.
- Author:
- doebele
- See Also:
- Serialized Form
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
BeanResult
public BeanResult(Class<T> clazz,
DBCommand cmd)
- Create a bean result from a command object.
No checks will be performed here whether the command is compatible with the supplied class.
- Parameters:
clazz
- cmd
-
BeanResult
public BeanResult(Class<T> clazz,
DBRowSet rowset)
- Creates a bean result for a Table, View or Query from the supplied columns.
At least one column must match the given getters / setters on the supplied class otherwise an BeanIncompatibleException will be thrown.
- Parameters:
clazz
- the of Trowset
- the rowset
getCommand
public DBCommand getCommand()
fetch
public int fetch(Connection conn,
int maxItems)
fetch
public final int fetch(Connection conn)
Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.