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.
- Version:
- $Revision: 1652498 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map
<String, ValidatorResult> Map of validation results.private static final long
-
Constructor Summary
Constructors -
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.Return the set of property names for which at least one message has been recorded.Get aMap
of anyObject
s returned from validation routines.getValidatorResult
(String key) Gets theValidatorResult
associated with the key passed in.boolean
isEmpty()
Returntrue
if there are no messages recorded in this collection, orfalse
otherwise.void
merge
(ValidatorResults results) Merge another ValidatorResults into mine.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
hResults
Map of validation results.
-
-
Constructor Details
-
ValidatorResults
public ValidatorResults()
-
-
Method Details
-
merge
Merge another ValidatorResults into mine.- Parameters:
results
- ValidatorResults to merge.
-
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
public void clear()Clear all results recorded by this object. -
isEmpty
public boolean isEmpty()Returntrue
if there are no messages recorded in this collection, orfalse
otherwise.- Returns:
- Whether these results are empty.
-
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.
-
getPropertyNames
Return the set of property names for which at least one message has been recorded.- Returns:
- An unmodifiable Set of the property names.
-
getResultValueMap
Get aMap
of anyObject
s returned from validation routines.- Returns:
- Map of objections returned by validators.
-