Class LimitOffsetAllEntitiesLoader
java.lang.Object
io.jmix.gridexportui.exporter.entitiesloader.AbstractAllEntitiesLoader
io.jmix.gridexportui.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.gridexportui.exporter.entitiesloader.AllEntitiesLoader
AllEntitiesLoader.ExportedEntityVisitor
-
Field Summary
Fields inherited from class io.jmix.gridexportui.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 TypeMethodDescriptiongenerateLoadContext
(DataUnit dataUnit, Sort sort) Generates the load context using the givenDataUnit
.Type of data loading strategy defined as string constant.void
loadAll
(DataUnit dataUnit, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, Sort sort) Sequential data loading
-
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
Generates the load context using the givenDataUnit
.- Specified by:
generateLoadContext
in classAbstractAllEntitiesLoader
- Parameters:
dataUnit
- data unit linked with the datasort
- An optional sorting specification for the data. Ifnull
sorting will be applied by the primary key.
-
loadAll
public void loadAll(DataUnit dataUnit, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, @Nullable Sort sort) Sequential data loading- Parameters:
exportedEntityVisitor
-AllEntitiesLoader.ExportedEntityVisitor.visitEntity(EntityExportContext)
-