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

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

public class ByteExpression
extends NumericExpression

Representation of a Byte 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
isParameter, LOCALISER, lowestOperator, mapping, st, stmt, subExprs, table
 
Constructor Summary
ByteExpression(org.datanucleus.query.expression.Expression.MonadicOperator op, SQLExpression expr1)
          Perform an operation
ByteExpression(SQLExpression expr1, org.datanucleus.query.expression.Expression.DyadicOperator op, SQLExpression expr2)
          Perform an operation
ByteExpression(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 ge(SQLExpression expr)
          Relational operator (greater than or equals)
 BooleanExpression gt(SQLExpression expr)
          Relational operator (greater than)
 SQLExpression invoke(java.lang.String methodName, java.util.List args)
          Invocation of a method on this expression.
 BooleanExpression le(SQLExpression expr)
          Relational operator (lower than or equals)
 BooleanExpression lt(SQLExpression expr)
          Relational operator (lower than)
 BooleanExpression ne(SQLExpression expr)
          Not equality operator (not equals to)
 
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.NumericExpression
add, com, div, in, mod, mul, neg, sub
 
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
and, cast, checkForAndCorrectParameterComparison, encloseInParentheses, eor, getJavaTypeMapping, getNumberOfSubExpressions, getSQLStatement, getSQLTable, ior, is, isParameter, not, toSQLText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteExpression

public ByteExpression(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

ByteExpression

public ByteExpression(org.datanucleus.query.expression.Expression.MonadicOperator op,
                      SQLExpression expr1)
Perform an operation
op
on expression
expr1
.

Parameters:
op - operator
expr1 - operand

ByteExpression

public ByteExpression(SQLExpression expr1,
                      org.datanucleus.query.expression.Expression.DyadicOperator op,
                      SQLExpression expr2)
Perform an operation
op
between
expr1
and
expr2
.

Parameters:
expr1 - the first expression
op - the operator between operands
expr2 - the second expression
Method Detail

eq

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

Overrides:
eq in class NumericExpression
Parameters:
expr - the right-hand operand
Returns:
The type of an equality expression is a boolean

ne

public BooleanExpression ne(SQLExpression expr)
Description copied from class: SQLExpression
Not equality operator (not equals to)

Overrides:
ne in class NumericExpression
Parameters:
expr - the right-hand operand
Returns:
The type of an equality expression is a boolean

lt

public BooleanExpression lt(SQLExpression expr)
Description copied from class: SQLExpression
Relational operator (lower than)

Overrides:
lt in class NumericExpression
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.

le

public BooleanExpression le(SQLExpression expr)
Description copied from class: SQLExpression
Relational operator (lower than or equals)

Overrides:
le in class NumericExpression
Parameters:
expr - the right-hand operand
Returns:
true if the value of the left-hand operand is less than or equal to the value of the right-hand operand, and otherwise is false.

gt

public BooleanExpression gt(SQLExpression expr)
Description copied from class: SQLExpression
Relational operator (greater than)

Overrides:
gt in class NumericExpression
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.

ge

public BooleanExpression ge(SQLExpression expr)
Description copied from class: SQLExpression
Relational operator (greater than or equals)

Overrides:
ge in class NumericExpression
Parameters:
expr - the right-hand operand
Returns:
true if the value of the left-hand operand is greater than or equal the value of the right-hand operand, and otherwise is false.

invoke

public SQLExpression invoke(java.lang.String methodName,
                            java.util.List args)
Description copied from class: SQLExpression
Invocation of a method on this expression.

Overrides:
invoke in class SQLExpression
Parameters:
methodName - name of the method to invoke
args - Args to this method (if any)
Returns:
the converted value


Copyright © 2009. All Rights Reserved.