Class DataTable
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.utilities.components.DataTable
-
public class DataTable extends java.lang.Object
Static string used in the ResponseBody for DataTables calls.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REQUEST_PARAM_DRAW
static java.lang.String
REQUEST_PARAM_LENGTH
static java.lang.String
REQUEST_PARAM_SEARCH_VALUE
static java.lang.String
REQUEST_PARAM_SORT_COLUMN
static java.lang.String
REQUEST_PARAM_SORT_DIRECTION
static java.lang.String
REQUEST_PARAM_START
Request Parametersstatic java.lang.String
RESPONSE_PARAM_DATA
static java.lang.String
RESPONSE_PARAM_DRAW
Response Parametersstatic java.lang.String
RESPONSE_PARAM_RECORDS_FILTERED
static java.lang.String
RESPONSE_PARAM_RECORDS_TOTAL
static java.lang.String
RESPONSE_PARAM_SORT_COLUMN
static java.lang.String
RESPONSE_PARAM_SORT_DIRECTION
-
Constructor Summary
Constructors Constructor Description DataTable()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getPageNumber(int start, int length)
Helper method to get the page number based on the pageSize of the list and the current startstatic org.springframework.data.domain.Sort.Direction
getSortDirection(java.lang.String directionString)
Helper method to get the sort direction for the column.
-
-
-
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
-
-
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
-
-