public abstract class AbstractKeyValueAdapter extends Object implements KeyValueAdapter
KeyValueAdapter holds QueryEngine to delegate find and
count execution to.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractKeyValueAdapter()
Creates new
AbstractKeyValueAdapter with using the default query engine. |
protected |
AbstractKeyValueAdapter(QueryEngine<? extends KeyValueAdapter,?,?> engine)
Creates new
AbstractKeyValueAdapter with using the default query engine. |
| Modifier and Type | Method and Description |
|---|---|
long |
count(KeyValueQuery<?> query,
String keyspace)
Count all matching objects within keyspace.
|
<T> T |
delete(Object id,
String keyspace,
Class<T> type)
Delete and return the object with given type and id.
|
Collection<?> |
find(KeyValueQuery<?> query,
String keyspace)
Find all matching objects within keyspace.
|
<T> Iterable<T> |
find(KeyValueQuery<?> query,
String keyspace,
Class<T> type) |
<T> T |
get(Object id,
String keyspace,
Class<T> type)
Get the object with given id from keyspace.
|
protected QueryEngine<? extends KeyValueAdapter,?,?> |
getQueryEngine()
Get the
QueryEngine used. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, contains, count, delete, deleteAllOf, entries, entries, get, getAllOf, getAllOf, putdestroyprotected AbstractKeyValueAdapter()
AbstractKeyValueAdapter with using the default query engine.protected AbstractKeyValueAdapter(@Nullable QueryEngine<? extends KeyValueAdapter,?,?> engine)
AbstractKeyValueAdapter with using the default query engine.engine - will be defaulted to SpelQueryEngine if null.protected QueryEngine<? extends KeyValueAdapter,?,?> getQueryEngine()
QueryEngine used.@Nullable public <T> T get(Object id, String keyspace, Class<T> type)
KeyValueAdapterget in interface KeyValueAdapterid - must not be null.keyspace - must not be null.type - must not be null.@Nullable public <T> T delete(Object id, String keyspace, Class<T> type)
KeyValueAdapterdelete in interface KeyValueAdapterid - must not be null.keyspace - must not be null.type - must not be null.public <T> Iterable<T> find(KeyValueQuery<?> query, String keyspace, Class<T> type)
find in interface KeyValueAdapterquery - must not be null.keyspace - must not be null.type - must not be null.Collection if no match found.public Collection<?> find(KeyValueQuery<?> query, String keyspace)
KeyValueAdapterfind in interface KeyValueAdapterquery - must not be null.keyspace - must not be null.Collection if no match found.public long count(KeyValueQuery<?> query, String keyspace)
KeyValueAdaptercount in interface KeyValueAdapterquery - must not be null.keyspace - must not be null.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.