public interface ColumnTemplate extends Template
ColumnFamilyManagerColumnFamilyManager| 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
|
void |
delete(ColumnDeleteQuery query)
Deletes an entity
|
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
|
long 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 supportvoid 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> 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 null<T> Stream<T> query(String query)
StreamT - the entity typequery - the queryStreamNullPointerException - when the query is nullUnsupportedOperationException - if the specified template does not support this operation<T> Optional<T> singleResult(String query)
T - the entity typequery - the queryOptionalNullPointerException - when the query is nulljakarta.nosql.NonUniqueResultException - if returns more than one resultUnsupportedOperationException - if the specified template does not support this operationPreparedStatement prepare(String query)
PreparedStatement from the queryquery - the queryPreparedStatement instanceNullPointerException - when the query is nullUnsupportedOperationException - if the specified template does not support this operationCopyright © 2017–2022 Eclipse Foundation. All rights reserved.