public interface IndexKey extends RecordValue
getFields()
.
If an attempt is made to set a field that is not part of the index
IllegalArgumentException is thrown.
IndexKey instances do not share the same RecordDef
definition as the
corresponding Row
objects on the same table. Instead, they have a
flattened name space, simplifying their use. Values for fields in
an IndexKey can be created using a positional put, RecordValue.put(int, FieldValue)
, or by name, where the name must be one of
the strings returned by getFields()
.
IndexKey objects are constructed using Index.createIndexKey()
},
and Index.createIndexKeyFromJson(java.lang.String, boolean)
.
Modifier and Type | Method and Description |
---|---|
List<String> |
getFields()
Returns an unmodifiable list of fields, in key order, that
comprise this key.
|
Index |
getIndex()
Returns the Index associated with this key.
|
IndexKey |
putEMPTY(int position)
Inserts the field at the given position, or updates its value if the
field exists already.
|
IndexKey |
putEMPTY(String fieldName)
Puts an EMPTY value in the named field, silently overwriting existing
values.
|
clear, clone, contains, contains, copyFrom, get, get, getDefinition, getFieldName, getFieldNames, getFieldPos, isEmpty, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putArray, putArray, putArray, putArray, putArray, putArray, putArrayAsJson, putArrayAsJson, putArrayAsJson, putArrayAsJson, putEnum, putEnum, putFixed, putFixed, putJson, putJson, putJson, putJson, putJsonNull, putJsonNull, putMap, putMap, putMap, putMap, putMapAsJson, putMapAsJson, putMapAsJson, putMapAsJson, putNull, putNull, putNumber, putNumber, putNumber, putNumber, putNumber, putNumber, putNumber, putNumber, putNumber, putNumber, putRecord, putRecord, putRecord, putRecord, putRecordAsJson, putRecordAsJson, putRecordAsJson, putRecordAsJson, remove, size, toString
asArray, asBinary, asBoolean, asDouble, asEnum, asFixedBinary, asFloat, asIndexKey, asInteger, asLong, asMap, asNumber, asPrimaryKey, asRecord, asRow, asString, asTimestamp, getType, isArray, isAtomic, isBinary, isBoolean, isComplex, isDouble, isEMPTY, isEnum, isFixedBinary, isFloat, isIndexKey, isInteger, isJsonNull, isLong, isMap, isNull, isNumber, isNumeric, isPrimaryKey, isRecord, isRow, isString, isTimestamp, toJsonString
compareTo
Index getIndex()
List<String> getFields()
Index.getFields()
for this instance's Index.getFields
in interface RecordValue
IndexKey putEMPTY(int position)
FieldValue.isEMPTY()
.position
- the position of the field.IndexOutOfBoundsException
- if position is negative or greater or
equal to the number of fields in the record type definition associated
with this record.IndexKey putEMPTY(String fieldName)
FieldValue.isEMPTY()
.fieldName
- name of the desired fieldCopyright (c) 2011, 2017 Oracle and/or its affiliates. All rights reserved.