Package org.nuiton.validator.bean.simple
Class SimpleBeanValidatorMessage<E extends SimpleBeanValidatorMessage<?>>
- java.lang.Object
-
- org.nuiton.validator.bean.simple.SimpleBeanValidatorMessage<E>
-
- Type Parameters:
E
- type of message (use for overrideComparable.compareTo(Object)
method.
- All Implemented Interfaces:
Serializable
,Comparable<E>
public class SimpleBeanValidatorMessage<E extends SimpleBeanValidatorMessage<?>> extends Object implements Comparable<E>, Serializable
The object to box a validation message.- Since:
- 2.5.2
- Author:
- Tony Chemit - chemit@codelutin.com
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
field
the field that produce the messageprotected String
message
the label of the message (to be displayed somewhere)protected NuitonValidatorScope
scope
the scope of the messageprotected SimpleBeanValidator<?>
validator
the validator that produce the message
-
Constructor Summary
Constructors Constructor Description SimpleBeanValidatorMessage(SimpleBeanValidator<?> validator, String field, String message, NuitonValidatorScope scope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(E o)
boolean
equals(Object o)
String
getField()
String
getI18nError(String error)
String
getMessage()
NuitonValidatorScope
getScope()
SimpleBeanValidator<?>
getValidator()
int
hashCode()
String
toString()
-
-
-
Field Detail
-
validator
protected SimpleBeanValidator<?> 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
-
SimpleBeanValidatorMessage
public SimpleBeanValidatorMessage(SimpleBeanValidator<?> validator, String field, String message, NuitonValidatorScope scope)
-
-
Method Detail
-
getValidator
public SimpleBeanValidator<?> getValidator()
-
getField
public String getField()
-
getScope
public NuitonValidatorScope getScope()
-
getMessage
public String getMessage()
-
compareTo
public int compareTo(E o)
- Specified by:
compareTo
in interfaceComparable<E extends SimpleBeanValidatorMessage<?>>
-
-