Interface ComparableExpression<C extends Comparable<? super C>>
- Type Parameters:
C- the type of the expression
- All Superinterfaces:
Expression<C>, Selection<C>, TupleElement<C>
- All Known Subinterfaces:
BooleanExpression, BooleanPath, CriteriaBuilder.In<T>, NumericExpression<N>, Predicate, TemporalExpression<T>, TextExpression
Type for comparable query expressions.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionasc()Create an ordering by the ascending value of this expression.Create an ordering by the ascending value of this expression.Create a predicate for testing whether this expression is between the first and second arguments in value.between(Expression<? extends C> x, Expression<? extends C> y) Create a predicate for testing whether this expression is between the first and second arguments in value.Create an expression that returns null if this and the argument evaluate to null, and the value of the first non-null expression otherwise.coalesce(Expression<? extends C> 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.desc()Create an ordering by the descending value of this expression.Create an ordering by the descending value of this expression.greaterThan(C y) Create a predicate for testing whether this expression is greater than the first argument.greaterThan(Expression<? extends C> y) Create a predicate for testing whether this expression is greater than the first argument.Create a predicate for testing whether this expression is greater than or equal to the first argument.greaterThanOrEqualTo(Expression<? extends C> y) Create a predicate for testing whether this expression is greater than or equal to the first argument.Create a predicate for testing whether this expression is less than the first argument.lessThan(Expression<? extends C> y) Create a predicate for testing whether this expression is less than the first argument.Create a predicate for testing whether this expression is less than or equal to the first argument.lessThanOrEqualTo(Expression<? extends C> y) Create a predicate for testing whether this expression is less than or equal to the first argument.max()Create an aggregate expression for finding the greatest of the values (strings, dates, etc).min()Create an aggregate expression for finding the least of the values (strings, dates, etc).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.nullif(Expression<? extends C> 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.Methods 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
-
greaterThan
Create a predicate for testing whether this expression is greater than the first argument.- Parameters:
y- expression- Returns:
- greater-than predicate
- See Also:
-
greaterThan
-
greaterThanOrEqualTo
Create a predicate for testing whether this expression is greater than or equal to the first argument.- Parameters:
y- expression- Returns:
- greater-than-or-equal predicate
- See Also:
-
greaterThanOrEqualTo
-
lessThan
Create a predicate for testing whether this expression is less than the first argument.- Parameters:
y- expression- Returns:
- less-than predicate
- See Also:
-
lessThan
-
lessThanOrEqualTo
Create a predicate for testing whether this expression is less than or equal to the first argument.- Parameters:
y- expression- Returns:
- less-than-or-equal predicate
- See Also:
-
lessThanOrEqualTo
-
between
Create a predicate for testing whether this expression is between the first and second arguments in value.- Parameters:
x- expressiony- expression- Returns:
- between predicate
- See Also:
-
between
-
max
ComparableExpression<C> max()Create an aggregate expression for finding the greatest of the values (strings, dates, etc).- Returns:
- greatest expression
- See Also:
-
min
ComparableExpression<C> min()Create an aggregate expression for finding the least of the values (strings, dates, etc).- Returns:
- least expression
- See Also:
-
asc
Order asc()Create an ordering by the ascending value of this expression.- Returns:
- ascending ordering corresponding to this expression
- Since:
- 4.0
-
desc
Order desc()Create an ordering by the descending value of this expression.- Returns:
- descending ordering corresponding to this expression
-
asc
-
desc
-
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 interfaceExpression<C extends Comparable<? super C>>- 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 interfaceExpression<C extends Comparable<? super C>>- 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 interfaceExpression<C extends Comparable<? super C>>- 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 interfaceExpression<C extends Comparable<? super C>>- Parameters:
y- expression- Returns:
- nullif expression
-