Package org.springframework.validation
Class MapBindingResult
java.lang.Object
org.springframework.validation.AbstractErrors
org.springframework.validation.AbstractBindingResult
org.springframework.validation.MapBindingResult
- All Implemented Interfaces:
- Serializable,- BindingResult,- Errors
Map-based implementation of the BindingResult interface,
 supporting registration and evaluation of binding errors on
 Map attributes.
 
Can be used as errors holder for custom binding onto a Map, for example when invoking a Validator for a Map object.
- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from interface org.springframework.validation.BindingResultMODEL_KEY_PREFIXFields inherited from interface org.springframework.validation.ErrorsNESTED_PATH_SEPARATOR
- 
Constructor SummaryConstructorsConstructorDescriptionMapBindingResult(Map<?, ?> target, String objectName) Create a new MapBindingResult instance.
- 
Method SummaryModifier and TypeMethodDescriptionprotected ObjectgetActualFieldValue(String field) Extract the actual field value for the given field.final ObjectReturn the wrapped target object.final Map<?,?> Return the target Map to bind onto.Methods inherited from class org.springframework.validation.AbstractBindingResultaddAllErrors, addError, equals, findEditor, formatFieldValue, getAllErrors, getErrorCount, getFieldError, getFieldError, getFieldErrors, getFieldErrors, getFieldType, getFieldValue, getGlobalError, getGlobalErrors, getMessageCodesResolver, getModel, getObjectName, getPropertyEditorRegistry, getRawFieldValue, getSuppressedFields, hasErrors, hashCode, recordFieldValue, recordSuppressedField, reject, rejectValue, resolveMessageCodes, resolveMessageCodes, setMessageCodesResolverMethods inherited from class org.springframework.validation.AbstractErrorscanonicalFieldName, doSetNestedPath, fixedField, getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, isMatchingFieldError, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.validation.ErrorsgetFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath
- 
Constructor Details- 
MapBindingResultCreate a new MapBindingResult instance.- Parameters:
- target- the target Map to bind onto
- objectName- the name of the target object
 
 
- 
- 
Method Details- 
getTargetMapReturn the target Map to bind onto.
- 
getTargetDescription copied from class:AbstractBindingResultReturn the wrapped target object.- Specified by:
- getTargetin interface- BindingResult
- Specified by:
- getTargetin class- AbstractBindingResult
 
- 
getActualFieldValueDescription copied from class:AbstractBindingResultExtract the actual field value for the given field.- Specified by:
- getActualFieldValuein class- AbstractBindingResult
- Parameters:
- field- the field to check
- Returns:
- the current value of the field
 
 
-