Package oracle.kv.table
Interface RecordValue
- All Superinterfaces:
- Comparable<FieldValue>,- FieldValue
- All Known Subinterfaces:
- IndexKey,- PrimaryKey,- ReturnRow,- Row
RecordValue extends 
FieldValue to represent a record value. A record
 value is an ordered collection of key-value pairs called "fields". The keys
 are called "field names"; they are all strings and must be unique within each
 record. The associated values, called "field values", do not need to have the
 same type. Each record is associated with, and conforms to, a record type
 definition (see RecordDef). The record type definition specifies the
 number, names, and ordering of the fields in all conforming records, as well
 as the type of each field value. The field order is the order in which the
 fields appear in record type declaration. Based on this order, each field
 has a unique position, which is a number between 0 and N - 1, where N is
 the number of fields.
 Note: during its construction, a record may have fewer fields than what its
 associated type dictates. Fields can be added to a record via the various
 put() methods defined by the RecordValue interface.- Since:
- 3.0
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()Deletes all the fields from this record.clone()Returns a deep copy of this object.booleancontains(int position) Returns true if the record contains a field at the given position.booleanReturns true if the record contains the named field.voidcopyFrom(RecordValue source) Copies the fields from another RecordValue instance, overwriting fields in this object with the same name.get(int position) Returns the value of the field at the given position.Returns the value of the field with the given name.Returns the record type that this record conforms to.getFieldName(int position) Returns the name of the field at the given positionReturns the list of all field names that are defined by the associated record type.intgetFieldPos(String fieldName) Returns the position of the field with the given nameDeprecated.as of 4.2 Please use the equivalent getFieldNames() method.booleanisEmpty()Returns true if none of the record's fields have been set, false otherwise.put(int position, boolean value) Inserts the field at the given position, or updates its value if the field exists already.put(int position, byte[] value) Inserts the field at the given position, or updates its value if the field exists already.put(int position, double value) Inserts the field at the given position, or updates its value if the field exists already.put(int position, float value) Inserts the field at the given position, or updates its value if the field exists already.put(int position, int value) Inserts the field at the given position, or updates its value if the field exists already.put(int position, long value) Inserts the field at the given position, or updates its value if the field exists already.Inserts the field at the given position, or updates its value if the field exists already.Inserts the field at the given position, or updates its value if the field exists already.put(int position, FieldValue value) Inserts the field at the given position, or updates its value if the field exists already.Set the named field, silently overwriting existing values.Set the named field, silently overwriting existing values.Set the named field, silently overwriting existing values.Set the named field, silently overwriting existing values.Set the named field, silently overwriting existing values.Set the named field, silently overwriting existing values.Set the named field, silently overwriting existing values.Set the named field, silently overwriting existing values.put(String fieldName, FieldValue value) Set the named field, silently overwriting existing values.putArray(int position) Inserts the field at the given position, or updates its value if the field exists already.Inserts a list of Java objects into the record as an array at the given position, or updates its value if the field exists already.Inserts an array of Java objects into the record as an array at the given given position, or updates its value if the field exists already.Set an ArrayValue field, silently overwriting existing values.Set an ArrayValue field based on list input, silently overwriting existing values.Set an ArrayValue field based on an array of Java Objects, silently overwriting existing values.putArrayAsJson(int position, InputStream jsonInput, boolean exact) Inserts the field at the given position, or updates its value if the field exists already.putArrayAsJson(int position, String jsonInput, boolean exact) Inserts the field at the given position, or updates its value if the field exists already.putArrayAsJson(String fieldName, InputStream jsonInput, boolean exact) Set a ArrayValue field, silently overwriting existing values.putArrayAsJson(String fieldName, String jsonInput, boolean exact) Set a ArrayValue field, silently overwriting existing values.Inserts the field at the given position, or updates its value if the field exists already.Set the named field, silently overwriting existing values.putFixed(int position, byte[] value) Inserts the field at the given position, or updates its value if the field exists already.Set the named field, silently overwriting existing values.Set a RecordValue field of type JSON using the JSON input.Set a RecordValue field of type JSON using the JSON input.Set a RecordValue field of type JSON using the JSON input.Set a RecordValue field of type JSON using the JSON input.putJsonNull(int position) Inserts the field at the given position, or updates its value if the field exists already.putJsonNull(String fieldName) Puts a JSON NULL value in the named field, silently overwriting existing values.putMap(int position) Inserts the field at the given position, or updates its value if the field exists already.Inserts the field at the given position, or updates its value if the field exists already.Set a MapValue field, silently overwriting existing values.Set a MapValue field based on map input, silently overwriting existing values.putMapAsJson(int position, InputStream jsonInput, boolean exact) Inserts the field at the given position, or updates its value if the field exists already.putMapAsJson(int position, String jsonInput, boolean exact) Inserts the field at the given position, or updates its value if the field exists already.putMapAsJson(String fieldName, InputStream jsonInput, boolean exact) Set a MapValue field, silently overwriting existing values.putMapAsJson(String fieldName, String jsonInput, boolean exact) Set a MapValue field, silently overwriting existing values.putNull(int position) Inserts the field at the given position, or updates its value if the field exists already.Put a null value in the named field, silently overwriting existing values.putNumber(int position, double value) Inserts the field at the given position, or updates its value if the field exists already.putNumber(int position, float value) Inserts the field at the given position, or updates its value if the field exists already.putNumber(int position, int value) Inserts the field at the given position, or updates its value if the field exists already.putNumber(int position, long value) Inserts the field at the given position, or updates its value if the field exists already.putNumber(int position, BigDecimal value) Inserts the field at the given position, or updates its value if the field exists already.Set the named field, silently overwriting existing values.Set the named field, silently overwriting existing values.Set the named field, silently overwriting existing values.Set the named field, silently overwriting existing values.putNumber(String fieldName, BigDecimal value) Set the named field, silently overwriting existing values.putRecord(int position) Inserts the field at the given position, or updates its value if the field exists already.Inserts the field at the given position, or updates its value if the field exists already.Set a RecordValue field, silently overwriting existing values.Set a RecordValue field based on map input, silently overwriting existing values.putRecordAsJson(int position, InputStream jsonInput, boolean exact) Inserts the field at the given position, or updates its value if the field exists already.putRecordAsJson(int position, String jsonInput, boolean exact) Inserts the field at the given position, or updates its value if the field exists already.putRecordAsJson(String fieldName, InputStream jsonInput, boolean exact) Set a RecordValue field, silently overwriting existing values.putRecordAsJson(String fieldName, String jsonInput, boolean exact) Set a RecordValue field, silently overwriting existing values.Remove the named field if it exists.intsize()Returns the number of the fields in this record.toString()Returns a String representation of this record.Methods inherited from interface java.lang.ComparablecompareToMethods inherited from interface oracle.kv.table.FieldValueasArray, 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
- 
Method Details- 
getDefinitionRecordDef getDefinition()Returns the record type that this record conforms to.- Specified by:
- getDefinitionin interface- FieldValue
- Returns:
- the RecordDef
 
