| Constructor and Description |
|---|
DefaultTuple(java.util.List<java.lang.String> names,
java.util.List<java.lang.Object> values,
org.springframework.format.support.FormattingConversionService formattingConversionService) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
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 values for all the fields 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.
|
protected static org.springframework.util.IdGenerator |
getIdGenerator() |
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
|
int |
hashCode() |
protected int |
indexOf(java.lang.String name)
Find the index in the names collection for the given name.
|
Tuple |
select(java.lang.String expression)
Use SpEL expression to return a subset of the tuple that matches the expression
|
protected void |
setTupleToStringConverter(org.springframework.core.convert.converter.Converter<Tuple,java.lang.String> tupleToStringConverter) |
int |
size()
Return the number of elements in this tuple.
|
java.lang.String |
toString() |
public DefaultTuple(java.util.List<java.lang.String> names,
java.util.List<java.lang.Object> values,
org.springframework.format.support.FormattingConversionService formattingConversionService)
public int size()
Tuplepublic java.util.UUID getId()
Tuplepublic java.lang.Long getTimestamp()
TuplegetTimestamp in interface Tuplepublic java.util.List<java.lang.String> getFieldNames()
getFieldNames in interface Tuplepublic java.util.List<java.lang.Object> getValues()
public int getFieldCount()
TuplegetFieldCount in interface Tuplepublic boolean hasFieldName(java.lang.String name)
TuplehasFieldName in interface Tuplename - the name of the fieldpublic java.lang.Object getValue(java.lang.String name)
Tuplepublic java.lang.Object getValue(int index)
Tuplepublic java.util.List<java.lang.Class> getFieldTypes()
TuplegetFieldTypes in interface Tuplepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String getString(java.lang.String name)
TupleString value given the field 'name'.public java.lang.String getString(int index)
Tuplepublic Tuple getTuple(int index)
Tuplepublic Tuple getTuple(java.lang.String name)
TupleTuple value given the field 'name'.public java.lang.String getRawString(java.lang.String name)
TupleString value from column with given 'name' including trailing whitespace (don't
trim).getRawString in interface Tuplename - the field name.public java.lang.String getRawString(int index)
TupleString value at index 'index' including trailing whitespace (don't trim).getRawString in interface Tupleindex - the field index.public char getChar(int index)
Tuplechar' value at index 'index'.public char getChar(java.lang.String name)
Tuplechar' value from field with given 'name'.public boolean getBoolean(int index)
Tupleboolean' value at index 'index'.getBoolean in interface Tupleindex - the field index.public boolean getBoolean(java.lang.String name)
Tupleboolean' value from field with given 'name'.getBoolean in interface Tuplename - the field name.public boolean getBoolean(int index,
java.lang.String trueValue)
Tupleboolean' value at index 'index'.getBoolean in interface Tupleindex - the field index.trueValue - the value that signifies true; case-sensitive.public boolean getBoolean(java.lang.String name,
java.lang.String trueValue)
Tupleboolean' value from column with given 'name'.getBoolean in interface Tuplename - the field name.trueValue - the value that signifies true; case-sensitive.public byte getByte(java.lang.String name)
Tuplebyte' value from column with given 'name'.public byte getByte(int index)
Tuplebyte' value at index 'index'.public byte getByte(java.lang.String name,
byte defaultValue)
Tuplebyte' value from column with given 'name'. using the supplied
defaultValue if the field value is a zero length string or null.public byte getByte(int index,
byte defaultValue)
Tuplebyte' value at index 'index'. using the supplied defaultValue if
the field value is a zero length string or null.public short getShort(java.lang.String name)
Tupleshort' value from column with given 'name'.public short getShort(int index)
Tupleshort' value at index 'index'.public short getShort(java.lang.String name,
short defaultValue)
Tupleshort' value from column with given 'name'. using the supplied
defaultValue if the field value is a zero length string or null.public short getShort(int index,
short defaultValue)
Tupleshort' value at index 'index'. using the supplied defaultValue
if the field value is a zero length string or null.public int getInt(java.lang.String name)
Tupleint' value from column with given 'name'.public int getInt(int index)
Tupleint' value at index 'index'.public int getInt(java.lang.String name,
int defaultValue)
Tupleint' value from column with given 'name'. using the supplied
defaultValue if the field value is a zero length string or null.public int getInt(int index,
int defaultValue)
Tupleint' value at index 'index'. using the supplied defaultValue if
the field value is a zero length string or null.public long getLong(java.lang.String name)
Tupleint' value from column with given 'name'.public long getLong(int index)
Tuplelong' value at index 'index'.public long getLong(java.lang.String name,
long defaultValue)
Tuplelong' value from column with given 'name'. using the supplied
defaultValue if the field value is a zero length string or null.public long getLong(int index,
long defaultValue)
Tuplelong' value at index 'index'. using the supplied defaultValue if
the field value is a zero length string or null.public float getFloat(java.lang.String name)
Tuplefloat' value from column with given 'name'.public float getFloat(int index)
Tuplefloat' value at index 'index'.public float getFloat(java.lang.String name,
float defaultValue)
Tuplefloat' value from column with given 'name'. using the supplied
defaultValue if the field value is a zero length string or null.public float getFloat(int index,
float defaultValue)
Tuplefloat' value at index 'index'. using the supplied defaultValue
if the field value is a zero length string or null.public double getDouble(java.lang.String name)
Tupledouble' value from column with given 'name'.public double getDouble(int index)
Tupledouble' value at index 'index'.public double getDouble(java.lang.String name,
double defaultValue)
Tupledouble' value from column with given 'name'. using the supplied
defaultValue if the field value is a zero length string or null.public double getDouble(int index,
double defaultValue)
Tupledouble' value at index 'index'. using the supplied defaultValue
if the field value is a zero length string or null.public java.math.BigDecimal getBigDecimal(java.lang.String name)
TupleBigDecimal' value from column with given 'name'.getBigDecimal in interface Tuplename - the field name.public java.math.BigDecimal getBigDecimal(int index)
TupleBigDecimal' value at index 'index'.getBigDecimal in interface Tupleindex - the field index.public java.math.BigDecimal getBigDecimal(java.lang.String name,
java.math.BigDecimal defaultValue)
TupleBigDecimal' value from column with given 'name'. using the supplied
defaultValue if the field value is a zero length string or null.getBigDecimal in interface Tuplename - the field name.defaultValue - the default value to return if field value is not found.public java.math.BigDecimal getBigDecimal(int index,
java.math.BigDecimal defaultValue)
TupleBigDecimal' value at index 'index'. using the supplied
defaultValue if the field value is a zero length string or null.getBigDecimal in interface Tupleindex - the field index.defaultValue - the default value to return if field value is not found.public java.util.Date getDate(int index)
Tuplejava.util.Date value in default format at designated column index.public java.util.Date getDate(java.lang.String name)
Tuplejava.util.Date value in default format at designated column with given name.public java.util.Date getDate(java.lang.String name,
java.util.Date defaultValue)
Tuplejava.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.public java.util.Date getDate(int index,
java.util.Date defaultValue)
Tuplejava.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.public java.util.Date getDateWithPattern(int index,
java.lang.String pattern)
Tuplejava.util.Date value in default format at designated column index.getDateWithPattern in interface Tupleindex - the field index.pattern - the pattern describing the date and time formatpublic java.util.Date getDateWithPattern(java.lang.String name,
java.lang.String pattern)
Tuplejava.util.Date value in given format from column with given name.getDateWithPattern in interface Tuplename - the field name.pattern - the pattern describing the date and time formatpublic java.util.Date getDateWithPattern(int index,
java.lang.String pattern,
java.util.Date defaultValue)
Tuplejava.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.getDateWithPattern in interface Tupleindex - the field index.pattern - the pattern describing the date and time formatdefaultValue - the default value to return if field value is not found.public java.util.Date getDateWithPattern(java.lang.String name,
java.lang.String pattern,
java.util.Date defaultValue)
Tuplejava.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.getDateWithPattern in interface Tuplename - the field name.pattern - the pattern describing the date and time formatdefaultValue - the default value to return if field value is not found.public <T> T getValue(java.lang.String name,
java.lang.Class<T> valueClass)
Tuplepublic <T> T getValue(int index,
java.lang.Class<T> valueClass)
Tuplepublic Tuple select(java.lang.String expression)
Tupleprotected int indexOf(java.lang.String name)
protected void setTupleToStringConverter(org.springframework.core.convert.converter.Converter<Tuple,java.lang.String> tupleToStringConverter)
tupleToStringConverter - protected static org.springframework.util.IdGenerator getIdGenerator()
public java.lang.String toString()
toString in class java.lang.Object