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
FieldsModifier and TypeFieldDescriptionprotected DataManagerprotected GridExportPropertiesprotected MetadataToolsprotected org.springframework.transaction.PlatformTransactionManager -
Constructor Summary
ConstructorsConstructorDescriptionAbstractAllEntitiesLoader(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract LoadContextgenerateLoadContext(CollectionLoader loader) protected DataLoadergetDataLoader(DataUnit dataUnit) protected ValueLoadContext.QuerygetValueLoadContextQuery(ValueLoadContext valueLoadContext) voidloadAll(DataUnit dataUnit, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor) Loads all entity instances associated with the givendataUnitand calls theentityExporterto export each loaded entity instance.protected abstract voidloadEntities(CollectionLoader<?> collectionLoader, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) protected voidloadKeyValueEntities(KeyValueCollectionLoader loader, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 givendataUnitand calls theentityExporterto 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:
loadAllin 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
-