public final class Expressions
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static BooleanExpression |
allOf(BooleanExpression... exprs)
Get the intersection of the given Boolean expressions
|
static BooleanExpression |
anyOf(BooleanExpression... exprs)
Get the union of the given Boolean expressions
|
static <D> SimpleExpression<D> |
as(Expression<D> source,
Path<D> alias) |
static <D> SimpleExpression<D> |
as(Expression<D> source,
java.lang.String alias)
Create the alias expression source as alias
|
static BooleanExpression |
booleanOperation(Operator<java.lang.Boolean> operation,
Expression<?>... args)
Create a new Boolean operation
|
static BooleanPath |
booleanPath(Path<?> parent,
java.lang.String property)
Create a new Path expression
|
static BooleanPath |
booleanPath(java.lang.String variable)
Create a new Path expression
|
static BooleanExpression |
booleanTemplate(java.lang.String template,
java.lang.Object... args)
Create a new Template expression
|
static CaseBuilder |
cases()
Get a builder for a case expression
|
static <T extends java.lang.Comparable<?>> |
comparableOperation(java.lang.Class<T> type,
Operator<? super T> operator,
Expression<?>... args)
Create a new Operation expression
|
static <T extends java.lang.Comparable<?>> |
comparablePath(java.lang.Class<T> type,
Path<?> parent,
java.lang.String property)
Create a new Path expression
|
static <T extends java.lang.Comparable<?>> |
comparablePath(java.lang.Class<T> type,
java.lang.String variable)
Create a new Path expression
|
static <T extends java.lang.Comparable<?>> |
comparableTemplate(java.lang.Class<T> cl,
java.lang.String template,
java.lang.Object... args)
Create a new Template expression
|
static <T> Expression<T> |
constant(T value)
Create a Constant expression for the given value
|
static <D> SimpleExpression<D> |
constantAs(D source,
Path<D> alias)
Get the alias expression source as alias
|
static DateExpression<java.util.Date> |
currentDate()
Get an expression representing the current date as a DateExpression instance
|
static TimeExpression<java.sql.Time> |
currentTime()
Get an expression representing the current time as a TimeExpression instance
|
static DateTimeExpression<java.util.Date> |
currentTimestamp()
Get an expression representing the current time instant as a DateTimeExpression instance
|
static <T extends java.lang.Comparable<?>> |
dateOperation(java.lang.Class<T> type,
Operator<? super T> operator,
Expression<?>... args)
Create a new Operation expression
|
static <T extends java.lang.Comparable<?>> |
datePath(java.lang.Class<T> type,
Path<?> parent,
java.lang.String property)
Create a new Path expression
|
static <T extends java.lang.Comparable<?>> |
datePath(java.lang.Class<T> type,
java.lang.String variable)
Create a new Path expression
|
static <T extends java.lang.Comparable<?>> |
dateTimeOperation(java.lang.Class<T> type,
Operator<? super T> operator,
Expression<?>... args)
Create a new Operation expression
|
static <T extends java.lang.Comparable<?>> |
dateTimePath(java.lang.Class<T> type,
Path<?> parent,
java.lang.String property)
Create a new Path expression
|
static <T extends java.lang.Comparable<?>> |
dateTimePath(java.lang.Class<T> type,
java.lang.String variable)
Create a new Path expression
|
static <T> DslExpression<T> |
dslOperation(java.lang.Class<T> type,
Operator<? super T> operator,
Expression<?>... args)
Create a new Operation expression
|
static <T> DslPath<T> |
dslPath(java.lang.Class<T> type,
Path<?> parent,
java.lang.String property)
Create a new Path expression
|
static <T> DslPath<T> |
dslPath(java.lang.Class<T> type,
java.lang.String variable)
Create a new Path expression
|
static <T> DslExpression<T> |
dslTemplate(java.lang.Class<T> cl,
java.lang.String template,
java.lang.Object... args)
Create a new Template expression
|
static <T> SimpleExpression<T> |
list(java.lang.Class<T> clazz,
SimpleExpression<?>... exprs)
Combine the given expressions into a list expression
|
static SimpleExpression<Tuple> |
list(SimpleExpression<?>... exprs)
Combine the given expressions into a list expression
|
static <T extends java.lang.Number & java.lang.Comparable<?>> |
numberOperation(java.lang.Class<T> type,
Operator<? super T> operator,
Expression<?>... args)
Create a new Operation expression
|
static <T extends java.lang.Number & java.lang.Comparable<?>> |
numberPath(java.lang.Class<T> type,
Path<?> parent,
java.lang.String property)
Create a new Path expression
|
static <T extends java.lang.Number & java.lang.Comparable<?>> |
numberPath(java.lang.Class<T> type,
java.lang.String variable)
Create a new Path expression
|
static <T extends java.lang.Number & java.lang.Comparable<?>> |
numberTemplate(java.lang.Class<T> cl,
java.lang.String template,
java.lang.Object... args)
Create a new Template expression
|
static <T> SimpleExpression<T> |
operation(java.lang.Class<T> type,
Operator<? super T> operator,
Expression<?>... args)
Create a new Operation expression
|
static <T> SimplePath<T> |
path(java.lang.Class<T> type,
Path<?> parent,
java.lang.String property)
Create a new Path expression
|
static <T> SimplePath<T> |
path(java.lang.Class<T> type,
java.lang.String variable)
Create a new Path expression
|
static BooleanExpression |
predicate(Operator<java.lang.Boolean> operation,
Expression<?>... args)
Create a new Predicate operation
|
static StringExpression |
stringOperation(Operator<? super java.lang.String> operator,
Expression<?>... args)
Create a new Operation expression
|
static StringPath |
stringPath(Path<?> parent,
java.lang.String property)
Create a new Path expression
|
static StringPath |
stringPath(java.lang.String variable)
Create a new Path expression
|
static StringExpression |
stringTemplate(java.lang.String template,
java.lang.Object... args)
Create a new Template expression
|
static <T> ExtendedSubQueryExpression<T> |
subQuery(java.lang.Class<T> type,
QueryMetadata metadata)
Create a new SubQuery expression
|
static <T> SimpleExpression<T> |
template(java.lang.Class<T> cl,
java.lang.String template,
java.lang.Object... args)
Create a new Template expression
|
static <T> SimpleExpression<T> |
template(java.lang.Class<T> cl,
Template template,
java.lang.Object... args)
Create a new Template expression
|
static <T extends java.lang.Comparable<?>> |
timeOperation(java.lang.Class<T> type,
Operator<? super T> operator,
Expression<?>... args)
Create a new Operation expression
|
static <T extends java.lang.Comparable<?>> |
timePath(java.lang.Class<T> type,
Path<?> parent,
java.lang.String property)
Create a new Path expression
|
static <T extends java.lang.Comparable<?>> |
timePath(java.lang.Class<T> type,
java.lang.String variable)
Create a new Path expression
|
public static <D> SimpleExpression<D> as(Expression<D> source, Path<D> alias)
public static DateExpression<java.util.Date> currentDate()
public static DateTimeExpression<java.util.Date> currentTimestamp()
public static TimeExpression<java.sql.Time> currentTime()
public static <D> SimpleExpression<D> as(Expression<D> source, java.lang.String alias)
source
- alias
- @Nullable public static BooleanExpression allOf(BooleanExpression... exprs)
exprs
- @Nullable public static BooleanExpression anyOf(BooleanExpression... exprs)
exprs
- public static <T> Expression<T> constant(T value)
value
- public static <D> SimpleExpression<D> constantAs(D source, Path<D> alias)
source
- alias
- public static <T> SimpleExpression<T> template(java.lang.Class<T> cl, java.lang.String template, java.lang.Object... args)
cl
- template
- args
- public static <T> SimpleExpression<T> template(java.lang.Class<T> cl, Template template, java.lang.Object... args)
cl
- template
- args
- public static <T> DslExpression<T> dslTemplate(java.lang.Class<T> cl, java.lang.String template, java.lang.Object... args)
cl
- template
- args
- public static <T extends java.lang.Comparable<?>> ComparableExpression<T> comparableTemplate(java.lang.Class<T> cl, java.lang.String template, java.lang.Object... args)
cl
- template
- args
- public static <T extends java.lang.Number & java.lang.Comparable<?>> NumberExpression<T> numberTemplate(java.lang.Class<T> cl, java.lang.String template, java.lang.Object... args)
cl
- template
- args
- public static StringExpression stringTemplate(java.lang.String template, java.lang.Object... args)
template
- args
- public static BooleanExpression booleanTemplate(java.lang.String template, java.lang.Object... args)
template
- args
- public static <T> ExtendedSubQueryExpression<T> subQuery(java.lang.Class<T> type, QueryMetadata metadata)
type
- metadata
- public static BooleanExpression predicate(Operator<java.lang.Boolean> operation, Expression<?>... args)
operation
- args
- public static <T> SimpleExpression<T> operation(java.lang.Class<T> type, Operator<? super T> operator, Expression<?>... args)
type
- operator
- args
- public static <T> DslExpression<T> dslOperation(java.lang.Class<T> type, Operator<? super T> operator, Expression<?>... args)
type
- operator
- args
- public static BooleanExpression booleanOperation(Operator<java.lang.Boolean> operation, Expression<?>... args)
operation
- args
- public static <T extends java.lang.Comparable<?>> ComparableExpression<T> comparableOperation(java.lang.Class<T> type, Operator<? super T> operator, Expression<?>... args)
type
- operator
- args
- public static <T extends java.lang.Comparable<?>> DateExpression<T> dateOperation(java.lang.Class<T> type, Operator<? super T> operator, Expression<?>... args)
type
- operator
- args
- public static <T extends java.lang.Comparable<?>> DateTimeExpression<T> dateTimeOperation(java.lang.Class<T> type, Operator<? super T> operator, Expression<?>... args)
type
- operator
- args
- public static <T extends java.lang.Comparable<?>> TimeExpression<T> timeOperation(java.lang.Class<T> type, Operator<? super T> operator, Expression<?>... args)
type
- operator
- args
- public static <T extends java.lang.Number & java.lang.Comparable<?>> NumberExpression<T> numberOperation(java.lang.Class<T> type, Operator<? super T> operator, Expression<?>... args)
type
- operator
- args
- public static StringExpression stringOperation(Operator<? super java.lang.String> operator, Expression<?>... args)
operator
- args
- public static <T> SimplePath<T> path(java.lang.Class<T> type, java.lang.String variable)
type
- variable
- public static <T> SimplePath<T> path(java.lang.Class<T> type, Path<?> parent, java.lang.String property)
type
- parent
- property
- public static <T> DslPath<T> dslPath(java.lang.Class<T> type, java.lang.String variable)
type
- variable
- public static <T> DslPath<T> dslPath(java.lang.Class<T> type, Path<?> parent, java.lang.String property)
type
- parent
- property
- public static <T extends java.lang.Comparable<?>> ComparablePath<T> comparablePath(java.lang.Class<T> type, java.lang.String variable)
type
- variable
- public static <T extends java.lang.Comparable<?>> ComparablePath<T> comparablePath(java.lang.Class<T> type, Path<?> parent, java.lang.String property)
type
- parent
- property
- public static <T extends java.lang.Comparable<?>> DatePath<T> datePath(java.lang.Class<T> type, java.lang.String variable)
type
- variable
- public static <T extends java.lang.Comparable<?>> DatePath<T> datePath(java.lang.Class<T> type, Path<?> parent, java.lang.String property)
type
- parent
- property
- public static <T extends java.lang.Comparable<?>> DateTimePath<T> dateTimePath(java.lang.Class<T> type, java.lang.String variable)
type
- variable
- public static <T extends java.lang.Comparable<?>> DateTimePath<T> dateTimePath(java.lang.Class<T> type, Path<?> parent, java.lang.String property)
type
- parent
- property
- public static <T extends java.lang.Comparable<?>> TimePath<T> timePath(java.lang.Class<T> type, java.lang.String variable)
type
- variable
- public static <T extends java.lang.Comparable<?>> TimePath<T> timePath(java.lang.Class<T> type, Path<?> parent, java.lang.String property)
type
- parent
- property
- public static <T extends java.lang.Number & java.lang.Comparable<?>> NumberPath<T> numberPath(java.lang.Class<T> type, java.lang.String variable)
type
- variable
- public static <T extends java.lang.Number & java.lang.Comparable<?>> NumberPath<T> numberPath(java.lang.Class<T> type, Path<?> parent, java.lang.String property)
type
- parent
- property
- public static StringPath stringPath(java.lang.String variable)
variable
- public static StringPath stringPath(Path<?> parent, java.lang.String property)
parent
- property
- public static BooleanPath booleanPath(java.lang.String variable)
variable
- public static BooleanPath booleanPath(Path<?> parent, java.lang.String property)
parent
- property
- public static CaseBuilder cases()
public static SimpleExpression<Tuple> list(SimpleExpression<?>... exprs)
exprs
- public static <T> SimpleExpression<T> list(java.lang.Class<T> clazz, SimpleExpression<?>... exprs)
clazz
- exprs
- Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.