Module jakarta.data

Interface TemporalAttribute<T,V extends Temporal & Comparable<? extends Temporal>>

Type Parameters:
T - entity class of the static metamodel.
V - type of entity attribute.
All Superinterfaces:
Attribute<T>, BasicAttribute<T,V>, ComparableAttribute<T,V>, ComparableExpression<T,V>, Expression<T,V>, SortableAttribute<T>, TemporalExpression<T,V>

public interface TemporalAttribute<T,V extends Temporal & Comparable<? extends Temporal>> extends ComparableAttribute<T,V>, TemporalExpression<T,V>

Represents a temporal entity attribute in the StaticMetamodel. Temporal entity attributes can be sorted on in query results and can be compared against values in query restrictions.

Jakarta Data supports the following entity attribute types for temporal data:

Where possible, TemporalAttribute is preferred over ComparableAttribute and SortableAttribute.

Since:
1.1
  • Method Details

    • of

      static <T, V extends Temporal & Comparable<? extends Temporal>> TemporalAttribute<T,V> of(Class<T> entityClass, String name, Class<V> attributeType)

      Creates a static metamodel TemporalAttribute representing the entity attribute with the specified name.

      Type Parameters:
      T - entity class of the static metamodel.
      V - type of entity attribute.
      Parameters:
      entityClass - the entity class.
      name - the name of the entity attribute.
      attributeType - type of the entity attribute.
      Returns:
      instance of TemporalAttribute.