@Documented @Constraint(validatedBy={}) @Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(value=RUNTIME) @MinDuration(value=0L) @MaxDuration(value=9223372036854775807L, unit=DAYS) @ReportAsSingleViolation public @interface DurationRange
Duration instances.| Modifier and Type | Optional Element and Description |
|---|---|
Class<?>[] |
groups
The groups the constraint belongs to.
|
long |
max
The maximum value of the range the validated
Duration must be in. |
String |
message
The validation message for this constraint.
|
long |
min
The minimum value of the range the validated
Duration must be in. |
Class<? extends javax.validation.Payload>[] |
payload
The payloads of this constraint.
|
TimeUnit |
unit
The unit of the validated range.
|
@OverridesAttribute(constraint=MinDuration.class, name="value") public abstract long min
Duration must be in.@OverridesAttribute(constraint=MaxDuration.class, name="value") public abstract long max
Duration must be in.@OverridesAttribute(constraint=MinDuration.class,name="unit") @OverridesAttribute(constraint=MaxDuration.class,name="unit") public abstract TimeUnit unit
TimeUnitpublic abstract String message
public abstract Class<?>[] groups
public abstract Class<? extends javax.validation.Payload>[] payload
Copyright © 2011. All rights reserved.