本文整理匯總了Java中org.springframework.batch.core.JobExecution.setJobInstance方法的典型用法代碼示例。如果您正苦於以下問題:Java JobExecution.setJobInstance方法的具體用法?Java JobExecution.setJobInstance怎麽用?Java JobExecution.setJobInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.batch.core.JobExecution
的用法示例。
在下文中一共展示了JobExecution.setJobInstance方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: unmarshal
import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
@Override
public StepExecution unmarshal(AdaptedStepExecution v) throws Exception {
JobExecution je = new JobExecution(v.getJobExecutionId());
JobInstance ji = new JobInstance(v.getJobInstanceId(), v.getJobName());
je.setJobInstance(ji);
StepExecution step = new StepExecution(v.getStepName(), je);
step.setId(v.getId());
step.setStartTime(v.getStartTime());
step.setEndTime(v.getEndTime());
step.setReadSkipCount(v.getReadSkipCount());
step.setWriteSkipCount(v.getWriteSkipCount());
step.setProcessSkipCount(v.getProcessSkipCount());
step.setReadCount(v.getReadCount());
step.setWriteCount(v.getWriteCount());
step.setFilterCount(v.getFilterCount());
step.setRollbackCount(v.getRollbackCount());
step.setExitStatus(new ExitStatus(v.getExitCode()));
step.setLastUpdated(v.getLastUpdated());
step.setVersion(v.getVersion());
step.setStatus(v.getStatus());
step.setExecutionContext(v.getExecutionContext());
return step;
}
示例2: marshallStepExecutionTest
import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
@Test
public void marshallStepExecutionTest() throws Exception {
JobInstance jobInstance = new JobInstance(1234L, "test");
JobExecution jobExecution = new JobExecution(123L);
jobExecution.setJobInstance(jobInstance);
StepExecution step = new StepExecution("testStep", jobExecution);
step.setLastUpdated(new Date(System.currentTimeMillis()));
StepExecutionAdapter adapter = new StepExecutionAdapter();
AdaptedStepExecution adStep = adapter.marshal(step);
jaxb2Marshaller.marshal(adStep, result);
Fragment frag = new Fragment(new DOMBuilder().build(doc));
frag.setNamespaces(getNamespaceProvider().getNamespaces());
frag.prettyPrint();
frag.assertElementExists("/msb:stepExecution");
frag.assertElementExists("/msb:stepExecution/msb:lastUpdated");
frag.assertElementValue("/msb:stepExecution/msb:stepName", "testStep");
}
開發者ID:marklogic-community,項目名稱:marklogic-spring-batch,代碼行數:18,代碼來源:MarshallSpringBatchPojoToXmlTest.java
示例3: unmarshal
import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
@Override
public JobExecution unmarshal(AdaptedJobExecution v) throws Exception {
JobExecution jobExec = new JobExecution(v.getId(), v.getJobParameters());
jobExec.setJobInstance(v.getJobInstance());
jobExec.setCreateTime(v.getCreateDateTime());
jobExec.setEndTime(v.getEndDateTime());
jobExec.setLastUpdated(v.getLastUpdatedDateTime());
jobExec.setStartTime(v.getStartDateTime());
jobExec.setStatus(BatchStatus.valueOf(v.getStatus()));
jobExec.setExitStatus(new ExitStatus(v.getExitCode(), ""));
jobExec.addStepExecutions(v.getStepExecutions());
jobExec.setVersion(v.getVersion());
jobExec.setExecutionContext(v.getExecutionContext());
return jobExec;
}
示例4: createMasterStepExecution
import org.springframework.batch.core.JobExecution; //導入方法依賴的package包/類
private StepExecution createMasterStepExecution() {
JobExecution jobExecution = new JobExecution(1L);
jobExecution.setJobInstance(new JobInstance(2L, "partitionedJob"));
StepExecution masterStepExecution = new StepExecution("masterStep", jobExecution);
masterStepExecution.setId(3L);
return masterStepExecution;
}