|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- Any serializable type, mostly an entity class typepublic interface EntityService<T extends Serializable>
An EntityService is a generic interface definition of a simple CRUD service.
Basically this service is responsible to encapsulate CRUD functionality and delegates to repository implementations. Furthermore the service spans the transaction boundary and handles exception translation.
Method Summary | |
---|---|
void |
add(T entity)
Add an entity. |
List<T> |
findAll()
Find all entities of type T . |
void |
remove(T entity)
Removes an entity instance. |
T |
save(T entity)
Save an entity of type T . |
Method Detail |
---|
T save(T entity)
T
.
entity
- Instance to be saved
List<T> findAll()
T
.
The result is specific to the implementation and can also be
null
.
void remove(T entity)
entity
- Instance to be removedvoid add(T entity)
entity
- New entity instance to be added
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |