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
FieldsFields inherited from class io.jmix.gridexportflowui.exporter.entitiesloader.AbstractAllEntitiesLoader
dataManager, gridExportProperties, metadataTools, platformTransactionManager -
Constructor Summary
ConstructorsConstructorDescriptionLimitOffsetAllEntitiesLoader(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected LoadContextgenerateLoadContext(CollectionLoader loader) Type of data loading strategy defined as string constant.protected voidloadEntities(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:AllEntitiesLoaderType of data loading strategy defined as string constant.AllEntitiesLoaderFactory.getEntitiesLoader()returns loader which pagination strategy equals toGridExportProperties.getExportAllPaginationStrategy() -
generateLoadContext
- Specified by:
generateLoadContextin classAbstractAllEntitiesLoader
-
loadEntities
protected void loadEntities(CollectionLoader<?> collectionLoader, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) Sequential data loading- Specified by:
loadEntitiesin classAbstractAllEntitiesLoader- Parameters:
exportedEntityVisitor-AllEntitiesLoader.ExportedEntityVisitor.visitEntity(EntityExportContext)loadBatchSize-GridExportProperties.getExportAllBatchSize()number of entities loaded in one query
-