Class AbstractPaginationDataBinder
java.lang.Object
io.jmix.ui.component.pagination.data.AbstractPaginationDataBinder
- All Implemented Interfaces:
PaginationDataBinder
- Direct Known Subclasses:
PaginationContainerBinder
,PaginationDataUnitBinder
,PaginationLoaderBinder
-
Field Summary
Modifier and TypeFieldDescriptionprotected CollectionContainer
protected DataManager
protected BaseCollectionLoader
protected Consumer<CollectionChangeType>
protected WeakCollectionChangeListener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
int
getCount()
int
int
void
refresh()
Reloads instances.void
Removes collection change listener.void
Sets collection change listener.void
setDataManager
(DataManager dataManager) void
setFirstResult
(int startPosition) Sets the position of the first instance to load.void
setMaxResults
(int maxResults) Sets maximum number of instances to load.int
size()
-
Field Details
-
dataManager
-
container
-
refreshListener
-
containerCollectionChangeListener
-
weakContainerCollectionChangeListener
-
loader
-
-
Constructor Details
-
AbstractPaginationDataBinder
public AbstractPaginationDataBinder()
-
-
Method Details
-
attachCollectionChangeListener
protected void attachCollectionChangeListener() -
setDataManager
-
removeCollectionChangeListener
public void removeCollectionChangeListener()Description copied from interface:PaginationDataBinder
Removes collection change listener.- Specified by:
removeCollectionChangeListener
in interfacePaginationDataBinder
-
getFirstResult
public int getFirstResult()- Specified by:
getFirstResult
in interfacePaginationDataBinder
- Returns:
- first position to load
-
getMaxResults
public int getMaxResults()- Specified by:
getMaxResults
in interfacePaginationDataBinder
- Returns:
- maximum number of instances to load
-
setFirstResult
public void setFirstResult(int startPosition) Description copied from interface:PaginationDataBinder
Sets the position of the first instance to load.- Specified by:
setFirstResult
in interfacePaginationDataBinder
-
setMaxResults
public void setMaxResults(int maxResults) Description copied from interface:PaginationDataBinder
Sets maximum number of instances to load.- Specified by:
setMaxResults
in interfacePaginationDataBinder
-
getCount
public int getCount()- Specified by:
getCount
in interfacePaginationDataBinder
- Returns:
- number of instances in the data store
-
getEntityMetaClass
- Specified by:
getEntityMetaClass
in interfacePaginationDataBinder
- Returns:
- meta class of entity
-
size
public int size()- Specified by:
size
in interfacePaginationDataBinder
- Returns:
- number of instances are currently loaded
-
refresh
public void refresh()Description copied from interface:PaginationDataBinder
Reloads instances.- Specified by:
refresh
in interfacePaginationDataBinder
-
setCollectionChangeListener
Description copied from interface:PaginationDataBinder
Sets collection change listener.- Specified by:
setCollectionChangeListener
in interfacePaginationDataBinder
-