com.elasticpath.domain.dataimport.impl
Class ImportRunningJobImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.dataimport.impl.ImportRunningJobImpl
All Implemented Interfaces:
ImportRunningJob, EpDomain, Transient, java.io.Serializable

public class ImportRunningJobImpl
extends AbstractEpDomainImpl
implements ImportRunningJob

Represents a running import job.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
ImportRunningJobImpl()
           
 
Method Summary
 void addBadRow(ImportBadRow importBadRow)
          Add an ImportBadRow.
 java.util.List getBadRows()
          Returns a list of ImportBadRow.
 int getCurrentRow()
          Returns the current row number is in importing.
 java.util.Date getEndTime()
          Returns the import job end time.
 int getFailedRows()
          Returns the row number that failed the imported.
 ImportJob getImportJob()
          Returns the import job that is running.
 int getLeftRows()
          Returns the left rows to import.
 java.util.Date getStartTime()
          Returns the import job start time.
 int getSucceededRows()
          Returns the row number that has been imported successfully.
 int getTotalRows()
          Returns the total number of rows to import.
 boolean isFinished()
          Returns true if the job is finished, otherwise, false.
 void setCurrentRow(int currentRow)
          Set the current row number.
 void setFinished()
          Sets the finished flag to true.
 void setImportJob(ImportJob importJob)
          Set the import job to run.
 void updateFailedRows(int num)
          Adds the given number to the failed rows number.
 void updateSucceededRows(int num)
          Adds the given number to the succeeded rows number.
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

ImportRunningJobImpl

public ImportRunningJobImpl()
Method Detail

addBadRow

public void addBadRow(ImportBadRow importBadRow)
Add an ImportBadRow.

Specified by:
addBadRow in interface ImportRunningJob
Parameters:
importBadRow - the import bad row to add.

getBadRows

public java.util.List getBadRows()
Returns a list of ImportBadRow.

Specified by:
getBadRows in interface ImportRunningJob
Returns:
a list of ImportBadRow

getCurrentRow

public int getCurrentRow()
Returns the current row number is in importing.

Specified by:
getCurrentRow in interface ImportRunningJob
Returns:
the current row number is in importing

getEndTime

public java.util.Date getEndTime()
Returns the import job end time.

Specified by:
getEndTime in interface ImportRunningJob
Returns:
the import job end time

getFailedRows

public int getFailedRows()
Returns the row number that failed the imported.

Specified by:
getFailedRows in interface ImportRunningJob
Returns:
the row number that failed the imported

getImportJob

public ImportJob getImportJob()
Returns the import job that is running.

Specified by:
getImportJob in interface ImportRunningJob
Returns:
the import job that is running

getLeftRows

public int getLeftRows()
Returns the left rows to import.

Specified by:
getLeftRows in interface ImportRunningJob
Returns:
the left rows to import

getStartTime

public java.util.Date getStartTime()
Returns the import job start time.

Specified by:
getStartTime in interface ImportRunningJob
Returns:
the import job start time

getSucceededRows

public int getSucceededRows()
Returns the row number that has been imported successfully.

Specified by:
getSucceededRows in interface ImportRunningJob
Returns:
the row number that has been imported successfully

getTotalRows

public int getTotalRows()
Returns the total number of rows to import.

Specified by:
getTotalRows in interface ImportRunningJob
Returns:
the total number of rows to import

isFinished

public boolean isFinished()
Returns true if the job is finished, otherwise, false.

Specified by:
isFinished in interface ImportRunningJob
Returns:
true if the job is finished, otherwise, false

setCurrentRow

public void setCurrentRow(int currentRow)
Set the current row number.

Specified by:
setCurrentRow in interface ImportRunningJob
Parameters:
currentRow - the current row number

setFinished

public void setFinished()
Sets the finished flag to true.

Specified by:
setFinished in interface ImportRunningJob

setImportJob

public void setImportJob(ImportJob importJob)
Set the import job to run.

Specified by:
setImportJob in interface ImportRunningJob
Parameters:
importJob - the import job to set

updateFailedRows

public void updateFailedRows(int num)
Adds the given number to the failed rows number.

Specified by:
updateFailedRows in interface ImportRunningJob
Parameters:
num - the number

updateSucceededRows

public void updateSucceededRows(int num)
Adds the given number to the succeeded rows number.

Specified by:
updateSucceededRows in interface ImportRunningJob
Parameters:
num - the number