Class AbstractPastOrPresentJavaTimeValidator<T extends TemporalAccessor & Comparable<? super T>>
java.lang.Object
org.hibernate.validator.internal.constraintvalidators.bv.time.AbstractJavaTimeValidator<PastOrPresent,T>
org.hibernate.validator.internal.constraintvalidators.bv.time.pastorpresent.AbstractPastOrPresentJavaTimeValidator<T>
- All Implemented Interfaces:
ConstraintValidator<PastOrPresent,,T> HibernateConstraintValidator<PastOrPresent,T>
- Direct Known Subclasses:
PastOrPresentValidatorForHijrahDate,PastOrPresentValidatorForInstant,PastOrPresentValidatorForJapaneseDate,PastOrPresentValidatorForLocalDate,PastOrPresentValidatorForLocalDateTime,PastOrPresentValidatorForLocalTime,PastOrPresentValidatorForMinguoDate,PastOrPresentValidatorForMonthDay,PastOrPresentValidatorForOffsetDateTime,PastOrPresentValidatorForOffsetTime,PastOrPresentValidatorForThaiBuddhistDate,PastOrPresentValidatorForYear,PastOrPresentValidatorForYearMonth,PastOrPresentValidatorForZonedDateTime
public abstract class AbstractPastOrPresentJavaTimeValidator<T extends TemporalAccessor & Comparable<? super T>>
extends AbstractJavaTimeValidator<PastOrPresent,T>
Base class for all
@PastOrPresent validators that are based on the java.time package.- Author:
- Alaa Nassef, Guillaume Smet
-
Field Summary
Fields inherited from class org.hibernate.validator.internal.constraintvalidators.bv.time.AbstractJavaTimeValidator
referenceClock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, isValidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.validation.ConstraintValidator
initialize
-
Constructor Details
-
AbstractPastOrPresentJavaTimeValidator
public AbstractPastOrPresentJavaTimeValidator()
-
-
Method Details
-
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<PastOrPresent,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<PastOrPresent,T extends TemporalAccessor & Comparable<? super T>>
-