Class DataTable


  • public class DataTable
    extends java.lang.Object
    Static string used in the ResponseBody for DataTables calls.
    • Field Detail

      • REQUEST_PARAM_START

        public static final java.lang.String REQUEST_PARAM_START
        Request Parameters
        See Also:
        Constant Field Values
      • REQUEST_PARAM_LENGTH

        public static final java.lang.String REQUEST_PARAM_LENGTH
        See Also:
        Constant Field Values
      • REQUEST_PARAM_DRAW

        public static final java.lang.String REQUEST_PARAM_DRAW
        See Also:
        Constant Field Values
      • REQUEST_PARAM_SEARCH_VALUE

        public static final java.lang.String REQUEST_PARAM_SEARCH_VALUE
        See Also:
        Constant Field Values
      • REQUEST_PARAM_SORT_COLUMN

        public static final java.lang.String REQUEST_PARAM_SORT_COLUMN
        See Also:
        Constant Field Values
      • REQUEST_PARAM_SORT_DIRECTION

        public static final java.lang.String REQUEST_PARAM_SORT_DIRECTION
        See Also:
        Constant Field Values
      • RESPONSE_PARAM_DRAW

        public static final java.lang.String RESPONSE_PARAM_DRAW
        Response Parameters
        See Also:
        Constant Field Values
      • RESPONSE_PARAM_SORT_COLUMN

        public static final java.lang.String RESPONSE_PARAM_SORT_COLUMN
        See Also:
        Constant Field Values
      • RESPONSE_PARAM_SORT_DIRECTION

        public static final java.lang.String RESPONSE_PARAM_SORT_DIRECTION
        See Also:
        Constant Field Values
      • RESPONSE_PARAM_DATA

        public static final java.lang.String RESPONSE_PARAM_DATA
        See Also:
        Constant Field Values
      • RESPONSE_PARAM_RECORDS_TOTAL

        public static final java.lang.String RESPONSE_PARAM_RECORDS_TOTAL
        See Also:
        Constant Field Values
      • RESPONSE_PARAM_RECORDS_FILTERED

        public static final java.lang.String RESPONSE_PARAM_RECORDS_FILTERED
        See Also:
        Constant Field Values
    • Constructor Detail

      • DataTable

        public DataTable()
    • Method Detail

      • getSortDirection

        public static org.springframework.data.domain.Sort.Direction getSortDirection​(java.lang.String directionString)
        Helper method to get the sort direction for the column.
        Parameters:
        directionString - Expect either "asc" or "desc" for direction of sort.
        Returns:
        Sort.Direction
      • getPageNumber

        public static int getPageNumber​(int start,
                                        int length)
        Helper method to get the page number based on the pageSize of the list and the current start
        Parameters:
        start - The first object at the start of the currently display DataTables row.
        length - The length of the DataTables page.
        Returns:
        Current page number