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 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)
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. |
FieldRange |
createMapKeyFieldRange(String pathToMap)
Creates a
FieldRange object used to specify a value range for
map keys for use in a index iteration operation over an index that
includes a map key as an indexed field. |
FieldRange |
createMapValueFieldRange(String pathToMap,
String pathToValue)
/**
Creates a
FieldRange object used to specify a value range for
an indexed value that is either the element of a map or nested inside the
element of a map. |
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 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 may be in "dot" notation if the field is
nested within an array or record.FieldRange
based on the indexIllegalArgumentException
- if the field is not defined in the
indexFieldRange createMapKeyFieldRange(String pathToMap)
FieldRange
object used to specify a value range for
map keys for use in a index iteration operation over an index that
includes a map key as an indexed field.pathToMap
- the path to the map name of the field from the index
to use for the range. This may be in "dot" notation if the map field
is nested inside a record.FieldRange
based on the indexIllegalArgumentException
- if the field is not defined in the
indexFieldRange createMapValueFieldRange(String pathToMap, String pathToValue)
FieldRange
object used to specify a value range for
an indexed value that is either the element of a map or nested inside the
element of a map.pathToMap
- the path to the map name of the field from the index
to use for the range. This may be in "dot" notation if the map field
is nested inside a record.pathToValue
- the path from the map to the target value for use in
the range. This may be in "dot" notation if the map is map of records
and the target field is nested in that record. It should be null if the
target is the map's element itself.FieldRange
based on the indexIllegalArgumentException
- if the field is not defined in the
indexCopyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.