Module jakarta.data
Package jakarta.data.metamodel
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 Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T,V extends Temporal & Comparable<? extends Temporal>>
TemporalAttribute<T, V> Creates a static metamodelTemporalAttributerepresenting the entity attribute with the specified name.Methods inherited from interface jakarta.data.metamodel.Attribute
declaringType, nameMethods inherited from interface jakarta.data.metamodel.BasicAttribute
typeMethods 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, typeMethods inherited from interface jakarta.data.metamodel.SortableAttribute
asc, desc
-
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
TemporalAttributerepresenting 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.
-