public interface SinglevaluedIndex extends Index
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(java.lang.Object key)
Returns the value to which this index maps the specified key.
|
java.lang.Object |
getIfExists(java.lang.Object key)
Returns the value to which this index maps the specified key
or null if there is no value for this key.
|
java.lang.Object |
getObject(java.lang.Object key,
SinglevaluedIndex repos)
Like get, but if the index contains keys, this returns the object
corresponding to the key
|
java.lang.Object |
getObjectIfExists(java.lang.Object key,
SinglevaluedIndex repos)
Like getIfExists, but if the index contains keys, this returns the object
corresponding to the key
|
boolean |
put(java.lang.Object key,
java.lang.Object value)
Associates the specified value with the specified key in this index.
|
java.util.Collection |
queryByKeyPrefix(java.lang.Object prefix,
SinglevaluedIndex repos)
Returns a collection view of
Map.Entry key-value pairs in the index,
where key matches the queried prefix. |
void |
replace(java.lang.Object key,
java.lang.Object value)
Replaces the original value associated with the specified key in this index
with new value.
|
java.util.Collection |
values()
Returns a collection view of the values contained in this index.
|
add, getKeyType, getName, getValueType, keySet, removeboolean put(java.lang.Object key,
java.lang.Object value)
throws StorageException
key - value - StorageExceptionvoid replace(java.lang.Object key,
java.lang.Object value)
throws StorageException,
StorageBadRequestException
key - value - StorageExceptionStorageBadRequestExceptionjava.lang.Object get(java.lang.Object key)
throws StorageException,
StorageBadRequestException
key - StorageExceptionStorageBadRequestExceptionjava.lang.Object getObject(java.lang.Object key,
SinglevaluedIndex repos)
throws StorageException
key - StorageExceptionjava.lang.Object getIfExists(java.lang.Object key)
throws StorageException
key - StorageExceptionjava.lang.Object getObjectIfExists(java.lang.Object key,
SinglevaluedIndex repos)
throws StorageException
key - StorageExceptionjava.util.Collection values()
throws StorageException
StorageExceptionjava.util.Collection queryByKeyPrefix(java.lang.Object prefix,
SinglevaluedIndex repos)
throws StorageException
Map.Entry key-value pairs in the index,
where key matches the queried prefix. Values are objects (as returned by getObject
method).prefix - queried prefixrepos - primary indexStorageExceptionjava.lang.UnsupportedOperationException - thrown if the index does not support quries on
prefixes (due to unsuitable key entry type, etc.)Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.