T - the type of the domain objectPK - the type of the primary key from the domain objectpublic interface GenericDao<T extends BaseEntity<PK>,PK extends Serializable> extends Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
delete(List<T> objects)
Delete all persistent objects in the given list.
|
void |
delete(PK id)
Deletes an object of a given Id.
|
void |
delete(T object)
Deletes the given object from persistent storage in the database.
|
void |
evict(T object)
Remove this instance from the session cache.
|
boolean |
exists(PK id)
Checks if an entry exists with the given id.
|
List<T> |
findAll()
Returns a list of all persistent objects.
|
T |
get(PK id)
Retrieve a persisted object with a given id from the database.
|
Class<T> |
getType()
Gets the class type.
|
T |
load(PK id)
Retrieve a persisted object with a given id from the database.
|
List<T> |
merge(List<T> objects)
Merges all new objects in the given list.
|
T |
merge(T object)
Merges the given object.
|
void |
refresh(T object)
Re-read the state of the given instance from the underlying database.
|
List<PK> |
save(List<T> objects)
Save all new objects in the given list.
|
PK |
save(T object)
Persist the given object into database.
|
void |
saveOrUpdate(List<T> objects)
Save or update all transient objects in the given list.
|
void |
saveOrUpdate(T object)
Save or update the given persistent object.
|
void |
update(List<T> objects)
Update all transient objects in the given list.
|
void |
update(T object)
Update changes made to the given object.
|
void delete(List<T> objects)
objects - the list with the persistent objects to deletevoid delete(PK id)
id - the idvoid delete(T object)
object - the persistent objectboolean exists(PK id)
id - the id to checkvoid evict(T object)
object - the object to evict.List<T> findAll()
T get(PK id)
id - the idT load(PK id)
id - the idT merge(T object)
object - the objectList<T> merge(List<T> objects)
objects - the list to savevoid refresh(T object)
object - the object to re-read.List<PK> save(List<T> objects)
objects - the list to savePK save(T object)
object - the new instance to save.void saveOrUpdate(List<T> objects)
objects - the transient objectsvoid saveOrUpdate(T object)
object - the transient object to save or update.void update(List<T> objects)
objects - the transient objects to update.void update(T object)
object - the transient object to update.Copyright © 2015–2016 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.