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, CriteriaBuilder.In<T>, NumericExpression<N>, Predicate, TemporalExpression<T>, TextExpression

public interface ComparableExpression<C extends Comparable<? super C>> extends Expression<C>
Type for comparable query expressions.
Since:
4.0
  • Method Details

    • greaterThan

      @Nonnull Predicate greaterThan(@Nonnull Expression<? extends C> y)
      Create a predicate for testing whether this expression is greater than the first argument.
      Parameters:
      y - expression
      Returns:
      greater-than predicate
      See Also:
    • greaterThan

      @Nonnull Predicate greaterThan(C y)
      Create a predicate for testing whether this expression is greater than the first argument.
      Parameters:
      y - value
      Returns:
      greater-than predicate
      See Also:
    • greaterThanOrEqualTo

      @Nonnull Predicate greaterThanOrEqualTo(@Nonnull Expression<? extends C> y)
      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

      @Nonnull Predicate greaterThanOrEqualTo(C y)
      Create a predicate for testing whether this expression is greater than or equal to the first argument.
      Parameters:
      y - value
      Returns:
      greater-than-or-equal predicate
      See Also:
    • lessThan

      @Nonnull Predicate lessThan(@Nonnull Expression<? extends C> y)
      Create a predicate for testing whether this expression is less than the first argument.
      Parameters:
      y - expression
      Returns:
      less-than predicate
      See Also:
    • lessThan

      @Nonnull Predicate lessThan(C y)
      Create a predicate for testing whether this expression is less than the first argument.
      Parameters:
      y - value
      Returns:
      less-than predicate
      See Also:
    • lessThanOrEqualTo

      @Nonnull Predicate lessThanOrEqualTo(@Nonnull Expression<? extends C> y)
      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

      @Nonnull Predicate lessThanOrEqualTo(C y)
      Create a predicate for testing whether this expression is less than or equal to the first argument.
      Parameters:
      y - value
      Returns:
      less-than-or-equal predicate
      See Also:
    • between

      @Nonnull Predicate between(@Nonnull Expression<? extends C> x, @Nonnull Expression<? extends C> y)
      Create a predicate for testing whether this expression is between the first and second arguments in value.
      Parameters:
      x - expression
      y - expression
      Returns:
      between predicate
      See Also:
    • between

      @Nonnull Predicate between(C x, C y)
      Create a predicate for testing whether this expression is between the first and second arguments in value.
      Parameters:
      x - value
      y - value
      Returns:
      between predicate
      See Also:
    • max

      @Nonnull ComparableExpression<C> max()
      Create an aggregate expression for finding the greatest of the values (strings, dates, etc).
      Returns:
      greatest expression
      See Also:
    • min

      @Nonnull ComparableExpression<C> min()
      Create an aggregate expression for finding the least of the values (strings, dates, etc).
      Returns:
      least expression
      See Also:
    • asc

      @Nonnull Order asc()
      Create an ordering by the ascending value of this expression.
      Returns:
      ascending ordering corresponding to this expression
      Since:
      4.0
    • desc

      @Nonnull Order desc()
      Create an ordering by the descending value of this expression.
      Returns:
      descending ordering corresponding to this expression
    • asc

      @Nonnull Order asc(@Nonnull Nulls nullPrecedence)
      Create an ordering by the ascending value of this expression.
      Parameters:
      nullPrecedence - the precedence of null values
      Returns:
      ascending ordering corresponding to this expression
    • desc

      @Nonnull Order desc(@Nonnull Nulls nullPrecedence)
      Create an ordering by the descending value of this expression.
      Parameters:
      nullPrecedence - the precedence of null values
      Returns:
      descending ordering corresponding to this expression
    • coalesce

      @Nonnull ComparableExpression<C> coalesce(C y)
      Description copied from interface: Expression
      Create 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:
      coalesce in interface Expression<C extends Comparable<? super C>>
      Parameters:
      y - value
      Returns:
      coalesce expression
    • coalesce

      @Nonnull ComparableExpression<C> coalesce(@Nonnull Expression<? extends C> y)
      Description copied from interface: Expression
      Create 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:
      coalesce in interface Expression<C extends Comparable<? super C>>
      Parameters:
      y - expression
      Returns:
      coalesce expression
    • nullif

      @Nonnull ComparableExpression<C> nullif(C y)
      Description copied from interface: Expression
      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.
      Specified by:
      nullif in interface Expression<C extends Comparable<? super C>>
      Parameters:
      y - value
      Returns:
      nullif expression
    • nullif

      @Nonnull ComparableExpression<C> nullif(@Nonnull Expression<? extends C> y)
      Description copied from interface: Expression
      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.
      Specified by:
      nullif in interface Expression<C extends Comparable<? super C>>
      Parameters:
      y - expression
      Returns:
      nullif expression