Class LimitOffsetAllEntitiesLoader
java.lang.Object
io.jmix.gridexportflowui.exporter.entitiesloader.AbstractAllEntitiesLoader
io.jmix.gridexportflowui.exporter.entitiesloader.LimitOffsetAllEntitiesLoader
- All Implemented Interfaces:
AllEntitiesLoader
This loader implements limit-offset pagination strategy. Entities are fetched in the same order as in the data store.
The strategy uses two parameters. The first, offset, sets a number of the starting record of the page.
The second, limit, defines the number of records in the page.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.gridexportflowui.exporter.entitiesloader.AllEntitiesLoader
AllEntitiesLoader.ExportedEntityVisitor
-
Field Summary
Fields inherited from class io.jmix.gridexportflowui.exporter.entitiesloader.AbstractAllEntitiesLoader
dataManager, gridExportProperties, metadataTools, platformTransactionManager
-
Constructor Summary
ConstructorDescriptionLimitOffsetAllEntitiesLoader
(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected LoadContext
generateLoadContext
(CollectionLoader loader) Type of data loading strategy defined as string constant.protected void
loadEntities
(CollectionLoader<?> collectionLoader, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) Sequential data loadingMethods inherited from class io.jmix.gridexportflowui.exporter.entitiesloader.AbstractAllEntitiesLoader
getDataLoader, getValueLoadContextQuery, loadAll, loadKeyValueEntities
-
Field Details
-
PAGINATION_STRATEGY
- See Also:
-
-
Constructor Details
-
LimitOffsetAllEntitiesLoader
public LimitOffsetAllEntitiesLoader(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties)
-
-
Method Details
-
getPaginationStrategy
Description copied from interface:AllEntitiesLoader
Type of data loading strategy defined as string constant.AllEntitiesLoaderFactory.getEntitiesLoader()
returns loader which pagination strategy equals toGridExportProperties.getExportAllPaginationStrategy()
-
generateLoadContext
- Specified by:
generateLoadContext
in classAbstractAllEntitiesLoader
-
loadEntities
protected void loadEntities(CollectionLoader<?> collectionLoader, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) Sequential data loading- Specified by:
loadEntities
in classAbstractAllEntitiesLoader
- Parameters:
exportedEntityVisitor
-AllEntitiesLoader.ExportedEntityVisitor.visitEntity(EntityExportContext)
loadBatchSize
-GridExportProperties.getExportAllBatchSize()
number of entities loaded in one query
-