public class MetaDataInstanceFactory
extends java.lang.Object
JobExecution,
JobInstance and StepExecution.| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_JOB_EXECUTION_ID
The default id for a job execution (123L)
|
static long |
DEFAULT_JOB_INSTANCE_ID
The default id for a job instance (12L)
|
static java.lang.String |
DEFAULT_JOB_NAME
The default name for a job ("job")
|
static long |
DEFAULT_STEP_EXECUTION_ID
The default id for a step execution (1234L)
|
static java.lang.String |
DEFAULT_STEP_NAME
The default name for a step ("step")
|
| Constructor and Description |
|---|
MetaDataInstanceFactory() |
| Modifier and Type | Method and Description |
|---|---|
static org.springframework.batch.core.JobExecution |
createJobExecution()
Create a
JobExecution with default parameters. |
static org.springframework.batch.core.JobExecution |
createJobExecution(java.lang.Long executionId)
Create a
JobExecution with the parameters provided. |
static org.springframework.batch.core.JobExecution |
createJobExecution(java.lang.String jobName,
java.lang.Long instanceId,
java.lang.Long executionId)
Create a
JobExecution with the parameters provided. |
static org.springframework.batch.core.JobExecution |
createJobExecution(java.lang.String jobName,
java.lang.Long instanceId,
java.lang.Long executionId,
org.springframework.batch.core.JobParameters jobParameters)
Create a
JobExecution with the parameters provided. |
static org.springframework.batch.core.JobExecution |
createJobExecution(java.lang.String jobName,
java.lang.Long instanceId,
java.lang.Long executionId,
java.lang.String jobParameters)
Create a
JobExecution with the parameters provided. |
static org.springframework.batch.core.JobExecution |
createJobExecutionWithStepExecutions(java.lang.Long executionId,
java.util.Collection<java.lang.String> stepNames)
Create a
JobExecution with the parameters provided with attached
step executions. |
static org.springframework.batch.core.JobInstance |
createJobInstance()
Create a
JobInstance with default parameters. |
static org.springframework.batch.core.JobInstance |
createJobInstance(java.lang.String jobName,
java.lang.Long instanceId)
Create a
JobInstance with the parameters provided. |
static org.springframework.batch.core.StepExecution |
createStepExecution()
Create a
StepExecution with default parameters. |
static org.springframework.batch.core.StepExecution |
createStepExecution(org.springframework.batch.item.ExecutionContext executionContext)
Create a
StepExecution and all its parent entities with default
values, but using the ExecutionContext provided. |
static org.springframework.batch.core.StepExecution |
createStepExecution(org.springframework.batch.core.JobExecution jobExecution,
java.lang.String stepName,
java.lang.Long executionId)
Create a
StepExecution with the parameters provided. |
static org.springframework.batch.core.StepExecution |
createStepExecution(org.springframework.batch.core.JobParameters jobParameters)
Create a
StepExecution and all its parent entities with default
values, but using the JobParameters provided. |
static org.springframework.batch.core.StepExecution |
createStepExecution(org.springframework.batch.core.JobParameters jobParameters,
org.springframework.batch.item.ExecutionContext executionContext)
Create a
StepExecution and all its parent entities with default
values, but using the ExecutionContext and JobParameters
provided. |
static org.springframework.batch.core.StepExecution |
createStepExecution(java.lang.String stepName,
java.lang.Long executionId)
Create a
StepExecution with the parameters provided. |
public static final java.lang.String DEFAULT_JOB_NAME
public static final long DEFAULT_JOB_INSTANCE_ID
public static final long DEFAULT_JOB_EXECUTION_ID
public static final java.lang.String DEFAULT_STEP_NAME
public static final long DEFAULT_STEP_EXECUTION_ID
public static org.springframework.batch.core.JobInstance createJobInstance(java.lang.String jobName,
java.lang.Long instanceId)
JobInstance with the parameters provided.jobName - the name of the jobinstanceId - the Id of the JobInstanceJobInstance with empty JobParameterspublic static org.springframework.batch.core.JobInstance createJobInstance()
JobInstance with default parameters.JobInstance with name=DEFAULT_JOB_NAME,
id=DEFAULT_JOB_INSTANCE_ID and empty parameterspublic static org.springframework.batch.core.JobExecution createJobExecution()
JobExecution with default parameters.JobExecution with id=DEFAULT_JOB_EXECUTION_IDpublic static org.springframework.batch.core.JobExecution createJobExecution(java.lang.Long executionId)
JobExecution with the parameters provided.executionId - the id for the JobExecutionJobExecution with valid JobInstancepublic static org.springframework.batch.core.JobExecution createJobExecution(java.lang.String jobName,
java.lang.Long instanceId,
java.lang.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 org.springframework.batch.core.JobExecution createJobExecution(java.lang.String jobName,
java.lang.Long instanceId,
java.lang.Long executionId,
java.lang.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 org.springframework.batch.core.JobExecution createJobExecution(java.lang.String jobName,
java.lang.Long instanceId,
java.lang.Long executionId,
org.springframework.batch.core.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 org.springframework.batch.core.StepExecution createStepExecution()
StepExecution with default parameters.StepExecution with stepName="step" and
id=DEFAULT_STEP_EXECUTION_IDpublic static org.springframework.batch.core.StepExecution createStepExecution(java.lang.String stepName,
java.lang.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 org.springframework.batch.core.StepExecution createStepExecution(org.springframework.batch.core.JobExecution jobExecution,
java.lang.String stepName,
java.lang.Long executionId)
StepExecution with the parameters provided.jobExecution - instance of JobExecution.stepName - the name for the StepExecution.executionId - the id for the StepExecution.StepExecution with the given JobExecution.public static org.springframework.batch.core.JobExecution createJobExecutionWithStepExecutions(java.lang.Long executionId,
java.util.Collection<java.lang.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 org.springframework.batch.core.StepExecution createStepExecution(org.springframework.batch.core.JobParameters jobParameters,
org.springframework.batch.item.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 org.springframework.batch.core.StepExecution createStepExecution(org.springframework.batch.core.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 org.springframework.batch.core.StepExecution createStepExecution(org.springframework.batch.item.ExecutionContext executionContext)
StepExecution and all its parent entities with default
values, but using the ExecutionContext provided.executionContext - some ExecutionContextStepExecution with the execution context provided