Class Expressions

java.lang.Object
com.querydsl.core.types.dsl.Expressions

public final class Expressions extends Object
Factory class for Expression creation.
Author:
tiwe
  • Field Details

  • Method Details

    • as

      public static <D> SimpleExpression<D> as(Expression<D> source, Path<D> alias)
      Create a source as alias expression
      Type Parameters:
      D -
      Parameters:
      source - source
      alias - alias
      Returns:
      source as alias
    • currentDate

      public static DateExpression<Date> currentDate()
      Create an expression representing the current date as a DateExpression instance
      Returns:
      current date
    • currentTimestamp

      public static DateTimeExpression<Date> currentTimestamp()
      Create an expression representing the current time instant as a DateTimeExpression instance
      Returns:
      current timestamp
    • currentTime

      public static TimeExpression<Time> currentTime()
      Create an expression representing the current time as a TimeExpression instance
      Returns:
      current time
    • as

      public static <D> SimpleExpression<D> as(Expression<D> source, String alias)
      Create a source as alias expression
      Parameters:
      source - source
      alias - alias
      Returns:
      source as alias
    • allOf

      public static BooleanExpression allOf(BooleanExpression... exprs)
      Get the intersection of the given Boolean expressions
      Parameters:
      exprs - predicates
      Returns:
      intersection of predicates
    • anyOf

      public static BooleanExpression anyOf(BooleanExpression... exprs)
      Get the union of the given Boolean expressions
      Parameters:
      exprs - predicates
      Returns:
      union of predicates
    • constant

      public static <T> Expression<T> constant(T value)
      Create a Constant expression for the given value
      Parameters:
      value - constant
      Returns:
      constant expression
    • constantAs

      public static <D> SimpleExpression<D> constantAs(D source, Path<D> alias)
      Create a source as alias expression
      Parameters:
      source - source
      alias - alias
      Returns:
      source as alias
    • template

      public static <T> SimpleTemplate<T> template(Class<? extends T> cl, String template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • template

      public static <T> SimpleTemplate<T> template(Class<? extends T> cl, String template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • template

      public static <T> SimpleTemplate<T> template(Class<? extends T> cl, Template template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • template

      public static <T> SimpleTemplate<T> template(Class<? extends T> cl, Template template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • simpleTemplate

      public static <T> SimpleTemplate<T> simpleTemplate(Class<? extends T> cl, String template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • simpleTemplate

      public static <T> SimpleTemplate<T> simpleTemplate(Class<? extends T> cl, String template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • simpleTemplate

      public static <T> SimpleTemplate<T> simpleTemplate(Class<? extends T> cl, Template template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • simpleTemplate

      public static <T> SimpleTemplate<T> simpleTemplate(Class<? extends T> cl, Template template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dslTemplate

      public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, String template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dslTemplate

      public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, String template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dslTemplate

      public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, Template template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dslTemplate

      public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, Template template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • comparableTemplate

      public static <T extends Comparable<?>> ComparableTemplate<T> comparableTemplate(Class<? extends T> cl, String template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • comparableTemplate

      public static <T extends Comparable<?>> ComparableTemplate<T> comparableTemplate(Class<? extends T> cl, String template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • comparableTemplate

      public static <T extends Comparable<?>> ComparableTemplate<T> comparableTemplate(Class<? extends T> cl, Template template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • comparableTemplate

      public static <T extends Comparable<?>> ComparableTemplate<T> comparableTemplate(Class<? extends T> cl, Template template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dateTemplate

      public static <T extends Comparable<?>> DateTemplate<T> dateTemplate(Class<? extends T> cl, String template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dateTemplate

      public static <T extends Comparable<?>> DateTemplate<T> dateTemplate(Class<? extends T> cl, String template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dateTemplate

      public static <T extends Comparable<?>> DateTemplate<T> dateTemplate(Class<? extends T> cl, Template template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dateTemplate

      public static <T extends Comparable<?>> DateTemplate<T> dateTemplate(Class<? extends T> cl, Template template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dateTimeTemplate

      public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, String template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dateTimeTemplate

      public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, String template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dateTimeTemplate

      public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, Template template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • dateTimeTemplate

      public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, Template template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • timeTemplate

      public static <T extends Comparable<?>> TimeTemplate<T> timeTemplate(Class<? extends T> cl, String template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • timeTemplate

      public static <T extends Comparable<?>> TimeTemplate<T> timeTemplate(Class<? extends T> cl, String template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • timeTemplate

      public static <T extends Comparable<?>> TimeTemplate<T> timeTemplate(Class<? extends T> cl, Template template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • timeTemplate

      public static <T extends Comparable<?>> TimeTemplate<T> timeTemplate(Class<? extends T> cl, Template template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • enumTemplate

      public static <T extends Enum<T>> EnumTemplate<T> enumTemplate(Class<? extends T> cl, String template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • enumTemplate

      public static <T extends Enum<T>> EnumTemplate<T> enumTemplate(Class<? extends T> cl, String template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • enumTemplate

      public static <T extends Enum<T>> EnumTemplate<T> enumTemplate(Class<? extends T> cl, Template template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • enumTemplate

      public static <T extends Enum<T>> EnumTemplate<T> enumTemplate(Class<? extends T> cl, Template template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • numberTemplate

      public static <T extends Number & Comparable<?>> NumberTemplate<T> numberTemplate(Class<? extends T> cl, String template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • numberTemplate

      public static <T extends Number & Comparable<?>> NumberTemplate<T> numberTemplate(Class<? extends T> cl, String template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • numberTemplate

      public static <T extends Number & Comparable<?>> NumberTemplate<T> numberTemplate(Class<? extends T> cl, Template template, Object... args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • numberTemplate

      public static <T extends Number & Comparable<?>> NumberTemplate<T> numberTemplate(Class<? extends T> cl, Template template, List<?> args)
      Create a new Template expression
      Parameters:
      cl - type of expression
      template - template
      args - template parameters
      Returns:
      template expression
    • stringTemplate

      public static StringTemplate stringTemplate(String template, Object... args)
      Create a new Template expression
      Parameters:
      template - template
      args - template parameters
      Returns:
      template expression
    • stringTemplate

      public static StringTemplate stringTemplate(String template, List<?> args)
      Create a new Template expression
      Parameters:
      template - template
      args - template parameters
      Returns:
      template expression
    • stringTemplate

      public static StringTemplate stringTemplate(Template template, Object... args)
      Create a new Template expression
      Parameters:
      template - template
      args - template parameters
      Returns:
      template expression
    • stringTemplate

      public static StringTemplate stringTemplate(Template template, List<?> args)
      Create a new Template expression
      Parameters:
      template - template
      args - template parameters
      Returns:
      template expression
    • booleanTemplate

      public static BooleanTemplate booleanTemplate(String template, Object... args)
      Create a new Template expression
      Parameters:
      template - template
      args - template parameters
      Returns:
      template expression
    • booleanTemplate

      public static BooleanTemplate booleanTemplate(String template, List<?> args)
      Create a new Template expression
      Parameters:
      template - template
      args - template parameters
      Returns:
      template expression
    • booleanTemplate

      public static BooleanTemplate booleanTemplate(Template template, Object... args)
      Create a new Template expression
      Parameters:
      template - template
      args - template parameters
      Returns:
      template expression
    • booleanTemplate

      public static BooleanTemplate booleanTemplate(Template template, List<?> args)
      Create a new Template expression
      Parameters:
      template - template
      args - template parameters
      Returns:
      template expression
    • predicate

      public static BooleanOperation predicate(Operator operator, Expression<?>... args)
      Create a new Predicate operation
      Parameters:
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • operation

      public static <T> SimpleOperation<T> operation(Class<? extends T> type, Operator operator, Expression<?>... args)
      Create a new Operation expression
      Parameters:
      type - type of expression
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • simpleOperation

      public static <T> SimpleOperation<T> simpleOperation(Class<? extends T> type, Operator operator, Expression<?>... args)
      Create a new Operation expression
      Parameters:
      type - type of expression
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • dslOperation

      public static <T> DslOperation<T> dslOperation(Class<? extends T> type, Operator operator, Expression<?>... args)
      Create a new Operation expression
      Parameters:
      type - type of expression
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • booleanOperation

      public static BooleanOperation booleanOperation(Operator operator, Expression<?>... args)
      Create a new Boolean operation
      Parameters:
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • comparableOperation

      public static <T extends Comparable<?>> ComparableOperation<T> comparableOperation(Class<? extends T> type, Operator operator, Expression<?>... args)
      Create a new Operation expression
      Parameters:
      type - type of expression
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • dateOperation

      public static <T extends Comparable<?>> DateOperation<T> dateOperation(Class<? extends T> type, Operator operator, Expression<?>... args)
      Create a new Operation expression
      Parameters:
      type - type of expression
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • dateTimeOperation

      public static <T extends Comparable<?>> DateTimeOperation<T> dateTimeOperation(Class<? extends T> type, Operator operator, Expression<?>... args)
      Create a new Operation expression
      Parameters:
      type - type of expression
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • timeOperation

      public static <T extends Comparable<?>> TimeOperation<T> timeOperation(Class<? extends T> type, Operator operator, Expression<?>... args)
      Create a new Operation expression
      Parameters:
      type - type of expression
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • numberOperation

      public static <T extends Number & Comparable<?>> NumberOperation<T> numberOperation(Class<? extends T> type, Operator operator, Expression<?>... args)
      Create a new Operation expression
      Parameters:
      type - type of expression
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • stringOperation

      public static StringOperation stringOperation(Operator operator, Expression<?>... args)
      Create a new Operation expression
      Parameters:
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • path

      public static <T> SimplePath<T> path(Class<? extends T> type, String variable)
      Create a new Path expression
      Parameters:
      type - type of expression
      variable - variable name
      Returns:
      path expression
    • path

      public static <T> SimplePath<T> path(Class<? extends T> type, Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      type - type of expression
      parent - parent path
      property - property name
      Returns:
      property path
    • path

      public static <T> SimplePath<T> path(Class<? extends T> type, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      metadata - path metadata
      Returns:
      path expression
    • simplePath

      public static <T> SimplePath<T> simplePath(Class<? extends T> type, String variable)
      Create a new Path expression
      Parameters:
      type - type of expression
      variable - variable name
      Returns:
      path expression
    • simplePath

      public static <T> SimplePath<T> simplePath(Class<? extends T> type, Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      type - type of expression
      parent - parent path
      property - property name
      Returns:
      property path
    • simplePath

      public static <T> SimplePath<T> simplePath(Class<? extends T> type, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      metadata - path metadata
      Returns:
      path expression
    • dslPath

      public static <T> DslPath<T> dslPath(Class<? extends T> type, String variable)
      Create a new Path expression
      Parameters:
      type - type of expression
      variable - variable name
      Returns:
      path expression
    • dslPath

      public static <T> DslPath<T> dslPath(Class<? extends T> type, Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      type - type of expression
      parent - parent path
      property - property name
      Returns:
      property path
    • dslPath

      public static <T> DslPath<T> dslPath(Class<? extends T> type, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      metadata - path metadata
      Returns:
      path expression
    • comparablePath

      public static <T extends Comparable<?>> ComparablePath<T> comparablePath(Class<? extends T> type, String variable)
      Create a new Path expression
      Parameters:
      type - type of expression
      variable - variable name
      Returns:
      path expression
    • comparablePath

      public static <T extends Comparable<?>> ComparablePath<T> comparablePath(Class<? extends T> type, Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      type - type of expression
      parent - parent path
      property - property path
      Returns:
      path expression
    • comparablePath

      public static <T extends Comparable<?>> ComparablePath<T> comparablePath(Class<? extends T> type, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      metadata - path metadata
      Returns:
      path expression
    • comparableEntityPath

      public static <T extends Comparable<?>> ComparableEntityPath<T> comparableEntityPath(Class<? extends T> type, String variable)
      Create a new Path expression
      Parameters:
      type - type of expression
      variable - variable name
      Returns:
      path expression
    • comparableEntityPath

      public static <T extends Comparable<?>> ComparableEntityPath<T> comparableEntityPath(Class<? extends T> type, Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      type - type of expression
      parent - parent path
      property - property name
      Returns:
      path expression
    • comparableEntityPath

      public static <T extends Comparable<?>> ComparableEntityPath<T> comparableEntityPath(Class<? extends T> type, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      metadata - path metadata
      Returns:
      path expression
    • datePath

      public static <T extends Comparable<?>> DatePath<T> datePath(Class<? extends T> type, String variable)
      Create a new Path expression
      Parameters:
      type - type of expression
      variable - variable name
      Returns:
      path expression
    • datePath

      public static <T extends Comparable<?>> DatePath<T> datePath(Class<? extends T> type, Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      type - type of expression
      parent - parent path
      property - property name
      Returns:
      path expression
    • datePath

      public static <T extends Comparable<?>> DatePath<T> datePath(Class<? extends T> type, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      metadata - path metadata
      Returns:
      new path instance
    • dateTimePath

      public static <T extends Comparable<?>> DateTimePath<T> dateTimePath(Class<? extends T> type, String variable)
      Create a new Path expression
      Parameters:
      type - type of expression
      variable - variable name
      Returns:
      path expression
    • dateTimePath

      public static <T extends Comparable<?>> DateTimePath<T> dateTimePath(Class<? extends T> type, Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      type - type of expression
      parent - parent path
      property - property name
      Returns:
      path expression
    • dateTimePath

      public static <T extends Comparable<?>> DateTimePath<T> dateTimePath(Class<? extends T> type, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      metadata - path metadata
      Returns:
      path expression
    • timePath

      public static <T extends Comparable<?>> TimePath<T> timePath(Class<? extends T> type, String variable)
      Create a new Path expression
      Parameters:
      type - type of expression
      variable - variable name
      Returns:
      path expression
    • timePath

      public static <T extends Comparable<?>> TimePath<T> timePath(Class<? extends T> type, Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      type - type of expression
      parent - parent path
      property - property name
      Returns:
      property path
    • timePath

      public static <T extends Comparable<?>> TimePath<T> timePath(Class<? extends T> type, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      metadata - path metadata
      Returns:
      path expression
    • numberPath

      public static <T extends Number & Comparable<?>> NumberPath<T> numberPath(Class<? extends T> type, String variable)
      Create a new Path expression
      Parameters:
      type - type of expression
      variable - variable name
      Returns:
      path expression
    • numberPath

      public static <T extends Number & Comparable<?>> NumberPath<T> numberPath(Class<? extends T> type, Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      type - type of expression
      parent - parent path
      property - property name
      Returns:
      path expression
    • numberPath

      public static <T extends Number & Comparable<?>> NumberPath<T> numberPath(Class<? extends T> type, PathMetadata metadata)
      Create new Path expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      metadata - path metadata
      Returns:
      path expression
    • stringPath

      public static StringPath stringPath(String variable)
      Create a new Path expression
      Parameters:
      variable - variable name
      Returns:
      path expression
    • stringPath

      public static StringPath stringPath(Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      parent - parent path
      property - property name
      Returns:
      property path
    • stringPath

      public static StringPath stringPath(PathMetadata metadata)
      Create a new Path expression
      Parameters:
      metadata - path metadata
      Returns:
      path expression
    • booleanPath

      public static BooleanPath booleanPath(String variable)
      Create a new Path expression
      Parameters:
      variable - variable name
      Returns:
      path expression
    • booleanPath

      public static BooleanPath booleanPath(Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      parent - parent path
      property - property name
      Returns:
      property path
    • booleanPath

      public static BooleanPath booleanPath(PathMetadata metadata)
      Create a new Path expression
      Parameters:
      metadata - path metadata
      Returns:
      path expression
    • cases

      public static CaseBuilder cases()
      Create a builder for a case expression
      Returns:
      case builder
    • list

      public static SimpleExpression<Tuple> list(SimpleExpression<?>... exprs)
      Combine the given expressions into a list expression
      Parameters:
      exprs - list elements
      Returns:
      list expression
    • list

      public static <T> SimpleExpression<T> list(Class<T> clazz, SimpleExpression<?>... exprs)
      Combine the given expressions into a list expression
      Parameters:
      clazz - type of list expression
      exprs - list elements
      Returns:
      list expression
    • list

      public static <T> Expression<T> list(Class<T> clazz, Expression<?>... exprs)
      Combine the given expressions into a list expression
      Parameters:
      clazz - type of list expression
      exprs - list elements
      Returns:
      list expression
    • set

      public static <T> SimpleExpression<T> set(Class<T> clazz, SimpleExpression<?>... exprs)
      Combine the given expressions into a set expression
      Parameters:
      clazz - type of list expression
      exprs - list elements
      Returns:
      list expression
    • set

      public static <T> Expression<T> set(Class<T> clazz, Expression<?>... exprs)
      Combine the given expressions into a set expression
      Parameters:
      clazz - type of list expression
      exprs - list elements
      Returns:
      list expression
    • list

      public static Expression<Tuple> list(Expression<?>... exprs)
      Combine the given expressions into a list expression
      Parameters:
      exprs - list elements
      Returns:
      list expression
    • set

      public static Expression<Tuple> set(Expression<?>... exprs)
      Combine the given expressions into a set expression
      Parameters:
      exprs - list elements
      Returns:
      list expression
    • nullExpression

      public static <T> NullExpression<T> nullExpression()
      Create a null expression for the specified type
      Returns:
      null expression
    • nullExpression

      public static <T> NullExpression<T> nullExpression(Class<T> type)
      Create a null expression for the specified type
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      Returns:
      null expression
    • nullExpression

      public static <T> NullExpression<T> nullExpression(Path<T> path)
      Create a null expression for the specified path
      Type Parameters:
      T - type of expression
      Parameters:
      path - path for type cast
      Returns:
      null expression
    • enumOperation

      public static <T extends Enum<T>> EnumOperation<T> enumOperation(Class<? extends T> type, Operator operator, Expression<?>... args)
      Create a new Enum operation expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • enumPath

      public static <T extends Enum<T>> EnumPath<T> enumPath(Class<? extends T> type, String variable)
      Create a new Path expression
      Parameters:
      type - type of expression
      variable - variable name
      Returns:
      path expression
    • enumPath

      public static <T extends Enum<T>> EnumPath<T> enumPath(Class<? extends T> type, Path<?> parent, String property)
      Create a new Path expression
      Parameters:
      type - type of expression
      parent - parent path
      property - property name
      Returns:
      property path
    • enumPath

      public static <T extends Enum<T>> EnumPath<T> enumPath(Class<? extends T> type, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      T - type of expression
      Parameters:
      type - type of expression
      metadata - path metadata
      Returns:
      path expression
    • collectionOperation

      public static <T> CollectionExpression<Collection<T>,T> collectionOperation(Class<T> elementType, Operator operator, Expression<?>... args)
      Create a new Collection operation expression
      Type Parameters:
      T - type of expression
      Parameters:
      elementType - element type
      operator - operator
      args - operation arguments
      Returns:
      operation expression
    • collectionPath

      public static <E, Q extends SimpleExpression<? super E>> CollectionPath<E,Q> collectionPath(Class<E> type, Class<Q> queryType, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      E - element type
      Q - element expression type
      Parameters:
      type - element type
      queryType - element expression type
      metadata - path metadata
      Returns:
      path expression
    • listPath

      public static <E, Q extends SimpleExpression<? super E>> ListPath<E,Q> listPath(Class<E> type, Class<Q> queryType, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      E - element type
      Q - element expression type
      Parameters:
      type - element type
      queryType - element expression type
      metadata - path metadata
      Returns:
      path expression
    • setPath

      public static <E, Q extends SimpleExpression<? super E>> SetPath<E,Q> setPath(Class<E> type, Class<Q> queryType, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      E - element type
      Q - element expression type
      Parameters:
      type - element type
      queryType - element expression type
      metadata - path metadata
      Returns:
      path expression
    • mapPath

      public static <K, V, E extends SimpleExpression<? super V>> MapPath<K,V,E> mapPath(Class<? super K> keyType, Class<? super V> valueType, Class<E> queryType, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      K - key type
      V - value type
      E - value expression type
      Parameters:
      keyType - key type
      valueType - value type
      queryType - value expression type
      metadata - path metadata
      Returns:
      path expression
    • arrayPath

      public static <A, E> ArrayPath<A,E> arrayPath(Class<A> arrayType, String variable)
      Create a new Path expression
      Type Parameters:
      A - array type
      E - element type
      Parameters:
      arrayType - array type
      variable - variable name
      Returns:
      path expression
    • arrayPath

      public static <A, E> ArrayPath<A,E> arrayPath(Class<A> arrayType, Path<?> parent, String property)
      Create a new Path expression
      Type Parameters:
      A - array type
      E - element type
      Parameters:
      arrayType - array type
      parent - path metadata
      property - property name
      Returns:
      path expression
    • arrayPath

      public static <A, E> ArrayPath<A,E> arrayPath(Class<A> arrayType, PathMetadata metadata)
      Create a new Path expression
      Type Parameters:
      A - array type
      E - element type
      Parameters:
      arrayType - array type
      metadata - path metadata
      Returns:
      path expression
    • asBoolean

      public static BooleanExpression asBoolean(Expression<Boolean> expr)
      Create a new BooleanExpression
      Parameters:
      expr - Expression of type Boolean
      Returns:
      new BooleanExpression
    • asBoolean

      public static BooleanExpression asBoolean(boolean value)
      Create a new BooleanExpression
      Parameters:
      value - boolean
      Returns:
      new BooleanExpression
    • asComparable

      public static <T extends Comparable<?>> ComparableExpression<T> asComparable(Expression<T> expr)
      Create a new ComparableExpression
      Parameters:
      expr - Expression of type Comparable
      Returns:
      new ComparableExpression
    • asComparable

      public static <T extends Comparable<?>> ComparableExpression<T> asComparable(T value)
      Create a new ComparableExpression
      Parameters:
      value - Comparable
      Returns:
      new ComparableExpression
    • asDate

      public static <T extends Comparable<?>> DateExpression<T> asDate(Expression<T> expr)
      Create a new DateExpression
      Parameters:
      expr - the date Expression
      Returns:
      new DateExpression
    • asDate

      public static <T extends Comparable<?>> DateExpression<T> asDate(T value)
      Create a new DateExpression
      Parameters:
      value - the date
      Returns:
      new DateExpression
    • asDateTime

      public static <T extends Comparable<?>> DateTimeExpression<T> asDateTime(Expression<T> expr)
      Create a new DateTimeExpression
      Parameters:
      expr - the date time Expression
      Returns:
      new DateTimeExpression
    • asDateTime

      public static <T extends Comparable<?>> DateTimeExpression<T> asDateTime(T value)
      Create a new DateTimeExpression
      Parameters:
      value - the date time
      Returns:
      new DateTimeExpression
    • asTime

      public static <T extends Comparable<?>> TimeExpression<T> asTime(Expression<T> expr)
      Create a new TimeExpression
      Parameters:
      expr - the time Expression
      Returns:
      new TimeExpression
    • asTime

      public static <T extends Comparable<?>> TimeExpression<T> asTime(T value)
      Create a new TimeExpression
      Parameters:
      value - the time
      Returns:
      new TimeExpression
    • asEnum

      public static <T extends Enum<T>> EnumExpression<T> asEnum(Expression<T> expr)
      Create a new EnumExpression
      Parameters:
      expr - Expression of type Enum
      Returns:
      new EnumExpression
    • asEnum

      public static <T extends Enum<T>> EnumExpression<T> asEnum(T value)
      Create a new EnumExpression
      Parameters:
      value - enum
      Returns:
      new EnumExpression
    • asNumber

      public static <T extends Number & Comparable<?>> NumberExpression<T> asNumber(Expression<T> expr)
      Create a new NumberExpression
      Parameters:
      expr - Expression of type Number
      Returns:
      new NumberExpression
    • asNumber

      public static <T extends Number & Comparable<?>> NumberExpression<T> asNumber(T value)
      Create a new NumberExpression
      Parameters:
      value - Number
      Returns:
      new NumberExpression
    • asString

      public static StringExpression asString(Expression<String> expr)
      Create a new StringExpression
      Parameters:
      expr - Expression of type String
      Returns:
      new StringExpression
    • asString

      public static StringExpression asString(String value)
      Create a new StringExpression
      Parameters:
      value - String
      Returns:
      new StringExpression
    • asSimple

      public static <T> SimpleExpression<T> asSimple(Expression<T> expr)
      Create a new SimpleExpression
      Parameters:
      expr - expression
      Returns:
      new SimpleExpression
    • asSimple

      public static <T> SimpleExpression<T> asSimple(T value)
      Create a new SimpleExpression
      Parameters:
      value - constant
      Returns:
      new SimpleExpression