Spring Web Flow

org.springframework.binding.mapping.results
Class AbstractMappingResult

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

public abstract class AbstractMappingResult
extends java.lang.Object
implements MappingResult

Convenient base class for MappingResult implementations.

Author:
Keith Donald

Constructor Summary
AbstractMappingResult(Mapping mapping)
          Creates a new mapping result.
 
Method Summary
abstract  java.lang.String getCode()
          The mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".
abstract  java.lang.Throwable getErrorCause()
          Get the cause of the error result
abstract  java.lang.Object getMappedValue()
          The actual value that was mapped to the target object.
 Mapping getMapping()
          The mapping that executed for which this result pertains to.
abstract  java.lang.Object getOriginalValue()
          The original value of the source object that was to be mapped.
abstract  boolean isError()
          Indicates if this result is an error result.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractMappingResult

public AbstractMappingResult(Mapping mapping)
Creates a new mapping result.

Parameters:
mapping - the mapping this result is for.
Method Detail

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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Web Flow