Interface JdbcValues
-
- All Known Implementing Classes:
AbstractJdbcValues,JdbcValuesCacheHit,JdbcValuesResultSetImpl
public interface JdbcValuesProvides unified access to query results (JDBC values - seeRowProcessingState.getJdbcValue(org.hibernate.sql.ast.spi.SqlSelection)whether they come from query cache or ResultSet. Implementations also manage any cache puts if required.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidafterLast(RowProcessingState rowProcessingState)voidbeforeFirst(RowProcessingState rowProcessingState)voidfinishRowProcessing(RowProcessingState rowProcessingState)voidfinishUp(SharedSessionContractImplementor session)Give implementations a chance to finish processingbooleanfirst(RowProcessingState rowProcessingState)ObjectgetCurrentRowValue(int valueIndex)Get the JDBC value at the given index for the row currently positioned at within this source.Object[]getCurrentRowValuesArray()Get the JDBC values for the row currently positioned at within this source.intgetPosition()JdbcValuesMappinggetValuesMapping()booleanisAfterLast(RowProcessingState rowProcessingState)booleanisBeforeFirst(RowProcessingState rowProcessingState)booleanisFirst(RowProcessingState rowProcessingState)booleanisLast(RowProcessingState rowProcessingState)booleanlast(RowProcessingState rowProcessingState)booleannext(RowProcessingState rowProcessingState)Advances the "cursor position" and returns a boolean indicating whether there is a row available to read viagetCurrentRowValue(int).booleanposition(int position, RowProcessingState rowProcessingState)Moves the "cursor position" to the specified positionbooleanprevious(RowProcessingState rowProcessingState)Advances the "cursor position" in reverse and returns a boolean indicating whether there is a row available to read viagetCurrentRowValue(int).booleanscroll(int numberOfRows, RowProcessingState rowProcessingState)Advances the "cursor position" the indicated number of rows and returns a boolean indicating whether there is a row available to read viagetCurrentRowValue(int).voidsetFetchSize(int fetchSize)
-
-
-
Method Detail
-
getValuesMapping
JdbcValuesMapping getValuesMapping()
-
next
boolean next(RowProcessingState rowProcessingState)
Advances the "cursor position" and returns a boolean indicating whether there is a row available to read viagetCurrentRowValue(int).- Returns:
trueif there are results
-
previous
boolean previous(RowProcessingState rowProcessingState)
Advances the "cursor position" in reverse and returns a boolean indicating whether there is a row available to read viagetCurrentRowValue(int).- Returns:
trueif there are results available
-
scroll
boolean scroll(int numberOfRows, RowProcessingState rowProcessingState)Advances the "cursor position" the indicated number of rows and returns a boolean indicating whether there is a row available to read viagetCurrentRowValue(int).- Parameters:
numberOfRows- The number of rows to advance. This can also be negative meaning to move in reverse- Returns:
trueif there are results available
-
position
boolean position(int position, RowProcessingState rowProcessingState)Moves the "cursor position" to the specified position
-
getPosition
int getPosition()
-
isBeforeFirst
boolean isBeforeFirst(RowProcessingState rowProcessingState)
-
beforeFirst
void beforeFirst(RowProcessingState rowProcessingState)
-
isFirst
boolean isFirst(RowProcessingState rowProcessingState)
-
first
boolean first(RowProcessingState rowProcessingState)
-
isAfterLast
boolean isAfterLast(RowProcessingState rowProcessingState)
-
afterLast
void afterLast(RowProcessingState rowProcessingState)
-
isLast
boolean isLast(RowProcessingState rowProcessingState)
-
last
boolean last(RowProcessingState rowProcessingState)
-
getCurrentRowValuesArray
Object[] getCurrentRowValuesArray()
Get the JDBC values for the row currently positioned at within this source.- Returns:
- The current row's JDBC values, or
nullif the position is beyond the end of the available results.
-
getCurrentRowValue
Object getCurrentRowValue(int valueIndex)
Get the JDBC value at the given index for the row currently positioned at within this source.- Returns:
- The current row's JDBC values, or
nullif the position is beyond the end of the available results.
-
finishRowProcessing
void finishRowProcessing(RowProcessingState rowProcessingState)
-
finishUp
void finishUp(SharedSessionContractImplementor session)
Give implementations a chance to finish processing
-
setFetchSize
void setFetchSize(int fetchSize)
-
-