本文整理汇总了Java中javax.batch.api.chunk.ItemReader类的典型用法代码示例。如果您正苦于以下问题:Java ItemReader类的具体用法?Java ItemReader怎么用?Java ItemReader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ItemReader类属于javax.batch.api.chunk包,在下文中一共展示了ItemReader类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createItemReaderProxy
import javax.batch.api.chunk.ItemReader; //导入依赖的package包/类
public static ItemReaderProxy createItemReaderProxy(String id, InjectionReferences injectionRefs, StepContextImpl stepContext) throws ArtifactValidationException {
ItemReader loadedArtifact = (ItemReader)loadArtifact(id, injectionRefs);
ItemReaderProxy proxy = new ItemReaderProxy(loadedArtifact);
proxy.setStepContext(stepContext);
return proxy;
}
示例2: initializeUI
import javax.batch.api.chunk.ItemReader; //导入依赖的package包/类
@Override
public void initializeUI(UIBuilder builder) throws Exception {
reader.setCompleter(new BatchUICompleter(AbstractItemReader.class,
ItemReader.class));
processor.setCompleter(new BatchUICompleter(null, ItemProcessor.class));
writer.setCompleter(new BatchUICompleter(AbstractItemWriter.class,
ItemWriter.class));
reader.addValidator(new NamedValidator());
processor.addValidator(new NamedValidator());
writer.addValidator(new NamedValidator());
jobXML.addValidator(new UIValidator() {
@Override
public void validate(UIValidationContext context) {
String jobXMLName = ((String)context.getCurrentInputComponent().getValue());
FileResource<?> resource = getJobXMLResource(context.getUIContext(),
jobXMLName);
if (resource.exists()) {
context.addValidationError(context.getCurrentInputComponent(), resource.getFullyQualifiedName() + " already exists");
}
}
});
builder.add(jobXML).add(reader).add(processor).add(writer);
}
示例3: CheckpointManager
import javax.batch.api.chunk.ItemReader; //导入依赖的package包/类
public CheckpointManager(final ItemReader reader, final ItemWriter writer,
final CheckpointAlgorithm chkptAlg,
final long jobInstanceID, final String stepId,
final PersistenceManagerService persistenceManagerService,
final DataRepresentationService dataRepresentationService) {
this.readerProxy = reader;
this.writerProxy = writer;
this.checkpointAlgorithm = chkptAlg;
this.stepId = stepId;
this.jobInstanceID = jobInstanceID;
this.persistenceManagerService = persistenceManagerService;
this.dataRepresentationService = dataRepresentationService;
}
示例4: ItemReaderProxy
import javax.batch.api.chunk.ItemReader; //导入依赖的package包/类
ItemReaderProxy(ItemReader delegate) {
super(delegate);
}
示例5: createItemReaderProxy
import javax.batch.api.chunk.ItemReader; //导入依赖的package包/类
public static ItemReader createItemReaderProxy(final BatchArtifactFactory factory, final String id, final InjectionReferences injectionRefs,
final RuntimeJobExecution execution) {
final ItemReader loadedArtifact = (ItemReader) loadArtifact(factory, id, injectionRefs, execution);
return createProxy(loadedArtifact, injectionRefs, "readItem");
}
示例6: open
import javax.batch.api.chunk.ItemReader; //导入依赖的package包/类
@Override
public void open(final Serializable checkpoint) throws Exception {
groovyInstance = Groovys.newInstance(ItemReader.class, scriptPath, jobContext, stepContext);
delegate = groovyInstance.getInstance();
delegate.open(checkpoint);
}