T
- The persistent class.PK
- The class of the primary key used to identify the objects.public interface GenericDAO<T,PK extends Serializable>
Modifier and Type | Method and Description |
---|---|
PK |
create(T newInstance)
Persist the newInstance object into database.
|
void |
delete(T persistentObject)
Remove an object from persistent storage in the database.
|
T |
read(PK id)
Retrieve an object that was previously persisted to the database using the indicated id as primary key.
|
void |
update(T transientObject)
Save changes made to a persistent object.
|
PK create(T newInstance)
newInstance
- the object to persist.T read(PK id)
id
- the key of the object to be retrieved.void update(T transientObject)
transientObject
- the object to be updated.Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.