ma.glasnost.orika.impl
Class NonCyclicBoundMapperFacade<A,B>

java.lang.Object
  extended by ma.glasnost.orika.impl.NonCyclicBoundMapperFacade<A,B>
All Implemented Interfaces:
BoundMapperFacade<A,B>, MappedTypePair<A,B>

public class NonCyclicBoundMapperFacade<A,B>
extends Object

Author:
matt.deboer@gmail.com

Field Summary
protected  ma.glasnost.orika.impl.DefaultBoundMapperFacade.BoundStrategyCache aToB
           
protected  ma.glasnost.orika.impl.DefaultBoundMapperFacade.BoundStrategyCache aToBInPlace
           
protected  Type<A> aType
           
protected  ma.glasnost.orika.impl.DefaultBoundMapperFacade.BoundStrategyCache bToA
           
protected  ma.glasnost.orika.impl.DefaultBoundMapperFacade.BoundStrategyCache bToAInPlace
           
protected  Type<B> bType
           
protected  MappingContextFactory contextFactory
           
protected  MapperFactory mapperFactory
           
protected  ObjectFactory<A> objectFactoryA
           
protected  ObjectFactory<B> objectFactoryB
           
protected  Type rawAType
           
protected  Type rawBType
           
 
Method Summary
 Type<A> getAType()
           
 Type<B> getBType()
           
 B map(A source)
          Generates a new instance of the 'B' type based on the specified instance of 'A'
 B map(A source, B destination)
          Maps properties (in place) from the instance of 'A' to the provided instance of 'B'
 B map(A instanceA, B instanceB, MappingContext context)
          Maps properties (in place) from the instance of 'A' to the provided instance of 'B'
 B map(A instanceA, MappingContext context)
          Generates a new instance of the 'B' type based on the specified instance of 'A'
 A mapReverse(B source)
          Generates a new instance of the 'A' type based on the specified instance of 'B'
 A mapReverse(B destination, A source)
          Maps properties (in place) from the instance of 'B' to the provided instance of 'A'
 A mapReverse(B instanceB, A instanceA, MappingContext context)
          Maps properties (in place) from the instance of 'B' to the provided instance of 'A'
 A mapReverse(B instanceB, MappingContext context)
          Generates a new instance of the 'A' type based on the specified instance of 'B'
 B newObject(A source, MappingContext context)
          Returns a new instance of type B, using source instance of A for context
 A newObjectReverse(B source, MappingContext context)
          Returns a new instance of type A, using source instance of B for context
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

aToB

protected final ma.glasnost.orika.impl.DefaultBoundMapperFacade.BoundStrategyCache aToB

bToA

protected final ma.glasnost.orika.impl.DefaultBoundMapperFacade.BoundStrategyCache bToA

aToBInPlace

protected final ma.glasnost.orika.impl.DefaultBoundMapperFacade.BoundStrategyCache aToBInPlace

bToAInPlace

protected final ma.glasnost.orika.impl.DefaultBoundMapperFacade.BoundStrategyCache bToAInPlace

objectFactoryA

protected volatile ObjectFactory<A> objectFactoryA

objectFactoryB

protected volatile ObjectFactory<B> objectFactoryB

rawAType

protected final Type rawAType

rawBType

protected final Type rawBType

aType

protected final Type<A> aType

bType

protected final Type<B> bType

mapperFactory

protected final MapperFactory mapperFactory

contextFactory

protected final MappingContextFactory contextFactory
Method Detail

map

public B map(A source)
Description copied from interface: BoundMapperFacade
Generates a new instance of the 'B' type based on the specified instance of 'A'

Specified by:
map in interface BoundMapperFacade<A,B>
Returns:

mapReverse

public A mapReverse(B source)
Description copied from interface: BoundMapperFacade
Generates a new instance of the 'A' type based on the specified instance of 'B'

Specified by:
mapReverse in interface BoundMapperFacade<A,B>
Returns:

map

public B map(A source,
             B destination)
Description copied from interface: BoundMapperFacade
Maps properties (in place) from the instance of 'A' to the provided instance of 'B'

Specified by:
map in interface BoundMapperFacade<A,B>

mapReverse

public A mapReverse(B destination,
                    A source)
Description copied from interface: BoundMapperFacade
Maps properties (in place) from the instance of 'B' to the provided instance of 'A'

Specified by:
mapReverse in interface BoundMapperFacade<A,B>

getAType

public Type<A> getAType()
Specified by:
getAType in interface MappedTypePair<A,B>
Returns:
the 'A' type for this mapped pair

getBType

public Type<B> getBType()
Specified by:
getBType in interface MappedTypePair<A,B>
Returns:
the 'B' type for this mapped pair

map

public B map(A instanceA,
             MappingContext context)
Description copied from interface: BoundMapperFacade
Generates a new instance of the 'B' type based on the specified instance of 'A'

Specified by:
map in interface BoundMapperFacade<A,B>
Returns:

mapReverse

public A mapReverse(B instanceB,
                    MappingContext context)
Description copied from interface: BoundMapperFacade
Generates a new instance of the 'A' type based on the specified instance of 'B'

Specified by:
mapReverse in interface BoundMapperFacade<A,B>
Returns:

map

public B map(A instanceA,
             B instanceB,
             MappingContext context)
Description copied from interface: BoundMapperFacade
Maps properties (in place) from the instance of 'A' to the provided instance of 'B'

Specified by:
map in interface BoundMapperFacade<A,B>

mapReverse

public A mapReverse(B instanceB,
                    A instanceA,
                    MappingContext context)
Description copied from interface: BoundMapperFacade
Maps properties (in place) from the instance of 'B' to the provided instance of 'A'

Specified by:
mapReverse in interface BoundMapperFacade<A,B>

toString

public String toString()
Overrides:
toString in class Object

newObject

public B newObject(A source,
                   MappingContext context)
Description copied from interface: BoundMapperFacade
Returns a new instance of type B, using source instance of A for context

Specified by:
newObject in interface BoundMapperFacade<A,B>
Returns:

newObjectReverse

public A newObjectReverse(B source,
                          MappingContext context)
Description copied from interface: BoundMapperFacade
Returns a new instance of type A, using source instance of B for context

Specified by:
newObjectReverse in interface BoundMapperFacade<A,B>
Returns:


Copyright © 2013 Glasnost. All Rights Reserved.