Class Paginator


  • public final class Paginator
    extends java.lang.Object
    Utility methods for handling list pagination.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
    • Constructor Summary

      Constructors 
      Constructor Description
      Paginator()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getActualPageSize​(java.util.Map<java.lang.String,​java.lang.Object> context)  
      static int getHighIndex​(java.util.Map<java.lang.String,​java.lang.Object> context)  
      static void getListLimits​(ModelForm modelForm, java.util.Map<java.lang.String,​java.lang.Object> context, java.lang.Object entryList)  
      static int getListSize​(java.util.Map<java.lang.String,​java.lang.Object> context)  
      static int getLowIndex​(java.util.Map<java.lang.String,​java.lang.Object> context)  
      static java.lang.Integer getViewIndex​(java.util.Map<java.lang.String,​? extends java.lang.Object> context, java.lang.String viewIndexName)  
      static java.lang.Integer getViewIndex​(java.util.Map<java.lang.String,​? extends java.lang.Object> context, java.lang.String viewIndexName, int defaultValue)  
      static int getViewIndex​(ModelForm modelForm, java.util.Map<java.lang.String,​java.lang.Object> context)  
      static java.lang.Integer getViewSize​(java.util.Map<java.lang.String,​? extends java.lang.Object> context, java.lang.String viewSizeName)  
      static int getViewSize​(ModelForm modelForm, java.util.Map<java.lang.String,​java.lang.Object> context)  
      static void preparePager​(ModelForm modelForm, java.util.Map<java.lang.String,​java.lang.Object> context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
    • Constructor Detail

      • Paginator

        public Paginator()
    • Method Detail

      • getActualPageSize

        public static int getActualPageSize​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getHighIndex

        public static int getHighIndex​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getListLimits

        public static void getListLimits​(ModelForm modelForm,
                                         java.util.Map<java.lang.String,​java.lang.Object> context,
                                         java.lang.Object entryList)
      • getListSize

        public static int getListSize​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getLowIndex

        public static int getLowIndex​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getViewIndex

        public static int getViewIndex​(ModelForm modelForm,
                                       java.util.Map<java.lang.String,​java.lang.Object> context)
      • getViewSize

        public static int getViewSize​(ModelForm modelForm,
                                      java.util.Map<java.lang.String,​java.lang.Object> context)
      • preparePager

        public static void preparePager​(ModelForm modelForm,
                                        java.util.Map<java.lang.String,​java.lang.Object> context)
      • getViewIndex

        public static java.lang.Integer getViewIndex​(java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                                     java.lang.String viewIndexName)
        Parameters:
        context - Map
        viewIndexName -
        Returns:
        value of viewIndexName in context map (as an int) or return 0 as default
      • getViewIndex

        public static java.lang.Integer getViewIndex​(java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                                     java.lang.String viewIndexName,
                                                     int defaultValue)
        Parameters:
        context -
        viewIndexName -
        defaultValue -
        Returns:
        value of viewIndexName in context map (as an int) or return defaultValue
      • getViewSize

        public static java.lang.Integer getViewSize​(java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                                    java.lang.String viewSizeName)
        Parameters:
        context -
        viewSizeName -
        Returns:
        value of viewSizeName in context map (as an int) or return default value from widget.properties