Record Class PaginationResult
java.lang.Object
java.lang.Record
org.hibernate.dialect.pagination.spi.PaginationResult
- Record Components:
sql- completed, possibly rewritten SQLjdbcInstructions- JDBC binding, maximum-row, and row-skipping work
@SPI
public record PaginationResult(String sql, PaginationJdbcInstructions jdbcInstructions)
extends Record
Immutable result returned by LimitHandler.processSql(PaginationRequest), pairing completed SQL
with all JDBC and result-set work required by its pagination.
The SQL and instructions form one protocol result and must remain consistent. In particular, values represented by SQL parameters must appear in the appropriate instruction list.
- Since:
- 8.0
-
Constructor Summary
ConstructorsConstructorDescriptionPaginationResult(String sql, PaginationJdbcInstructions jdbcInstructions) Creates an instance of aPaginationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thejdbcInstructionsrecord component.sql()Returns the value of thesqlrecord component.final StringtoString()Returns a string representation of this record class.static PaginationResultReturn the given SQL with no pagination-specific JDBC work.
-
Constructor Details
-
PaginationResult
Creates an instance of aPaginationResultrecord class.- Parameters:
sql- the value for thesqlrecord componentjdbcInstructions- the value for thejdbcInstructionsrecord component
-
-
Method Details
-
unchanged
Return the given SQL with no pagination-specific JDBC work. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
sql
-
jdbcInstructions
Returns the value of thejdbcInstructionsrecord component.- Returns:
- the value of the
jdbcInstructionsrecord component
-