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 | Interface | Description |
|---|---|---|
static class |
Index.IndexType |
The type of an index.
|
| Modifier and Type | Method | Description |
|---|---|---|
FieldRange |
createFieldRange(java.lang.String fieldPath) |
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) |
Deprecated.
as of 4.5
|
IndexKey |
createIndexKeyFromJson(java.io.InputStream jsonInput,
boolean exact) |
Creates an
IndexKey based on JSON input. |
IndexKey |
createIndexKeyFromJson(java.lang.String jsonInput,
boolean exact) |
Creates an
IndexKey based on JSON input. |
java.lang.String |
getAnnotationForField(java.lang.String fieldName) |
Return an annotation for the given field.
|
java.lang.String |
getDescription() |
Gets the index's description if present, otherwise null.
|
java.util.List<java.lang.String> |
getFields() |
Returns an unmodifiable list of the field names that define the index.
|
java.lang.String |
getName() |
Returns the name of the index.
|
Table |
getTable() |
Returns the Table on which the index is defined.
|
Index.IndexType |
getType() |
Returns the index's IndexType.
|
Table getTable()
java.lang.String getName()
java.util.List<java.lang.String> getFields()
IndexKey.getFields() for IndexKey
instances created by this Index.java.lang.String getDescription()
Index.IndexType getType()
java.lang.String getAnnotationForField(java.lang.String fieldName)
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.@Deprecated 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.
This method is not able to construct index keys for multi-key
indexes. These are indexes that include elements of a map or array and
can result in multiple index entries, or distinct IndexKey
values for a single row.
value - a RecordValue instanceIndexKey containing relevant fields from the valuejava.lang.IllegalArgumentException - if the value does not match the table
or index, or if the index contains an array or mapIndexKey createIndexKeyFromJson(java.lang.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 abovejava.lang.IllegalArgumentException - if exact is true and a field is
missing or extra. It will also be thrown if a field type or value is
not correctjava.lang.IllegalArgumentException - if the input is malformedIndexKey createIndexKeyFromJson(java.io.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 abovejava.lang.IllegalArgumentException - if exact is true and a field is
missing or extra. It will also be thrown if a field type or value is
not correctjava.lang.IllegalArgumentException - if the input is malformedFieldRange createFieldRange(java.lang.String fieldPath)
FieldRange object used to specify a value range for
use in a index iteration operation in TableAPI.fieldPath - the path to the field from the index
to use for the range. This string must match one of the valid index
field strings returned by getFields().FieldRange based on the indexjava.lang.IllegalArgumentException - if the field is not defined in the
indexCopyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved.