Class AbstractMappingResult
java.lang.Object
org.springframework.binding.mapping.results.AbstractMappingResult
- All Implemented Interfaces:
Serializable,MappingResult
- Direct Known Subclasses:
RequiredError,SourceAccessError,Success,TargetAccessError,TypeConversionError
Convenient base class for
MappingResult implementations.- Author:
- Keith Donald
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetCode()The mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".abstract ThrowableGet the cause of the error resultabstract ObjectThe actual value that was mapped to the target object.The mapping that executed for which this result pertains to.abstract ObjectThe original value of the source object that was to be mapped.abstract booleanisError()Indicates if this result is an error result.toString()
-
Constructor Details
-
AbstractMappingResult
Creates a new mapping result.- Parameters:
mapping- the mapping this result is for.
-
-
Method Details
-
getMapping
Description copied from interface:MappingResultThe mapping that executed for which this result pertains to.- Specified by:
getMappingin interfaceMappingResult
-
getCode
Description copied from interface:MappingResultThe mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".- Specified by:
getCodein interfaceMappingResult
-
isError
public abstract boolean isError()Description copied from interface:MappingResultIndicates if this result is an error result.- Specified by:
isErrorin interfaceMappingResult
-
getErrorCause
Description copied from interface:MappingResultGet the cause of the error result- Specified by:
getErrorCausein interfaceMappingResult- Returns:
- the underyling cause, or null if this is not an error or there was no root cause.
-
getOriginalValue
Description copied from interface:MappingResultThe 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:
getOriginalValuein interfaceMappingResult
-
getMappedValue
Description copied from interface:MappingResultThe actual value that was mapped to the target object. Null if this result is an error.- Specified by:
getMappedValuein interfaceMappingResult
-
toString
-