public class HistoryLazyModel extends org.primefaces.model.LazyDataModel<HistoryUI>
| Constructor and Description |
|---|
HistoryLazyModel(HistoryService historyService,
HistoryRequestManager manager)
Constructs a new history lazy model for history data.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getFilters() |
int |
getRowCount() |
HistoryUI |
getRowData(String rowKey) |
Object |
getRowKey(HistoryUI object) |
String |
getSortField() |
org.primefaces.model.SortOrder |
getSortOrder() |
boolean |
isEmpty() |
List<HistoryUI> |
load(int first,
int pageSize,
String sortField,
org.primefaces.model.SortOrder sortOrder,
Map<String,Object> filters)
Loads a section of data from database.
|
protected void |
setEmpty(int first,
List<HistoryUI> results)
The lazy data collection is empty, if it returns no data for the first page.
|
protected void |
setLatestLoadData(String sortField,
org.primefaces.model.SortOrder sortOrder,
Map<String,Object> filters)
Important parameters of the data load request
|
getPageSize, getRowData, getRowIndex, getWrappedData, isRowAvailable, load, setPageSize, setRowCount, setRowIndex, setWrappedDataaddDataModelListener, getDataModelListeners, iterator, removeDataModelListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic HistoryLazyModel(HistoryService historyService, HistoryRequestManager manager)
historyService - service layer handling history operationsmanager - backing bean for ui dialog handlingpublic List<HistoryUI> load(int first, int pageSize, String sortField, org.primefaces.model.SortOrder sortOrder, Map<String,Object> filters)
load in class org.primefaces.model.LazyDataModel<HistoryUI>first - index of first rowpageSize - amount of rows to loadsortField - field by which data should be sortedsortOrder - order by which data should be sortedfilters - filters for dataprotected void setLatestLoadData(@Nullable String sortField, @Nullable org.primefaces.model.SortOrder sortOrder, @Nullable Map<String,Object> filters)
sortField - name of the sort fieldsortOrder - the sort orderfilters - active filtersprotected void setEmpty(int first,
@Nullable
List<HistoryUI> results)
first - the index of the first element to be loadedresults - the database resultspublic boolean isEmpty()
true if the current filter returns no data, false otherwisepublic String getSortField()
public org.primefaces.model.SortOrder getSortOrder()
public int getRowCount()
getRowCount in class org.primefaces.model.LazyDataModel<HistoryUI>Copyright © 2025 European Spallation Source. All rights reserved.