public interface Template
| Modifier and Type | Method and Description |
|---|---|
<T,K> void |
delete(Class<T> entityClass,
K id)
Deletes by Id.
|
<T,K> Optional<T> |
find(Class<T> entityClass,
K id)
Finds by Id.
|
<T> Iterable<T> |
insert(Iterable<T> entities)
Inserts entity, by default it's just run for each saving using
insert(Object)},
each NoSQL vendor might replace to a more appropriate one. |
<T> Iterable<T> |
insert(Iterable<T> entities,
Duration ttl)
Inserts entities collection entity with time to live, by default it's just run for each saving using
insert(Object, Duration),
each NoSQL vendor might replace to a more appropriate one. |
<T> T |
insert(T entity)
Inserts entity
|
<T> T |
insert(T entity,
Duration ttl)
Inserts entity with time to live
|
<T> Iterable<T> |
update(Iterable<T> entities)
Saves entity, by default it's just run for each saving using
update(Object)},
each NoSQL vendor might replace to a more appropriate one. |
<T> T |
update(T entity)
Updates an entity
|
<T> T insert(T entity)
T - the instance typeentity - entity to insertNullPointerException - when entity is null<T> T insert(T entity,
Duration ttl)
T - the instance typeentity - entity to insertttl - the time to liveNullPointerException - when entity is null<T> Iterable<T> insert(Iterable<T> entities)
insert(Object)},
each NoSQL vendor might replace to a more appropriate one.T - the instance typeentities - entities to insertNullPointerException - when entities is null<T> Iterable<T> insert(Iterable<T> entities, Duration ttl)
insert(Object, Duration),
each NoSQL vendor might replace to a more appropriate one.T - the instance typeentities - entities to be savedttl - time to liveNullPointerException - when entities is null<T> T update(T entity)
T - the instance typeentity - entity to updateNullPointerException - when entity is null<T> Iterable<T> update(Iterable<T> entities)
update(Object)},
each NoSQL vendor might replace to a more appropriate one.T - the instance typeentities - entities to updateNullPointerException - when entities is null<T,K> Optional<T> find(Class<T> entityClass, K id)
T - the entity class typeK - the id typeentityClass - the entity classid - the id valueOptional.empty()NullPointerException - when either the entityClass or id are nullIdNotFoundException - when the entityClass does not have the Id annotation<T,K> void delete(Class<T> entityClass, K id)
T - the entity class typeK - the id typeentityClass - the entity classid - the id valueNullPointerException - when either the entityClass or id are nullIdNotFoundException - when the entityClass does not have the Id annotationCopyright © 2017–2022 Eclipse Foundation. All rights reserved.