Package io.jmix.flowui.data.pagination
Interface PaginationDataLoader
- All Known Implementing Classes:
PaginationDataLoaderImpl
public interface PaginationDataLoader
Interface defining methods for managing pagination when loading entity data.
Provides functionality to control the number of records fetched, the start position of the data,
and tracking changes in the data collection.
-
Method Summary
Modifier and TypeMethodDescriptionintgetCount()intintvoidrefresh()Reloads instances.voidRemoves collection change listener.voidSets collection change listener.voidsetFirstResult(int startPosition) Sets the position of the first instance to load.voidsetMaxResults(int maxResults) Sets maximum number of instances to load.voidsetTotalCountDelegate(Function<DataLoadContext, Integer> totalCountDelegate) Sets delegate which is used to get the total count of items.intsize()
-
Method Details
-
getFirstResult
int getFirstResult()- Returns:
- first position to load
-
setFirstResult
void setFirstResult(int startPosition) Sets the position of the first instance to load. -
getMaxResults
int getMaxResults()- Returns:
- maximum number of instances to load
-
setMaxResults
void setMaxResults(int maxResults) Sets maximum number of instances to load. -
getCount
int getCount()- Returns:
- number of instances in the data store
-
size
int size()- Returns:
- number of instances are currently loaded
-
refresh
void refresh()Reloads instances. -
removeCollectionChangeListener
void removeCollectionChangeListener()Removes collection change listener. -
setCollectionChangeListener
Sets collection change listener. -
getEntityMetaClass
MetaClass getEntityMetaClass()- Returns:
- meta class of entity
-
getTotalCountDelegate
- Returns:
- total count delegate or
nullotherwise
-
setTotalCountDelegate
Sets delegate which is used to get the total count of items.- Parameters:
totalCountDelegate- function that takes currentDataLoadContextof loader and return calculated total count
-