|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SingleObjectSet
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 pm = 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 | |
---|---|
void |
get(int index,
Persistable object)
Deprecated. Use the getSharedInstance instead of it. |
int |
getId(int index)
Load the object of a given index into the object instance supplied. |
Methods inherited from interface net.sourceforge.floggy.persistence.ObjectSet |
---|
get, getSharedInstance, isLazy, setLazy, size |
Method Detail |
---|
void get(int index, Persistable object) throws FloggyException
index
- Index of the object to be loaded.object
- An instance of the object to be loaded. It cannot be
null
.
FloggyException
- Exception thrown if a persistance error occurs.int getId(int index) throws FloggyException
index
- Index of the object to be loaded.
FloggyException
- Exception thrown if a persistance error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |