public class MetaDataInstanceFactory extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static long | DEFAULT_JOB_EXECUTION_IDThe default id for a job execution (123L) | 
| static long | DEFAULT_JOB_INSTANCE_IDThe default id for a job instance (12L) | 
| static String | DEFAULT_JOB_NAMEThe default name for a job ("job") | 
| static long | DEFAULT_STEP_EXECUTION_IDThe default id for a step execution (1234L) | 
| static String | DEFAULT_STEP_NAMEThe default name for a step ("step") | 
| Constructor and Description | 
|---|
| MetaDataInstanceFactory() | 
| Modifier and Type | Method and Description | 
|---|---|
| static JobExecution | createJobExecution()Create a  JobExecutionwith default parameters. | 
| static JobExecution | createJobExecution(Long executionId)Create a  JobExecutionwith the parameters provided. | 
| static JobExecution | createJobExecution(String jobName,
                  Long instanceId,
                  Long executionId)Create a  JobExecutionwith the parameters provided. | 
| static JobExecution | createJobExecution(String jobName,
                  Long instanceId,
                  Long executionId,
                  JobParameters jobParameters)Create a  JobExecutionwith the parameters provided. | 
| static JobExecution | createJobExecution(String jobName,
                  Long instanceId,
                  Long executionId,
                  String jobParameters)Create a  JobExecutionwith the parameters provided. | 
| static JobExecution | createJobExecutionWithStepExecutions(Long executionId,
                                    Collection<String> stepNames)Create a  JobExecutionwith the parameters provided with attached
 step executions. | 
| static JobInstance | createJobInstance()Create a  JobInstancewith default parameters. | 
| static JobInstance | createJobInstance(String jobName,
                 Long instanceId)Create a  JobInstancewith the parameters provided. | 
| static StepExecution | createStepExecution()Create a  StepExecutionwith default parameters. | 
| static StepExecution | createStepExecution(ExecutionContext executionContext)Create a  StepExecutionand all its parent entities with default
 values, but using theExecutionContextprovided. | 
| static StepExecution | createStepExecution(JobExecution jobExecution,
                   String stepName,
                   Long executionId)Create a  StepExecutionwith the parameters provided. | 
| static StepExecution | createStepExecution(JobParameters jobParameters)Create a  StepExecutionand all its parent entities with default
 values, but using theJobParametersprovided. | 
| static StepExecution | createStepExecution(JobParameters jobParameters,
                   ExecutionContext executionContext)Create a  StepExecutionand all its parent entities with default
 values, but using theExecutionContextandJobParametersprovided. | 
| static StepExecution | createStepExecution(String stepName,
                   Long executionId)Create a  StepExecutionwith the parameters provided. | 
public static final String DEFAULT_JOB_NAME
public static final long DEFAULT_JOB_INSTANCE_ID
public static final long DEFAULT_JOB_EXECUTION_ID
public static final String DEFAULT_STEP_NAME
public static final long DEFAULT_STEP_EXECUTION_ID
public static JobInstance createJobInstance(String jobName, Long instanceId)
JobInstance with the parameters provided.jobName - the name of the jobinstanceId - the Id of the JobInstanceJobInstance with empty JobParameterspublic static JobInstance createJobInstance()
JobInstance with default parameters.JobInstance with name=DEFAULT_JOB_NAME,
 id=DEFAULT_JOB_INSTANCE_ID and empty parameterspublic static JobExecution createJobExecution()
JobExecution with default parameters.JobExecution with id=DEFAULT_JOB_EXECUTION_IDpublic static JobExecution createJobExecution(Long executionId)
JobExecution with the parameters provided.executionId - the id for the JobExecutionJobExecution with valid JobInstancepublic static JobExecution createJobExecution(String jobName, Long instanceId, Long executionId)
JobExecution with the parameters provided.jobName - the name of the jobinstanceId - the id for the JobInstanceexecutionId - the id for the JobExecutionJobExecution with empty JobParameterspublic static JobExecution createJobExecution(String jobName, Long instanceId, Long executionId, String jobParameters)
JobExecution with the parameters provided.jobName - the name of the jobinstanceId - the Id of the JobInstanceexecutionId - the id for the JobExecutionjobParameters - comma or new line separated name=value pairsJobExecutionpublic static JobExecution createJobExecution(String jobName, Long instanceId, Long executionId, JobParameters jobParameters)
JobExecution with the parameters provided.jobName - the name of the jobinstanceId - the Id of the JobInstanceexecutionId - the id for the JobExecutionjobParameters - an instance of JobParametersJobExecutionpublic static StepExecution createStepExecution()
StepExecution with default parameters.StepExecution with stepName="step" and
 id=DEFAULT_STEP_EXECUTION_IDpublic static StepExecution createStepExecution(String stepName, Long executionId)
StepExecution with the parameters provided.stepName - the stepName for the StepExecutionexecutionId - the id for the StepExecutionStepExecution with a JobExecution having
 default propertiespublic static StepExecution createStepExecution(JobExecution jobExecution, String stepName, Long executionId)
StepExecution with the parameters provided.stepName - the stepName for the StepExecutionexecutionId - the id for the StepExecutionStepExecution with the given JobExecutionpublic static JobExecution createJobExecutionWithStepExecutions(Long executionId, Collection<String> stepNames)
JobExecution with the parameters provided with attached
 step executions.executionId - the JobExecution idstepNames - the names of the step executionsJobExecution with step executions as specified, each
 with a unique idpublic static StepExecution createStepExecution(JobParameters jobParameters, ExecutionContext executionContext)
StepExecution and all its parent entities with default
 values, but using the ExecutionContext and JobParameters
 provided.jobParameters - come JobParametersexecutionContext - some ExecutionContextStepExecution with the execution context providedpublic static StepExecution createStepExecution(JobParameters jobParameters)
StepExecution and all its parent entities with default
 values, but using the JobParameters provided.jobParameters - some JobParametersStepExecution with the job parameters providedpublic static StepExecution createStepExecution(ExecutionContext executionContext)
StepExecution and all its parent entities with default
 values, but using the ExecutionContext provided.executionContext - some ExecutionContextStepExecution with the execution context providedCopyright © 2014 Pivotal. All rights reserved.