当前位置: 首页>>代码示例>>Java>>正文


Java JobInstance.getId方法代码示例

本文整理汇总了Java中org.springframework.batch.core.JobInstance.getId方法的典型用法代码示例。如果您正苦于以下问题:Java JobInstance.getId方法的具体用法?Java JobInstance.getId怎么用?Java JobInstance.getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.batch.core.JobInstance的用法示例。


在下文中一共展示了JobInstance.getId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AdaptedJobInstance

import org.springframework.batch.core.JobInstance; //导入方法依赖的package包/类
public AdaptedJobInstance(JobInstance jobInstance) {
	this.id = jobInstance.getId();
	if (jobInstance.getVersion() == null) {
		jobInstance.setVersion(0);
	} else {
		this.setVersion(jobInstance.getVersion());
	}
	this.jobName = jobInstance.getJobName();
}
 
开发者ID:marklogic-community,项目名称:marklogic-spring-batch,代码行数:10,代码来源:AdaptedJobInstance.java

示例2: findJobExecutions

import org.springframework.batch.core.JobInstance; //导入方法依赖的package包/类
@Override
public List<JobExecution> findJobExecutions(JobInstance jobInstance) {
    String directory = properties.getJobRepositoryDirectory() + "/" + jobInstance.getId() + "/";
    StructuredQueryBuilder qb = new StructuredQueryBuilder(properties.getSearchOptions());
    StructuredQueryDefinition querydef =
            qb.and(
                    qb.directory(true, directory),
                    qb.collection(properties.getJobExecutionCollection())
            );
    QueryManager queryMgr = databaseClient.newQueryManager();
    SearchHandle results = queryMgr.search(querydef, new SearchHandle());
    MatchDocumentSummary[] summaries = results.getMatchResults();
    List<JobExecution> jobExecutions = new ArrayList<JobExecution>();

    DocumentManager docMgr = databaseClient.newXMLDocumentManager();
    for (MatchDocumentSummary summary : summaries) {
        DocumentDescriptor desc = docMgr.exists(summary.getUri());
        JAXBHandle<AdaptedJobExecution> jaxbHandle = new JAXBHandle<AdaptedJobExecution>(jaxbContext());
        summary.getFirstSnippet(jaxbHandle);
        AdaptedJobExecution aJobExecution = jaxbHandle.get();
        try {
            JobExecution jobExecution = adapter.unmarshal(aJobExecution);
            jobExecution.setVersion((int) desc.getVersion());
            jobExecutions.add(jobExecution);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    return jobExecutions;
}
 
开发者ID:marklogic-community,项目名称:marklogic-spring-batch,代码行数:31,代码来源:MarkLogicJobExecutionDao.java

示例3: toJobInstanceResource

import org.springframework.batch.core.JobInstance; //导入方法依赖的package包/类
public static JobInstanceResource toJobInstanceResource(final JobInstance jobInstance) {
    final JobInstanceResource job = new JobInstanceResource(jobInstance.getId());
    job.setName(jobInstance.getJobName());
    return job;
}
 
开发者ID:OHDSI,项目名称:WebAPI,代码行数:6,代码来源:JobUtils.java

示例4: toInstanceInfo

import org.springframework.batch.core.JobInstance; //导入方法依赖的package包/类
private JobInstanceInfo toInstanceInfo(final JobInstance instance) {
	final LatestExecutions latest = getLatestExecutions(instance);

	return new JobInstanceInfo(instance.getId(), instance.getJobName(), latest.getLatestExecution(),
			latest.getLatestSuccessfulExecution());
}
 
开发者ID:phjardas,项目名称:spring-batch-tools,代码行数:7,代码来源:BatchController.java

示例5: getJobName

import org.springframework.batch.core.JobInstance; //导入方法依赖的package包/类
private String getJobName(JobInstance jobInstance, JobStartParams jobStartParams) {
    return jobInstance.getJobName() + " id: " + jobInstance.getId();
}
 
开发者ID:cegeka,项目名称:batchers,代码行数:4,代码来源:JobExecutionMapper.java


注:本文中的org.springframework.batch.core.JobInstance.getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。