|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value=TYPE) @Retention(value=RUNTIME) @Documented @Inherited public @interface NullOrNotNullAll
Use this annotation to specify that methods and/or fields must be all NULL or NOT NULL. For instance: @NullOrNotNullAll(values="#{me.anotherProperty}","#{me.child.name}") means that both field/method's value must be non-null or both must null. It is recommended to use the customMessage attribute to define a useful message to present to your users.
Class level annotation!
Note: As this is a classlevel annotation the message is global by DEFAULT.
| Optional Element Summary | |
|---|---|
java.lang.String[] |
applyToGroups
Specify for which groups this annotation must be applied. |
java.lang.String |
customCode
Optional custom code (property from a properties file). |
boolean |
globalMessage
If this annotation's message must be added as global message instead of real validation path. |
java.lang.String[] |
values
Values is required. |
public abstract java.lang.String[] applyToGroups
Defaults to JvGroup.GROUP_APPLY_ALL
public abstract java.lang.String customCode
This way you can override the default message if needed.
public abstract boolean globalMessage
public abstract java.lang.String[] values
You are recommended to specify a custom code message (for the sake of your users).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||