T - base type of all entities@ParametersAreNonnullByDefault public interface CompletionStageEntityStore<T> extends EntityStore<T,CompletionStage<?>>
EntityStore where all return values are CompletionStage instances
representing the outcome of each operation.| 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.
|
<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, toBlocking@CheckReturnValue <E extends T> CompletionStage<E> insert(E entity)
EntityStorePersistenceException may be thrown.insert in interface EntityStore<T,CompletionStage<?>>E - entity typeentity - non null entity to insert@CheckReturnValue <E extends T> CompletionStage<Iterable<E>> insert(Iterable<E> entities)
EntityStoreinsert in interface EntityStore<T,CompletionStage<?>>E - entity typeentities - to insert@CheckReturnValue <K,E extends T> CompletionStage<K> insert(E entity, Class<K> keyClass)
EntityStorePersistenceException
may be thrown.insert in interface EntityStore<T,CompletionStage<?>>K - key typeE - entity typeentity - non null entity to insertkeyClass - key class@CheckReturnValue <K,E extends T> CompletionStage<Iterable<K>> insert(Iterable<E> entities, Class<K> keyClass)
EntityStoreinsert in interface EntityStore<T,CompletionStage<?>>K - key typeE - entity typeentities - to insertkeyClass - key class@CheckReturnValue <E extends T> CompletionStage<E> update(E entity)
EntityStoreupdate in interface EntityStore<T,CompletionStage<?>>E - entity typeentity - to update@CheckReturnValue <E extends T> CompletionStage<E> update(E entity, Attribute<?,?>... attributes)
EntityStoreupdate in interface EntityStore<T,CompletionStage<?>>E - entity typeentity - to refreshattributes - attributes to update, attributes should be of type E@CheckReturnValue <E extends T> CompletionStage<Iterable<E>> update(Iterable<E> entities)
EntityStoreupdate in interface EntityStore<T,CompletionStage<?>>E - entity typeentities - to update@CheckReturnValue <E extends T> CompletionStage<E> upsert(E entity)
EntityStoreupsert in interface EntityStore<T,CompletionStage<?>>E - entity typeentity - non null entity to insert@CheckReturnValue <E extends T> CompletionStage<Iterable<E>> upsert(Iterable<E> entities)
EntityStoreupsert in interface EntityStore<T,CompletionStage<?>>E - entity typeentities - to update@CheckReturnValue <E extends T> CompletionStage<E> refresh(E entity)
EntityStorerefresh in interface EntityStore<T,CompletionStage<?>>E - entity typeentity - to insert@CheckReturnValue <E extends T> CompletionStage<E> refresh(E entity, Attribute<?,?>... attributes)
EntityStorerefresh in interface EntityStore<T,CompletionStage<?>>E - entity typeentity - to refreshattributes - attributes to refresh, attributes should be of type E
(not enforced due to erasure)@CheckReturnValue <E extends T> CompletionStage<Iterable<E>> refresh(Iterable<E> entities, Attribute<?,?>... attributes)
EntityStorerefresh in interface EntityStore<T,CompletionStage<?>>E - entity typeentities - to refreshattributes - attributes to refresh, attributes should be of type E
(not enforced due to erasure)@CheckReturnValue <E extends T> CompletionStage<E> refreshAll(E entity)
EntityStorerefreshAll in interface EntityStore<T,CompletionStage<?>>E - entity typeentity - to refresh@CheckReturnValue <E extends T> CompletionStage<Void> delete(E entity)
EntityStoredelete in interface EntityStore<T,CompletionStage<?>>E - entity type.entity - to delete@CheckReturnValue <E extends T> CompletionStage<Void> delete(Iterable<E> entities)
EntityStoredelete in interface EntityStore<T,CompletionStage<?>>E - entity typeentities - to delete@CheckReturnValue <E extends T,K> CompletionStage<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,CompletionStage<?>>E - entity typeK - key typetype - non null entity class typekey - non null key value