Class BinaryExpression
- java.lang.Object
-
- org.datanucleus.store.rdbms.sql.expression.SQLExpression
-
- org.datanucleus.store.rdbms.sql.expression.BinaryExpression
-
- Direct Known Subclasses:
BinaryLiteral
public class BinaryExpression extends SQLExpression
Representation of a Binary expression in a Query.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
SQLExpression.ColumnExpressionList
-
-
Field Summary
-
Fields inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
lowestOperator, mapping, parameterName, st, stmt, subExprs, table
-
-
Constructor Summary
Constructors Constructor Description BinaryExpression(SQLStatement stmt, JavaTypeMapping mapping, String functionName, List<SQLExpression> args, List types)
BinaryExpression(SQLStatement stmt, SQLTable table, JavaTypeMapping mapping)
Constructor for an SQL expression for a (field) mapping in a specified table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanExpression
eq(SQLExpression expr)
Equality operator (equals to)BooleanExpression
gt(SQLExpression expr)
Relational operator (greater than)BooleanExpression
gteq(SQLExpression expr)
BooleanExpression
in(SQLExpression expr, boolean not)
In expression.BooleanExpression
lt(SQLExpression expr)
Relational operator (lower than)BooleanExpression
lteq(SQLExpression expr)
BooleanExpression
noteq(SQLExpression expr)
-
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
add, and, bitAnd, bitOr, cast, com, distinct, div, encloseInParentheses, eor, ge, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, invoke, ior, is, isParameter, le, mod, mul, ne, neg, not, setJavaTypeMapping, sub, toSQLText, unDistinct
-
-
-
-
Constructor Detail
-
BinaryExpression
public BinaryExpression(SQLStatement stmt, SQLTable table, JavaTypeMapping mapping)
Constructor for an SQL expression for a (field) mapping in a specified table.- Parameters:
stmt
- The statementtable
- The table in the statementmapping
- The mapping for the field
-
BinaryExpression
public BinaryExpression(SQLStatement stmt, JavaTypeMapping mapping, String functionName, List<SQLExpression> args, List types)
- Parameters:
stmt
- SQL statementmapping
- The mappingfunctionName
- Function to invokeargs
- Function argstypes
- Function arg types
-
-
Method Detail
-
eq
public BooleanExpression eq(SQLExpression expr)
Description copied from class:SQLExpression
Equality operator (equals to)- Overrides:
eq
in classSQLExpression
- Parameters:
expr
- the right-hand operand- Returns:
- The type of an equality expression is a boolean
-
noteq
public BooleanExpression noteq(SQLExpression expr)
-
lt
public BooleanExpression lt(SQLExpression expr)
Description copied from class:SQLExpression
Relational operator (lower than)- Overrides:
lt
in classSQLExpression
- Parameters:
expr
- the right-hand operand- Returns:
- true if the value of the left-hand operand is less than the value of the right-hand operand, and otherwise is false.
-
lteq
public BooleanExpression lteq(SQLExpression expr)
-
gt
public BooleanExpression gt(SQLExpression expr)
Description copied from class:SQLExpression
Relational operator (greater than)- Overrides:
gt
in classSQLExpression
- Parameters:
expr
- the right-hand operand- Returns:
- true if the value of the left-hand operand is greater than the value of the right-hand operand, and otherwise is false.
-
gteq
public BooleanExpression gteq(SQLExpression expr)
-
in
public BooleanExpression in(SQLExpression expr, boolean not)
Description copied from class:SQLExpression
In expression. Return true if this is contained byexpr
- Overrides:
in
in classSQLExpression
- Parameters:
expr
- the right-hand expressionnot
- Whether we really want "not in"- Returns:
- true if the left-hand expression is contained by the right-hand expression. Otherwise the result is false.
-
-