public abstract class Conditions extends Object
Condition
s.SQL
,
Expressions
,
Functions
Modifier and Type | Method and Description |
---|---|
static In |
in(Column column,
Select subselect)
|
static Condition |
in(Expression columnOrExpression,
Collection<? extends Expression> expressions)
|
static In |
in(Expression columnOrExpression,
Expression... expressions)
|
static In |
in(Expression columnOrExpression,
Expression arg)
Creates a
IN clause . |
static Comparison |
isEqual(Expression leftColumnOrExpression,
Expression rightColumnOrExpression)
Creates a
= (equals) Condition . |
static Comparison |
isGreater(Expression leftColumnOrExpression,
Expression rightColumnOrExpression)
|
static Comparison |
isGreaterOrEqualTo(Expression leftColumnOrExpression,
Expression rightColumnOrExpression)
|
static Comparison |
isLess(Expression leftColumnOrExpression,
Expression rightColumnOrExpression)
|
static Comparison |
isLessOrEqualTo(Expression leftColumnOrExpression,
Expression rightColumnOrExpression)
|
static Comparison |
isNotEqual(Expression leftColumnOrExpression,
Expression rightColumnOrExpression)
Creates a {@code !
|
static IsNull |
isNull(Expression expression)
Creates a
IS NULL condition. |
static Condition |
just(String sql)
Creates a plain
sql Condition . |
static Like |
like(Expression leftColumnOrExpression,
Expression rightColumnOrExpression)
Creates a
LIKE Condition . |
static Condition |
nest(Condition condition)
Creates a nested
Condition that is enclosed with parentheses. |
static In |
notIn(Column column,
Select subselect)
|
static Condition |
notIn(Expression columnOrExpression,
Collection<? extends Expression> expressions)
|
static In |
notIn(Expression columnOrExpression,
Expression... expressions)
|
static In |
notIn(Expression columnOrExpression,
Expression arg)
Creates a
NOT IN clause . |
public static Condition just(String sql)
sql
Condition
.sql
- the SQL, must not be null or empty.Expression
.public static Condition nest(Condition condition)
Condition
that is enclosed with parentheses. Useful to combine AND
and OR
statements.condition
- the nested condition.NestedCondition
.public static IsNull isNull(Expression expression)
IS NULL
condition.expression
- the expression to check for nullability, must not be null.IS NULL
condition.public static Comparison isEqual(Expression leftColumnOrExpression, Expression rightColumnOrExpression)
=
(equals) Condition
.leftColumnOrExpression
- left side of the comparison.rightColumnOrExpression
- right side of the comparison.Comparison
condition.public static Comparison isNotEqual(Expression leftColumnOrExpression, Expression rightColumnOrExpression)
!=
(not equals) Condition
.leftColumnOrExpression
- left side of the comparison.rightColumnOrExpression
- right side of the comparison.Comparison
condition.public static Comparison isLess(Expression leftColumnOrExpression, Expression rightColumnOrExpression)
leftColumnOrExpression
- left side of the comparison.rightColumnOrExpression
- right side of the comparison.Comparison
condition.public static Comparison isLessOrEqualTo(Expression leftColumnOrExpression, Expression rightColumnOrExpression)
leftColumnOrExpression
- left side of the comparison.rightColumnOrExpression
- right side of the comparison.Comparison
condition.public static Comparison isGreater(Expression leftColumnOrExpression, Expression rightColumnOrExpression)
leftColumnOrExpression
- left side of the comparison.rightColumnOrExpression
- right side of the comparison.Comparison
condition.public static Comparison isGreaterOrEqualTo(Expression leftColumnOrExpression, Expression rightColumnOrExpression)
leftColumnOrExpression
- left side of the comparison.rightColumnOrExpression
- right side of the comparison.Comparison
condition.public static Like like(Expression leftColumnOrExpression, Expression rightColumnOrExpression)
LIKE
Condition
.leftColumnOrExpression
- left side of the comparison.rightColumnOrExpression
- right side of the comparison.Comparison
condition.public static In in(Expression columnOrExpression, Expression arg)
IN
clause
.columnOrExpression
- left side of the comparison.arg
- IN argument.In
condition.public static Condition in(Expression columnOrExpression, Collection<? extends Expression> expressions)
columnOrExpression
- left hand side of the Condition
must not be null.expressions
- right hand side (collection Expression
) must not be null.In
Condition
.public static In in(Expression columnOrExpression, Expression... expressions)
columnOrExpression
- left hand side of the Condition
must not be null.expressions
- right hand side (collection Expression
) must not be null.In
Condition
.public static In in(Column column, Select subselect)
column
- the column to compare.subselect
- the subselect.In
condition.public static In notIn(Expression columnOrExpression, Expression arg)
NOT IN
clause
.columnOrExpression
- left side of the comparison.arg
- IN argument.In
condition.public static Condition notIn(Expression columnOrExpression, Collection<? extends Expression> expressions)
columnOrExpression
- left hand side of the Condition
must not be null.expressions
- right hand side (collection Expression
) must not be null.In
Condition
.public static In notIn(Expression columnOrExpression, Expression... expressions)
columnOrExpression
- left hand side of the Condition
must not be null.expressions
- right hand side (collection Expression
) must not be null.NOT IN
Condition
.Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.