dk.netarkivet.harvester.datamodel
Class HarvestRunInfo

java.lang.Object
  extended by dk.netarkivet.harvester.datamodel.HarvestRunInfo

public class HarvestRunInfo
extends java.lang.Object

Information on a single run of a harvest.


Constructor Summary
HarvestRunInfo(long harvestID, java.lang.String harvestName, int runNr)
          Constructor used to read harvest run information from database.
 
Method Summary
 long getBytesHarvested()
           
 long getDocsHarvested()
           
 java.util.Date getEndDate()
           
 long getHarvestID()
           
 java.lang.String getHarvestName()
           
 int getJobCount()
          Get the total number of jobs created for this run.
 int getJobCount(JobStatus status)
          Get the number of jobs for this run that are in a specific status.
 int getRunNr()
           
 java.util.Date getStartDate()
           
 void setBytesHarvested(long bytesHarvested)
          Set the number of bytes harvested by this job.
 void setDocsHarvested(long docsHarvested)
          Set the number of documents harvested by this job.
 void setEndDate(java.util.Date endDate)
          Set the end Date for this harvest job.
 void setStartDate(java.util.Date startDate)
          Set the start Date for this harvest job.
 void setStatusCount(JobStatus status, int count)
          Update the count for a specific jobstatus.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HarvestRunInfo

HarvestRunInfo(long harvestID,
               java.lang.String harvestName,
               int runNr)
Constructor used to read harvest run information from database.

Parameters:
harvestID - the ID of the harvest job
harvestName - the name of the harvest job
runNr - the run number of this harvest job
Method Detail

getHarvestID

public long getHarvestID()
Returns:
the harvest id of this job

getHarvestName

public java.lang.String getHarvestName()
Returns:
the harvest name of this job

getRunNr

public int getRunNr()
Returns:
the harvest run number of this job

getStartDate

public java.util.Date getStartDate()
Returns:
the date when this job started

getEndDate

public java.util.Date getEndDate()
Returns:
the date when this job ended

getBytesHarvested

public long getBytesHarvested()
Returns:
bytes harvested by the job

getDocsHarvested

public long getDocsHarvested()
Returns:
documents harvested by the job

getJobCount

public int getJobCount()
Get the total number of jobs created for this run.

Returns:
the total number of jobs created for this run.

getJobCount

public int getJobCount(JobStatus status)
Get the number of jobs for this run that are in a specific status.

Parameters:
status - the specific status
Returns:
the number of jobs for this run that are in a specific status.

setStartDate

public void setStartDate(java.util.Date startDate)
Set the start Date for this harvest job.

Parameters:
startDate - the start date

setEndDate

public void setEndDate(java.util.Date endDate)
Set the end Date for this harvest job.

Parameters:
endDate - The end date

setBytesHarvested

public void setBytesHarvested(long bytesHarvested)
Set the number of bytes harvested by this job.

Parameters:
bytesHarvested - number of bytes harvested

setDocsHarvested

public void setDocsHarvested(long docsHarvested)
Set the number of documents harvested by this job.

Parameters:
docsHarvested - number of documents harvested

setStatusCount

public void setStatusCount(JobStatus status,
                           int count)
Update the count for a specific jobstatus.

Parameters:
status - a certain JobStatus
count - the new count for this JobStatus.