Class AbstractFutureJavaTimeValidator<T extends TemporalAccessor & Comparable<? super T>>
- java.lang.Object
-
- org.hibernate.validator.internal.constraintvalidators.bv.time.AbstractJavaTimeValidator<Future,T>
-
- org.hibernate.validator.internal.constraintvalidators.bv.time.future.AbstractFutureJavaTimeValidator<T>
-
- All Implemented Interfaces:
ConstraintValidator<Future,T>,HibernateConstraintValidator<Future,T>
- Direct Known Subclasses:
FutureValidatorForHijrahDate,FutureValidatorForInstant,FutureValidatorForJapaneseDate,FutureValidatorForLocalDate,FutureValidatorForLocalDateTime,FutureValidatorForLocalTime,FutureValidatorForMinguoDate,FutureValidatorForMonthDay,FutureValidatorForOffsetDateTime,FutureValidatorForOffsetTime,FutureValidatorForThaiBuddhistDate,FutureValidatorForYear,FutureValidatorForYearMonth,FutureValidatorForZonedDateTime
public abstract class AbstractFutureJavaTimeValidator<T extends TemporalAccessor & Comparable<? super T>> extends AbstractJavaTimeValidator<Future,T>
Base class for all@Futurevalidators that are based on thejava.timepackage.- Author:
- Alaa Nassef, Guillaume Smet
-
-
Field Summary
-
Fields inherited from class org.hibernate.validator.internal.constraintvalidators.bv.time.AbstractJavaTimeValidator
referenceClock
-
-
Constructor Summary
Constructors Constructor Description AbstractFutureJavaTimeValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DurationgetEffectiveTemporalValidationTolerance(Duration absoluteTemporalValidationTolerance)Returns the temporal validation tolerance to apply.protected booleanisValid(int result)Returns whether the result of the comparison between the validated value and the time reference is considered valid.-
Methods inherited from class org.hibernate.validator.internal.constraintvalidators.bv.time.AbstractJavaTimeValidator
getReferenceValue, initialize, isValid
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.validation.ConstraintValidator
initialize
-
-
-
-
Method Detail
-
isValid
protected boolean isValid(int result)
Description copied from class:AbstractJavaTimeValidatorReturns whether the result of the comparison between the validated value and the time reference is considered valid.- Specified by:
isValidin classAbstractJavaTimeValidator<Future,T extends TemporalAccessor & Comparable<? super T>>
-
getEffectiveTemporalValidationTolerance
protected Duration getEffectiveTemporalValidationTolerance(Duration absoluteTemporalValidationTolerance)
Description copied from class:AbstractJavaTimeValidatorReturns the temporal validation tolerance to apply.- Specified by:
getEffectiveTemporalValidationTolerancein classAbstractJavaTimeValidator<Future,T extends TemporalAccessor & Comparable<? super T>>
-
-