|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - Type of entityID - ID type for the entity.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 entity by its identifier and saving an entity to the underlying data store.
| Method Summary | |
|---|---|
void |
delete(T entity)
Delete the specified object from the persistent store. |
void |
deleteById(ID id)
Delete an object from the persistent store based on the id. |
void |
deleteByIds(ID... ids)
Delete objects from the persistent store based on the passed in id values. |
Iterable<T> |
findAll()
Find all objects of type T. |
T |
findById(ID id)
Find an object T with the specified id. |
Iterable<T> |
findByIds(ID... ids)
Find objects of type T with the specified ids. |
void |
flush()
If the implementation supports lazy writes, manually flush changes to the external database |
ReferenceSet<T> |
referenceByIds(ID... ids)
Build a ReferenceSet to persisted objects with the passed in id values. |
void |
save(T entity)
Call save to insert a new object into the persistent store or update a preexisting object that has been modified. |
void |
updateReferences(ReferenceSet<T> referenceSet,
T updateObject)
Update the objects referenced by the referenceSet with the changes in the updateObject. |
| 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> findByIds(ID... ids)
throws JeppettoException
ids - of the desired object.
JeppettoException - if any other failure occurs
Iterable<T> findAll()
throws JeppettoException
JeppettoException - if any underlying failure occurs
void save(T entity)
throws OptimisticLockException,
JeppettoException
entity - 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 entity)
throws JeppettoException
entity - 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 deleteByIds(ID... ids)
throws JeppettoException
ids - of the objects to delete.
JeppettoException - if any underlying failure occursReferenceSet<T> referenceByIds(ID... ids)
ids - of the objects to reference.
JeppettoException - if any underlying failure occurs
void updateReferences(ReferenceSet<T> referenceSet,
T updateObject)
throws JeppettoException
referenceSet - containing references to stored itemsupdateObject - the changes to make on references objects
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 | |||||||||