Interface TemporalExpression<T extends Temporal & Comparable<? super T>>
- Type Parameters:
T- the temporal type of the expression
- All Superinterfaces:
ComparableExpression<T>, Expression<T>, Selection<T>, TupleElement<T>
public interface TemporalExpression<T extends Temporal & Comparable<? super T>>
extends ComparableExpression<T>
Type for temporal query expressions.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault Predicateafter(Expression<? extends T> y) Synonym forComparableExpression.greaterThan(Expression).default PredicateSynonym forComparableExpression.greaterThan(Comparable).default Predicatebefore(Expression<? extends T> y) Synonym forComparableExpression.lessThan(Expression).default PredicateSynonym forComparableExpression.lessThan(Comparable).coalesce(Expression<? extends T> y) Create an expression that returns null if this and the argument evaluate to null, and the value of the first non-null expression otherwise.Create an expression that returns null if this and the argument evaluate to null, and the value of the first non-null expression otherwise.<N extends Number & Comparable<N>>
NumericExpression<N> extract(TemporalField<N, T> field) Create an expression that returns the value of a field extracted from this date.nullif(Expression<? extends T> y) Create an expression that tests whether this expression is equal to the argument, returning null if they are and the value of the first expression if they are not.Create an expression that tests whether this expression is equal to the argument, returning null if they are and the value of the first expression if they are not.Methods inherited from interface ComparableExpression
asc, asc, between, between, desc, desc, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualTo, max, minMethods inherited from interface Expression
as, cast, count, countDistinct, equalTo, equalTo, in, in, in, in, in, isMember, isNotMember, isNotNull, isNull, notEqualTo, notEqualTo, selectCaseMethods inherited from interface Selection
alias, getCompoundSelectionItems, isCompoundSelectionMethods inherited from interface TupleElement
getAlias, getJavaType
-
Method Details
-
extract
@Nonnull <N extends Number & Comparable<N>> NumericExpression<N> extract(@Nonnull TemporalField<N, T> field) Create an expression that returns the value of a field extracted from this date.- Type Parameters:
N- the type of the extracted value- Parameters:
field- a temporal field type- Returns:
- expression for the value of the extracted field
- See Also:
-
coalesce
Description copied from interface:ExpressionCreate an expression that returns null if this and the argument evaluate to null, and the value of the first non-null expression otherwise.- Specified by:
coalescein interfaceComparableExpression<T extends Temporal & Comparable<? super T>>- Specified by:
coalescein interfaceExpression<T extends Temporal & Comparable<? super T>>- Parameters:
y- value- Returns:
- coalesce expression
-
coalesce
Description copied from interface:ExpressionCreate an expression that returns null if this and the argument evaluate to null, and the value of the first non-null expression otherwise.- Specified by:
coalescein interfaceComparableExpression<T extends Temporal & Comparable<? super T>>- Specified by:
coalescein interfaceExpression<T extends Temporal & Comparable<? super T>>- Parameters:
y- expression- Returns:
- coalesce expression
-
nullif
Description copied from interface:ExpressionCreate an expression that tests whether this expression is equal to the argument, returning null if they are and the value of the first expression if they are not.- Specified by:
nullifin interfaceComparableExpression<T extends Temporal & Comparable<? super T>>- Specified by:
nullifin interfaceExpression<T extends Temporal & Comparable<? super T>>- Parameters:
y- value- Returns:
- nullif expression
-
nullif
Description copied from interface:ExpressionCreate an expression that tests whether this expression is equal to the argument, returning null if they are and the value of the first expression if they are not.- Specified by:
nullifin interfaceComparableExpression<T extends Temporal & Comparable<? super T>>- Specified by:
nullifin interfaceExpression<T extends Temporal & Comparable<? super T>>- Parameters:
y- expression- Returns:
- nullif expression
-
before
Synonym forComparableExpression.lessThan(Expression).- Parameters:
y- expression- Returns:
- before predicate
-
before
Synonym forComparableExpression.lessThan(Comparable).- Parameters:
y- value- Returns:
- before predicate
-
after
Synonym forComparableExpression.greaterThan(Expression).- Parameters:
y- expression- Returns:
- after predicate
-
after
Synonym forComparableExpression.greaterThan(Comparable).- Parameters:
y- value- Returns:
- after predicate
-