Class AbstractAllEntitiesLoader
java.lang.Object
io.jmix.gridexportflowui.exporter.entitiesloader.AbstractAllEntitiesLoader
- All Implemented Interfaces:
AllEntitiesLoader
- Direct Known Subclasses:
KeysetAllEntitiesLoader
,LimitOffsetAllEntitiesLoader
Base class for the all entities loader which is used to export to other data formats such as excel or json
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.gridexportflowui.exporter.entitiesloader.AllEntitiesLoader
AllEntitiesLoader.ExportedEntityVisitor
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataManager
protected GridExportProperties
protected MetadataTools
protected org.springframework.transaction.PlatformTransactionManager
-
Constructor Summary
ConstructorDescriptionAbstractAllEntitiesLoader
(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract LoadContext
generateLoadContext
(CollectionLoader loader) protected DataLoader
getDataLoader
(DataUnit dataUnit) protected ValueLoadContext.Query
getValueLoadContextQuery
(ValueLoadContext valueLoadContext) void
loadAll
(DataUnit dataUnit, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor) Loads all entity instances associated with the givendataUnit
and calls theentityExporter
to export each loaded entity instance.protected abstract void
loadEntities
(CollectionLoader<?> collectionLoader, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) protected void
loadKeyValueEntities
(KeyValueCollectionLoader loader, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.gridexportflowui.exporter.entitiesloader.AllEntitiesLoader
getPaginationStrategy
-
Field Details
-
metadataTools
-
dataManager
-
platformTransactionManager
protected org.springframework.transaction.PlatformTransactionManager platformTransactionManager -
gridExportProperties
-
-
Constructor Details
-
AbstractAllEntitiesLoader
public AbstractAllEntitiesLoader(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties)
-
-
Method Details
-
loadAll
public void loadAll(DataUnit dataUnit, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor) Loads all entity instances associated with the givendataUnit
and calls theentityExporter
to export each loaded entity instance. Creation of the output file object is the responsibility ofentityExporter
. Data is loaded in batches, the batch size is configured by theGridExportProperties.getExportAllBatchSize()
.- Specified by:
loadAll
in interfaceAllEntitiesLoader
- Parameters:
dataUnit
- data unit linked with the dataexportedEntityVisitor
- visitor which exports entity to appropriate format
-
generateLoadContext
-
loadEntities
protected abstract void loadEntities(CollectionLoader<?> collectionLoader, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) -
getDataLoader
-
loadKeyValueEntities
protected void loadKeyValueEntities(KeyValueCollectionLoader loader, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) -
getValueLoadContextQuery
-