public interface ColumnFamilyManager extends AutoCloseable
ColumnEntity
The ColumnFamilyManager API is used to create and remove persistent ColumnEntity instances,
to select entities by their primary key, and to select over entities.| Modifier and Type | Method and Description |
|---|---|
void |
close()
closes a resource
|
long |
count(String columnFamily)
Returns the number of elements from column family
|
void |
delete(ColumnDeleteQuery query)
Deletes an entity
|
ColumnEntity |
insert(ColumnEntity entity)
Saves a Column family entity
|
ColumnEntity |
insert(ColumnEntity entity,
Duration ttl)
Saves a Column family entity with time to live
|
Iterable<ColumnEntity> |
insert(Iterable<ColumnEntity> entities)
Saves a Column family entities, by default it's just run for each saving using
insert(ColumnEntity), each NoSQL vendor might
replace to a more appropriate one. |
Iterable<ColumnEntity> |
insert(Iterable<ColumnEntity> entities,
Duration ttl)
Saves a Column family entity with time to live, by default it's just run for each saving using
insert(ColumnEntity, Duration),
each NoSQL vendor might replace to a more appropriate one. |
default ColumnPreparedStatement |
prepare(String query)
Executes a query and returns the result, when the operations are insert, update and select
command it will return the result of the operation when the command is delete it will return an empty collection.
|
default Stream<ColumnEntity> |
query(String query)
Executes a query and returns the result, when the operations are insert, update and select
command it will return the result of the operation when the command is delete it will return an empty collection.
|
Stream<ColumnEntity> |
select(ColumnQuery query)
Finds
ColumnEntity from select |
default Optional<ColumnEntity> |
singleResult(ColumnQuery query)
Returns a single entity from select
|
ColumnEntity |
update(ColumnEntity entity)
Updates a Column family entity
|
Iterable<ColumnEntity> |
update(Iterable<ColumnEntity> entities)
Updates a Column family entities, by default it's just run for each saving using
update(ColumnEntity), each NoSQL vendor might
replace to a more appropriate one. |
ColumnEntity insert(ColumnEntity entity)
entity - column family to be savedNullPointerException - when entity is nullColumnEntity update(ColumnEntity entity)
entity - column family to be savedNullPointerException - when entity is nullIterable<ColumnEntity> update(Iterable<ColumnEntity> entities)
update(ColumnEntity), each NoSQL vendor might
replace to a more appropriate one.entities - column family to be savedNullPointerException - when entities is nullColumnEntity insert(ColumnEntity entity, Duration ttl)
entity - column family to be savedttl - time to liveNullPointerException - when either entity or ttl are nullUnsupportedOperationException - when the database does not support this featureIterable<ColumnEntity> insert(Iterable<ColumnEntity> entities)
insert(ColumnEntity), each NoSQL vendor might
replace to a more appropriate one.entities - column family to be savedNullPointerException - when entities is nullIterable<ColumnEntity> insert(Iterable<ColumnEntity> entities, Duration ttl)
insert(ColumnEntity, Duration),
each NoSQL vendor might replace to a more appropriate one.entities - column family to be savedttl - time to liveNullPointerException - when either entity or ttl are nullUnsupportedOperationException - when the database does not support this featurevoid delete(ColumnDeleteQuery query)
query - the select to delete an entityNullPointerException - when either select or collection are nullUnsupportedOperationException - if the implementation does not support any operation that a query has.Stream<ColumnEntity> select(ColumnQuery query)
ColumnEntity from selectquery - - select to figure out entitiesNullPointerException - when select is nullUnsupportedOperationException - if the implementation does not support any operation that a query has.default Stream<ColumnEntity> query(String query)
query - the query as StringNullPointerException - when there is parameter nullIllegalArgumentException - when the query has value parametersIllegalStateException - when there is not ColumnQueryParserQueryException - when there is error in the syntaxdefault ColumnPreparedStatement prepare(String query)
query - the query as StringColumnPreparedStatement instanceNullPointerException - when there is parameter nullIllegalStateException - when there is not ColumnQueryParserQueryException - when there is error in the syntaxdefault Optional<ColumnEntity> singleResult(ColumnQuery query)
query - - select to figure out entitiesOptional or Optional.empty() when the result is not found.NonUniqueResultException - when the result has more than one entityNullPointerException - when select is nullUnsupportedOperationException - if the implementation does not support any operation that a query has.long count(String columnFamily)
columnFamily - the column familyNullPointerException - when column family is nullUnsupportedOperationException - when the database dot not have supportvoid close()
close in interface AutoCloseableCopyright © 2017–2021 Eclipse Foundation. All rights reserved.