com.github.drinkjava2.jdialects.hibernatesrc.pagination
Class LimitHelper

java.lang.Object
  extended by com.github.drinkjava2.jdialects.hibernatesrc.pagination.LimitHelper

public class LimitHelper
extends Object

A helper for dealing with LimitHandler implementations

Author:
Lukasz Antoniak (lukasz dot antoniak at gmail dot com), Yong Zhu(modify)

Method Summary
static int getFirstRow(RowSelection selection)
          Retrieve the indicated first row for pagination
static boolean hasFirstRow(RowSelection selection)
          Is a first row limit indicated?
static boolean hasMaxRows(RowSelection selection)
           
static boolean useLimit(LimitHandler limitHandler, RowSelection selection)
          Should limit be applied?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasMaxRows

public static boolean hasMaxRows(RowSelection selection)

useLimit

public static boolean useLimit(LimitHandler limitHandler,
                               RowSelection selection)
Should limit be applied?

Parameters:
limitHandler - The limit handler
selection - The row selection
Returns:
Whether limiting is indicated

hasFirstRow

public static boolean hasFirstRow(RowSelection selection)
Is a first row limit indicated?

Parameters:
selection - The row selection options
Returns:
Whether a first row limit in indicated

getFirstRow

public static int getFirstRow(RowSelection selection)
Retrieve the indicated first row for pagination

Parameters:
selection - The row selection options
Returns:
The first row


Copyright © 2018. All rights reserved.