ma.glasnost.orika
Interface Mapper<A,B>

All Superinterfaces:
MappedTypePair<A,B>
All Known Implementing Classes:
CustomMapper, GeneratedMapperBase, MapperBase.MapperBaseAdapter, ReversedMapper

public interface Mapper<A,B>
extends MappedTypePair<A,B>

Defines a contract between internal parts of Orika such as MapperFacade, MapperGenerator, MapperFactory and generated mappers.

Author:
S.M. El Aatifi
See Also:
MapperFacade

Method Summary
 Boolean favorsExtension()
          Specifies whether this mapper is abstract, meaning that it can only be used in combination with a non-abstract mapper.
 void mapAtoB(A a, B b, MappingContext context)
          Maps the properties of an instance of type A to the properties of an instance of type B.
 void mapBtoA(B b, A a, MappingContext context)
          Maps the properties of an instance of type B to the properties of an instance of type A.
 void setMapperFacade(MapperFacade mapper)
          Store an instance of the current MapperFacade which may be used in mapping of nested types.
 void setUsedMappers(Mapper<Object,Object>[] mapper)
          Store the set of custom mappers used by this mapper.
 
Methods inherited from interface ma.glasnost.orika.MappedTypePair
getAType, getBType
 

Method Detail

mapAtoB

void mapAtoB(A a,
             B b,
             MappingContext context)
Maps the properties of an instance of type A to the properties of an instance of type B.

Parameters:
a - the object from which to read the properties
b - the object onto which the properties should be mapped
context -

mapBtoA

void mapBtoA(B b,
             A a,
             MappingContext context)
Maps the properties of an instance of type B to the properties of an instance of type A.

Parameters:
b - the object from which to read the properties
a - the object onto which the properties should be mapped
context -

setMapperFacade

void setMapperFacade(MapperFacade mapper)
Store an instance of the current MapperFacade which may be used in mapping of nested types.

Parameters:
mapper -

setUsedMappers

void setUsedMappers(Mapper<Object,Object>[] mapper)
Store the set of custom mappers used by this mapper.

Parameters:
mapper -

favorsExtension

Boolean favorsExtension()
Specifies whether this mapper is abstract, meaning that it can only be used in combination with a non-abstract mapper.



Copyright © 2014 Glasnost. All Rights Reserved.