Package org.modelmapper.builder
Interface ReferenceMapExpression<S,D>
- Type Parameters:
S- source typeD- destination type
- All Known Subinterfaces:
ConfigurableConditionExpression<S,,D> ConfigurableConverterExpression<S,,D> ConfigurableProviderExpression<S,D>
public interface ReferenceMapExpression<S,D>
Represents mapping actions, to set a destination property from a source property,
or to skip a destination property.
-
Method Summary
Modifier and TypeMethodDescription<V> voidmap(SourceGetter<S> sourceGetter, DestinationSetter<D, V> destinationSetter) Map source getter value to destination setter<V> voidskip(DestinationSetter<D, V> destinationSetter) Skip destination property based ondestinationSetter<V> voidskip(SourceGetter<S> sourceGetter, DestinationSetter<D, V> destinationSetter) Skip the mapping from the source property ofsourceGetterto the destination property ofdestinationSetter
-
Method Details
-
map
Map source getter value to destination setter<String>map(Src::getValue, Dest::setValue) <String>map(src -> srg.getCustomer().getAddress(), dest -> dest.getCustomer().setAddress())- Type Parameters:
V- the value type to set into destination- Parameters:
sourceGetter- a method reference to source getterdestinationSetter- a method reference to destination setter
-
skip
Skip destination property based ondestinationSetter<String>skip(Dest::setValue) <String>map(dest -> dest.getCustomer().setAddress())- Type Parameters:
V- the value type of the setter- Parameters:
destinationSetter- a method reference to destination setter
-
skip
Skip the mapping from the source property ofsourceGetterto the destination property ofdestinationSetter<String>skip(Source::getValue, Dest::setValue)- Type Parameters:
V- the value type of the setter- Parameters:
destinationSetter- a method reference to destination setter
-