|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Validation
Validation context
Method Summary | |
---|---|
void |
addFieldViolation(String field,
ConstraintViolation constraintViolation)
Add a violation to the given field |
void |
addViolation(ConstraintViolation constraintViolation)
Add a general violation |
ConstraintViolation |
getFieldViolation(String field)
Get the voilation for the given field |
String |
getFieldViolationMessage(String field)
Get the formatted violation message for the given field |
String |
getFieldViolationMessage(String field,
Locale locale)
Get the formatted violation message for the given field |
boolean |
hasFieldViolation(String field)
Whether the validation context has a violation for the given field |
boolean |
hasViolations()
Whether the validation context has violations |
Method Detail |
---|
boolean hasViolations()
boolean hasFieldViolation(String field)
void addFieldViolation(String field, ConstraintViolation constraintViolation)
field
- The field to add the violation toconstraintViolation
- The constraint violationvoid addViolation(ConstraintViolation constraintViolation)
constraintViolation
- The constraint violationConstraintViolation getFieldViolation(String field)
field
- The field
String getFieldViolationMessage(String field)
field
- The field
String getFieldViolationMessage(String field, Locale locale)
field
- The fieldlocale
- The locale
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |