public interface Persister
A Persister is responsible for persisting and retrieving an object.
Type Params | Return Type | Name and description |
---|---|---|
|
public Query |
createQuery() Creates a query for the entity |
|
public void |
delete(java.lang.Iterable objects) Deletes one or many objects |
|
public void |
delete(java.lang.Object obj) Deletes a single object |
|
public java.io.Serializable |
getObjectIdentifier(java.lang.Object o) Get the identifier for the given object, if it has one. |
|
public java.lang.Class |
getType() The type this persister persists |
|
public java.io.Serializable |
insert(java.lang.Object o) Forces an insert of an object rather than trying to guess if it is an insert or an update |
|
public java.io.Serializable |
persist(java.lang.Object obj) Persist an object using the given mapping context |
|
public 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 |
|
public java.lang.Object |
proxy(java.io.Serializable key) Creates a proxy for the given key |
|
public java.io.Serializable |
refresh(java.lang.Object o) Refreshes the given objects state |
|
public java.lang.Object |
retrieve(java.io.Serializable key) Retrieves an object for the given context and Key |
|
public java.util.List<java.lang.Object> |
retrieveAll(java.lang.Iterable<java.io.Serializable> keys) Batch retrieve several objects in one go |
|
public 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 objectGet the identifier for the given object, if it has one.
o
- The object.The type this persister persists
Forces an insert of an object rather than trying to guess if it is an insert or an update
o
- The objectPersist 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