Class AbstractMappingResult

java.lang.Object
org.springframework.binding.mapping.results.AbstractMappingResult
All Implemented Interfaces:
Serializable, MappingResult
Direct Known Subclasses:
RequiredError, SourceAccessError, Success, TargetAccessError, TypeConversionError

public abstract class AbstractMappingResult extends Object implements MappingResult
Convenient base class for MappingResult implementations.
Author:
Keith Donald
See Also:
  • Constructor Details

    • AbstractMappingResult

      public AbstractMappingResult(Mapping mapping)
      Creates a new mapping result.
      Parameters:
      mapping - the mapping this result is for.
  • Method Details

    • getMapping

      public Mapping getMapping()
      Description copied from interface: MappingResult
      The mapping that executed for which this result pertains to.
      Specified by:
      getMapping in interface MappingResult
    • getCode

      public abstract String getCode()
      Description copied from interface: MappingResult
      The mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".
      Specified by:
      getCode in interface MappingResult
    • isError

      public abstract boolean isError()
      Description copied from interface: MappingResult
      Indicates if this result is an error result.
      Specified by:
      isError in interface MappingResult
    • getErrorCause

      public abstract Throwable getErrorCause()
      Description copied from interface: MappingResult
      Get the cause of the error result
      Specified by:
      getErrorCause in interface MappingResult
      Returns:
      the underyling cause, or null if this is not an error or there was no root cause.
    • getOriginalValue

      public abstract Object getOriginalValue()
      Description copied from interface: MappingResult
      The original value of the source object that was to be mapped. May be null if this result is an error on the source object.
      Specified by:
      getOriginalValue in interface MappingResult
    • getMappedValue

      public abstract Object getMappedValue()
      Description copied from interface: MappingResult
      The actual value that was mapped to the target object. Null if this result is an error.
      Specified by:
      getMappedValue in interface MappingResult
    • toString

      public String toString()
      Overrides:
      toString in class Object