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


Java MapperFacade类代码示例

本文整理汇总了Java中ma.glasnost.orika.MapperFacade的典型用法代码示例。如果您正苦于以下问题:Java MapperFacade类的具体用法?Java MapperFacade怎么用?Java MapperFacade使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getMapperFacade

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
private MapperFacade getMapperFacade() {
	return mapperFactory.getMapperFacade();
}
 
开发者ID:GovernIB,项目名称:helium,代码行数:4,代码来源:ConversioTipusHelper.java

示例2: mapperFacade

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
@Bean
MapperFacade mapperFacade() {
	return new InsuranceHateoasMapper();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:5,代码来源:InsuranceHateoasConfig.java

示例3: HistoryDownloader

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
public HistoryDownloader(Arguments arguments, MapperFacade mapper) {
    this.arguments = arguments;
    this.mapper = mapper;
    this.apiClient = new LimitedApiClient(arguments.getToken());
    this.apiExtensions = new ApiExtensions(this.apiClient, mapper);
}
 
开发者ID:firov,项目名称:vk.history,代码行数:7,代码来源:HistoryDownloader.java

示例4: getObject

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
public MapperFacade getObject() throws Exception {

        MapperFactory mapperFactory = new DefaultMapperFactory.Builder()
                .classMapBuilderFactory(new AnnotationClassMapBuilder.Factory())
                .build();
        mapperFactory.getConverterFactory().registerConverter(new PassThroughConverter(org.joda.time.DateTime.class));

//        mapperFactory.registerClassMap(
//                mapperFactory.classMap(ComplexCriterion.class, gov.va.vba.persistence.entity.ComplexCriterion.class)
//                        .field("criteria", "simpleCriteria")
//                        .byDefault()
//                        .toClassMap()
//        );

        return mapperFactory.getMapperFacade();
    }
 
开发者ID:VHAINNOVATIONS,项目名称:BCDS,代码行数:17,代码来源:MapperFacadeFactory.java

示例5: getObjectType

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
public Class<?> getObjectType() {
    return MapperFacade.class;
}
 
开发者ID:VHAINNOVATIONS,项目名称:BCDS,代码行数:4,代码来源:MapperFacadeFactory.java

示例6: getFascade

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
public MapperFacade getFascade() {
	return mapperFactory.getMapperFacade();
}
 
开发者ID:daflockinger,项目名称:spongeblog,代码行数:4,代码来源:BlogMapperFactory.java

示例7: mapper

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
protected MapperFacade mapper(){
	return mapperFactory.getFascade();
}
 
开发者ID:daflockinger,项目名称:spongeblog,代码行数:4,代码来源:BaseServiceImpl.java

示例8: beanMapper

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
@Bean
MapperFacade beanMapper() {
  return new DefaultMapperFactory.Builder().build().getMapperFacade();
}
 
开发者ID:adrobisch,项目名称:putput,代码行数:5,代码来源:DozerConfiguration.java

示例9: ApiExtensions

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
public ApiExtensions(IApiClient client, MapperFacade mapper) {
    this.client = client;
    this.mapper = mapper;
}
 
开发者ID:firov,项目名称:vk.history,代码行数:5,代码来源:ApiExtensions.java

示例10: getMapper

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
@Override
public MapperFacade getMapper() {
	return getFactory().getMapperFacade();
}
 
开发者ID:SmarterApp,项目名称:TechnologyReadinessTool,代码行数:5,代码来源:MappingServiceImpl.java

示例11: list

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
/**
 * General convert method, it will convert VO to RO without any other logic
 *
 * @param vo    converted object
 * @param clazz class of converted object
 * @param <I>   Generic class of input
 * @param <O>   Generic class of output
 * @return converted object
 */
public <I, O> O list(final I vo, Class<O> clazz) {
    MapperFacade mapper = mapperFactory.getMapperFacade();
    return mapper.map(vo, clazz);
}
 
开发者ID:petrleocompel,项目名称:docker-dash,代码行数:14,代码来源:ObjectFactory.java

示例12: convert

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
/**
 * eneral convert method, it will convert list VO to list RO without any other logic
 *
 * @param vos   list of converted object
 * @param clazz class of converted object
 * @param <I>   Generic class of input
 * @param <O>   Generic class of output
 * @return converted object
 */
public <I, O> List<O> convert(final Iterable<I> vos, Class<O> clazz) {
    MapperFacade mapper = mapperFactory.getMapperFacade();
    return mapper.mapAsList(vos, clazz);
}
 
开发者ID:petrleocompel,项目名称:docker-dash,代码行数:14,代码来源:ObjectFactory.java

示例13: doMapping

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private <From, To> To doMapping(final Class<To> toClass, From from, String mappingName, MappingType mappingType, boolean beenMappedWithOrika, To to) {

    CustomMappingWrapper.Orika orikaOverrideSetting = CustomMappingWrapper.Orika.DEFAULT;

    if (from == null) return null;

    if (from instanceof CustomMappingWrapper) {
        CustomMappingWrapper cmo = (CustomMappingWrapper) from;
        from = (From)cmo.getObject();
        mappingType = cmo.getMappingType();
        mappingName = cmo.getMappingName();
        orikaOverrideSetting = cmo.getOrika();

        if (from == null) return null;

    }

    Class fromClass = from.getClass();

    boolean mappedWithOrika = false;

    if (orikaOverrideSetting == CustomMappingWrapper.Orika.FORCE_ON || (orikaOverrideSetting == CustomMappingWrapper.Orika.DEFAULT && (!beenMappedWithOrika && autoMapUsingOrika))) {

        //TODO move to cache
        MapperFacade orikaMapper;

        if (!mapperFactory.existsRegisteredMapper(TypeFactory.valueOf(from.getClass()), TypeFactory.valueOf(toClass), false)) {

            mapperFactory.classMap(fromClass, toClass)
                    .byDefault().register();
        }

        orikaMapper = mapperFactory.getMapperFacade();

        to = orikaMapper.map(from, toClass);

        beenMappedWithOrika = true;
        mappedWithOrika = true;

    }

    if (to == null) {
        try {
            to = toClass.newInstance();
        } catch (IllegalAccessException | InstantiationException e) {
            throw new RuntimeException("Error creating instace of " + toClass, e);
        }
    }

    doAudibleMapping(toClass, from, mappingName, mappingType, fromClass, to, beenMappedWithOrika, mappedWithOrika);

    handlePostProcessor(to, toClass, from, mappingName);

    return to;
}
 
开发者ID:nfl,项目名称:audible,代码行数:57,代码来源:DomainMapper.java

示例14: getMapper

import ma.glasnost.orika.MapperFacade; //导入依赖的package包/类
public MapperFacade getMapper(); 
开发者ID:SmarterApp,项目名称:TechnologyReadinessTool,代码行数:2,代码来源:MappingService.java


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