Class DataTablesResponse
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.components.datatables.DataTablesResponse
-
public class DataTablesResponse extends java.lang.Object
This is returned to client in anHttpServletResponse
in the format the can be consumed by jQuery DataTables.- See Also:
- DataTables
-
-
Constructor Summary
Constructors Constructor Description DataTablesResponse(DataTablesParams dataTablesParams, long recordsTotal, java.util.List<DataTablesResponseModel> data)
DataTablesResponse(DataTablesParams dataTablesParams, org.springframework.data.domain.Page<?> page, java.util.List<? extends DataTablesResponseModel> data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<DataTablesResponseModel>
getData()
The data to be displayed in the table.int
getDraw()
Get the draw counter.long
getRecordsFiltered()
Total records, after filtering (i.e.long
getRecordsTotal()
Total records, before filtering (i.e.
-
-
-
Constructor Detail
-
DataTablesResponse
public DataTablesResponse(DataTablesParams dataTablesParams, org.springframework.data.domain.Page<?> page, java.util.List<? extends DataTablesResponseModel> data)
-
DataTablesResponse
public DataTablesResponse(DataTablesParams dataTablesParams, long recordsTotal, java.util.List<DataTablesResponseModel> data)
-
-
Method Detail
-
getDraw
public int getDraw()
Get the draw counter. This is used by DataTables to ensure that the Ajax returns from server-side processing requests are drawn in sequence by DataTables. Extracted directly from the initialorg.apache.http.HttpRequest
- Returns:
Integer
-
getRecordsTotal
public long getRecordsTotal()
Total records, before filtering (i.e. the total number of records in the database)- Returns:
Long
-
getRecordsFiltered
public long getRecordsFiltered()
Total records, after filtering (i.e. the total number of records after filtering has been applied - not just the number of records being returned for this page of data).- Returns:
Long
-
getData
public java.util.List<DataTablesResponseModel> getData()
The data to be displayed in the table. This is an array of data source objects, one for each row, which will be used by DataTables.- Returns:
List
-
-