- 
getFieldsDeprecated.as of 4.2 Please use the equivalent getFieldNames() method.Returns the list of all field names that are defined by the associated record type. The list is in field declaration order. Notice that this list does not depend on the actual fields present in this record, and is never empty. Values of the fields, if they are present in this instance, can be obtained usingget(java.lang.String).- Returns:
- an unmodifiable list of the field names in declaration order
- Since:
- 3.0.6
 
- 
getFieldNamesReturns the list of all field names that are defined by the associated record type. The list is in field declaration order. Notice that this list does not depend on the actual fields present in this record, and is never empty. Values of the fields, if they are present in this instance, can be obtained usingget(java.lang.String).If this RecordValue is an instance of a Row from a JSON collection table this method will return all of the fields in the row, not just the primary keys defined in the schema. - Returns:
- an unmodifiable list of the field names in declaration order
- Since:
- 4.2
 
- 
getFieldNameReturns the name of the field at the given position- Parameters:
- position- the position of the field whose name is to be returned
- Returns:
- the name of the field at the given position
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- Since:
- 4.2
 
- 
getFieldPosReturns the position of the field with the given name- Returns:
- the position of the field with the given name
- Throws:
- IllegalArgumentException- if the associated record type does not have any field with the given name
- Since:
- 4.2
 
