public class RecordSettableFilter extends Object implements RecordSettable
RecordSettable
.
This API should be considered evolving; backwards compatibility is not guaranteed in future releases.
Constructor and Description |
---|
RecordSettableFilter(RecordTokenType type,
RecordSettable target)
Defines a
RecordSettable declaring the specified
type, backed by the underlying target. |
Modifier and Type | Method and Description |
---|---|
ScalarSettable |
getField(int index)
Get the field at the given index within the list of fields.
|
ScalarSettable |
getField(String fieldName)
Gets the settable for the field with the given name.
|
ScalarSettable[] |
getFields()
Gets the settables for all fields in the record
|
RecordTokenType |
getType()
Gets the type of data tokens handled by the implementor.
|
void |
set(TokenValued value)
Sets the contained value to the given token value.
|
void |
setNull()
Sets the contained value to be null valued.
|
void |
setZero()
Sets the contained value to be zero valued.
|
int |
size()
Gets the number of fields in the record schema.
|
public RecordSettableFilter(RecordTokenType type, RecordSettable target)
RecordSettable
declaring the specified
type, backed by the underlying target. Mapping between
fields is done by name, not ordering; this allows reordering
of fields of the target. Not all fields need be mapped.
Mapped fields must be of compatible types.type
- the record schema of the filter resulttarget
- the storage to which to map requestsTypesNotComparableException
- if a pair of mapped
fields are of incompatible typespublic RecordTokenType getType()
TokenTyped
getType
in interface RecordSettable
getType
in interface RecordTyped
getType
in interface TokenTyped
public int size()
RecordSettable
size
in interface RecordSettable
public ScalarSettable getField(String fieldName)
RecordSettable
getField
in interface RecordSettable
fieldName
- the field namepublic ScalarSettable getField(int index)
RecordSettable
getField
in interface RecordSettable
index
- zero-based index into the field listpublic ScalarSettable[] getFields()
RecordSettable
getFields
in interface RecordSettable
public void set(TokenValued value)
Only those fields of the underlying target which are mapped will be set; other fields will retain their values.
set
in interface TokenSettable
value
- the value to which to set the containerpublic void setNull()
Only those fields of the underlying target which are mapped will be set; other fields will retain their values.
setNull
in interface TokenSettable
public void setZero()
Only those fields of the underlying target which are mapped will be set; other fields will retain their values.
setZero
in interface TokenSettable
Copyright © 2020 Actian Corporation. All rights reserved.