Package org.apache.commons.validator
Class ValidatorResults
java.lang.Object
org.apache.commons.validator.ValidatorResults
- All Implemented Interfaces:
Serializable
This contains the results of a set of validation rules processed
on a JavaBean.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map<String,
ValidatorResult> Map of validation results. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a the result of a validator action.void
Add a the result of a validator action.void
clear()
Clear all results recorded by this object.Gets the set of property names for which at least one message has been recorded.Gets aMap
of anyObject
s returned from validation routines.getValidatorResult
(String key) Gets theValidatorResult
associated with the key passed in.boolean
isEmpty()
Getstrue
if there are no messages recorded in this collection, orfalse
otherwise.void
merge
(ValidatorResults results) Merge another ValidatorResults into mine.
-
Field Details
-
hResults
Map of validation results.
-
-
Constructor Details
-
ValidatorResults
public ValidatorResults()
-
-
Method Details
-
add
Add a the result of a validator action.- Parameters:
field
- The field validated.validatorName
- The name of the validator.result
- The result of the validation.
-
add
Add a the result of a validator action.- Parameters:
field
- The field validated.validatorName
- The name of the validator.result
- The result of the validation.value
- The value returned by the validator.
-
clear
Clear all results recorded by this object. -
getPropertyNames
Gets the set of property names for which at least one message has been recorded.- Returns:
- An unmodifiable Set of the property names.
-
getResultValueMap
Gets aMap
of anyObject
s returned from validation routines.- Returns:
- Map of objections returned by validators.
-
getValidatorResult
Gets theValidatorResult
associated with the key passed in. The key theValidatorResult
is stored under is theField
's getKey method.- Parameters:
key
- The key generated fromField
(this is often just the field name).- Returns:
- The result of a specified key.
-
isEmpty
Getstrue
if there are no messages recorded in this collection, orfalse
otherwise.- Returns:
- Whether these results are empty.
-
merge
Merge another ValidatorResults into mine.- Parameters:
results
- ValidatorResults to merge.
-