Top Description Constructors Methods
org.hibernate.dialect.pagination

public Class LimitHelper

extends Object
Class Inheritance
Imports
org.hibernate.engine.spi.RowSelection

A helper for dealing with LimitHandler implementations
Author
Lukasz Antoniak (lukasz dot antoniak at gmail dot com)

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

The first row
getFirstRow
(RowSelection
The row selection options
selection
)

Retrieve the indicated first row for pagination

public static boolean

Returns:

Whether a first row limit in indicated
hasFirstRow
(RowSelection
The row selection options
selection
)

Is a first row limit indicated?

public static boolean

Returns:

Whether a max row limit was indicated
hasMaxRows
(RowSelection
The row selection options
selection
)

Is a max row limit indicated?

public static boolean

Returns:

Whether limiting is indicated
useLimit
(LimitHandler
The limit handler
limitHandler
,
RowSelection
The row selection
selection
)

Should limit be applied?

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LimitHelperback to summary
private LimitHelper()

Method Detail

getFirstRowback to summary
public static int getFirstRow(RowSelection selection)

Retrieve the indicated first row for pagination

Parameters
selection:RowSelection

The row selection options

Returns:int

The first row

hasFirstRowback to summary
public static boolean hasFirstRow(RowSelection selection)

Is a first row limit indicated?

Parameters
selection:RowSelection

The row selection options

Returns:boolean

Whether a first row limit in indicated

hasMaxRowsback to summary
public static boolean hasMaxRows(RowSelection selection)

Is a max row limit indicated?

Parameters
selection:RowSelection

The row selection options

Returns:boolean

Whether a max row limit was indicated

useLimitback to summary
public static boolean useLimit(LimitHandler limitHandler, RowSelection selection)

Should limit be applied?

Parameters
limitHandler:LimitHandler

The limit handler

selection:RowSelection

The row selection

Returns:boolean

Whether limiting is indicated