|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
@Documented
public @interface CollectionSizeThis annotation can be used for size checks on java.util.Collection or java.util.Map related classes (e.g a list, map, tree ..), can be specified on get methods and fields. Specify the mode (defaults to equals) using one of the MODE_ constants. Read the docs with the constant to find out what else you need to fill in.
| 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. |
int |
maximumSize
Maximum size of collection, only required/used if MODE_MAXIMUM or MODE_BETWEEN. |
int |
minimumSize
Minimum size of collection, only required/used if MODE_MINIMUM or MODE_BETWEEN. |
int |
mode
What mode the check is in, use one of the MODE constants defined in this class, defaults to MODE_EQUALS. |
int |
size
Size of collection, only required/used if MODE_EQUALS. |
public abstract int mode
public abstract int size
public abstract int minimumSize
public abstract int maximumSize
public abstract java.lang.String[] applyToGroups
public abstract java.lang.String customCode
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 | ||||||||