Class AbstractImportProcess

java.lang.Object
org.gvsig.vcsgis.swing.impl.importhistory.AbstractImportProcess
All Implemented Interfaces:
ImportProcess
Direct Known Subclasses:
ImportHistoryWithDate_minimize_memory, ImportHistoryWithDate_minimize_time, ImportHistoryWithRevision_minimize_memory, ImportHistoryWithRevision_minimize_time

public abstract class AbstractImportProcess extends Object implements ImportProcess
Author:
gvSIG Team
  • Field Details

    • LOGGER

      protected static final org.slf4j.Logger LOGGER
    • NUMBER_OF_INSERTS_TO_CHANGE_TO_APPEND_MODE

      protected static final int NUMBER_OF_INSERTS_TO_CHANGE_TO_APPEND_MODE
      See Also:
    • workspace

      protected final VCSGisWorkspace workspace
    • sourceStore

      protected final org.gvsig.fmap.dal.feature.FeatureStore sourceStore
    • targetEntity

      protected final VCSGisEntity targetEntity
    • fieldCodeName

      protected final String fieldCodeName
    • fieldOrderName

      protected final String fieldOrderName
    • sortOrder

      protected final boolean sortOrder
    • deletedCondition

      protected final org.gvsig.expressionevaluator.Expression deletedCondition
    • status

      protected final org.gvsig.tools.task.SimpleTaskStatus status
    • entityCodes

      protected final List<String> entityCodes
    • entities

      protected final List<VCSGisEntity> entities
    • deletedConditionSymbolTable

      protected final org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable deletedConditionSymbolTable
    • sourceSize

      protected long sourceSize
  • Constructor Details

    • AbstractImportProcess

      protected AbstractImportProcess(boolean onlyLocal, VCSGisWorkspace workspace, org.gvsig.fmap.dal.feature.FeatureStore sourceStore, VCSGisEntity targetEntity, String fieldCodeName, String fieldOrderName, String sortOrder, org.gvsig.expressionevaluator.Expression deletedCondition, org.gvsig.tools.task.SimpleTaskStatus status)
  • Method Details

    • getSourceQuery

      protected abstract org.gvsig.fmap.dal.feature.FeatureQuery getSourceQuery() throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • update_estimated_time

      protected void update_estimated_time()
    • getTargetStore

      protected org.gvsig.fmap.dal.feature.FeatureStore getTargetStore()
    • getSourceFeatureType

      protected org.gvsig.fmap.dal.feature.FeatureType getSourceFeatureType() throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • getTargetFeatureType

      protected org.gvsig.fmap.dal.feature.FeatureType getTargetFeatureType() throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • getSourceAttrCodeName

      protected org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor getSourceAttrCodeName() throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • getTargetAttrCodeName

      protected org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor getTargetAttrCodeName() throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • checkParameters

      public int checkParameters()
    • getTargetFieldCodeName

      public String getTargetFieldCodeName() throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • getSourceFieldCodeName

      public String getSourceFieldCodeName() throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • getSourceFieldOrderName

      public String getSourceFieldOrderName() throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • getDateDiff

      protected long getDateDiff(Timestamp date1, Timestamp date2, ChronoUnit unit)
    • haveToDelete

      protected boolean haveToDelete(org.gvsig.fmap.dal.feature.Feature feature)
    • commit

      protected int commit(Timestamp revisionDate, Timestamp efectiveDate)
    • disposeTargetStore

      protected void disposeTargetStore()
    • changeToAppendMode

      protected boolean changeToAppendMode(org.gvsig.fmap.dal.feature.FeatureStore store, long insertionCounter) throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • changeToPassThroughMode

      protected boolean changeToPassThroughMode(org.gvsig.fmap.dal.feature.FeatureStore store) throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • getTotalCommits

      public long getTotalCommits()
      Specified by:
      getTotalCommits in interface ImportProcess
    • getTotalTime

      public long getTotalTime()
      Specified by:
      getTotalTime in interface ImportProcess
    • getTotalTimeFormatted

      public String getTotalTimeFormatted()
      Specified by:
      getTotalTimeFormatted in interface ImportProcess
    • formatTime

      public String formatTime(long t)
    • dumpRepositoryConnectionInfo

      protected void dumpRepositoryConnectionInfo()
    • createGroupByRevisionDate

      protected AbstractImportProcess.GroupBy createGroupByRevisionDate(String fieldDateName, ChronoUnit groupEveryUnit, long groupEvery)
    • createGroupByRevisionNumber

      protected AbstractImportProcess.GroupBy createGroupByRevisionNumber(String sourceFieldRevisionName)
    • process_minimize_time

      protected int process_minimize_time(org.gvsig.fmap.dal.feature.FeatureSet sourceFeatures, AbstractImportProcess.GroupBy groupby, String sourceFieldEfectiveDateName, Set<Object> inserteds) throws Exception
      Throws:
      Exception
    • process_minimize_memory

      protected int process_minimize_memory(org.gvsig.fmap.dal.feature.FeatureSet sourceFeatures, AbstractImportProcess.GroupBy groupby, boolean requireEfectiveDate, String sourceFieldEfectiveDateName) throws Exception
      Throws:
      Exception
    • process_minimize_time2

      protected int process_minimize_time2(org.gvsig.fmap.dal.feature.FeatureSet sourceFeatures, AbstractImportProcess.GroupBy groupby, String sourceFieldEfectiveDateName, Set<Object> inserteds) throws Exception
      Throws:
      Exception
    • process_minimize_memory2

      protected int process_minimize_memory2(org.gvsig.fmap.dal.feature.FeatureSet sourceFeatures, AbstractImportProcess.GroupBy groupby, boolean requireEfectiveDate, String sourceFieldEfectiveDateName) throws Exception
      Throws:
      Exception
    • hasDuplicatedDeletes

      protected boolean hasDuplicatedDeletes()
    • hasErrors

      protected boolean hasErrors()
    • addError

      protected int addError(Object id, AbstractImportProcess.GroupBy groupby, int code, String description)
    • addError

      protected int addError(Object id, AbstractImportProcess.GroupBy groupby, int code, String description, String errmsg, Throwable th)
    • log

      protected void log(String line)
    • getLogFile

      public File getLogFile()
      Specified by:
      getLogFile in interface ImportProcess