- 
cloneRecordValue clone()Returns a deep copy of this object.- Specified by:
- clonein interface- FieldValue
- Returns:
- a deep copy of this object
 
- 
clearvoid clear()Deletes all the fields from this record.- Since:
- 4.1
 
- 
toStringString toString()Returns a String representation of this record. The value returned is a JSON string, and is the same as that returned byFieldValue.toJsonString(boolean).
- 
getReturns the value of the field with the given name.- Parameters:
- fieldName- the name of the desired field
- Returns:
- the value of the specified field, if the field exists in this record, or null if it has not been added yet.
- Throws:
- IllegalArgumentException- if the associated record type does not have any field with the given name
 
- 
getReturns the value of the field at the given position.- Parameters:
- position- the position of the desired field.
- Returns:
- the field value if it is available, null if it has not been set
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- Since:
- 4.0
 
- 
sizeint size()Returns the number of the fields in this record. This is the number of fields that have actually been set, and is always less or equal to the number of fields in the associated record definition.- Returns:
- the number of fields that have been set.
 
- 
isEmptyboolean isEmpty()Returns true if none of the record's fields have been set, false otherwise.- Returns:
- true if none of the record's fields have been set, false otherwise.
 
- 
copyFromCopies the fields from another RecordValue instance, overwriting fields in this object with the same name. If a field exists in this record but not in the other record, the existing field is not removed.- Parameters:
- source- the source RecordValue from which to copy
- Throws:
- IllegalArgumentException- if the- RecordDefof source does not match that of this instance.
 
- 
containsReturns true if the record contains the named field.- Parameters:
- fieldName- the name of the field
- Returns:
- true if the field exists in the record, otherwise null
- Throws:
- IllegalArgumentException- if the associated record type does not have any field with the given name
 
- 
containsboolean contains(int position) Returns true if the record contains a field at the given position.- Parameters:
- position- the position of the desired field.
- Returns:
- true if the field exists in the record, otherwise null
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- Since:
- 4.2
 
- 
removeRemove the named field if it exists.- Parameters:
- fieldName- the name of the field to remove
- Returns:
- the FieldValue if the field existed (was set) in the record, otherwise null
- Throws:
- IllegalArgumentException- if the associated record type does not have any field with the given name
 
- 
putInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.1
 
- 
putInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.2
 
- 
putInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.2
 
- 
putInserts the field at the given position, or updates its value if the field exists already. This method is used to put a string into a field of type String. The String value is not parsed or interpreted. The methodsputJson(java.lang.String, java.lang.String)andputEnum(int, java.lang.String)exist to put String values of those types.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.2
 
- 
putInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.2
 
- 
putInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.2
 
- 
putInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.2
 
- 
putInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.2
 
- 
putFixedInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.2
 
- 
putEnumInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.2
 
- 
putNumberInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.4
 
- 
putNumberInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.4
 
- 
putNumberInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.4
 
- 
putNumberInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.4
 
- 
putNumberInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.4
 
- 
putInserts the field at the given position, or updates its value if the field exists already.- Parameters:
- position- the position of the field.
- value- the value to set
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the type of the specified field does not match that of the value.
- Since:
- 4.3
 
- 
putNullInserts the field at the given position, or updates its value if the field exists already. The new value of the field will be the special NULL value.- Parameters:
- position- the position of the field.
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not nullable.
- Since:
- 4.2
 
- 
putJsonNullInserts the field at the given position, or updates its value if the field exists already. The new value of the field will be the special JSON NULL value that returns true forFieldValue.isJsonNull(). The field must be of type JSON.- Parameters:
- position- the position of the field.
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not of type JSON
- Since:
- 4.3
 
- 
putRecordInserts the field at the given position, or updates its value if the field exists already. The specified field must be a record-valued field, and the value assigned to it by this method is an empty record that conforms to the record type declared for this field.- Parameters:
- position- the position of the field.
- Returns:
- the empty record assigned to the field.
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not record-valued.
- Since:
- 4.2
 
