Class LimitHelper


  • public class LimitHelper
    extends Object
    A helper for dealing with LimitHandler implementations
    • Method Detail

      • hasMaxRows

        public static boolean hasMaxRows​(RowSelection selection)
        Is a max row limit indicated?
        Parameters:
        selection - The row selection options
        Returns:
        Whether a max row limit was indicated
      • 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