Constructor and Description |
---|
DefaultTuple(java.util.List<java.lang.String> names,
java.util.List<java.lang.Object> values,
org.springframework.core.convert.support.ConfigurableConversionService configurableConversionService) |
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 '. |
org.springframework.core.convert.support.ConfigurableConversionService |
getConversionService() |
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 '. |
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 '. |
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.core.convert.support.ConfigurableConversionService configurableConversionService)
public int size()
Tuple
public java.util.List<java.lang.String> getFieldNames()
getFieldNames
in interface Tuple
public java.util.List<java.lang.Object> getValues()
public int getFieldCount()
Tuple
getFieldCount
in interface Tuple
public boolean hasFieldName(java.lang.String name)
Tuple
hasFieldName
in interface Tuple
name
- the name of the fieldpublic java.lang.Object getValue(java.lang.String name)
Tuple
public java.lang.Object getValue(int index)
Tuple
public java.util.List<java.lang.Class> getFieldTypes()
Tuple
getFieldTypes
in interface Tuple
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getString(java.lang.String name)
Tuple
String
value given the field 'name
'.public java.lang.String getString(int index)
Tuple
public Tuple getTuple(int index)
Tuple
public Tuple getTuple(java.lang.String name)
Tuple
Tuple
value given the field 'name
'.public java.lang.String getRawString(java.lang.String name)
Tuple
String
value from column with given 'name
' including trailing whitespace (don't
trim).getRawString
in interface Tuple
name
- the field name.public java.lang.String getRawString(int index)
Tuple
String
value at index 'index
' including trailing whitespace (don't trim).getRawString
in interface Tuple
index
- the field index.public char getChar(int index)
Tuple
char
' value at index 'index
'.public char getChar(java.lang.String name)
Tuple
char
' value from field with given 'name
'.public boolean getBoolean(int index)
Tuple
boolean
' value at index 'index
'.getBoolean
in interface Tuple
index
- the field index.public boolean getBoolean(java.lang.String name)
Tuple
boolean
' value from field with given 'name
'.getBoolean
in interface Tuple
name
- the field name.public boolean getBoolean(int index, java.lang.String trueValue)
Tuple
boolean
' value at index 'index
'.getBoolean
in interface Tuple
index
- the field index.trueValue
- the value that signifies true
; case-sensitive.public boolean getBoolean(java.lang.String name, java.lang.String trueValue)
Tuple
boolean
' value from column with given 'name
'.getBoolean
in interface Tuple
name
- the field name.trueValue
- the value that signifies true
; case-sensitive.public byte getByte(java.lang.String name)
Tuple
byte
' value from column with given 'name
'.public byte getByte(int index)
Tuple
byte
' value at index 'index
'.public byte getByte(java.lang.String name, byte defaultValue)
Tuple
byte
' 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)
Tuple
byte
' 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)
Tuple
short
' value from column with given 'name
'.public short getShort(int index)
Tuple
short
' value at index 'index
'.public short getShort(java.lang.String name, short defaultValue)
Tuple
short
' 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)
Tuple
short
' 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)
Tuple
int
' value from column with given 'name
'.public int getInt(int index)
Tuple
int
' value at index 'index
'.public int getInt(java.lang.String name, int defaultValue)
Tuple
int
' 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)
Tuple
int
' 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)
Tuple
int
' value from column with given 'name
'.public long getLong(int index)
Tuple
long
' value at index 'index
'.public long getLong(java.lang.String name, long defaultValue)
Tuple
long
' 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)
Tuple
long
' 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)
Tuple
float
' value from column with given 'name
'.public float getFloat(int index)
Tuple
float
' value at index 'index
'.public float getFloat(java.lang.String name, float defaultValue)
Tuple
float
' 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)
Tuple
float
' 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)
Tuple
double
' value from column with given 'name
'.public double getDouble(int index)
Tuple
double
' value at index 'index
'.public double getDouble(java.lang.String name, double defaultValue)
Tuple
double
' 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)
Tuple
double
' 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)
Tuple
BigDecimal
' value from column with given 'name
'.getBigDecimal
in interface Tuple
name
- the field name.public java.math.BigDecimal getBigDecimal(int index)
Tuple
BigDecimal
' value at index 'index
'.getBigDecimal
in interface Tuple
index
- the field index.public java.math.BigDecimal getBigDecimal(java.lang.String name, java.math.BigDecimal defaultValue)
Tuple
BigDecimal
' value from column with given 'name
'. using the supplied
defaultValue
if the field value is a zero length string or null.getBigDecimal
in interface Tuple
name
- 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)
Tuple
BigDecimal
' value at index 'index
'. using the supplied
defaultValue
if the field value is a zero length string or null.getBigDecimal
in interface Tuple
index
- the field index.defaultValue
- the default value to return if field value is not found.public java.util.Date getDate(int index)
Tuple
java.util.Date
value in default format at designated column index
.public java.util.Date getDate(java.lang.String name)
Tuple
java.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)
Tuple
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.public java.util.Date getDate(int index, java.util.Date defaultValue)
Tuple
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.public java.util.Date getDateWithPattern(int index, java.lang.String pattern)
Tuple
java.util.Date
value in default format at designated column index
.getDateWithPattern
in interface Tuple
index
- the field index.pattern
- the pattern describing the date and time formatpublic java.util.Date getDateWithPattern(java.lang.String name, java.lang.String pattern)
Tuple
java.util.Date
value in given format from column with given name
.getDateWithPattern
in interface Tuple
name
- 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)
Tuple
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.getDateWithPattern
in interface Tuple
index
- 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)
Tuple
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.getDateWithPattern
in interface Tuple
name
- 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)
Tuple
public <T> T getValue(int index, java.lang.Class<T> valueClass)
Tuple
public Tuple select(java.lang.String expression)
Tuple
protected int indexOf(java.lang.String name)
protected void setTupleToStringConverter(org.springframework.core.convert.converter.Converter<Tuple,java.lang.String> tupleToStringConverter)
tupleToStringConverter
- used to convert a Tuple
to a Stringpublic java.lang.String toString()
toString
in class java.lang.Object
public org.springframework.core.convert.support.ConfigurableConversionService getConversionService()