- 
putRecordInserts the field at the given position, or updates its value if the field exists already. The specified field must be a record-valued field, and the value assigned to it by this method is a new record that conforms to the record type declared for this field, and whose content is taken from the given java Map object..- Parameters:
- position- the position of the field.
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not record-valued or if the map value doesn't match the record type of the field.
- Since:
- 4.2
 
- 
putRecordAsJsonInserts the field at the given position, or updates its value if the field exists already. The specified field must be a record-valued field, and the value assigned to it by this method is a new record created and populated form a given JSON string. If theexactparameter is true, the input JSON must contain an exact match to the record type of the specified field, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- position- the position of the field.
- jsonInput- a JSON string
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not record-value or if the JSON doesn't match the record type of the field, according to the requirements set by the- exactparameter.
- IllegalArgumentException- if the jsonInput is malformed
- Since:
- 4.2
 
- 
putRecordAsJsonInserts the field at the given position, or updates its value if the field exists already. The specified field must be a record-valued field, and the value assigned to it by this method is a new record created and populated form a given JSON stream. If theexactparameter is true, the input JSON must contain an exact match to the record type of the specified field, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- position- the position of the field.
- jsonInput- a JSON stream
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not record-value or if the JSON doesn't match the record type of the field, according to the requirements set by the- exactparameter.
- IllegalArgumentException- if the jsonInput is malformed
- Since:
- 4.2
 
- 
putArrayInserts the field at the given position, or updates its value if the field exists already. The specified field must be an array-valued field, and the value assigned to it by this method is an empty array that conforms to the array type declared for this field.- Parameters:
- position- the position of the field.
- Returns:
- the empty array assigned to the field.
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not array-valued.
- Since:
- 4.2
 
- 
putArrayInserts a list of Java objects into the record as an array at the given position, or updates its value if the field exists already. The specified field must be an array-valued field, and the value assigned to it by this method is a new array that conforms to the array type declared for this field, and whose content is taken from the given java Iterable object.- Parameters:
- position- the position of the field.
- list- the Iterable list of objects to insert.
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not record-valued or if the type of the list doesn't match the array type of the array field.
- Since:
- 4.2
 
- 
putArrayInserts an array of Java objects into the record as an array at the given given position, or updates its value if the field exists already. The specified field must be an array-valued field, and the value assigned to it by this method is a new array that conforms to the array type declared for this field, and whose content is taken from the array of java objects.- Parameters:
- position- the position of the field.
- array- the array of objects to insert.
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the field at position is not an array or the type of the objects in the array does not match the type of the array field.
- Since:
- 4.2
 
- 
putArrayAsJsonInserts the field at the given position, or updates its value if the field exists already. The specified field must be an array-valued field, and the value assigned to it by this method is a new array created and populated form a given JSON string. If theexactparameter is true, the input JSON must contain an exact match to the array type of the specified field, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- position- the position of the field.
- jsonInput- a JSON string
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not array-value or if the JSON doesn't match the array type of the field, according to the requirements set by the- exactparameter.
- IllegalArgumentException- if the jsonInput is malformed
- Since:
- 4.2
 
- 
putArrayAsJsonInserts the field at the given position, or updates its value if the field exists already. The specified field must be an array-valued field, and the value assigned to it by this method is a new array created and populated form a given JSON stream. If theexactparameter is true, the input JSON must contain an exact match to the array type of the specified field, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- position- the positionition of the field.
- jsonInput- a JSON stream
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not array-value or if the JSON doesn't match the array type of the field, according to the requirements set by the- exactparameter.
- IllegalArgumentException- if the jsonInput is malformed
- Since:
- 4.2
 
- 
putMapInserts the field at the given position, or updates its value if the field exists already. The specified field must be a map-valued field, and the value assigned to it by this method is an empty map that conforms to the array type declared for this field.- Parameters:
- position- the position of the field.
- Returns:
- the empty map assigned to the field.
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not map-valued.
- Since:
- 4.2
 
