當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。