public class TargetAccessError extends AbstractMappingResult
PropertyNotFoundException errors and general EvaluationException errors.| Constructor and Description |
|---|
TargetAccessError(Mapping mapping,
java.lang.Object originalValue,
EvaluationException cause)
Creates a new target access error.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCode()
The mapping result code; for example, "success" , "typeMismatch", "propertyNotFound", or "evaluationException".
|
java.lang.Throwable |
getErrorCause()
Get the cause of the error result
|
java.lang.Object |
getMappedValue()
The actual value that was mapped to the target object.
|
java.lang.Object |
getOriginalValue()
The original value of the source object that was to be mapped.
|
boolean |
isError()
Indicates if this result is an error result.
|
getMapping, toStringpublic TargetAccessError(Mapping mapping, java.lang.Object originalValue, EvaluationException cause)
originalValue - the value that was attempted to be mappedcause - the underlying evaluation exception that occurredpublic java.lang.String getCode()
MappingResultgetCode in interface MappingResultgetCode in class AbstractMappingResultpublic boolean isError()
MappingResultisError in interface MappingResultisError in class AbstractMappingResultpublic java.lang.Throwable getErrorCause()
MappingResultgetErrorCause in interface MappingResultgetErrorCause in class AbstractMappingResultpublic java.lang.Object getOriginalValue()
MappingResultgetOriginalValue in interface MappingResultgetOriginalValue in class AbstractMappingResultpublic java.lang.Object getMappedValue()
MappingResultgetMappedValue in interface MappingResultgetMappedValue in class AbstractMappingResult