Package difar.offline

Class UpdateCrossingTask<T extends PamDataUnit>

java.lang.Object
offlineProcessing.OfflineTask<T>
difar.offline.UpdateCrossingTask<T>
Type Parameters:
T -

public class UpdateCrossingTask<T extends PamDataUnit> extends OfflineTask<T>
Generic class for copying data from binary data files to database files. This will generally use the default SqlLogging and binaryDataSources which are already set in the datablock so copy data from the binary to the database.
Author:
Doug Gillespie
  • Constructor Details

    • UpdateCrossingTask

      public UpdateCrossingTask(PamDataBlock<T> pamDataBlock)
      Parameters:
      pamDataBlock -
  • Method Details

    • getSqlLogging

      public SQLLogging getSqlLogging()
      Returns:
      the sqlLogging
    • setSqlLogging

      public void setSqlLogging(SQLLogging sqlLogging)
      Parameters:
      sqlLogging - the sqlLogging to set
    • getBinaryDataSource

      public BinaryDataSource getBinaryDataSource()
      Returns:
      the binaryDataSource
    • setBinaryDataSource

      public void setBinaryDataSource(BinaryDataSource binaryDataSource)
      Parameters:
      binaryDataSource - the binaryDataSource to set
    • getName

      public String getName()
      Specified by:
      getName in class OfflineTask<T extends PamDataUnit>
      Returns:
      a name for the task, to be displayed in the dialog.
    • newDataLoad

      public void newDataLoad(long startTime, long endTime, OfflineDataMapPoint mapPoint)
      Description copied from class: OfflineTask
      Called when new data are loaded for offline processing (or once at the start of processing loaded data).
      Specified by:
      newDataLoad in class OfflineTask<T extends PamDataUnit>
      Parameters:
      startTime - start time of loaded data
      endTime - end time of loaded data
    • processDataUnit

      public boolean processDataUnit(T dataUnit)
      Description copied from class: OfflineTask
      Process a single data unit.
      Specified by:
      processDataUnit in class OfflineTask<T extends PamDataUnit>
      Returns:
      true if the data unit has changed in some way so that it will need re-writing to it's binary file or database.
    • canRun

      public boolean canRun()
      Description copied from class: OfflineTask
      can the task be run ? This will generally be true, but may be false if the task is dependent on some other module which may not be present.
      Overrides:
      canRun in class OfflineTask<T extends PamDataUnit>
      Returns:
      true if it's possible to run the task.
    • loadedDataComplete

      public void loadedDataComplete()
      Description copied from class: OfflineTask
      Called when processing of loaded data, or each map point worth of data, is complete.
      Specified by:
      loadedDataComplete in class OfflineTask<T extends PamDataUnit>