T - base entity typepublic interface BlockingEntityStore<T> extends EntityStore<T,Object>, Transactionable<Object>
EntityStore in which the entity objects are returned directly
after the successful completion of the operation and all modification operations are blocking.| Modifier and Type | Method and Description |
|---|---|
<E extends T> |
delete(E entity)
Deletes the given entity from the store.
|
<E extends T> |
delete(Iterable<E> entities)
Deletes multiple entities.
|
<E extends T,K> |
findByKey(Class<E> type,
K key)
Find an entity by the given key.
|
<E extends T> |
insert(E entity)
Inserts the given entity.
|
<K,E extends T> |
insert(E entity,
Class<K> keyClass)
Inserts the given entity returning the generated key after the entity is inserted.
|
<E extends T> |
insert(Iterable<E> entities)
Insert a collection of entities.
|
<K,E extends T> |
insert(Iterable<E> entities,
Class<K> keyClass)
Insert a collection of entities returning the generated keys for the inserted entities in
the order they were inserted.
|
<E extends T> |
refresh(E entity)
Refresh the given entity.
|
<E extends T> |
refresh(E entity,
Attribute<?,?>... attributes)
Refresh the given entity on specific attributes.
|
<E extends T> |
refresh(Iterable<E> entities,
Attribute<?,?>... attributes)
Refresh the given entities on specific attributes.
|
<E extends T> |
refreshAll(E entity)
Refresh the given entity on all of its attributes including relational ones.
|
<V> V |
runInTransaction(Callable<V> callable)
Runs the given callable in a transaction.
|
<V> V |
runInTransaction(Callable<V> callable,
TransactionIsolation isolation)
Runs the given callable in a transaction.
|
<E extends T> |
update(E entity)
Update the given entity.
|
<E extends T> |
update(E entity,
Attribute<?,?>... attributes)
Update specific attributes of entity regardless of any modification state.
|
<E extends T> |
update(Iterable<E> entities)
Updates a collection of entities.
|
<E extends T> |
upsert(E entity)
Upserts (insert or update) the given entity.
|
<E extends T> |
upsert(Iterable<E> entities)
Upserts (inserts or updates) a collection of entities.
|
close, toBlockingcount, count, delete, delete, insert, raw, raw, select, select, select, select, update, updatetransaction<E extends T> E insert(E entity)
EntityStorePersistenceException may be thrown.insert in interface EntityStore<T,Object>E - entity typeentity - non null entity to insert<E extends T> Iterable<E> insert(Iterable<E> entities)
EntityStoreinsert in interface EntityStore<T,Object>E - entity typeentities - to insert<K,E extends T> K insert(E entity, Class<K> keyClass)
EntityStorePersistenceException
may be thrown.insert in interface EntityStore<T,Object>K - key typeE - entity typeentity - non null entity to insertkeyClass - key class<K,E extends T> Iterable<K> insert(Iterable<E> entities, Class<K> keyClass)
EntityStoreinsert in interface EntityStore<T,Object>K - key typeE - entity typeentities - to insertkeyClass - key class<E extends T> E update(E entity)
EntityStoreupdate in interface EntityStore<T,Object>E - entity typeentity - to update<E extends T> Iterable<E> update(Iterable<E> entities)
EntityStoreupdate in interface EntityStore<T,Object>E - entity typeentities - to update<E extends T> E update(E entity, Attribute<?,?>... attributes)
EntityStoreupdate in interface EntityStore<T,Object>E - entity typeentity - to refreshattributes - attributes to update, attributes should be of type E<E extends T> E upsert(E entity)
EntityStoreupsert in interface EntityStore<T,Object>E - entity typeentity - non null entity to insert<E extends T> Iterable<E> upsert(Iterable<E> entities)
EntityStoreupsert in interface EntityStore<T,Object>E - entity typeentities - to update<E extends T> E refresh(E entity)
EntityStorerefresh in interface EntityStore<T,Object>E - entity typeentity - to insert<E extends T> E refresh(E entity, Attribute<?,?>... attributes)
EntityStorerefresh in interface EntityStore<T,Object>E - entity typeentity - to refreshattributes - attributes to refresh, attributes should be of type E
(not enforced due to erasure)<E extends T> Iterable<E> refresh(Iterable<E> entities, Attribute<?,?>... attributes)
EntityStorerefresh in interface EntityStore<T,Object>E - entity typeentities - to refreshattributes - attributes to refresh, attributes should be of type E
(not enforced due to erasure)<E extends T> E refreshAll(E entity)
EntityStorerefreshAll in interface EntityStore<T,Object>E - entity typeentity - to refresh<E extends T> Void delete(E entity)
EntityStoredelete in interface EntityStore<T,Object>E - entity type.entity - to delete<E extends T> Void delete(Iterable<E> entities)
EntityStoredelete in interface EntityStore<T,Object>E - entity typeentities - to delete@CheckReturnValue <E extends T,K> E findByKey(Class<E> type, K key)
EntityStoreEntityCache if available may be checked first for the object. If an entity is
found in the cache it will be returned and potentially no query will be made.findByKey in interface EntityStore<T,Object>E - entity typeK - key typetype - non null entity class typekey - non null key value<V> V runInTransaction(Callable<V> callable)
TransactionablerunInTransaction in interface Transactionable<Object>V - call result typecallable - to run<V> V runInTransaction(Callable<V> callable, TransactionIsolation isolation)
TransactionablerunInTransaction in interface Transactionable<Object>V - call result typecallable - to runisolation - isolation level for the transaction