|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={METHOD,FIELD,TYPE})
@Retention(value=RUNTIME)
@Documented
@Inherited
public @interface JvGroupGroup annotation which specifies 1 or more groups and also automatically assures the method is validated. Specify on getXXX() methods or on fields.
NOTE: In 1.1 and earlier a method/field was supposed to have this annotation if it
required validation (whatever that may be). Since 1.2 you can leave it out, a method/field
will be treated as if it were annotated with @JvGroup (without parameters), so falls back
to default group "1".
Important: The default group is NOT created if the method/field does not have any
JaValid validation annotation (so has neither JvGroup or any validation annotation that is
supported!).
Maximum 1 annotation per method /field.
| Optional Element Summary | |
|---|---|
java.lang.String[] |
disableRecursionForGroups
You can disable recursion for a method by specifying which validation group(s) must NOT recurse, in other words: The validator will not recurse (thus validate the methods' return value) for the group in this array. |
boolean |
exposeInSubClass
If set to true, it means that if a class specifies a JvGroup on one of its methods, its subclasses that override such method will be validated automatically too. |
java.lang.String[] |
groups
Name of group, defaults to a group called 1. |
public abstract java.lang.String[] groups
Defaults to JvGroup.DEFAULT_GROUP (1).
public abstract java.lang.String[] disableRecursionForGroups
Use GROUP_APPLY_ALL of this annotation to disable any recursion for this method for all validation groups.
Note: If a group is specified in an inheritance relationship the most specialized class's groups disableRecursionForGroups() is taken. Assume: B extends A, on A you have a method with JvGroup telling recursion for group 1 is disabled, in B you have the same method telling recursion is allowed -> recursion is allowed then if you validate an instance of B. When you validate an instance of A, recursion is disabled for group 1, as A is now the 'highest' object.
Defaults to empty array (thus nothing is disabled).
public abstract boolean exposeInSubClass
Defaults to false.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||