Interface MappingResult

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractMappingResult, RequiredError, SourceAccessError, Success, TargetAccessError, TypeConversionError

public interface MappingResult extends Serializable
A single data mapping result. Each result has a unique code, and provides context about the result of a single data mapping operation.
Author:
Keith Donald
  • Method Summary

    Modifier and Type
    Method
    Description
    The mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".
    Get the cause of the error result
    The actual value that was mapped to the target object.
    The mapping that executed for which this result pertains to.
    The original value of the source object that was to be mapped.
    boolean
    Indicates if this result is an error result.
  • Method Details

    • getMapping

      Mapping getMapping()
      The mapping that executed for which this result pertains to.
    • getCode

      String getCode()
      The mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".
    • isError

      boolean isError()
      Indicates if this result is an error result.
    • getErrorCause

      Throwable getErrorCause()
      Get the cause of the error result
      Returns:
      the underyling cause, or null if this is not an error or there was no root cause.
    • getOriginalValue

      Object getOriginalValue()
      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.
    • getMappedValue

      Object getMappedValue()
      The actual value that was mapped to the target object. Null if this result is an error.