Class BidirectionalMapper<S,​D>

  • Type Parameters:
    S - Source type
    D - Destination type

    @Deprecated
    public class BidirectionalMapper<S,​D>
    extends Object
    Deprecated.
    The intent of this class was to shorten the access to bidirectional mappings. Actually this class introduces overhead for creation and the access to the different mapping directions is confusing in most cases.
    This class can be used to manage bidirectional mappings. The configuration of mappers for both directions is required to build a bidirectional mapping.
    • Method Detail

      • map

        public D map​(S source)
        Deprecated.
        Performs the mapping from the source to destination type.
        Parameters:
        source - The source object to map to a new destination object.
        Returns:
        Returns a newly created destination object.
      • map

        public Collection<D> map​(Collection<? extends S> source)
        Deprecated.
        Performs the mapping from the source to destination type for the specified Collection.
        Parameters:
        source - The source collection to map to a new collection of destination objects.
        Returns:
        Returns a newly created collection of destination objects. The type of the resulting collection is either List or Set depending on the specified type.
      • map

        public List<D> map​(List<? extends S> source)
        Deprecated.
        Performs the mapping from the source to destination type for the specified List.
        Parameters:
        source - The source collection to map to a new collection of destination objects.
        Returns:
        Returns a newly created list of destination objects.
      • map

        public Set<D> map​(Set<? extends S> source)
        Deprecated.
        Performs the mapping from the source to destination type for the specified Set.
        Parameters:
        source - The source collection to map to a new collection of destination objects.
        Returns:
        Returns a newly created set of destination objects.
      • map

        public List<D> map​(Iterable<? extends S> iterable)
        Deprecated.
        Performs the mapping from the source to destination type for the elements provided by the specified Iterable .
        Parameters:
        iterable - The source iterable to be mapped to a new List of destination objects.
        Returns:
        Returns a newly created list of destination objects.
      • mapFrom

        public <Dest extends DS mapFrom​(Dest destination)
        Deprecated.
        Performs the mapping from the destination to source type.
        Parameters:
        destination - The destination object to map to a new source object.
        Returns:
        Returns a newly created source object.
      • mapFrom

        public Collection<S> mapFrom​(Collection<? extends D> destination)
        Deprecated.
        Performs the mapping from the destination to source type for the specified Collection.
        Parameters:
        destination - The destination collection to map to a new collection of source objects.
        Returns:
        Returns a newly created collection of source objects. The type of the resulting collection is either List or Set depending on the specified type.
      • mapFrom

        public List<S> mapFrom​(List<? extends D> destination)
        Deprecated.
        Performs the mapping from the destination to source type for the specified List.
        Parameters:
        destination - The destination collection to map to a new collection of source objects.
        Returns:
        Returns a newly created list of source objects.
      • mapFrom

        public Set<S> mapFrom​(Set<? extends D> destination)
        Deprecated.
        Performs the mapping from the destination to source type for the specified Set.
        Parameters:
        destination - The destination collection to map to a new collection of source objects.
        Returns:
        Returns a newly created set of source objects.
      • mapFrom

        public List<S> mapFrom​(Iterable<? extends D> iterable)
        Deprecated.
        Performs the mapping from the destination to source type for the elements provided by the specified Iterable .
        Parameters:
        iterable - The destination iterable to be mapped to a new List of source objects.
        Returns:
        Returns a newly created list of source objects.
      • getMapper

        public Mapper<S,​D> getMapper()
        Deprecated.
        Returns the Mapper object for mapping source to destination type.
        Returns:
        Mapper
      • getFromMapper

        public Mapper<D,​S> getFromMapper()
        Deprecated.
        Returns the Mapper object for mapping destination to source type.
        Returns:
        Mapper