java.lang.Object
com.pervasive.datarush.operators.group.ReadableStorage
Storage class by which a custom aggregator can load its internals. An aggregator's
internals correspond element-by-element with the
internalTypes
that the aggregator declared.
Needed only for writing custom Aggregator; consumers of the API
should not need to use this class.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBinaryRef(int offset) Returns the value of the internal element at the given offset.booleangetBoolean(int offset) Returns the value of the internal element at the given offset.chargetChar(int offset) Returns the value of the internal element at the given offset.longgetDateEpochDays(int offset) Returns the value of the internal element at the given offset.doublegetDouble(int offset) Returns the value of the internal element at the given offset.floatgetFloat(int offset) Returns the value of the internal element at the given offset.intgetInt(int offset) Returns the value of the internal element at the given offset.longgetLong(int offset) Returns the value of the internal element at the given offset.longgetMoney(int offset) Returns the value of the internal element at the given offset.getNumeric(int offset) Returns the value of the internal element at the given offset.getObject(int offset) Returns the value of the internal element at the given offset.getScalarValued(int offset) Returns the value of the internal element at the given offset.getString(int offset) Returns the value of the internal element at the given offset.intgetTimeDayMillis(int offset) Returns the value of the internal element at the given offset.
-
Constructor Details
-
ReadableStorage
Create a new readable storage.- Parameters:
internals- the array of internals.
-
-
Method Details
-
getDouble
public double getDouble(int offset) Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeDoubleValued
-
getNumeric
Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeNumericValued
-
getMoney
public long getMoney(int offset) Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeMoneyValued
-
getLong
public long getLong(int offset) Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeLongValued
-
getObject
Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeObjectValued
-
getScalarValued
Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.
-
getBinaryRef
public byte[] getBinaryRef(int offset) Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeBinaryValued
-
getBoolean
public boolean getBoolean(int offset) Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeBooleanValued.
-
getChar
public char getChar(int offset) Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeCharValued.
-
getDateEpochDays
public long getDateEpochDays(int offset) Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeDateValued.
-
getInt
public int getInt(int offset) Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeIntValued.
-
getString
Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeStringValued.
-
getFloat
public float getFloat(int offset) Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeFloatValued.
-
getTimeDayMillis
public int getTimeDayMillis(int offset) Returns the value of the internal element at the given offset.- Parameters:
offset- the offset of the internal element.- Returns:
- the value of the internal element at the given offset.
- Throws:
ArrayIndexOutOfBoundsException- if the given offset is larger than the number ofinternalTypes.ClassCastException- if theinternalTypeat the given offset is not of typeTimeValued.
-