ADAPTER - CRITERIA - SORT - public abstract class QueryEngine<ADAPTER extends KeyValueAdapter,CRITERIA,SORT> extends Object
KeyValueQuery against a KeyValueAdapter.| Constructor and Description |
|---|
QueryEngine(CriteriaAccessor<CRITERIA> criteriaAccessor,
SortAccessor<SORT> sortAccessor) |
| Modifier and Type | Method and Description |
|---|---|
abstract long |
count(CRITERIA criteria,
String keyspace) |
long |
count(KeyValueQuery<?> query,
String keyspace)
Extract query attributes and delegate to concrete execution.
|
abstract Collection<?> |
execute(CRITERIA criteria,
SORT sort,
long offset,
int rows,
String keyspace) |
<T> Collection<T> |
execute(CRITERIA criteria,
SORT sort,
long offset,
int rows,
String keyspace,
Class<T> type) |
Collection<?> |
execute(KeyValueQuery<?> query,
String keyspace)
Extract query attributes and delegate to concrete execution.
|
<T> Collection<T> |
execute(KeyValueQuery<?> query,
String keyspace,
Class<T> type)
Extract query attributes and delegate to concrete execution.
|
protected ADAPTER |
getAdapter()
Get the
KeyValueAdapter used. |
protected ADAPTER |
getRequiredAdapter()
Get the required
KeyValueAdapter used or throw IllegalStateException if the adapter is not set. |
void |
registerAdapter(KeyValueAdapter adapter) |
public QueryEngine(@Nullable CriteriaAccessor<CRITERIA> criteriaAccessor, @Nullable SortAccessor<SORT> sortAccessor)
public Collection<?> execute(KeyValueQuery<?> query, String keyspace)
query - keyspace - public <T> Collection<T> execute(KeyValueQuery<?> query, String keyspace, Class<T> type)
query - keyspace - public long count(KeyValueQuery<?> query, String keyspace)
query - keyspace - public abstract Collection<?> execute(@Nullable CRITERIA criteria, @Nullable SORT sort, long offset, int rows, String keyspace)
criteria - sort - offset - rows - keyspace - public <T> Collection<T> execute(@Nullable CRITERIA criteria, @Nullable SORT sort, long offset, int rows, String keyspace, Class<T> type)
criteria - sort - offset - rows - keyspace - type - public abstract long count(@Nullable CRITERIA criteria, String keyspace)
criteria - keyspace - @Nullable protected ADAPTER getAdapter()
KeyValueAdapter used.protected ADAPTER getRequiredAdapter()
KeyValueAdapter used or throw IllegalStateException if the adapter is not set.KeyValueAdapter.IllegalStateException - if the adapter is not set.public void registerAdapter(KeyValueAdapter adapter)
adapter - Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.