Annotation Type MinTimeDuration
-
@Documented @Constraint(validatedBy=MinTimeDurationValidator.class) @Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(RUNTIME) @Repeatable(List.class) public @interface MinTimeDuration
Constraint validation that may be applied toTimeDuration. Checks that the duration is not shorter than the specified minimum duration.- Since:
- 8.1.0
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description longvalueThe minimum duration in the specified unit of time.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>[]groupsStringmessageGets the key for creating error messages in case the constraint is violated.StringmessageDaysStringmessageHoursStringmessageMicrosecondsStringmessageMillisecondsStringmessageMinutesStringmessageNanosecondsStringmessageSecondsStringmessageWeeksClass<? extends javax.validation.Payload>[]payloadETimeUnitunit
-
-
-
-
groups
Class<?>[] groups
- Returns:
- Allows the specification of validation groups, to which this constraint belongs. When not specified, the
constraint is placed in the
Defaultgroup.
- 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 minimum duration is given in days.
- Default:
- "{de.xima.fc.validation.constraints.MinTimeDuration.message.days}"
-
-
-
messageHours
String messageHours
- Returns:
- The key for creating error messages in case the minimum duration is given in hours.
- Default:
- "{de.xima.fc.validation.constraints.MinTimeDuration.message.hours}"
-
-
-
messageMicroseconds
String messageMicroseconds
- Returns:
- The key for creating error messages in case the minimum duration is given in microseconds.
- Default:
- "{de.xima.fc.validation.constraints.MinTimeDuration.message.microseconds}"
-
-
-
messageMilliseconds
String messageMilliseconds
- Returns:
- The key for creating error messages in case the minimum duration is given in milliseconds.
- Default:
- "{de.xima.fc.validation.constraints.MinTimeDuration.message.milliseconds}"
-
-
-
messageMinutes
String messageMinutes
- Returns:
- The key for creating error messages in case the minimum duration is given in minutes.
- Default:
- "{de.xima.fc.validation.constraints.MinTimeDuration.message.minutes}"
-
-
-
messageNanoseconds
String messageNanoseconds
- Returns:
- The key for creating error messages in case the minimum duration is given in nanoseconds.
- Default:
- "{de.xima.fc.validation.constraints.MinTimeDuration.message.nanoseconds}"
-
-
-
messageSeconds
String messageSeconds
- Returns:
- The key for creating error messages in case the minimum duration is given in seconds.
- Default:
- "{de.xima.fc.validation.constraints.MinTimeDuration.message.seconds}"
-
-
-
messageWeeks
String messageWeeks
- Returns:
- The key for creating error messages in case the minimum duration is given in weeks.
- Default:
- "{de.xima.fc.validation.constraints.MinTimeDuration.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 minimum duration.
- Default:
- de.xima.fc.common.bean_models.ETimeUnit.SECONDS
-
-