|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object velosurf.validation.FieldConstraint
public abstract class FieldConstraint
This class encapsulates a constraint on a column of an entity, used to validate data before an update or an insert.
Field Summary | |
---|---|
private java.lang.String |
message
the error message |
Constructor Summary | |
---|---|
FieldConstraint()
|
Method Summary | |
---|---|
java.lang.String |
getMessage()
get the error message |
void |
setMessage(java.lang.String msg)
error message setter |
boolean |
validate(java.lang.Object data)
validate data against this constraint. |
boolean |
validate(java.lang.Object data,
java.util.Locale locale)
validate data against this constraint. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String message
Constructor Detail |
---|
public FieldConstraint()
Method Detail |
---|
public boolean validate(java.lang.Object data, java.util.Locale locale) throws java.sql.SQLException
data
- to validatelocale
-
java.sql.SQLException
public boolean validate(java.lang.Object data) throws java.sql.SQLException
data
- data to validate
java.sql.SQLException
public void setMessage(java.lang.String msg)
msg
- error messagepublic java.lang.String getMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |