|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectSet
An interface representing a search result. The ObjectSet
logically maintains a sequence of the object's IDs. It is possible to iterate
over all objects (or a subset, if an optional object filter has been
supplied) using the get(int index)
method.
PersistableManager manager = PersistableManager.getInstance();
ObjectSet os = manager.find(Customer.class, null, null);
for(int i = 0; i < os.size(); i++) {
Customer customer = (Customer) os.get(i);
...
}
By using an optional Filter
, only the objects that matches
the provided filter will be avaiable in this set.
By using an optional Comparator
, the order of the objects in
this set will be determined by the comparator.
PersistableManager.find(Class, Filter, Comparator)
,
Filter
,
Comparator
Method Summary | |
---|---|
Persistable |
get(int index)
Load the object at the specified index. |
Persistable |
getSharedInstance(int index)
Returns the object at the specified index. |
boolean |
isLazy()
Gets the lazy property. |
void |
setLazy(boolean lazy)
Sets the lazy property. |
int |
size()
Returns the number of objects in this set. |
Method Detail |
---|
Persistable get(int index) throws FloggyException
index
- Index of the object to be loaded.
FloggyException
- Exception thrown if a persistence error occurs.Persistable getSharedInstance(int index) throws FloggyException
index
- Index of the object to return.
FloggyException
- Exception thrown if a persistence error occurs.boolean isLazy()
void setLazy(boolean lazy)
lazy
- DOCUMENT ME!int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |