Module jakarta.data
Package jakarta.data.expression
Interface TemporalExpression<T,V extends Temporal & Comparable<? extends Temporal>>
- Type Parameters:
T- entity type.V- expression type.
- All Superinterfaces:
ComparableExpression<T,,V> Expression<T,V>
- All Known Subinterfaces:
CurrentDate<T>,CurrentDateTime<T>,CurrentTime<T>,TemporalAttribute<T,,V> TemporalLiteral<V>,TemporalPath<T,U, V>
public interface TemporalExpression<T,V extends Temporal & Comparable<? extends Temporal>>
extends ComparableExpression<T,V>
An expression that evaluates to a temporal typed value.
The entity and static metamodel for the code
examples within this class are shown in the Attribute Javadoc.
- Since:
- 1.1
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic TemporalExpression<Object, LocalDate> Represents the function to obtain the current date.static TemporalExpression<Object, LocalDateTime> Represents the function to obtain the current date and time.static TemporalExpression<Object, LocalTime> Represents the function to obtain the current time.Methods inherited from interface jakarta.data.expression.ComparableExpression
between, between, greaterThan, greaterThan, greaterThanEqual, greaterThanEqual, lessThan, lessThan, lessThanEqual, lessThanEqual, notBetween, notBetweenMethods inherited from interface jakarta.data.expression.Expression
equalTo, equalTo, in, in, in, isNull, notEqualTo, notEqualTo, notIn, notIn, notIn, notNull, satisfies, type
-
Method Details
-
localDate
Represents the function to obtain the current date.
Example:
listedToday = cars.search(make, model, _Car.listed.equalTo(TemporalExpression.localDate()));- Returns:
- a
TemporalExpressionrepresenting the function to obtain the current date as known to the data store.
-
localDateTime
Represents the function to obtain the current date and time.
- Returns:
- a
TemporalExpressionrepresenting the function to obtain the current date and time as known to the data store.
-
localTime
Represents the function to obtain the current time.
- Returns:
- a
TemporalExpressionrepresenting the function to obtain the current time as known to the data store.
-