Class CollectedRowsCounter

java.lang.Object
net.sf.jailer.subsetting.CollectedRowsCounter
All Implemented Interfaces:
ProgressListener

public class CollectedRowsCounter extends Object implements ProgressListener
Count the number of collected (and deleted) rows.
Author:
Ralf Wisser
  • Constructor Details

    • CollectedRowsCounter

      public CollectedRowsCounter()
  • Method Details

    • getCollectedRowsCount

      public Map<Table,Long> getCollectedRowsCount()
      Gets the number of collected rows per table.
      Returns:
      map from table to number of collected rows
    • getDeletedRowsCount

      public Map<Table,Long> getDeletedRowsCount()
      Gets the number of deleted rows per table.
      Returns:
      map from table to number of deleted rows
    • createStatistic

      public List<String> createStatistic(boolean forDelete, DataModel datamodel, ExportStatistic exportStatistic)
      Creates the statistic.
      Parameters:
      forDelete - true to create a deletion statistic, false for an export statistic
      datamodel - the data model used for display names
      exportStatistic - if not null, will be populated with the export row counts
      Returns:
      the statistic as a list of formatted lines
    • collected

      public void collected(int day, ModelElement modelElement, long rc)
      Description copied from interface: ProgressListener
      Rows have been collected.
      Specified by:
      collected in interface ProgressListener
      Parameters:
      day - the day
      modelElement - the association or table which has been resolved
      rc - the number of rows which have been collected
    • newStage

      public void newStage(String stage, boolean isErrorStage, boolean isFinalStage)
      Description copied from interface: ProgressListener
      New stage has begun.
      Specified by:
      newStage in interface ProgressListener
      Parameters:
      stage - the stage
      isErrorStage - true if the stage represents an error
      isFinalStage - true if this is the final stage
    • exported

      public void exported(Table table, long rc)
      Description copied from interface: ProgressListener
      Rows have been exported.
      Specified by:
      exported in interface ProgressListener
      Parameters:
      table - the table from which the rows have been exported
      rc - the number of rows
    • collectionJobEnqueued

      public void collectionJobEnqueued(int day, ModelElement modelElement)
      Description copied from interface: ProgressListener
      A collection-job has been enqueued.
      Specified by:
      collectionJobEnqueued in interface ProgressListener
      Parameters:
      day - the day
      modelElement - the association or table to be resolved
    • collectionJobStarted

      public void collectionJobStarted(int day, ModelElement modelElement)
      Description copied from interface: ProgressListener
      Collection of rows has been started.
      Specified by:
      collectionJobStarted in interface ProgressListener
      Parameters:
      day - the day
      modelElement - the association or table to be resolved
    • prepareExport

      public void prepareExport() throws CancellationException
      Description copied from interface: ProgressListener
      Export is ready. This might be cancelled.
      Specified by:
      prepareExport in interface ProgressListener
      Throws:
      CancellationException
    • warn

      public void warn(Supplier<String> msgSupplier)
      User should be warned.
      Specified by:
      warn in interface ProgressListener
      Parameters:
      msgSupplier - supplier for the warning message