|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - Persistent ClassID - ID type for the persistent class.public interface GenericDAO<T,ID>
A GenericDAO is the root interface for DAOs that fit within the Jeppetto framework. This defines base functionality such as finding a specific item by its identifier and saving an to the underlying data store.
| Method Summary | |
|---|---|
void |
delete(T object)
Delete the specified object from the persistent store. |
void |
deleteById(ID id)
Delete an object from the persistent store based on the id. |
Iterable<T> |
findAll()
Find all objects of type T. |
T |
findById(ID id)
Find an object T with the specified id. |
void |
flush()
If the implementation supports lazy writes, manually flush changes to the external database |
void |
save(T object)
Call save to insert a new object into the persistent store or update a preexisting object that has been modified. |
| Method Detail |
|---|
T findById(ID id)
throws NoSuchItemException,
JeppettoException
id - of the desired object.
NoSuchItemException - if the object identified by the id is not found
JeppettoException - if any other failure occurs
Iterable<T> findAll()
throws JeppettoException
JeppettoException - if any underlying failure occurs
void save(T object)
throws OptimisticLockException,
JeppettoException
object - to save.
OptimisticLockException - if optimistic locking is enabled and a save is attempted on an already
modified object.
JeppettoException - if any other failure occurs
void delete(T object)
throws JeppettoException
object - to delete.
JeppettoException - if any underlying failure occurs
void deleteById(ID id)
throws JeppettoException
id - of the object to delete.
JeppettoException - if any underlying failure occurs
void flush()
throws JeppettoException
JeppettoException - if any underlying failure occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||