|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IGenericDao<T,PK extends java.io.Serializable>
Generic DAO (Data Access Object) with common methods to CRUD POJOs.
Extend this interface if you want typesafe (no casting necessary) DAO's for your domain objects.
| Method Summary | |
|---|---|
boolean |
exists(PK id)
Checks for existence of an object of type T using the id arg. |
T |
get(PK id)
Generic method to get an object based on class and identifier. |
java.util.List<T> |
getAll()
Generic method used to get all objects of a particular type. |
void |
remove(PK id)
Generic method to delete an object based on class and id |
T |
save(T object)
Generic method to save an object - handles both update and insert. |
| Method Detail |
|---|
java.util.List<T> getAll()
T get(PK id)
id - the identifier (primary assignmentId) of the object to get
ObjectRetrievalFailureExceptionboolean exists(PK id)
id -
T save(T object)
object - the object to savevoid remove(PK id)
id - the identifier (primary assignmentId) of the object to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||