Class AbstractFutureOrPresentEpochBasedValidator<T>
java.lang.Object
org.hibernate.validator.internal.constraintvalidators.bv.time.AbstractEpochBasedTimeValidator<FutureOrPresent,T>
org.hibernate.validator.internal.constraintvalidators.bv.time.futureorpresent.AbstractFutureOrPresentEpochBasedValidator<T>
- All Implemented Interfaces:
ConstraintValidator<FutureOrPresent,,T> HibernateConstraintValidator<FutureOrPresent,T>
- Direct Known Subclasses:
FutureOrPresentValidatorForReadableInstant,FutureOrPresentValidatorForReadablePartial
public abstract class AbstractFutureOrPresentEpochBasedValidator<T>
extends AbstractEpochBasedTimeValidator<FutureOrPresent,T>
Base class for all
@FutureOrPresent validators that use an epoch to be compared to the time reference.- Author:
- Alaa Nassef, Guillaume Smet
-
Field Summary
Fields inherited from class org.hibernate.validator.internal.constraintvalidators.bv.time.AbstractEpochBasedTimeValidator
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.AbstractEpochBasedTimeValidator
getEpochMillis, 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
-
AbstractFutureOrPresentEpochBasedValidator
public AbstractFutureOrPresentEpochBasedValidator()
-
-
Method Details
-
isValid
protected boolean isValid(int result) Description copied from class:AbstractEpochBasedTimeValidatorReturns whether the result of the comparison between the validated value and the time reference is considered valid.- Specified by:
isValidin classAbstractEpochBasedTimeValidator<FutureOrPresent,T>
-
getEffectiveTemporalValidationTolerance
protected Duration getEffectiveTemporalValidationTolerance(Duration absoluteTemporalValidationTolerance) Description copied from class:AbstractEpochBasedTimeValidatorReturns the temporal validation tolerance to apply.- Specified by:
getEffectiveTemporalValidationTolerancein classAbstractEpochBasedTimeValidator<FutureOrPresent,T>
-