org.nuiton.validator.bean
Class BeanValidatorMessage<E extends BeanValidatorMessage<?>>

java.lang.Object
  extended by org.nuiton.validator.bean.BeanValidatorMessage<E>
Type Parameters:
E - type of message (use for override Comparable.compareTo(Object) method.
All Implemented Interfaces:
Serializable, Comparable<E>

public class BeanValidatorMessage<E extends BeanValidatorMessage<?>>
extends Object
implements Comparable<E>, Serializable

The object to box a validation message.

Since:
2.0
Author:
tchemit
See Also:
Serialized Form

Field Summary
protected  String field
          the field that produce the message
protected  String message
          the label of the message (to be displayed somewhere)
protected  NuitonValidatorScope scope
          the scope of the message
protected  BeanValidator<?> validator
          the validator that produce the message
 
Constructor Summary
BeanValidatorMessage(BeanValidator<?> validator, String field, String message, NuitonValidatorScope scope)
           
 
Method Summary
 int compareTo(E o)
           
 boolean equals(Object o)
           
 String getField()
           
 String getI18nError(String error)
           
 String getMessage()
           
 NuitonValidatorScope getScope()
           
 BeanValidator<?> getValidator()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

validator

protected BeanValidator<?> validator
the validator that produce the message


field

protected String field
the field that produce the message


message

protected String message
the label of the message (to be displayed somewhere)


scope

protected NuitonValidatorScope scope
the scope of the message

Constructor Detail

BeanValidatorMessage

public BeanValidatorMessage(BeanValidator<?> validator,
                            String field,
                            String message,
                            NuitonValidatorScope scope)
Method Detail

getValidator

public BeanValidator<?> getValidator()

getField

public String getField()

getScope

public NuitonValidatorScope getScope()

getMessage

public String getMessage()

compareTo

public int compareTo(E o)
Specified by:
compareTo in interface Comparable<E extends BeanValidatorMessage<?>>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getI18nError

public String getI18nError(String error)


Copyright © 2011 CodeLutin. All Rights Reserved.