|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bowstreet.builders.webapp.methods.BeanCollectionDataRetriever
public class BeanCollectionDataRetriever
Helper class providing an implementation of the CollectionDataRetriever interface. Instances of this class can be used with the Paging Assistant builder to provide paged access to Collection-based data sources.
Constructor Summary | |
---|---|
BeanCollectionDataRetriever(Method m)
Create an instance of the class where the Collection is derived from the return value of a webApp method. |
|
BeanCollectionDataRetriever(Variable v)
Create an instance of the class where the Collection is derived from the content of a webApp Variable. |
|
BeanCollectionDataRetriever(Variable ljo,
java.lang.reflect.Method m)
Create an instance of the class where the Collection is derived from the return value of method on an LJO. |
Method Summary | |
---|---|
java.util.Collection |
getCollection(int startRow)
Return a subset of the Collection managed by the class. |
Variable |
getCollectionVar()
|
IXml |
getData(int startRow)
Return rows starting at specified position. |
int |
getFetchSize()
Indicate preferred chunk size for data retrieval. |
java.lang.Object |
getObj(int hashcode)
Get an object from the Collection based upon its hash code. |
static BeanCollectionDataRetriever |
getRetriever(WebAppAccess webAppAccess,
java.lang.String reference)
Utility Factory method method for the Beancrud Xmodel to instantiate a copy of this class by passing in an indirect reference that indicates where to obtain the Collection to be managed. |
int |
getRowCount()
Return total number of rows in this data set. |
java.util.Collection |
getRowSubset(int start,
int n)
Return a subset of the Collection managed by the class. |
java.util.Collection |
getUpdatedCollection()
Get an updated copy of the Collection managed by the class. |
void |
setWebAppAccess(WebAppAccess wa)
Associate or disassociate a specific WebAppAccess instance with the object implementing this interface. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanCollectionDataRetriever(Method m)
m
- The webApp method to be invoked to obtain the Collection.public BeanCollectionDataRetriever(Variable v)
v
- An instance of a webApp Variable that will contain a Collection
at runtime.public BeanCollectionDataRetriever(Variable ljo, java.lang.reflect.Method m)
ljo
- The webApp Variable that contains the LJO implementing the
method that will return a Collection.m
- The reflective method instance to be invoked to obtain the
Collection.Method Detail |
---|
public java.util.Collection getCollection(int startRow)
startRow
- The starting index of the Collection from which the
subset is to be extracted. The index is zero-based and the subset
contains all remaining rows in the Collection.
startRow
is less than zero or startRow
is
greater than or equal to the number of items in the Collection.public Variable getCollectionVar()
public IXml getData(int startRow)
DataRetriever
getData
in interface DataRetriever
public int getFetchSize()
DataRetriever
getFetchSize
in interface DataRetriever
public java.lang.Object getObj(int hashcode)
hashcode
- The hash code of the desired object.
public static BeanCollectionDataRetriever getRetriever(WebAppAccess webAppAccess, java.lang.String reference)
webAppAccess
- The webApp access instance for the current model.reference
- An indirect reference that indicates where to obtain
the Collection to be managed.
public int getRowCount()
DataRetriever
getRowCount
in interface DataRetriever
public java.util.Collection getRowSubset(int start, int n)
CollectionDataRetriever
getRowSubset
in interface CollectionDataRetriever
start
- The starting index of the Collection from which the subset
is to be extracted. The index is zero-based.n
- The number of consecutive items from the collection to be
included in the subset.
start
is less than zero, n
is less than zero,
or start
is greater than or equal to the number of items in
the Collection.public java.util.Collection getUpdatedCollection()
public void setWebAppAccess(WebAppAccess wa)
WebAppAccessConsumer
setWebAppAccess
in interface WebAppAccessConsumer
wa
- The WebAppAccess instance to be used by other methods
in the class implementing this interface.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |