|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
@Documented
public @interface LovConstraintChecks if annotated method returns a value that is either 'in' or 'not in' the Lov (List Of Values). The Lov supports dynamic retrieval of its values through the use of @Lookup. Please check the documentation of the properties of this annotations for details.
Note you can also use this annotation to see if a method's return value simply equals another value (or not), just let the lov have just 1 value then (array of size 1 or collection of size 1).
Lookup| Optional Element Summary | |
|---|---|
java.lang.String[] |
applyToGroups
Specify for which groups this annotation must be applied. |
java.lang.String |
customCodeLovIn
Optional custom code (property from a properties file) for operator=LovConstraint.OPERATOR_IN. |
java.lang.String |
customCodeLovNotIn
Optional custom code (property from a properties file) for operator=LovConstraint.OPERATOR_NOT_IN. |
boolean |
dynamic
If set to true, you must specify the lookup property of this annotation where to get the values from (hence it is dynamic). |
boolean |
globalMessage
If this annotation's message must be added as global message instead of real validation path. |
Lookup |
lookup
You can specify what must be used to lookup an array or collection for the LovConstraint (if dynamic=true). |
int |
operator
The operator represents how to check the value against the lov annotations values. |
java.lang.String |
type
The type that should be used for the values[] property during validation. |
java.lang.String[] |
values
The values in the LOV. |
public abstract java.lang.String[] applyToGroups
Defaults to JvGroup.GROUP_APPLY_ALL
public abstract int operator
Valid values are: Use one of the constants OPERATOR_* of this class.
Default value is Lov.OPERATOR_IN.
public abstract java.lang.String[] values
For instance if your method returns java.lang.Integer, the values in this array must be convertable to type java.lang.Integer.
If you want dynamic input for your Lov, set dynamic property to true (and read there for info), you should not use this property in that case.
Default value is an empty array.
public abstract java.lang.String type
Default value is java.lang.String.
public abstract boolean dynamic
Default value is false.
public abstract Lookup lookup
Whatever lookup you choose, the object being returned by the lookup (either the object iself or the method being called on that object), it must return one of: java.util.Collection (any class implementing this interface) or a real array (Object[], String[] etc.).
Note that the array must return actual objects, thus no primitive array! The latter is currently NOT supported. For the collection an iterator is created, and traversed that way. The array is traversed as an array.
Default value is useless, change if required.
public abstract java.lang.String customCodeLovIn
This way you can override the default message if needed.
public abstract java.lang.String customCodeLovNotIn
This way you can override the default message if needed.
public abstract boolean globalMessage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||