public interface ColumnTemplate
ColumnEntityColumnFamilyManager| Modifier and Type | Method and Description |
|---|---|
<T> long |
count(Class<T> entityClass)
Returns the number of elements from column family
|
long |
count(String columnFamily)
Returns the number of elements from column family
|
<T,K> void |
delete(Class<T> entityClass,
K id)
Deletes by Id.
|
void |
delete(ColumnDeleteQuery query)
Deletes an entity
|
<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
|
PreparedStatement |
prepare(String query)
Creates a
PreparedStatement from the query |
<T> Stream<T> |
query(String query)
Executes a query then bring the result as a
Stream |
<T> Stream<T> |
select(ColumnQuery query)
Finds entities from query
|
<T> Page<T> |
select(ColumnQueryPagination query)
Finds entities from query using pagination
|
<T> Optional<T> |
singleResult(ColumnQuery query)
Returns a single entity from query
|
<T> Optional<T> |
singleResult(String query)
Executes a query then bring the result as a unique result
|
<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 a entity
|
<T> T insert(T entity)
T - the instance typeentity - entity to be savedNullPointerException - when entity is null<T> T insert(T entity,
Duration ttl)
T - the instance typeentity - entity to be savedttl - the time to live<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 be savedNullPointerException - 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 be updatedNullPointerException - 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 be updatedNullPointerException - when entities is nullvoid delete(ColumnDeleteQuery query)
query - query to delete an entityNullPointerException - when query is null<T> Stream<T> select(ColumnQuery query)
T - the instance typequery - - query to figure out entitiesNullPointerException - when query is null<T> Page<T> select(ColumnQueryPagination query)
T - the instance typequery - - query to figure out entitiesNullPointerException - when query is null<T> Stream<T> query(String query)
StreamT - the entity typequery - the queryStreamNullPointerException - when the query is null<T> Optional<T> singleResult(String query)
T - the entity typequery - the queryOptionalNullPointerException - when the query is nulljakarta.nosql.NonUniqueResultException - if returns more than one resultPreparedStatement prepare(String query)
PreparedStatement from the queryquery - the queryPreparedStatement instanceNullPointerException - when the query 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 annotationlong count(String columnFamily)
columnFamily - the column familyNullPointerException - when column family is nullUnsupportedOperationException - when the database dot not have support<T> long count(Class<T> entityClass)
T - the entity typeentityClass - the column familyNullPointerException - when column family is nullUnsupportedOperationException - when the database dot not have support<T> Optional<T> singleResult(ColumnQuery query)
T - the instance typequery - - query to figure out entitiesOptional or Optional.empty() when the result is not found.jakarta.nosql.NonUniqueResultException - when the result has more than 1 entityNullPointerException - when query is nullCopyright © 2017–2019 Eclipse Foundation. All rights reserved.