Module jakarta.data

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 Details

    • localDate

      static TemporalExpression<Object,LocalDate> localDate()

      Represents the function to obtain the current date.

      Example:

      
           listedToday = cars.search(make,
                                     model,
                                     _Car.listed.equalTo(TemporalExpression.localDate()));
       
      Returns:
      a TemporalExpression representing the function to obtain the current date as known to the data store.
    • localDateTime

      static TemporalExpression<Object,LocalDateTime> localDateTime()

      Represents the function to obtain the current date and time.

      Returns:
      a TemporalExpression representing the function to obtain the current date and time as known to the data store.
    • localTime

      static TemporalExpression<Object,LocalTime> localTime()

      Represents the function to obtain the current time.

      Returns:
      a TemporalExpression representing the function to obtain the current time as known to the data store.