S - source typeD - destination typepublic interface ConfigurableMapExpression<S,D> extends ReferenceMapExpression<S,D>
| Modifier and Type | Method and Description |
|---|---|
ReferenceMapExpression<S,D> |
using(Converter<?,?> converter)
Uses
converter to convert a source property to destination property |
ReferenceMapExpression<S,D> |
when(Condition<?,?> condition)
Uses
condition to determine the mapping should fire or skip |
ReferenceMapExpression<S,D> |
with(Provider<?> provider)
Uses
provider to instantiate an instance for destination property |
map, skipReferenceMapExpression<S,D> using(Converter<?,?> converter)
converter to convert a source property to destination property
using(converter).<String>map(Src::getCustomer, Dest::setCustomerId)
using(ctx -> ctx.getSource().getName().toUpperCase()).<String>map(src -> src.getCustomer().getId(), Dest::setCustomerId)
converter - a converter convert source property to destination propertyReferenceMapExpression<S,D> with(Provider<?> provider)
provider to instantiate an instance for destination property
with(provider).<String>map(Src::getCustomer, Dest::setCustomer)
with(req -> new Customer()).<Customer>map(Src::getCustomer, Dest::setCustomer)
provider - a provider instantiate destination propertyReferenceMapExpression<S,D> when(Condition<?,?> condition)
condition to determine the mapping should fire or skip
when(condition).<String>map(Src::getCustomer, Dest::setCustomer)
with(ctx -> ctx.getSource() != null).<Customer>map(Src::getCustomer, Dest::setCustomer)
condition - a condition to apply the mapping action should be invoked or notCopyright © 2011–2018. All rights reserved.