br.com.caelum.stella.hibernate.validator
Class AnnotationMessageProducer
java.lang.Object
br.com.caelum.stella.hibernate.validator.AnnotationMessageProducer
- All Implemented Interfaces:
- MessageProducer
public class AnnotationMessageProducer
- extends Object
- implements MessageProducer
Recupera mensagens de validação definida na anotação do Hibernate Validator.
- Author:
- Fabio Kung
|
Method Summary |
ValidationMessage |
getMessage(InvalidValue invalidValue)
This method will always return the same ValidationMessage, as Hibernate
Validator only let one message per Validator, defined inside the
constraint annotation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationMessageProducer
public AnnotationMessageProducer(Annotation constraint)
getMessage
public ValidationMessage getMessage(InvalidValue invalidValue)
- This method will always return the same ValidationMessage, as Hibernate
Validator only let one message per Validator, defined inside the
constraint annotation.
- Specified by:
getMessage in interface MessageProducer
- Parameters:
invalidValue - will be ignored
- Returns:
- the message defined by the related constraint annotation
Copyright © 2009 Caelum. All Rights Reserved.