public interface Index
IndexKey
objects used
for IndexKey operations in TableAPI
.
Indexes are created and managed using the administrative command line interface.
Modifier and Type | Method and Description |
---|---|
FieldRange |
createFieldRange(String fieldName)
Creates a
FieldRange object used to specify a value range for
use in a index iteration operation in TableAPI . |
IndexKey |
createIndexKey()
Creates an
IndexKey for this index. |
IndexKey |
createIndexKey(RecordValue value)
Creates an
IndexKey for the index populated relevant fields from
the RecordValue parameter. |
IndexKey |
createIndexKeyFromJson(InputStream jsonInput,
boolean exact)
Creates an
IndexKey based on JSON input. |
IndexKey |
createIndexKeyFromJson(String jsonInput,
boolean exact)
Creates an
IndexKey based on JSON input. |
String |
getDescription()
Gets the index's description if present, otherwise null.
|
List<String> |
getFields()
Returns an unmodifiable list of the field names that define the index.
|
String |
getName()
Returns the name of the index.
|
Table |
getTable()
Returns the Table on which the index is defined.
|
Table getTable()
String getName()
List<String> getFields()
String getDescription()
IndexKey createIndexKey()
IndexKey
for this index. The returned key can only
hold fields that are part of this. Other fields are rejected if an
attempt is made to set them on the returned object.IndexKey createIndexKey(RecordValue value)
IndexKey
for the index populated relevant fields from
the RecordValue
parameter. Fields that are not part of the
index key are silently ignored.value
- a RecordValue
instanceIndexKey
containing relevant fields from the valueIndexKey createIndexKeyFromJson(String jsonInput, boolean exact)
IndexKey
based on JSON input. If the exact
parameter is true the input string must contain an exact match to the
index key. It must not have additional data. If false, only matching
fields will be added and the input may have additional, unrelated data.jsonInput
- a JSON stringexact
- set to true for an exact match. See aboveIllegalArgumentException
- if exact is true and a field is
missing or extra. It will also be thrown if a field type or value is
not correctIllegalArgumentException
- if the input is malformedIndexKey createIndexKeyFromJson(InputStream jsonInput, boolean exact)
IndexKey
based on JSON input. If the exact
parameter is true the input string must contain an exact match to the
index key. It must not have additional data. If false, only matching
fields will be added and the input may have additional, unrelated data.jsonInput
- a JSON stringexact
- set to true for an exact match. See aboveIllegalArgumentException
- if exact is true and a field is
missing or extra. It will also be thrown if a field type or value is
not correctIllegalArgumentException
- if the input is malformedFieldRange createFieldRange(String fieldName)
FieldRange
object used to specify a value range for
use in a index iteration operation in TableAPI
.fieldName
- the name of the field from the index
to use for the rangeFieldRange
based on the indexIllegalArgumentException
- if the field is not defined in the
indexCopyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.