Class AbstractAllRecordsExporter

java.lang.Object
io.jmix.gridexportflowui.exporter.AbstractAllRecordsExporter
Direct Known Subclasses:
ExcelAllRecordsExporter, JsonAllRecordsExporter

public abstract class AbstractAllRecordsExporter extends Object
  • Field Details

    • LAST_LOADED_PK_CONDITION_PARAMETER_NAME

      protected static String LAST_LOADED_PK_CONDITION_PARAMETER_NAME
    • metadataTools

      protected MetadataTools metadataTools
    • dataManager

      protected DataManager dataManager
    • platformTransactionManager

      protected org.springframework.transaction.PlatformTransactionManager platformTransactionManager
    • gridExportProperties

      protected GridExportProperties gridExportProperties
  • Constructor Details

    • AbstractAllRecordsExporter

      public AbstractAllRecordsExporter(MetadataTools metadataTools)
    • AbstractAllRecordsExporter

      public AbstractAllRecordsExporter(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties)
  • Method Details

    • setDataManager

      public void setDataManager(DataManager dataManager)
    • setPlatformTransactionManager

      public void setPlatformTransactionManager(org.springframework.transaction.PlatformTransactionManager platformTransactionManager)
    • setGridExportProperties

      public void setGridExportProperties(GridExportProperties gridExportProperties)
    • generateLoadContext

      public LoadContext generateLoadContext(DataUnit dataUnit)
      Generates the load context using the given DataUnit.
      Parameters:
      dataUnit - data unit linked with the data
    • getDataLoader

      protected DataLoader getDataLoader(DataUnit dataUnit)
    • generateLoadContext

      protected LoadContext generateLoadContext(CollectionLoader loader)
    • exportAll

      public void exportAll(DataUnit dataUnit, Predicate<EntityExportContext> entityExporter)
      Loads all entity instances associated with the given dataUnit and calls the entityExporter to export each loaded entity instance. Creation of the output file object is the responsibility of entityExporter. Data is loaded in batches, the batch size is configured by the GridExportProperties.getExportAllBatchSize().
      Parameters:
      dataUnit - data unit linked with the data
      entityExporter - 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

      protected ValueLoadContext.Query getValueLoadContextQuery(ValueLoadContext valueLoadContext)