|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={})
@Retention(value=RUNTIME)
@Documented
public @interface BeanLookupThis annotation should be used inside a @Lookup annotation to specify you wish to use a javabean to perform validation. This one must then specify the bean to use for validation (it must have a no-arg constructor), plus the method to call. Whatever the method and its parameters, it *must* return a List<ValidationMessage> containing validation errors.
Note: It is NOT a lookup as the name might suggest, its simply a java class bean instantiated for validation.
IMPORTANT: By default bean instances are cached (using their beanClass full name) and thus instantiated only once, and the next time the same beanClass is encountered the cached one is used instead. If however, this is not the desired behavior for certain classes set the property cacheBean to false.
Lookup| Required Element Summary | |
|---|---|
java.lang.Class |
beanClass
The class to use for validation, must be a class which can be instantiated through a no-arg constructor. |
| Optional Element Summary | |
|---|---|
boolean |
cacheBean
Defaults to true, each bean encountered is cached. |
JvMethod |
method
The method to call on the bean class, must return List<ValidationMessage> (empty list if no errors found). |
| Element Detail |
|---|
public abstract java.lang.Class beanClass
Defaults to nothing.
public abstract JvMethod method
Defaults to empty method.
public abstract boolean cacheBean
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||