org.springframework.batch.core
Class JobInstance

java.lang.Object
  extended by org.springframework.batch.core.Entity
      extended by org.springframework.batch.core.JobInstance
All Implemented Interfaces:
Serializable

public class JobInstance
extends Entity

Batch domain object representing a uniquely identifiable job run - it's identity is given by the pair Job and JobParameters. JobInstance can be restarted multiple times in case of execution failure and it's lifecycle ends with first successful execution. Trying to execute an existing JobIntance that has already completed successfully will result in error. Error will be raised also for an attempt to restart a failed JobInstance if the Job is not restartable.

Author:
Lucas Ward, Dave Syer, Robert Kasanicky
See Also:
Job, JobParameters, JobExecution, Serialized Form

Constructor Summary
JobInstance(Long id, JobParameters jobParameters, String jobName)
           
 
Method Summary
 String getJobName()
           
 JobParameters getJobParameters()
           
 String toString()
           
 
Methods inherited from class org.springframework.batch.core.Entity
equals, getId, getVersion, hashCode, incrementVersion, setId, setVersion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobInstance

public JobInstance(Long id,
                   JobParameters jobParameters,
                   String jobName)
Method Detail

getJobParameters

public JobParameters getJobParameters()
Returns:
JobParameters

getJobName

public String getJobName()
Returns:
the job name. (Equivalent to getJob().getName())

toString

public String toString()
Overrides:
toString in class Entity


Copyright © 2013 SpringSource. All Rights Reserved.