Annotation Type MaxTimeDuration
-
@Documented @Constraint(validatedBy=MaxTimeDurationValidator.class) @Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(RUNTIME) @Repeatable(List.class) public @interface MaxTimeDuration
Constraint validation that may be applied toTimeDuration
. Checks that the duration is not shorter than the specified Maximum duration.- Since:
- 8.1.0
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description long
value
The maximum duration in the specified unit of time.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>[]
groups
String
message
Gets the key for creating error messages in case the constraint is violated.String
messageDays
String
messageHours
String
messageMicroseconds
String
messageMilliseconds
String
messageMinutes
String
messageNanoseconds
String
messageSeconds
String
messageWeeks
Class<? extends javax.validation.Payload>[]
payload
ETimeUnit
unit
-
-
-
-
groups
Class<?>[] groups
- Returns:
- Allows the specification of validation groups, to which this constraint belongs. When not specified, the
constraint is placed in the
Default
group.
- Default:
- {}
-
-
-
message
String message
Gets the key for creating error messages in case the constraint is violated. When not empty, takes precedence over all other message keys.- Returns:
- The default key for creating error messages in case the constraint is violated.
- Default:
- ""
-
-
-
messageDays
String messageDays
- Returns:
- The key for creating error messages in case the maximum duration is given in days.
- Default:
- "{de.xima.fc.validation.constraints.MaxTimeDuration.message.days}"
-
-
-
messageHours
String messageHours
- Returns:
- The key for creating error messages in case the maximum duration is given in hours.
- Default:
- "{de.xima.fc.validation.constraints.MaxTimeDuration.message.hours}"
-
-
-
messageMicroseconds
String messageMicroseconds
- Returns:
- The key for creating error messages in case the maximum duration is given in microseconds.
- Default:
- "{de.xima.fc.validation.constraints.MaxTimeDuration.message.microseconds}"
-
-
-
messageMilliseconds
String messageMilliseconds
- Returns:
- The key for creating error messages in case the maximum duration is given in milliseconds.
- Default:
- "{de.xima.fc.validation.constraints.MaxTimeDuration.message.milliseconds}"
-
-
-
messageMinutes
String messageMinutes
- Returns:
- The key for creating error messages in case the maximum duration is given in minutes.
- Default:
- "{de.xima.fc.validation.constraints.MaxTimeDuration.message.minutes}"
-
-
-
messageNanoseconds
String messageNanoseconds
- Returns:
- The key for creating error messages in case the maximum duration is given in nanoseconds.
- Default:
- "{de.xima.fc.validation.constraints.MaxTimeDuration.message.nanoseconds}"
-
-
-
messageSeconds
String messageSeconds
- Returns:
- The key for creating error messages in case the maximum duration is given in seconds.
- Default:
- "{de.xima.fc.validation.constraints.MaxTimeDuration.message.seconds}"
-
-
-
messageWeeks
String messageWeeks
- Returns:
- The key for creating error messages in case the maximum duration is given in weeks.
- Default:
- "{de.xima.fc.validation.constraints.MaxTimeDuration.message.weeks}"
-
-
-
payload
Class<? extends javax.validation.Payload>[] payload
- Returns:
- The payload that can be used by clients of the Jakarta Bean Validation API to assign custom payload objects to a constraint.
- Default:
- {}
-
-
-
unit
ETimeUnit unit
- Returns:
- The unit of time for the maximum duration.
- Default:
- de.xima.fc.common.bean_models.ETimeUnit.SECONDS
-
-