org.datanucleus.store.rdbms.sql.expression
Class BinaryExpression

java.lang.Object
  extended by org.datanucleus.store.rdbms.sql.expression.SQLExpression
      extended by org.datanucleus.store.rdbms.sql.expression.BinaryExpression

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
LOCALISER, lowestOperator, mapping, parameterName, st, stmt, subExprs, table
 
Constructor Summary
BinaryExpression(SQLStatement stmt, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping, String functionName, List<SQLExpression> args, List types)
           
BinaryExpression(SQLStatement stmt, SQLTable table, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
          Constructor for an SQL expression for a (field) mapping in a specified table.
 
Method Summary
 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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryExpression

public BinaryExpression(SQLStatement stmt,
                        SQLTable table,
                        org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Constructor for an SQL expression for a (field) mapping in a specified table.

Parameters:
stmt - The statement
table - The table in the statement
mapping - The mapping for the field

BinaryExpression

public BinaryExpression(SQLStatement stmt,
                        org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
                        String functionName,
                        List<SQLExpression> args,
                        List types)
Parameters:
stmt - SQL statement
mapping - The mapping
functionName - Function to invoke
args - Function args
types - Function arg types
Method Detail

eq

public BooleanExpression eq(SQLExpression expr)
Description copied from class: SQLExpression
Equality operator (equals to)

Overrides:
eq in class SQLExpression
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 class SQLExpression
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 class SQLExpression
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 by expr

Overrides:
in in class SQLExpression
Parameters:
expr - the right-hand expression
not - 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.


Copyright © 2012. All Rights Reserved.