public class MutableComposite extends Object implements RecordSettable
MutableComposite
can be viewed as the loosest possible implementation of
RecordSettable.RecordRegister| Constructor and Description |
|---|
MutableComposite(RecordTokenType type,
ScalarSettable[] fields)
Construct a composite with the described schema using
the supplied
ScalarSettable objects. |
MutableComposite(T... fields)
Construct a composite with the described schema using
the supplied
Named and ScalarSettable objects. |
| 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 MutableComposite(T... fields)
Named and ScalarSettable objects.
The record type will be inferred from the provided fields.fields - the named ScalarSettable objects to contain field valuespublic MutableComposite(RecordTokenType type, ScalarSettable[] fields)
ScalarSettable objects. The field types
in the schema will be cross-validated against the given objects.type - the record schema to use for the resulting compositefields - the ScalarSettable objects to contain field valuesDRException - if the provided field types disagree
with the types of the field objectspublic RecordTokenType getType()
TokenTypedgetType in interface RecordSettablegetType in interface RecordTypedgetType in interface TokenTypedpublic int size()
RecordSettablesize in interface RecordSettablepublic ScalarSettable getField(String fieldName)
RecordSettablegetField in interface RecordSettablefieldName - the field namepublic ScalarSettable getField(int index)
RecordSettablegetField in interface RecordSettableindex - zero-based index into the field listpublic ScalarSettable[] getFields()
RecordSettablegetFields in interface RecordSettablepublic void set(TokenValued value)
TokenSettableset in interface TokenSettablevalue - the value to which to set the containerpublic void setNull()
TokenSettablesetNull in interface TokenSettablepublic void setZero()
TokenSettablesetZero in interface TokenSettableCopyright © 2020 Actian Corporation. All rights reserved.