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


Java DozerBeanMapper.setMappingFiles方法代码示例

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


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

示例1: mapper

import org.dozer.DozerBeanMapper; //导入方法依赖的package包/类
@Bean
public DozerBeanMapper mapper() {
    final DozerBeanMapper dozerBeanMapper = new DozerBeanMapper();
    dozerBeanMapper.setMappingFiles(Collections.singletonList("dozerJdk8Converters.xml"));
    dozerBeanMapper.addMapping(new StockToStockDtoMapping());
    return dozerBeanMapper;
}
 
开发者ID:akraskovski,项目名称:product-management-system,代码行数:8,代码来源:DozerConfig.java

示例2: DozerBean

import org.dozer.DozerBeanMapper; //导入方法依赖的package包/类
public DozerBean(List<String> mappingFiles) {
	dozer = new DozerBeanMapper();
	if(mappingFiles!=null){
		mappingFiles.add(0, GLOBAL_CONFIG);
	}else{
		mappingFiles = new ArrayList<String>(3);
		mappingFiles.add(GLOBAL_CONFIG);
	}
	dozer.setMappingFiles(mappingFiles);
}
 
开发者ID:wayshall,项目名称:onetwo,代码行数:11,代码来源:DozerBean.java

示例3: DozerTransformer

import org.dozer.DozerBeanMapper; //导入方法依赖的package包/类
/**
 * Constructor.
 * @param from From type.
 * @param to To type.
 * @param config config.
 */
protected DozerTransformer(final QName from, final QName to, List<String> configs) {
    super(from, to);
    _dozerBeanMapper = new DozerBeanMapper();
    if (configs != null && !configs.isEmpty()) {
        _dozerBeanMapper.setMappingFiles(configs);
    }
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:14,代码来源:DozerTransformer.java

示例4: mapFromPerson

import org.dozer.DozerBeanMapper; //导入方法依赖的package包/类
public static PersonBean mapFromPerson(Person sourceObject) {
	List<String> myMappingFiles = new ArrayList<String>();
	myMappingFiles.add("dozerMappings.xml");

	DozerBeanMapper mapper = new DozerBeanMapper();
	mapper.setMappingFiles(myMappingFiles);

	System.out.println("Mapping Person to PersonBean...");
	return (PersonBean) mapper.map(sourceObject, PersonBean.class);
}
 
开发者ID:IntroSDE,项目名称:introsde,代码行数:11,代码来源:PersonBeanDelegate.java

示例5: mapToPerson

import org.dozer.DozerBeanMapper; //导入方法依赖的package包/类
public static Person mapToPerson(PersonBean sourceObject) {
	
	List<String> myMappingFiles = new ArrayList<String>();
	myMappingFiles.add("dozerMappings.xml");

	DozerBeanMapper mapper = new DozerBeanMapper();
	mapper.setMappingFiles(myMappingFiles);
	
	System.out.println("Mapping PersonBean to Person...");
	return (Person) mapper.map(sourceObject, Person.class);
}
 
开发者ID:IntroSDE,项目名称:introsde,代码行数:12,代码来源:PersonBeanDelegate.java

示例6: mapFromPerson

import org.dozer.DozerBeanMapper; //导入方法依赖的package包/类
public static PersonAnnotationBean mapFromPerson(Person sourceObject) {
	List<String> myMappingFiles = new ArrayList<String>();
	myMappingFiles.add("dozerMappings.xml");

	DozerBeanMapper mapper = new DozerBeanMapper();
	mapper.setMappingFiles(myMappingFiles);

	System.out.println("Mapping Person to PersonAnnotationBean...");
	return (PersonAnnotationBean) mapper.map(sourceObject, PersonAnnotationBean.class);
}
 
开发者ID:IntroSDE,项目名称:introsde,代码行数:11,代码来源:PersonAnnotationBeanDelegate.java

示例7: mapToPerson

import org.dozer.DozerBeanMapper; //导入方法依赖的package包/类
public static Person mapToPerson(PersonAnnotationBean sourceObject) {
	List<String> myMappingFiles = new ArrayList<String>();
	myMappingFiles.add("dozerMappings.xml");

	DozerBeanMapper mapper = new DozerBeanMapper();
	mapper.setMappingFiles(myMappingFiles);

	System.out.println("Mapping PersonAnnotationBean to Person...");
	return (Person) mapper.map(sourceObject, Person.class);
}
 
开发者ID:IntroSDE,项目名称:introsde,代码行数:11,代码来源:PersonAnnotationBeanDelegate.java

示例8: createMapper

import org.dozer.DozerBeanMapper; //导入方法依赖的package包/类
/**
 * Creates and configures a bean mapper
 * 
 * @return the configured mapper object
 */
public static Mapper createMapper()
{
	// create a new dozer mapper
	DozerBeanMapper mapper = new DozerBeanMapper();
	
	// set the mapping files for this mapper
	mapper.setMappingFiles(Arrays.asList(MAPPING_FILES));
	
	return mapper;
}
 
开发者ID:ThreatConnect-Inc,项目名称:threatconnect-java,代码行数:16,代码来源:MapperUtil.java

示例9: mapper

import org.dozer.DozerBeanMapper; //导入方法依赖的package包/类
@Bean
DozerBeanMapper mapper() {
    DozerBeanMapper dozerBeanMapper = new DozerBeanMapper();
    dozerBeanMapper.setMappingFiles(Arrays.asList("dozer/domain-mapping.xml"));
    return dozerBeanMapper;
}
 
开发者ID:garbagetown,项目名称:springboot-tourreservation,代码行数:7,代码来源:Config.java


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