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
FieldsFields inherited from class io.jmix.gridexportui.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 TypeMethodDescriptiongenerateLoadContext
(DataUnit dataUnit, Sort sort) Deprecated.protected 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.gridexportui.exporter.entitiesloader.AbstractAllEntitiesLoader
getDataLoader, getValueLoadContextQuery, loadAll, 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
Deprecated.usegenerateLoadContext(CollectionLoader)
insteadGenerates the load context using the givenDataUnit
.- Overrides:
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.
-
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)
-
generateLoadContext(CollectionLoader)
instead