A Persister is responsible for persisting and retrieving an object.
Type | Name and description |
---|---|
Query |
createQuery() Creates a query for the entity |
void |
delete(java.lang.Iterable objects) Deletes one or many objects |
void |
delete(java.lang.Object obj) Deletes a single object |
java.lang.Class |
getType() The type this persister persists |
java.io.Serializable |
persist(java.lang.Object obj) Persist an object using the given mapping context |
java.util.List<java.io.Serializable> |
persist(java.lang.Iterable objs) Persists a number of objects at the same time and returns their keys in the order specified by the objs parameter |
java.lang.Object |
proxy(java.io.Serializable key) Creates a proxy for the given key |
java.io.Serializable |
refresh(java.lang.Object o) Refreshes the given objects state |
java.lang.Object |
retrieve(java.io.Serializable key) Retrieves an object for the given context and Key |
java.util.List<java.lang.Object> |
retrieveAll(java.lang.Iterable<java.io.Serializable> keys) Batch retrieve several objects in one go |
java.util.List<java.lang.Object> |
retrieveAll(java.io.Serializable[] keys) Batch retrieve several objects in one go |
Creates a query for the entity
Deletes one or many objects
objects
- The objects to delete. Must all be of the same type or an exception will be thrown.Deletes a single object
obj
- The objectThe type this persister persists
Persist an object using the given mapping context
obj
- The objectPersists a number of objects at the same time and returns their keys in the order specified by the objs parameter
objs
- The objectsCreates a proxy for the given key
key
- The keyRefreshes the given objects state
o
- The object to refreshRetrieves an object for the given context and Key
key
- The keyBatch retrieve several objects in one go
keys
- The keysBatch retrieve several objects in one go
keys
- The keys