|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.srplib.validation.DefaultValidatable<T>
public class DefaultValidatable<T>
An implementation of Validatable interface.
| Constructor Summary | |
|---|---|
DefaultValidatable(T value)
|
|
DefaultValidatable(T value,
Object context)
|
|
| Method Summary | |
|---|---|
void |
addError(ValidationError error)
Adds error to this object. |
Object |
getContext()
Returns a reference to component which is being validated. |
List<ValidationError> |
getErrors()
Returns validation error associated with this object. |
T |
getValue()
Returns value to be validated. |
boolean |
hasErrors()
Tests if this object has errors or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultValidatable(T value,
Object context)
public DefaultValidatable(T value)
| Method Detail |
|---|
public T getValue()
Validatable
getValue in interface Validatable<T>public boolean hasErrors()
Validatable
hasErrors in interface Validatable<T>false otherwisepublic void addError(ValidationError error)
Validatable
addError in interface Validatable<T>error - ValidationError an error.public List<ValidationError> getErrors()
Validatable
getErrors in interface Validatable<T>public Object getContext()
Validatable
getContext in interface Validatable<T>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||