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


Java FieldSetMapper类代码示例

本文整理汇总了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);
}
 
开发者ID:imCodePartnerAB,项目名称:iVIS,代码行数:4,代码来源:EntityLoader.java

示例4: productFieldSetMapper

import org.springframework.batch.item.file.mapping.FieldSetMapper; //导入依赖的package包/类
@Bean
public FieldSetMapper<PartnerProduct> productFieldSetMapper() {
	return new PartnerProductFieldSetMapper();
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:5,代码来源:TransformingProcessingConfiguration.java

示例5: productFieldSetMapper

import org.springframework.batch.item.file.mapping.FieldSetMapper; //导入依赖的package包/类
@Bean
public FieldSetMapper<Product> productFieldSetMapper() {
	return new ProductFieldSetMapper();
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:5,代码来源:FlatFileReaderConfiguration.java

示例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;
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:7,代码来源:FlatFileReaderConfiguration.java

示例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;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:5,代码来源:CsvItemReaderBuilder.java


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