public final class ColumnIndexResultSetReader extends java.lang.Object implements ResultReader<java.sql.ResultSet,java.lang.Integer>
Constructor and Description |
---|
ColumnIndexResultSetReader() |
Modifier and Type | Method and Description |
---|---|
<T> T |
getRequiredValue(java.sql.ResultSet resultSet,
java.lang.Integer index,
java.lang.Class<T> type)
Get a value from the given result set for the given name and type.
|
boolean |
next(java.sql.ResultSet resultSet)
Move the index to the next result if possible.
|
java.math.BigDecimal |
readBigDecimal(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a BigDecimal value for the given name.
|
boolean |
readBoolean(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a boolean value for the given name.
|
byte |
readByte(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a byte value for the given name.
|
byte[] |
readBytes(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a byte[] value for the given name.
|
char |
readChar(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a char value for the given name.
|
java.util.Date |
readDate(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a date value for the given name.
|
double |
readDouble(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a double value for the given name.
|
java.lang.Object |
readDynamic(java.sql.ResultSet resultSet,
java.lang.Integer index,
DataType dataType)
Read a value dynamically using the result set and the given name and data type.
|
float |
readFloat(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a float value for the given name.
|
int |
readInt(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a int value for the given name.
|
long |
readLong(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a long value for the given name.
|
short |
readShort(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a short value for the given name.
|
java.lang.String |
readString(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a string value for the given name.
|
java.sql.Timestamp |
readTimestamp(java.sql.ResultSet resultSet,
java.lang.Integer index)
Read a timestamp value for the given index.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertRequired, readNextDynamic
@Nullable public java.lang.Object readDynamic(@NonNull java.sql.ResultSet resultSet, @NonNull java.lang.Integer index, @NonNull DataType dataType)
ResultReader
readDynamic
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The namedataType
- The data typepublic java.sql.Timestamp readTimestamp(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readTimestamp
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The index (such as the column name)public long readLong(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readLong
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public char readChar(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readChar
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public java.util.Date readDate(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readDate
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)@Nullable public java.lang.String readString(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readString
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public int readInt(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readInt
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public boolean readBoolean(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readBoolean
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public float readFloat(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readFloat
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public byte readByte(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readByte
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public short readShort(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readShort
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public double readDouble(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readDouble
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public java.math.BigDecimal readBigDecimal(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readBigDecimal
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public byte[] readBytes(java.sql.ResultSet resultSet, java.lang.Integer index)
ResultReader
readBytes
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result setindex
- The name (such as the column name)public <T> T getRequiredValue(java.sql.ResultSet resultSet, java.lang.Integer index, java.lang.Class<T> type) throws DataAccessException
ResultReader
getRequiredValue
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
T
- The generic typeresultSet
- The result setindex
- The nametype
- The typeDataAccessException
- if the value cannot be readpublic boolean next(java.sql.ResultSet resultSet)
ResultReader
next
in interface ResultReader<java.sql.ResultSet,java.lang.Integer>
resultSet
- The result set