public interface Tuple
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
getBigDecimal(int index)
Read the '
BigDecimal ' value at index 'index '. |
java.math.BigDecimal |
getBigDecimal(int index,
java.math.BigDecimal defaultValue)
Read the '
BigDecimal ' value at index 'index '. |
java.math.BigDecimal |
getBigDecimal(java.lang.String name)
Read the '
BigDecimal ' value from column with given 'name '. |
java.math.BigDecimal |
getBigDecimal(java.lang.String name,
java.math.BigDecimal defaultValue)
Read the '
BigDecimal ' value from column with given 'name '. |
boolean |
getBoolean(int index)
Read the '
boolean ' value at index 'index '. |
boolean |
getBoolean(int index,
java.lang.String trueValue)
Read the '
boolean ' value at index 'index '. |
boolean |
getBoolean(java.lang.String name)
Read the '
boolean ' value from field with given 'name '. |
boolean |
getBoolean(java.lang.String name,
java.lang.String trueValue)
Read the '
boolean ' value from column with given 'name '. |
byte |
getByte(int index)
Read the '
byte ' value at index 'index '. |
byte |
getByte(int index,
byte defaultValue)
Read the '
byte ' value at index 'index '. |
byte |
getByte(java.lang.String name)
Read the '
byte ' value from column with given 'name '. |
byte |
getByte(java.lang.String name,
byte defaultValue)
Read the '
byte ' value from column with given 'name '. |
char |
getChar(int index)
Read the '
char ' value at index 'index '. |
char |
getChar(java.lang.String name)
Read the '
char ' value from field with given 'name '. |
java.util.Date |
getDate(int index)
Read the
java.util.Date value in default format at designated column index . |
java.util.Date |
getDate(int index,
java.util.Date defaultValue)
Read the
java.util.Date value in default format at designated column index using the
supplied defaultValue if the field value is a zero length string or null. |
java.util.Date |
getDate(java.lang.String name)
Read the
java.util.Date value in default format at designated column with given name . |
java.util.Date |
getDate(java.lang.String name,
java.util.Date defaultValue)
Read the
java.util.Date value in default format at designated column with given name . |
java.util.Date |
getDateWithPattern(int index,
java.lang.String pattern)
Read the
java.util.Date value in default format at designated column index . |
java.util.Date |
getDateWithPattern(int index,
java.lang.String pattern,
java.util.Date defaultValue)
Read the
java.util.Date value in default format at designated column index . |
java.util.Date |
getDateWithPattern(java.lang.String name,
java.lang.String pattern)
Read the
java.util.Date value in given format from column with given name . |
java.util.Date |
getDateWithPattern(java.lang.String name,
java.lang.String pattern,
java.util.Date defaultValue)
Read the
java.util.Date value in given format from column with given name . |
double |
getDouble(int index)
Read the '
double ' value at index 'index '. |
double |
getDouble(int index,
double defaultValue)
Read the '
double ' value at index 'index '. |
double |
getDouble(java.lang.String name)
Read the '
double ' value from column with given 'name '. |
double |
getDouble(java.lang.String name,
double defaultValue)
Read the '
double ' value from column with given 'name '. |
int |
getFieldCount()
Return the number of fields in this tuple.
|
java.util.List<java.lang.String> |
getFieldNames()
Return the fields names that can reference elements by name in this tuple
|
java.util.List<java.lang.Class> |
getFieldTypes()
Return the Java types of the fields in this tuple.
|
float |
getFloat(int index)
Read the '
float ' value at index 'index '. |
float |
getFloat(int index,
float defaultValue)
Read the '
float ' value at index 'index '. |
float |
getFloat(java.lang.String name)
Read the '
float ' value from column with given 'name '. |
float |
getFloat(java.lang.String name,
float defaultValue)
Read the '
float ' value from column with given 'name '. |
java.util.UUID |
getId()
Get the unique Id of this tuple, not included in comparisons for equality.
|
int |
getInt(int index)
Read the '
int ' value at index 'index '. |
int |
getInt(int index,
int defaultValue)
Read the '
int ' value at index 'index '. |
int |
getInt(java.lang.String name)
Read the '
int ' value from column with given 'name '. |
int |
getInt(java.lang.String name,
int defaultValue)
Read the '
int ' value from column with given 'name '. |
long |
getLong(int index)
Read the '
long ' value at index 'index '. |
long |
getLong(int index,
long defaultValue)
Read the '
long ' value at index 'index '. |
long |
getLong(java.lang.String name)
Read the '
int ' value from column with given 'name '. |
long |
getLong(java.lang.String name,
long defaultValue)
Read the '
long ' value from column with given 'name '. |
java.lang.String |
getRawString(int index)
Read the
String value at index 'index ' including trailing whitespace (don't trim). |
java.lang.String |
getRawString(java.lang.String name)
Read the
String value from column with given 'name ' including trailing whitespace (don't
trim). |
short |
getShort(int index)
Read the '
short ' value at index 'index '. |
short |
getShort(int index,
short defaultValue)
Read the '
short ' value at index 'index '. |
short |
getShort(java.lang.String name)
Read the '
short ' value from column with given 'name '. |
short |
getShort(java.lang.String name,
short defaultValue)
Read the '
short ' value from column with given 'name '. |
java.lang.String |
getString(int index)
Read the String value given the index position
|
java.lang.String |
getString(java.lang.String name)
Read the
String value given the field 'name '. |
java.lang.Long |
getTimestamp()
Get the creation timestamp of this tuple, not included in comparisons for equality
|
Tuple |
getTuple(int index)
Read the Tuple value given the index position
|
Tuple |
getTuple(java.lang.String name)
Read the
Tuple value given the field 'name '. |
java.lang.Object |
getValue(int index)
Return the value of the field given the index position
|
<T> T |
getValue(int index,
java.lang.Class<T> valueClass)
Return the value of the field given the index position
|
java.lang.Object |
getValue(java.lang.String name)
Return the value of the field given the name
|
<T> T |
getValue(java.lang.String name,
java.lang.Class<T> valueClass)
Return the value of the field given the name
|
java.util.List<java.lang.Object> |
getValues()
Return the values for all the fields in this tuple
|
boolean |
hasFieldName(java.lang.String name)
Return true if the tuple contains a field of the given name
|
Tuple |
select(java.lang.String expression)
Use SpEL expression to return a subset of the tuple that matches the expression
|
int |
size()
Return the number of elements in this tuple.
|
int size()
java.util.List<java.lang.String> getFieldNames()
java.util.List<java.lang.Object> getValues()
boolean hasFieldName(java.lang.String name)
name
- the name of the fieldjava.util.List<java.lang.Class> getFieldTypes()
int getFieldCount()
java.lang.Object getValue(java.lang.String name)
name
- the name of the fieldjava.lang.IllegalArgumentException
- if the name is not presentjava.lang.Object getValue(int index)
index
- position in the tuplejava.lang.IndexOutOfBoundsException
- if the index position is out of bounds.<T> T getValue(java.lang.String name, java.lang.Class<T> valueClass)
name
- the field namevalueClass
- Class to coerce the value into.<T> T getValue(int index, java.lang.Class<T> valueClass)
index
- position in the tuplevalueClass
- Class to coerce the value intojava.lang.String getString(java.lang.String name)
String
value given the field 'name
'.name
- the field name.java.lang.String getString(int index)
index
- position in the tupleTuple getTuple(java.lang.String name)
Tuple
value given the field 'name
'.name
- the field name.Tuple getTuple(int index)
index
- position in the tuplejava.lang.String getRawString(int index)
String
value at index 'index
' including trailing whitespace (don't trim).index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.java.lang.String getRawString(java.lang.String name)
String
value from column with given 'name
' including trailing whitespace (don't
trim).name
- the field name.char getChar(int index)
char
' value at index 'index
'.index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.char getChar(java.lang.String name)
char
' value from field with given 'name
'.name
- the field name.java.lang.IllegalArgumentException
- if a field with given name is not defined.boolean getBoolean(int index)
boolean
' value at index 'index
'.index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.boolean getBoolean(java.lang.String name)
boolean
' value from field with given 'name
'.name
- the field name.java.lang.IllegalArgumentException
- if a field with given name is not defined.boolean getBoolean(int index, java.lang.String trueValue)
boolean
' value at index 'index
'.index
- the field index.trueValue
- the value that signifies true
; case-sensitive.java.lang.IndexOutOfBoundsException
- if the index is out of bounds, or if the supplied trueValue
is
null
.boolean getBoolean(java.lang.String name, java.lang.String trueValue)
boolean
' value from column with given 'name
'.name
- the field name.trueValue
- the value that signifies true
; case-sensitive.java.lang.IllegalArgumentException
- if a column with given name is not defined, or if the supplied
trueValue
is null
.byte getByte(int index)
byte
' value at index 'index
'.index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.byte getByte(java.lang.String name)
byte
' value from column with given 'name
'.name
- the field name.byte getByte(int index, byte defaultValue)
byte
' value at index 'index
'. using the supplied defaultValue
if
the field value is a zero length string or null.index
- the field index.defaultValue
- the default value to return if field value is not found.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.byte getByte(java.lang.String name, byte defaultValue)
byte
' value from column with given 'name
'. using the supplied
defaultValue
if the field value is a zero length string or null.name
- the field name.defaultValue
- the default value to return if field value is not found.short getShort(int index)
short
' value at index 'index
'.index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.short getShort(java.lang.String name)
short
' value from column with given 'name
'.name
- the field name.short getShort(int index, short defaultValue)
short
' value at index 'index
'. using the supplied defaultValue
if the field value is a zero length string or null.index
- the field index.defaultValue
- the default value to return if field value is not found.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.short getShort(java.lang.String name, short defaultValue)
short
' value from column with given 'name
'. using the supplied
defaultValue
if the field value is a zero length string or null.name
- the field name.defaultValue
- the default value to return if field value is not found.int getInt(int index)
int
' value at index 'index
'.index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.int getInt(java.lang.String name)
int
' value from column with given 'name
'.name
- the field name.int getInt(int index, int defaultValue)
int
' value at index 'index
'. using the supplied defaultValue
if
the field value is a zero length string or null.index
- the field index.defaultValue
- the default value to return if field value is not found.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.int getInt(java.lang.String name, int defaultValue)
int
' value from column with given 'name
'. using the supplied
defaultValue
if the field value is a zero length string or null.name
- the field name.defaultValue
- the default value to return if field value is not found.long getLong(int index)
long
' value at index 'index
'.index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.long getLong(java.lang.String name)
int
' value from column with given 'name
'.name
- the field name.long getLong(int index, long defaultValue)
long
' value at index 'index
'. using the supplied defaultValue
if
the field value is a zero length string or null.index
- the field index.defaultValue
- the default value to return if field value is not found.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.long getLong(java.lang.String name, long defaultValue)
long
' value from column with given 'name
'. using the supplied
defaultValue
if the field value is a zero length string or null.name
- the field name.defaultValue
- the default value to return if field value is not found.float getFloat(int index)
float
' value at index 'index
'.index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.float getFloat(java.lang.String name)
float
' value from column with given 'name
'.name
- the field name.float getFloat(int index, float defaultValue)
float
' value at index 'index
'. using the supplied defaultValue
if the field value is a zero length string or null.index
- the field index.defaultValue
- the default value to return if field value is not found.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.float getFloat(java.lang.String name, float defaultValue)
float
' value from column with given 'name
'. using the supplied
defaultValue
if the field value is a zero length string or null.name
- the field name.defaultValue
- the default value to return if field value is not found.double getDouble(int index)
double
' value at index 'index
'.index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.double getDouble(java.lang.String name)
double
' value from column with given 'name
'.name
- the field name.double getDouble(int index, double defaultValue)
double
' value at index 'index
'. using the supplied defaultValue
if the field value is a zero length string or null.index
- the field index.defaultValue
- the default value to return if field value is not found.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.double getDouble(java.lang.String name, double defaultValue)
double
' value from column with given 'name
'. using the supplied
defaultValue
if the field value is a zero length string or null.name
- the field name.defaultValue
- the default value to return if field value is not found.java.math.BigDecimal getBigDecimal(int index)
BigDecimal
' value at index 'index
'.index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.java.math.BigDecimal getBigDecimal(java.lang.String name)
BigDecimal
' value from column with given 'name
'.name
- the field name.java.math.BigDecimal getBigDecimal(int index, java.math.BigDecimal defaultValue)
BigDecimal
' value at index 'index
'. using the supplied
defaultValue
if the field value is a zero length string or null.index
- the field index.defaultValue
- the default value to return if field value is not found.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.java.math.BigDecimal getBigDecimal(java.lang.String name, java.math.BigDecimal defaultValue)
BigDecimal
' value from column with given 'name
'. using the supplied
defaultValue
if the field value is a zero length string or null.name
- the field name.defaultValue
- the default value to return if field value is not found.java.util.Date getDate(int index)
java.util.Date
value in default format at designated column index
.index
- the field index.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.org.springframework.core.convert.ConversionFailedException
- if the value is not parseablejava.util.Date getDate(java.lang.String name)
java.util.Date
value in default format at designated column with given name
.name
- the field name.java.lang.IllegalArgumentException
- if a column with given name is not definedorg.springframework.core.convert.ConversionFailedException
- if the value is not parseablejava.util.Date getDate(int index, java.util.Date defaultValue)
java.util.Date
value in default format at designated column index
using the
supplied defaultValue
if the field value is a zero length string or null.index
- the field index.defaultValue
- the default value to return if field value is not found.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.org.springframework.core.convert.ConversionFailedException
- if the value is not parseablejava.util.Date getDate(java.lang.String name, java.util.Date defaultValue)
java.util.Date
value in default format at designated column with given name
.
using the supplied defaultValue
if the field value is a zero length string or null.name
- the field name.defaultValue
- the default value to return if field value is not found.java.lang.IllegalArgumentException
- if a column with given name is not definedorg.springframework.core.convert.ConversionFailedException
- if the value is not parseablejava.util.Date getDateWithPattern(int index, java.lang.String pattern)
java.util.Date
value in default format at designated column index
.index
- the field index.pattern
- the pattern describing the date and time formatjava.lang.IndexOutOfBoundsException
- if the index is out of bounds.java.lang.IllegalArgumentException
- if the date cannot be parsed.java.util.Date getDateWithPattern(java.lang.String name, java.lang.String pattern)
java.util.Date
value in given format from column with given name
.name
- the field name.pattern
- the pattern describing the date and time formatjava.lang.IllegalArgumentException
- if a column with given name is not defined or if the specified field cannot be
parsedjava.util.Date getDateWithPattern(int index, java.lang.String pattern, java.util.Date defaultValue)
java.util.Date
value in default format at designated column index
. using the
supplied defaultValue
if the field value is a zero length string or null.index
- the field index.pattern
- the pattern describing the date and time formatdefaultValue
- the default value to return if field value is not found.java.lang.IndexOutOfBoundsException
- if the index is out of bounds.java.lang.IllegalArgumentException
- if the date cannot be parsed.java.util.Date getDateWithPattern(java.lang.String name, java.lang.String pattern, java.util.Date defaultValue)
java.util.Date
value in given format from column with given name
. using the
supplied defaultValue
if the field value is a zero length string or null.name
- the field name.pattern
- the pattern describing the date and time formatdefaultValue
- the default value to return if field value is not found.java.lang.IllegalArgumentException
- if a column with given name is not defined or if the specified field cannot be
parsedTuple select(java.lang.String expression)
expression
- SpEL expression to select from a Map, e.g. ?[key.startsWith('b')]java.util.UUID getId()
java.lang.Long getTimestamp()