ma.glasnost.orika
Class MapperBase.MapperBaseAdapter<A,B>

java.lang.Object
  extended by ma.glasnost.orika.CustomMapper<A,B>
      extended by ma.glasnost.orika.MapperBase.MapperBaseAdapter<A,B>
Type Parameters:
A -
B -
All Implemented Interfaces:
MappedTypePair<A,B>, Mapper<A,B>
Enclosing class:
MapperBase<A,B>

public static class MapperBase.MapperBaseAdapter<A,B>
extends CustomMapper<A,B>

Provides backward-compatibility for custom mappers that extend the deprecated MapperBase.

Author:
matt.deboer@gmail.com

Field Summary
 
Fields inherited from class ma.glasnost.orika.CustomMapper
aType, bType, mapperFacade
 
Constructor Summary
MapperBase.MapperBaseAdapter(MapperBase<A,B> delegate)
           
 
Method Summary
 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.
 
Methods inherited from class ma.glasnost.orika.CustomMapper
getAType, getBType, setUsedMappers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapperBase.MapperBaseAdapter

public MapperBase.MapperBaseAdapter(MapperBase<A,B> delegate)
Method Detail

mapAtoB

public void mapAtoB(A a,
                    B b,
                    MappingContext context)
Description copied from interface: Mapper
Maps the properties of an instance of type A to the properties of an instance of type B.

Specified by:
mapAtoB in interface Mapper<A,B>
Overrides:
mapAtoB in class CustomMapper<A,B>
Parameters:
a - the object from which to read the properties
b - the object onto which the properties should be mapped

mapBtoA

public void mapBtoA(B b,
                    A a,
                    MappingContext context)
Description copied from interface: Mapper
Maps the properties of an instance of type B to the properties of an instance of type A.

Specified by:
mapBtoA in interface Mapper<A,B>
Overrides:
mapBtoA in class CustomMapper<A,B>
Parameters:
b - the object from which to read the properties
a - the object onto which the properties should be mapped

setMapperFacade

public void setMapperFacade(MapperFacade mapper)
Description copied from interface: Mapper
Store an instance of the current MapperFacade which may be used in mapping of nested types.

Specified by:
setMapperFacade in interface Mapper<A,B>
Overrides:
setMapperFacade in class CustomMapper<A,B>


Copyright © 2013 Glasnost. All Rights Reserved.