public final class WriteableStorage extends Object
internalTypes
that the aggregator declared.
Needed only for writing custom Aggregator
; consumers of the API
should not need to use this class.Constructor and Description |
---|
WriteableStorage(ScalarSettable[] internals)
Create a new writeable storage.
|
Modifier and Type | Method and Description |
---|---|
ScalarSettable |
getScalarSettable(int offset)
Gets a mutable handle to the internal element at the given offset.
|
void |
setBinaryRef(int offset,
byte[] value)
Sets the value of the internal element at the given offset.
|
void |
setBoolean(int offset,
boolean value)
Sets the value of the internal element at the given offset.
|
void |
setChar(int offset,
char value)
Sets the value of the internal element at the given offset.
|
void |
setDateEpochDays(int offset,
long value)
Sets the value of the internal element at the given offset.
|
void |
setDouble(int offset,
double value)
Sets the value of the internal element at the given offset.
|
void |
setFloat(int offset,
float value)
Sets the value of the internal element at the given offset.
|
void |
setInt(int offset,
int value)
Sets the value of the internal element at the given offset.
|
void |
setLong(int offset,
long value)
Sets the value of the internal element at the given offset.
|
void |
setMoney(int offset,
long value)
Sets the value of the internal element at the given offset.
|
void |
setNumeric(int offset,
BigDecimal value)
Sets the value of the internal element at the given offset.
|
void |
setObject(int offset,
Object value)
Sets the value of the internal element at the given offset.
|
void |
setString(int offset,
String value)
Sets the value of the internal element at the given offset.
|
void |
setTimeDayMillis(int offset,
int value)
Sets the value of the internal element at the given offset.
|
void |
setTimestamp(int offset,
long seconds,
int nanos,
int offsetSeconds)
Sets the value of the internal element at the given offset.
|
public WriteableStorage(ScalarSettable[] internals)
internals
- the array of internals.public void setObject(int offset, Object value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type ObjectSettable
public void setDouble(int offset, double value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type DoubleSettable
public void setNumeric(int offset, BigDecimal value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type NumericSettable
public void setMoney(int offset, long value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type LongSettable
public void setLong(int offset, long value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type LongSettable
public ScalarSettable getScalarSettable(int offset)
offset
- the offset of the internal element.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.public void setBinaryRef(int offset, byte[] value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type BinarySettable
public void setBoolean(int offset, boolean value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type BooleanSettable
public void setChar(int offset, char value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type CharSettable
public void setDateEpochDays(int offset, long value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type DateSettable
public void setInt(int offset, int value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type IntSettable
public void setString(int offset, String value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type StringSettable
public void setTimeDayMillis(int offset, int value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type TimeSettable
public void setTimestamp(int offset, long seconds, int nanos, int offsetSeconds)
offset
- the offset of the internal element.seconds
- number of seconds since Java epochnanos
- fractional portion of epoch time in nanosecondsoffsetSeconds
- time zone and daylight saving time offset, in secondsArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type TimestampSettable
public void setFloat(int offset, float value)
offset
- the offset of the internal element.value
- the new value of the internal element at the given offset.ArrayIndexOutOfBoundsException
- if the given offset is larger than the number of internalTypes
.ClassCastException
- if the internalType
at the given offset is not of type FloatSettable
Copyright © 2024 Actian Corporation. All rights reserved.