org.modelmapper.internal
Class MappingBuilderImpl<S,D>

java.lang.Object
  extended by org.modelmapper.internal.MappingBuilderImpl<S,D>
All Implemented Interfaces:
ConditionExpression<S,D>, ConverterExpression<S,D>, MapExpression<D>, ProviderExpression<S,D>, SkipExpression<D>

public class MappingBuilderImpl<S,D>
extends Object
implements ConditionExpression<S,D>

Builds explicit property mappings.

Author:
Jonathan Halterman

Method Summary
 S getSource()
           
 D map()
          Defines a mapping to a destination.
 D map(Object source)
          Defines a mapping from the source to a destination.
 D skip()
          Specifies that mapping for the destination property be skipped during the mapping process.
 ConditionExpression<S,D> using(Converter<?,?> converter)
          Specifies the converter to use for converting to the destination property hierarchy.
 ConditionExpression<S,D> when(Condition<?,?> condition)
          Specifies the condition that must apply in order for mapping to take place for a particular destination property hierarchy.
 ConditionExpression<S,D> withProvider(Provider<?> provider)
          Specifies the provider to be used for providing instances of the mapped property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

skip

public D skip()
Description copied from interface: SkipExpression
Specifies that mapping for the destination property be skipped during the mapping process. See the EDSL examples at PropertyMap.

Specified by:
skip in interface SkipExpression<D>

map

public D map()
Description copied from interface: MapExpression
Defines a mapping to a destination. See the EDSL examples at PropertyMap.

Specified by:
map in interface MapExpression<D>

map

public D map(Object source)
Description copied from interface: MapExpression
Defines a mapping from the source to a destination. See the EDSL examples at PropertyMap.

Specified by:
map in interface MapExpression<D>
Parameters:
source - to map from

using

public ConditionExpression<S,D> using(Converter<?,?> converter)
Description copied from interface: ConverterExpression
Specifies the converter to use for converting to the destination property hierarchy. When used with deep mapping the converter should convert to an instance of the last destination property. See the EDSL examples.

Specified by:
using in interface ConverterExpression<S,D>
Parameters:
converter - to use when mapping the property

when

public ConditionExpression<S,D> when(Condition<?,?> condition)
Description copied from interface: ConditionExpression
Specifies the condition that must apply in order for mapping to take place for a particular destination property hierarchy. See the EDSL examples.

Specified by:
when in interface ConditionExpression<S,D>
Parameters:
condition - that must apply when mapping the property

withProvider

public ConditionExpression<S,D> withProvider(Provider<?> provider)
Description copied from interface: ProviderExpression
Specifies the provider to be used for providing instances of the mapped property. When used with deep mapping the provider should provide an instance of the last destination property. See the EDSL examples.

Specified by:
withProvider in interface ProviderExpression<S,D>
Parameters:
provider - to use for providing the destination property

getSource

public S getSource()


Copyright © 2011. All Rights Reserved.