Class DefaultMapper

java.lang.Object
org.springframework.binding.mapping.impl.DefaultMapper
All Implemented Interfaces:
Mapper

public class DefaultMapper extends Object implements Mapper
Generic mapper implementation that allows mappings to be configured programatically.
Author:
Keith Donald
See Also:
  • Constructor Details

    • DefaultMapper

      public DefaultMapper()
  • Method Details

    • addMapping

      public DefaultMapper addMapping(DefaultMapping mapping)
      Add a mapping to this mapper.
      Parameters:
      mapping - the mapping to add (required)
      Returns:
      this, to support convenient call chaining
    • getMappings

      public Mapping[] getMappings()
      Returns this mapper's list of mappings.
      Returns:
      the list of mappings
    • map

      public MappingResults map(Object source, Object target)
      Description copied from interface: Mapper
      Map state from a source object to a target object.
      Specified by:
      map in interface Mapper
      Parameters:
      source - the source
      target - the target
      Returns:
      results of the mapping transaction
    • toString

      public String toString()
      Overrides:
      toString in class Object