@Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(value=RUNTIME) @Documented @Constraint(validatedBy=MaxDurationValidator.class) public @interface MaxDuration
Duration
whose value must be higher or equal to the specified minimum.
null elements are considered valid| Modifier and Type | Required Element and Description |
|---|---|
long |
value
The annotation's value.
|
| Modifier and Type | Optional Element and Description |
|---|---|
Class<?>[] |
groups
The groups the constraint belongs to.
|
boolean |
inclusive
If the boundary value is inclusive or not.
|
String |
message
The validation message for this constraint.
|
Class<? extends javax.validation.Payload>[] |
payload
The payloads of this constraint.
|
TimeUnit |
unit
The unit of the annotation.
|
public abstract long value
public abstract String message
public abstract Class<?>[] groups
public abstract Class<? extends javax.validation.Payload>[] payload
public abstract TimeUnit unit
public abstract boolean inclusive
true if the validation is to allow values equal to value().
False if the validation is to be exclusive.
Defaults to true.Copyright © 2023. All rights reserved.