Record Class PaginationRenderingPlan.Top
java.lang.Object
java.lang.Record
org.hibernate.dialect.sql.ast.spi.PaginationRenderingPlan.Top
- Record Components:
addOffset- whether the bound value represents fetch plus offsetparenthesize- whether the bound value must be parenthesized
- All Implemented Interfaces:
PaginationRenderingPlan
- Enclosing interface:
PaginationRenderingPlan
public static record PaginationRenderingPlan.Top(boolean addOffset, boolean parenthesize)
extends Record
implements PaginationRenderingPlan
A top clause rendered immediately after select.
Examples are select top (10) ... and, when addOffset is true,
select top (15) ... for offset 5 and fetch 10. Since top cannot express
the offset itself, Hibernate also skips the first five JDBC result rows in
the latter case.
- Since:
- 8.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface PaginationRenderingPlan
PaginationRenderingPlan.CombinedLimit, PaginationRenderingPlan.FetchPlusOffset, PaginationRenderingPlan.First, PaginationRenderingPlan.FirstSkip, PaginationRenderingPlan.LimitOffset, PaginationRenderingPlan.None, PaginationRenderingPlan.OffsetFetch, PaginationRenderingPlan.RowsTo, PaginationRenderingPlan.SkipFirst, PaginationRenderingPlan.Top, PaginationRenderingPlan.TopStartAt, PaginationRenderingPlan.Window -
Constructor Summary
ConstructorsConstructorDescriptionTop(boolean addOffset, boolean parenthesize) Creates an instance of aToprecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theaddOffsetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theparenthesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Top
public Top(boolean addOffset, boolean parenthesize) Creates an instance of aToprecord class.- Parameters:
addOffset- the value for theaddOffsetrecord componentparenthesize- the value for theparenthesizerecord component
-
-
Method Details
-
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 with thecomparemethod from their corresponding wrapper classes. -
addOffset
-
parenthesize
public boolean parenthesize()Returns the value of theparenthesizerecord component.- Returns:
- the value of the
parenthesizerecord component
-