本文整理汇总了Java中org.springframework.batch.item.file.mapping.FieldSetMapper类的典型用法代码示例。如果您正苦于以下问题:Java FieldSetMapper类的具体用法?Java FieldSetMapper怎么用?Java FieldSetMapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FieldSetMapper类属于org.springframework.batch.item.file.mapping包,在下文中一共展示了FieldSetMapper类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: productLineMapper
import org.springframework.batch.item.file.mapping.FieldSetMapper; //导入依赖的package包/类
@Bean
public LineMapper<Product> productLineMapper() throws Exception {
// HINT: 한 파일에 여러 종류의 데이터가 혼재해 있을 때 씁니다.
PatternMatchingCompositeLineMapper<Product> mapper = new PatternMatchingCompositeLineMapper<>();
Map<String, LineTokenizer> tokenizers = new HashMap<String, LineTokenizer>();
tokenizers.put("PRM*", mobilePhoneProductLineTokenizer());
tokenizers.put("PRB*", bookProductLineTokenizer());
mapper.setTokenizers(tokenizers);
Map<String, FieldSetMapper<Product>> mappers = new HashMap<String, FieldSetMapper<Product>>();
mappers.put("PRM*", mobilePhoneProductFieldSetMapper());
mappers.put("PRB*", bookProductFieldSetMapper());
mapper.setFieldSetMappers(mappers);
return mapper;
}
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:19,代码来源:JobStructureDelimitedMultiFlatFileConfig.java
示例2: mobilePhoneProductFieldSetMapper
import org.springframework.batch.item.file.mapping.FieldSetMapper; //导入依赖的package包/类
@Bean
public FieldSetMapper<Product> mobilePhoneProductFieldSetMapper() throws Exception {
BeanWrapperFieldSetMapper<Product> mapper =
new BeanWrapperFieldSetMapper<Product>();
mapper.setPrototypeBeanName("mobilePhoneProduct");
mapper.afterPropertiesSet();
return mapper;
}
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:10,代码来源:JobStructureDelimitedMultiFlatFileConfig.java
示例3: getFieldSetMapper
import org.springframework.batch.item.file.mapping.FieldSetMapper; //导入依赖的package包/类
public FieldSetMapper<T> getFieldSetMapper(FileOption fileOption) {
return new FieldSetMapperImpl(fileOption);
}
示例4: productFieldSetMapper
import org.springframework.batch.item.file.mapping.FieldSetMapper; //导入依赖的package包/类
@Bean
public FieldSetMapper<PartnerProduct> productFieldSetMapper() {
return new PartnerProductFieldSetMapper();
}
示例5: productFieldSetMapper
import org.springframework.batch.item.file.mapping.FieldSetMapper; //导入依赖的package包/类
@Bean
public FieldSetMapper<Product> productFieldSetMapper() {
return new ProductFieldSetMapper();
}
示例6: productFieldSetMapper
import org.springframework.batch.item.file.mapping.FieldSetMapper; //导入依赖的package包/类
@Bean
public FieldSetMapper<Product> productFieldSetMapper() {
BeanWrapperFieldSetMapper<Product> mapper = new BeanWrapperFieldSetMapper<Product>();
mapper.setTargetType(Product.class);
return mapper;
}
示例7: bookProductFieldSetMapper
import org.springframework.batch.item.file.mapping.FieldSetMapper; //导入依赖的package包/类
@Bean
public FieldSetMapper<Product> bookProductFieldSetMapper() throws Exception {
BeanWrapperFieldSetMapper<Product> mapper =
new BeanWrapperFieldSetMapper<Product>();
mapper.setPrototypeBeanName("bookProduct");
mapper.afterPropertiesSet();
return mapper;
}
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:10,代码来源:JobStructureDelimitedMultiFlatFileConfig.java
示例8: withFieldSetMapper
import org.springframework.batch.item.file.mapping.FieldSetMapper; //导入依赖的package包/类
public CsvItemReaderBuilder<T> withFieldSetMapper(final FieldSetMapper<T> fieldSetMapper) {
this.fieldSetMapper = fieldSetMapper;
return this;
}