|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.floggy.persistence.PersistableManager
public abstract class PersistableManager
This is the main class of the framework. All persistence operations methods (such as loading, saving, deleting and searching for objects) are declared in this class.
| Constructor Summary | |
|---|---|
PersistableManager()
|
|
| Method Summary | |
|---|---|
abstract void |
delete(Persistable persistable)
Removes an object from the repository. |
abstract void |
deleteAll()
Removes all objects from the repository. |
abstract void |
deleteAll(Class persistableClass)
Removes all objects that belongs to the class passed as parameter from the repository. |
abstract ObjectSet |
find(Class persistableClass,
Filter filter,
Comparator comparator)
Searches objects of an especific persistable class from the repository. |
abstract ObjectSet |
find(Class persistableClass,
Filter filter,
Comparator comparator,
boolean lazy)
Searches objects of an especific persistable class from the repository. |
abstract int |
getId(Persistable persistable)
Gets the id under the persistable is stored. |
static PersistableManager |
getInstance()
Returns the current instance of PersistableManager. |
abstract boolean |
isPersisted(Persistable persistable)
Check if the object is already persisted. |
abstract void |
load(Persistable persistable,
int id)
Load an previously stored object from the repository using the object ID. The object ID is the result of a save operation or you can obtain it executing a search. |
abstract void |
load(Persistable persistable,
int id,
boolean lazy)
Load an previously stored object from the repository using the object ID. The object ID is the result of a save operation or you can obtain it executing a search. |
abstract int |
save(Persistable persistable)
Store an object in the repository. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistableManager()
| Method Detail |
|---|
public static PersistableManager getInstance()
RuntimeException - DOCUMENT ME!
public abstract void load(Persistable persistable,
int id)
throws FloggyException
persistable - An instance where the object data will be loaded
into. Cannot be null.id - The ID of the object to be loaded from the repository.
FloggyException - Exception thrown if an error occurs while
loading the object.save(Persistable)
public abstract void load(Persistable persistable,
int id,
boolean lazy)
throws FloggyException
persistable - An instance where the object data will be loaded
into. Cannot be null.id - The ID of the object to be loaded from the repository.lazy - A flag indicating to load or not all composite
relationships.
FloggyException - Exception thrown if an error occurs while
loading the object.save(Persistable)
public abstract int save(Persistable persistable)
throws FloggyException
persistable - Object to be stored.
FloggyException - Exception thrown if an error occurs while
storing the object.load(Persistable, int)
public abstract void delete(Persistable persistable)
throws FloggyException
FloggyException will be
thrown.
persistable - Object to be removed.
FloggyException - Exception thrown if an error occurs while
removing the object.
public abstract void deleteAll()
throws FloggyException
FloggyException - Exception thrown if an error occurs while
removing the objects.
public abstract void deleteAll(Class persistableClass)
throws FloggyException
persistableClass - The persistable class to search the objects.
FloggyException - Exception thrown if an error occurs while
removing the objects.
public abstract ObjectSet find(Class persistableClass,
Filter filter,
Comparator comparator)
throws FloggyException
Filter.Comparator.
persistableClass - The persistable class to search the objects.filter - An optional application-defined criteria for searching
objects.comparator - An optional application-defined criteria for sorting
objects.
FloggyException - DOCUMENT ME!
public abstract ObjectSet find(Class persistableClass,
Filter filter,
Comparator comparator,
boolean lazy)
throws FloggyException
Filter.Comparator.
persistableClass - The persistable class to search the objects.filter - An optional application-defined criteria for searching
objects.comparator - An optional application-defined criteria for sorting
objects.lazy - A flag indicating to load or not all composite
relationships.
FloggyException - DOCUMENT ME!public abstract int getId(Persistable persistable)
persistable - Object to be retrieved the id.
public abstract boolean isPersisted(Persistable persistable)
persistable - Object to be checked the persistable state.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||