Interface ReferenceMapExpression<S,D>

Type Parameters:
S - source type
D - 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 Type
    Method
    Description
    <V> void
    map(SourceGetter<S> sourceGetter, DestinationSetter<D,V> destinationSetter)
    Map source getter value to destination setter
    <V> void
    skip(DestinationSetter<D,V> destinationSetter)
    Skip destination property based on destinationSetter
    <V> void
    skip(SourceGetter<S> sourceGetter, DestinationSetter<D,V> destinationSetter)
    Skip the mapping from the source property of sourceGetter to the destination property of destinationSetter
  • Method Details

    • map

      <V> void map(SourceGetter<S> sourceGetter, DestinationSetter<D,V> destinationSetter)
      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 getter
      destinationSetter - a method reference to destination setter
    • skip

      <V> void skip(DestinationSetter<D,V> destinationSetter)
      Skip destination property based on destinationSetter
       
         <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

      <V> void skip(SourceGetter<S> sourceGetter, DestinationSetter<D,V> destinationSetter)
      Skip the mapping from the source property of sourceGetter to the destination property of destinationSetter
       
         <String>skip(Source::getValue, Dest::setValue)
       
       
      Type Parameters:
      V - the value type of the setter
      Parameters:
      destinationSetter - a method reference to destination setter