Class TypeConversionError
java.lang.Object
org.springframework.binding.mapping.results.AbstractMappingResult
org.springframework.binding.mapping.results.TypeConversionError
- All Implemented Interfaces:
Serializable,MappingResult
Indicates a type conversion occurred during a mapping operation.
- Author:
- Keith Donald, Scott Andrews
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTypeConversionError(Mapping mapping, Object originalValue, Exception cause) Creates a new type conversion error. -
Method Summary
Modifier and TypeMethodDescriptiongetCode()The mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".Get the cause of the error resultThe actual value that was mapped to the target object.The original value of the source object that was to be mapped.booleanisError()Indicates if this result is an error result.Methods inherited from class org.springframework.binding.mapping.results.AbstractMappingResult
getMapping, toString
-
Constructor Details
-
TypeConversionError
Creates a new type conversion error.- Parameters:
cause- the underlying type conversion exception
-
-
Method Details
-
getCode
Description copied from interface:MappingResultThe mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".- Specified by:
getCodein interfaceMappingResult- Specified by:
getCodein classAbstractMappingResult
-
isError
public boolean isError()Description copied from interface:MappingResultIndicates if this result is an error result.- Specified by:
isErrorin interfaceMappingResult- Specified by:
isErrorin classAbstractMappingResult
-
getErrorCause
Description copied from interface:MappingResultGet the cause of the error result- Specified by:
getErrorCausein interfaceMappingResult- Specified by:
getErrorCausein classAbstractMappingResult- 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- Specified by:
getOriginalValuein classAbstractMappingResult
-
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- Specified by:
getMappedValuein classAbstractMappingResult
-