Class AbstractAllRecordsExporter
java.lang.Object
io.jmix.gridexportflowui.exporter.AbstractAllRecordsExporter
- Direct Known Subclasses:
ExcelAllRecordsExporter
,JsonAllRecordsExporter
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataManager
protected GridExportProperties
protected static String
protected MetadataTools
protected org.springframework.transaction.PlatformTransactionManager
-
Constructor Summary
ConstructorDescriptionAbstractAllRecordsExporter
(MetadataTools metadataTools) AbstractAllRecordsExporter
(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
exportAll
(DataUnit dataUnit, Predicate<EntityExportContext> entityExporter) Loads all entity instances associated with the givendataUnit
and calls theentityExporter
to export each loaded entity instance.protected void
exportEntities
(CollectionLoader<?> collectionLoader, Predicate<EntityExportContext> entityExporter, int loadBatchSize) protected void
exportKeyValueEntities
(KeyValueCollectionLoader loader, Predicate<EntityExportContext> entityExporter, int loadBatchSize) generateLoadContext
(DataUnit dataUnit) Generates the load context using the givenDataUnit
.protected LoadContext
generateLoadContext
(CollectionLoader loader) protected DataLoader
getDataLoader
(DataUnit dataUnit) protected ValueLoadContext.Query
getValueLoadContextQuery
(ValueLoadContext valueLoadContext) void
setDataManager
(DataManager dataManager) void
setGridExportProperties
(GridExportProperties gridExportProperties) void
setPlatformTransactionManager
(org.springframework.transaction.PlatformTransactionManager platformTransactionManager)
-
Field Details
-
LAST_LOADED_PK_CONDITION_PARAMETER_NAME
-
metadataTools
-
dataManager
-
platformTransactionManager
protected org.springframework.transaction.PlatformTransactionManager platformTransactionManager -
gridExportProperties
-
-
Constructor Details
-
AbstractAllRecordsExporter
-
AbstractAllRecordsExporter
public AbstractAllRecordsExporter(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties)
-
-
Method Details
-
setDataManager
-
setPlatformTransactionManager
public void setPlatformTransactionManager(org.springframework.transaction.PlatformTransactionManager platformTransactionManager) -
setGridExportProperties
-
generateLoadContext
Generates the load context using the givenDataUnit
.- Parameters:
dataUnit
- data unit linked with the data
-
getDataLoader
-
generateLoadContext
-
exportAll
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()
.- Parameters:
dataUnit
- data unit linked with the dataentityExporter
- predicate that is applied to each loaded instance
-
exportEntities
protected void exportEntities(CollectionLoader<?> collectionLoader, Predicate<EntityExportContext> entityExporter, int loadBatchSize) -
exportKeyValueEntities
protected void exportKeyValueEntities(KeyValueCollectionLoader loader, Predicate<EntityExportContext> entityExporter, int loadBatchSize) -
getValueLoadContextQuery
-