- 
putMapInserts the field at the given position, or updates its value if the field exists already. The specified field must be a map-valued field, and the value assigned to it by this method is a new map that conforms to the map type declared for this field, and whose content is taken from the given java map.- Parameters:
- position- the position of the field.
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not map-valued or if the given map doesn't match the array type of the field.
- Since:
- 4.2
 
- 
putMapAsJsonInserts the field at the given position, or updates its value if the field exists already. The specified field must be a map-valued field, and the value assigned to it by this method is a new map created and populated form a given JSON string. If theexactparameter is true, the input JSON must contain an exact match to the map type of the specified field, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- position- the position of the field.
- jsonInput- a JSON string
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not map-value or if the JSON doesn't match the map type of the field, according to the requirements set by the- exactparameter.
- IllegalArgumentException- if the jsonInput is malformed
- Since:
- 4.2
 
- 
putMapAsJsonInserts the field at the given position, or updates its value if the field exists already. The specified field must be a map-valued field, and the value assigned to it by this method is a new map created and populated form a given JSON stream. If theexactparameter is true, the input JSON must contain an exact match to the map type of the specified field, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- position- the position of the field.
- jsonInput- a JSON stream
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the specified field is not map-value or if the JSON doesn't match the map type of the field, according to the requirements set by the- exactparameter.
- IllegalArgumentException- if the jsonInput is malformed
- Since:
- 4.2
 
- 
putSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
 
- 
putSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
 
- 
putSet the named field, silently overwriting existing values. This method is used to put a string into a field of type String. The String value is not parsed or interpreted. The methodsputJson(java.lang.String, java.lang.String)andputEnum(int, java.lang.String)exist to put String values of those types.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
 
- 
putSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
 
- 
putSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
 
- 
putSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
 
- 
putNumberSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
- Since:
- 4.4
 
- 
putNumberSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
- Since:
- 4.4
 
- 
putNumberSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
- Since:
- 4.4
 
- 
putNumberSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
- Since:
- 4.4
 
- 
putNumberSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
- Since:
- 4.4
 
- 
putSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
 
- 
putFixedSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
 
- 
putEnumSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type.
 
- 
putSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the date value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
- Since:
- 4.3
 
- 
putNullPut a null value in the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
 
- 
putJsonNullPuts a JSON NULL value in the named field, silently overwriting existing values. JSON NULL is a special value that returns true forFieldValue.isJsonNull(). The field must be of type JSON.- Parameters:
- fieldName- name of the desired field
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field is not JSON.
- Since:
- 4.3
 
- 
putSet the named field, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- value- the value to set
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the type of the field does not match the input type
 
- 
putRecordSet a RecordValue field, silently overwriting existing values. The returned object is empty of fields and must be further set by the caller.- Parameters:
- fieldName- name of the desired field
- Returns:
- an empty instance of RecordValue
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition.
 
- 
putRecordSet a RecordValue field based on map input, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- map- to create value of the desired RecordValue field
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition
- IllegalArgumentException- if the map value type doesn't match the field definition of the named field.
 
- 
putRecordAsJsonSet a RecordValue field, silently overwriting existing values. The created RecordValue is based on JSON string input. If theexactparameter is true, the input string must contain an exact match to the Record field definition, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- fieldName- name of the desired field. In this method the field must have a precise type and not be of type JSON.
- jsonInput- a JSON string
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition
- 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 correct
- IllegalArgumentException- if the jsonInput is malformed
 
- 
putRecordAsJsonSet a RecordValue field, silently overwriting existing values. The created RecordValue is based on JSON stream input. If theexactparameter is true, the input string must contain an exact match to the Record field definition, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- fieldName- name of the desired field
- jsonInput- a JSON input stream
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition, or is of type JSON.
- 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 correct
- IllegalArgumentException- if the jsonInput is malformed
 
- 
putJsonSet a RecordValue field of type JSON using the JSON input. The named field must be of type JSON.- Parameters:
- fieldName- name of the desired field. The definition of this field must be of type JSON.
- jsonInput- a JSON string
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or its definition is not of type JSON.
- IllegalArgumentException- if the JSON input is invalid or contains an unsupported construct.
- Since:
- 4.2
 
