接口 Expression<T>

所有超级接口:
Selection<T>
所有已知子接口:
ComparableExpression<T>, ConfigurableSubQuery<R>, ExpressionImplementor<T>, NumericExpression<N>, Predicate, PredicateImplementor, PropExpression<T>, PropExpression.Cmp<T>, PropExpression.Embedded<T>, PropExpression.Num<N>, PropExpression.Str, PropExpressionImplementor<T>, StringExpression, TupleExpressionImplementor<T>, TypedSubQuery<R>, VirtualPredicate
所有已知实现类:
AbstractExpression, AbstractPredicate, AbstractTypedEmbeddedPropExpression, AssociatedPredicate, CompositePredicate, ConfigurableSubQueryImpl, ExistsPredicate, MergedTypedSubQueryImpl, NotPredicate, PropExpressionImpl, PropExpressionImpl.EmbeddedImpl, SubQueryFunctionExpression, SubQueryFunctionExpression.All, SubQueryFunctionExpression.Any, Tuples.Expr2, Tuples.Expr3, Tuples.Expr4, Tuples.Expr5, Tuples.Expr6, Tuples.Expr7, Tuples.Expr8, Tuples.Expr9, VirtualPredicateMergedResult

public interface Expression<T> extends Selection<T>
  • 方法详细资料

    • eq

      @NotNull @NotNull Predicate eq(Expression<T> other)
      Create `equal` predicate or `is null` predicate.
      • If this is null literal, returns other.isNull()
      • other is null literal, returns this.isNull()
      参数:
      other - The right operand which cannot be null
      返回:
      `equal` predicate or `is null` predicate
      抛出:
      NullPointerException - The argument `other` is null
    • eq

      @NotNull @NotNull Predicate eq(@Nullable T other)
      Create `equal` predicate or `is null` predicate.

      If other is null, creates an `is null` predicate

      参数:
      other - The right operand which can be null
      返回:
      `equal` predicate or `is null` predicate
    • eqIf

      @Nullable default @Nullable Predicate eqIf(boolean condition, @Nullable T other)
      Create `equal` predicate when certain conditions are met.
      参数:
      condition - If this argument is true and the other is neither null nor empty string, creates predicate; otherwise, returns null
      other - The right operand which can be null. If it is null or empty string, returns null directly; otherwise, check if condition is true to decide whether to create predicate
      返回:
      A predicate or null
      另请参阅:
    • eqIf

      @Nullable default @Nullable Predicate eqIf(@Nullable T other)
      Create `equal` predicate when certain conditions are met.
      参数:
      other - The right operand which can be null, if it is null or empty string, returns null directly; otherwise, create predicate
      返回:
      A predicate or null
      另请参阅:
    • ne

      @NotNull @NotNull Predicate ne(Expression<T> other)
      Create `not equal` predicate or `is not null` predicate.
      • If this is null literal, returns other.isNotNull()
      • other is null literal, returns this.isNotNull()
      参数:
      other - The right operand which cannot be null
      返回:
      `not equal` predicate or `is not null` predicate
      抛出:
      NullPointerException - The argument `other` is null
    • ne

      @NotNull @NotNull Predicate ne(@Nullable T other)
      Create `not equal` predicate or `is not null` predicate.

      If other is null, creates an `is not null` predicate

      参数:
      other - The right operand which can be null
      返回:
      `not equal` predicate or `is not null` predicate
    • neIf

      @Nullable default @Nullable Predicate neIf(boolean condition, @Nullable T other)
      Create `not equal` predicate when certain conditions are met.
      参数:
      condition - If this argument is true and the other is neither null nor empty string, creates predicate; otherwise, returns null
      other - The right operand which can be null. If it is null or empty string, returns null directly; otherwise, check if condition is true to decide whether to create predicate
      返回:
      `not equal` predicate or null
      另请参阅:
    • neIf

      @Nullable default @Nullable Predicate neIf(@Nullable T other)
      Create `not equal` predicate when certain conditions are met.
      参数:
      other - The right operand which can be null, if it is null or empty string, returns null directly; otherwise, create predicate
      返回:
      `not equal` predicate or null
      另请参阅:
    • isNull

      @NotNull @NotNull Predicate isNull()
    • isNotNull

      @NotNull @NotNull Predicate isNotNull()
    • in

      @NotNull @NotNull Predicate in(Collection<T> values)
      Create `in` predicate
      参数:
      values - A collection which cannot be null
      返回:
      `in` predicate
      抛出:
      NullPointerException - The argument values is null
    • inIf

      @Nullable default @Nullable Predicate inIf(boolean condition, @Nullable @Nullable Collection<T> values)
      Create `in` predicate when certain conditions are met.
      参数:
      condition - If this argument is true and the other is not null, creates predicate; otherwise, returns null
      values - The right operand which can be null. If it is null, returns null directly; otherwise, check if condition is true to decide whether to create predicate
      返回:
      `in` predicate or null
    • inIf

      @Nullable default @Nullable Predicate inIf(@Nullable @Nullable Collection<T> values)
      Create `in` predicate when certain conditions are met.
      参数:
      values - The right operand which can be null. If it is null, returns null directly; otherwise, creates predicate
      返回:
      `in` predicate or null
    • notIn

      @NotNull @NotNull Predicate notIn(Collection<T> values)
      Create `not in` predicate
      参数:
      values - A collection which cannot be null
      返回:
      `not in` predicate
      抛出:
      NullPointerException - The argument values is null
    • notInIf

      @Nullable default @Nullable Predicate notInIf(boolean condition, @Nullable @Nullable Collection<T> values)
      Create `not in` predicate when certain conditions are met.
      参数:
      condition - If this argument is true and the values is not null, creates predicate; otherwise, returns null
      values - The right operand which can be null. If it is null, returns null directly; otherwise, check if condition is true to decide whether to create predicate
      返回:
      `not in` predicate or null
    • notInIf

      @Nullable default @Nullable Predicate notInIf(@Nullable @Nullable Collection<T> values)
      Create `not in` predicate when certain conditions are met.
      参数:
      values - The right operand which can be null. If it is null, returns null directly; otherwise, creates predicate
      返回:
      `not in` predicate or null
    • in

      @NotNull @NotNull Predicate in(TypedSubQuery<T> subQuery)
      Create `in` predicate
      参数:
      subQuery - A sub query which cannot be null
      返回:
      `in` predicate
      抛出:
      NullPointerException - The argument subQuery is null
    • inIf

      @Nullable default @Nullable Predicate inIf(boolean condition, @Nullable @Nullable TypedSubQuery<T> subQuery)
      Create `in` predicate when certain conditions are met.
      参数:
      condition - If this argument is true and the subQuery is not null, creates predicate; otherwise, returns null
      subQuery - The right operand which can be null. If it is null, returns null directly; otherwise, check if condition is true to decide whether to create predicate
      返回:
      `in` predicate or null
    • inIf

      @Nullable default @Nullable Predicate inIf(@Nullable @Nullable TypedSubQuery<T> subQuery)
      Create `in` predicate when certain conditions are met.
      参数:
      subQuery - The right operand which can be null. If it is null, returns null directly; otherwise, creates predicate
      返回:
      `in` predicate or null
    • notIn

      @NotNull @NotNull Predicate notIn(TypedSubQuery<T> subQuery)
      Create `not in` predicate
      参数:
      subQuery - A sub query which cannot be null
      返回:
      `not in` predicate
      抛出:
      NullPointerException - The argument subQuery is null
    • notInIf

      @Nullable default @Nullable Predicate notInIf(boolean condition, @Nullable @Nullable TypedSubQuery<T> subQuery)
      Create `not in` predicate when certain conditions are met.
      参数:
      condition - If this argument is true and the subQuery is not null, creates predicate; otherwise, returns null
      subQuery - The right operand which can be null. If it is null, returns null directly; otherwise, check if condition is true to decide whether to create predicate
      返回:
      `not in` predicate or null
    • notInIf

      @Nullable default @Nullable Predicate notInIf(@Nullable @Nullable TypedSubQuery<T> subQuery)
      Create `not in` predicate when certain conditions are met.
      参数:
      subQuery - The right operand which can be null. If it is null, returns null directly; otherwise, creates predicate
      返回:
      `not in` predicate or null
    • count

      @NotNull @NotNull NumericExpression<Long> count()
    • count

      @NotNull @NotNull NumericExpression<Long> count(boolean distinct)
    • coalesce

      @NotNull @NotNull Expression<T> coalesce(T defaultValue)
    • coalesce

      @NotNull @NotNull Expression<T> coalesce(Expression<T> defaultExpr)
    • coalesceBuilder

      @NotNull @NotNull CoalesceBuilder<T> coalesceBuilder()
    • asc

      @NotNull @NotNull Order asc()
    • desc

      @NotNull @NotNull Order desc()
    • constant

      @NotNull static <N extends Number & Comparable<N>> @NotNull NumericExpression<N> constant(N value)
    • constant

      @NotNull static @NotNull StringExpression constant(String value)
    • rowCount

      @NotNull static @NotNull NumericExpression<Long> rowCount()
      Global expression for row count across tables
      返回:
      The row count across tables
      另请参阅:
    • string

      @NotNull static @NotNull Expression.StringFactory string()
    • numeric

      @NotNull static @NotNull Expression.NumericFactory numeric()
    • comparable

      @NotNull static @NotNull Expression.ComparableFactory comparable()
    • any

      @NotNull static @NotNull Expression.AnyFactory any()
    • nullValue

      @NotNull static <T> @NotNull Expression<T> nullValue(Class<T> type)
    • tuple

      @NotNull static <T1, T2> @NotNull Expression<org.babyfish.jimmer.sql.ast.tuple.Tuple2<T1,T2>> tuple(Expression<T1> expr1, Expression<T2> expr2)
    • tuple

      @NotNull static <T1, T2, T3> @NotNull Expression<org.babyfish.jimmer.sql.ast.tuple.Tuple3<T1,T2,T3>> tuple(Expression<T1> expr1, Expression<T2> expr2, Expression<T3> expr3)
    • tuple

      @NotNull static <T1, T2, T3, T4> @NotNull Expression<org.babyfish.jimmer.sql.ast.tuple.Tuple4<T1,T2,T3,T4>> tuple(Expression<T1> expr1, Expression<T2> expr2, Expression<T3> expr3, Expression<T4> expr4)
    • tuple

      @NotNull static <T1, T2, T3, T4, T5> @NotNull Expression<org.babyfish.jimmer.sql.ast.tuple.Tuple5<T1,T2,T3,T4,T5>> tuple(Expression<T1> expr1, Expression<T2> expr2, Expression<T3> expr3, Expression<T4> expr4, Expression<T5> expr5)
    • tuple

      @NotNull static <T1, T2, T3, T4, T5, T6> @NotNull Expression<org.babyfish.jimmer.sql.ast.tuple.Tuple6<T1,T2,T3,T4,T5,T6>> tuple(Expression<T1> expr1, Expression<T2> expr2, Expression<T3> expr3, Expression<T4> expr4, Expression<T5> expr5, Expression<T6> expr6)
    • tuple

      @NotNull static <T1, T2, T3, T4, T5, T6, T7> @NotNull Expression<org.babyfish.jimmer.sql.ast.tuple.Tuple7<T1,T2,T3,T4,T5,T6,T7>> tuple(Expression<T1> expr1, Expression<T2> expr2, Expression<T3> expr3, Expression<T4> expr4, Expression<T5> expr5, Expression<T6> expr6, Expression<T7> expr7)
    • tuple

      @NotNull static <T1, T2, T3, T4, T5, T6, T7, T8> @NotNull Expression<org.babyfish.jimmer.sql.ast.tuple.Tuple8<T1,T2,T3,T4,T5,T6,T7,T8>> tuple(Expression<T1> expr1, Expression<T2> expr2, Expression<T3> expr3, Expression<T4> expr4, Expression<T5> expr5, Expression<T6> expr6, Expression<T7> expr7, Expression<T8> expr8)
    • tuple

      @NotNull static <T1, T2, T3, T4, T5, T6, T7, T8, T9> @NotNull Expression<org.babyfish.jimmer.sql.ast.tuple.Tuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9>> tuple(Expression<T1> expr1, Expression<T2> expr2, Expression<T3> expr3, Expression<T4> expr4, Expression<T5> expr5, Expression<T6> expr6, Expression<T7> expr7, Expression<T8> expr8, Expression<T9> expr9)