public interface SqlValidator
The implementation can be based for example on the Hibernate library. The working sample implementation can be seen
at Sample validator. This validator in based on JSR 303. The annotated POJO (=dynamic input
forms) can be seen at Annotated Person POJO. In the case the validation is failed, the SqlValidationException
is thrown.
For more info please see the Tutorials.
Modifier and Type | Method and Description |
---|---|
<T> SqlValidationResult<?> |
finish(SqlValidationContext<T> context)
The SqlValidator visitor method called from inside the main execution methods in
SqlCrudEngine . |
<T> SqlValidationContext<T> |
start(Class<T> parentType)
The SqlValidator visitor method called from inside the main execution methods in
SqlCrudEngine . |
<T> void |
validate(SqlValidationContext<T> context,
Class<T> parentType,
String propertyName,
Object value)
The SqlValidator visitor method called from inside the main execution methods in
SqlCrudEngine . |
<T> SqlValidationContext<T> start(Class<T> parentType)
SqlCrudEngine
. This is
the first step to establish the validation context.parentType
- the dynamic or static input form type<T> void validate(SqlValidationContext<T> context, Class<T> parentType, String propertyName, Object value)
SqlCrudEngine
. This is
the validation step devoted for one input value.context
- the validation contextparentType
- the dynamic or static input form typepropertyName
- the name of the input attribute (in input form)value
- the input value (= the value of the input attribute)<T> SqlValidationResult<?> finish(SqlValidationContext<T> context)
SqlCrudEngine
. This is
the final step to return the overall validation result.context
- the validation contextSqlValidationException
.Copyright © 2014. All Rights Reserved.