- 
putJsonSet a RecordValue field of type JSON using the JSON input. The named field must be of type JSON.- Parameters:
- fieldName- name of the desired field. The definition of this field must be of type JSON.
- jsonReader- a Reader
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or its definition is not of type JSON.
- IllegalArgumentException- if the JSON input is invalid or contains an unsupported construct.
- Since:
- 4.2
 
- 
putJsonSet a RecordValue field of type JSON using the JSON input. The named field must be of type JSON.- Parameters:
- position- the position of the field.
- jsonInput- a JSON string
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the named field does not exist in the definition of the object or its definition is not of type JSON.
- IllegalArgumentException- if the JSON input is invalid or contains an unsupported construct.
- Since:
- 4.2
 
- 
putJsonSet a RecordValue field of type JSON using the JSON input. The named field must be of type JSON.- Parameters:
- position- the position of the field.
- jsonReader- a Reader
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if position is negative or greater or equal to the number of fields in the record type definition associated with this record. This situation will happen if this object is a JSON collection row and the position is beyond the range of the primary key fields.
- IllegalArgumentException- if the named field does not exist in the definition of the object or its definition is not of type JSON.
- IllegalArgumentException- if the JSON input is invalid or contains an unsupported construct.
- Since:
- 4.2
 
- 
putArraySet an ArrayValue field, silently overwriting existing values. The returned object is empty of fields and must be further set by the caller.- Parameters:
- fieldName- name of the desired field
- Returns:
- an empty instance of ArrayValue
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition
 
- 
putArraySet an ArrayValue field based on list input, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- list- to create value of the desired ArrayValue field
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition
- IllegalArgumentException- if the list type doesn't match the field definition of the named field.
 
- 
putArraySet an ArrayValue field based on an array of Java Objects, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- array- to insert into the ArrayValue field
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field is not an array
- IllegalArgumentException- if the type of the objects in the array does not match the type of the array field.
 
- 
putArrayAsJsonSet a ArrayValue field, silently overwriting existing values. The created ArrayValue is based on JSON string input. If theexactparameter is true, the input string must contain an exact match to all the nested Record definition in Array field, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- fieldName- name of the desired field
- jsonInput- a JSON string
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition
- 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 correct
- IllegalArgumentException- if the jsonInput is malformed
 
- 
putArrayAsJsonSet a ArrayValue field, silently overwriting existing values. The created ArrayValue is based on JSON stream input. If theexactparameter is true, the input string must contain an exact match to all the nested Record definition in Array field, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- fieldName- name of the desired field
- jsonInput- a JSON stream input
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition
- 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 correct
- IllegalArgumentException- if the jsonInput is malformed
 
- 
putMapSet a MapValue field, silently overwriting existing values. The returned object is empty of fields and must be further set by the caller.- Parameters:
- fieldName- name of the desired field
- Returns:
- an empty instance of MapValue
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition
 
- 
putMapSet a MapValue field based on map input, silently overwriting existing values.- Parameters:
- fieldName- name of the desired field
- map- to create value of the desired MapValue field
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition
- IllegalArgumentException- if the map value type doesn't match the field definition of the named field.
 
- 
putMapAsJsonSet a MapValue field, silently overwriting existing values. The created MapValue is based on JSON string input. If theexactparameter is true, the input string must contain an exact match to all the nested Record definition in Map field, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- fieldName- name of the desired field
- jsonInput- a JSON string
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition
- 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 correct
- IllegalArgumentException- if the jsonInput is malformed
 
- 
putMapAsJsonSet a MapValue field, silently overwriting existing values. The created MapValue is based on JSON stream input. If theexactparameter is true, the input string must contain an exact match to all the nested Record definition in Map field, including all fields. It must not have additional data. If false, only matching fields will be added and the input may have additional, unrelated data.- Parameters:
- fieldName- name of the desired field
- jsonInput- a JSON stream input
- exact- set to true for an exact match. See above
- Returns:
- this
- Throws:
- IllegalArgumentException- if the named field does not exist in the definition of the object or the definition of the field does not match the input definition
- 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 correct
- IllegalArgumentException- if the jsonInput is malformed
 
 
-