RS
- The result set type.public static interface ResultConsumer.Context<RS>
Modifier and Type | Method and Description |
---|---|
ResultReader<RS,java.lang.String> |
getResultReader() |
RS |
getResultSet() |
default java.math.BigDecimal |
readBigDecimal(java.lang.String name)
Read a BigDecimal value for the given name.
|
default boolean |
readBoolean(java.lang.String name)
Read a boolean value for the given name.
|
default byte |
readByte(java.lang.String name)
Read a byte value for the given name.
|
default byte[] |
readBytes(java.lang.String name)
Read a byte[] value for the given name.
|
default char |
readChar(java.lang.String name)
Read a char value for the given name.
|
default java.util.Date |
readDate(java.lang.String name)
Read a date value for the given name.
|
default double |
readDouble(java.lang.String name)
Read a double value for the given name.
|
<E,D> D |
readDTO(java.lang.String prefix,
java.lang.Class<E> rootEntity,
java.lang.Class<D> dtoType)
Read an entity using the given prefix to be passes to result set lookups.
|
<E> E |
readEntity(java.lang.String prefix,
java.lang.Class<E> type)
Read an entity using the given prefix to be passes to result set lookups.
|
default float |
readFloat(java.lang.String name)
Read a float value for the given name.
|
default int |
readInt(java.lang.String name)
Read a int value for the given name.
|
default long |
readLong(java.lang.String name)
Read a long value for the given name.
|
default short |
readShort(java.lang.String name)
Read a short value for the given name.
|
default java.lang.String |
readString(java.lang.String name)
Read a string value for the given name.
|
default java.util.Date |
readTimestamp(java.lang.String name)
Read a timestamp value for the given index.
|
RS getResultSet()
ResultReader<RS,java.lang.String> getResultReader()
@NonNull <E> E readEntity(@NonNull java.lang.String prefix, @NonNull java.lang.Class<E> type) throws DataAccessException
E
- The entity generic typeprefix
- The prefixtype
- The entity typeDataAccessException
- if it is not possible read the result from the result set.@NonNull <E,D> D readDTO(@NonNull java.lang.String prefix, @NonNull java.lang.Class<E> rootEntity, @NonNull java.lang.Class<D> dtoType) throws DataAccessException
E
- The entity generic typeD
- The DTO generic typeprefix
- The prefixrootEntity
- The entity typedtoType
- The DTO type. Must be annotated with Introspected
DataAccessException
- if it is not possible read the result from the result set.default long readLong(@NonNull java.lang.String name)
name
- The name (such as the column name)default char readChar(@NonNull java.lang.String name)
name
- The name (such as the column name)@Nullable default java.util.Date readDate(@NonNull java.lang.String name)
name
- The name (such as the column name)@Nullable default java.util.Date readTimestamp(@NonNull java.lang.String name)
name
- The name (such as the column name)@Nullable default java.lang.String readString(@NonNull java.lang.String name)
name
- The name (such as the column name)default int readInt(@NonNull java.lang.String name)
name
- The name (such as the column name)default boolean readBoolean(@NonNull java.lang.String name)
name
- The name (such as the column name)default float readFloat(@NonNull java.lang.String name)
name
- The name (such as the column name)default byte readByte(@NonNull java.lang.String name)
name
- The name (such as the column name)default short readShort(@NonNull java.lang.String name)
name
- The name (such as the column name)default double readDouble(@NonNull java.lang.String name)
name
- The name (such as the column name)@Nullable default java.math.BigDecimal readBigDecimal(@NonNull java.lang.String name)
name
- The name (such as the column name)default byte[] readBytes(@NonNull java.lang.String name)
name
- The name (such as the column name)