Class MCRJob

java.lang.Object
org.mycore.services.queuedjob.MCRJob
All Implemented Interfaces:
Cloneable

@Entity public class MCRJob extends Object implements Cloneable
Container class handled by hibernate to store and retrieve job information.
Author:
René Adler
  • Constructor Details

    • MCRJob

      protected MCRJob()
    • MCRJob

      public MCRJob(Class<? extends MCRJobAction> actionClass)
  • Method Details

    • getId

      public long getId()
      Returns the job Id.
      Returns:
      the job Id
    • setId

      protected void setId(long id)
      Set the job Id.
      Parameters:
      id - - the job id
    • getAction

      public Class<? extends MCRJobAction> getAction()
      Returns the action class (MCRJobAction).
      Returns:
      the action class
    • setAction

      public void setAction(Class<? extends MCRJobAction> actionClass)
      Set the action class (MCRJobAction).
      Parameters:
      actionClass - - the action class to set
    • getStatus

      public MCRJobStatus getStatus()
      Returns the current state (MCRJobStatus) of the job.
    • setStatus

      public void setStatus(MCRJobStatus status)
      Set the state (MCRJobStatus) of the job.
      Parameters:
      status - - the job status
    • getAdded

      public Date getAdded()
      Returns the adding date of job.
      Returns:
      the add date of the job
    • setAdded

      public void setAdded(Date added)
      Set the adding date.
    • getStart

      public Date getStart()
      Returns the starting date of execution.
      Returns:
      the job start date
    • setStart

      public void setStart(Date start)
      Set the job starting date.
      Parameters:
      start - - the starting date
    • getFinished

      public Date getFinished()
      Returns the finishing date of execution.
      Returns:
      the finishing date
    • setFinished

      public void setFinished(Date finished)
      Set the finishing date of execution.
      Parameters:
      finished - - the finishing date
    • getParameters

      public Map<String,String> getParameters()
      Returns all set parameters of the job.
      Returns:
      the job parameters
    • setParameters

      public void setParameters(Map<String,String> parameters)
      Set all job parameters.
      Parameters:
      parameters - - the job parameters
    • getParameter

      public String getParameter(String key)
      Returns an single parameter by it's name.
      Parameters:
      key - - the parameter name.
      Returns:
      the value of the parameter.
    • setParameter

      public void setParameter(String key, String value)
      Set an single parameter.
      Parameters:
      key - - the parameter name
      value - - the parameter value
    • clone

      public MCRJob clone()
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object