org.datanucleus.store.mapped.expression
Class ByteExpression

java.lang.Object
  extended by org.datanucleus.store.mapped.expression.ScalarExpression
      extended by org.datanucleus.store.mapped.expression.NumericExpression
          extended by org.datanucleus.store.mapped.expression.ByteExpression

public class ByteExpression
extends NumericExpression

Representation of a Byte expression in a Query.

Version:
$Revision: 1.9 $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
ScalarExpression.DatastoreFieldExpression, ScalarExpression.DyadicOperator, ScalarExpression.ExpressionList, ScalarExpression.IllegalArgumentTypeException, ScalarExpression.IllegalOperationException, ScalarExpression.MethodInvocationException, ScalarExpression.MonadicOperator, ScalarExpression.Operator
 
Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
aliasIdentifier, checkForTypeAssignability, expressionList, FILTER, LOCALISER, lowestOperator, mapping, OP_ADD, OP_AND, OP_BETWEEN, OP_COM, OP_CONCAT, OP_DIV, OP_EQ, OP_GT, OP_GTEQ, OP_IN, OP_IS, OP_ISNOT, OP_LIKE, OP_LT, OP_LTEQ, OP_MOD, OP_MUL, OP_NEG, OP_NOT, OP_NOTEQ, OP_NOTIN, OP_NOTLIKE, OP_OR, OP_SUB, parameterName, PROJECTION, qs, st, te
 
Constructor Summary
protected ByteExpression(QueryExpression qs)
          Constructor
  ByteExpression(QueryExpression qs, JavaTypeMapping mapping, LogicSetExpression te)
           
  ByteExpression(ScalarExpression.MonadicOperator op, ScalarExpression operand)
          Perform a function op on operand
  ByteExpression(ScalarExpression operand1, ScalarExpression.DyadicOperator op, ScalarExpression operand2)
          Performs a function on two arguments.
 
Method Summary
 BooleanExpression eq(ScalarExpression expr)
          Equality operator (equals to)
 BooleanExpression gt(ScalarExpression expr)
          Relational operator (greater than)
 BooleanExpression gteq(ScalarExpression expr)
          Relational operator (greater than or equals)
 BooleanExpression lt(ScalarExpression expr)
          Relational operator (lower than)
 BooleanExpression lteq(ScalarExpression expr)
          Relational operator (lower than or equals)
 BooleanExpression noteq(ScalarExpression expr)
          Equality operator (not equals to)
 
Methods inherited from class org.datanucleus.store.mapped.expression.NumericExpression
add, com, div, in, mod, mul, neg, sub
 
Methods inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
accessField, and, as, assertValidTypeForParameterComparison, callMethod, cast, checkForTypeAssignability, encloseWithInParentheses, eor, equals, getAlias, getConsistentTypeForParameterComparison, getExpressionList, getLogicSetExpression, getMapping, getNonAliasExpression, getQueryExpression, instanceOf, ior, not, setParameterName, toStatementText, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteExpression

protected ByteExpression(QueryExpression qs)
Constructor

Parameters:
qs - the QueryExpression

ByteExpression

public ByteExpression(QueryExpression qs,
                      JavaTypeMapping mapping,
                      LogicSetExpression te)
Parameters:
qs - the QueryExpression
mapping - the mapping associated to this expression
te - the TableExpression where this expression refers to

ByteExpression

public ByteExpression(ScalarExpression.MonadicOperator op,
                      ScalarExpression operand)
Perform a function op on operand

Parameters:
op - operator
operand - operand

ByteExpression

public ByteExpression(ScalarExpression operand1,
                      ScalarExpression.DyadicOperator op,
                      ScalarExpression operand2)
Performs a function on two arguments. op(operand1,operand2) operand1 op operand2

Parameters:
operand1 - the first expression
op - the operator between operands
operand2 - the second expression
Method Detail

eq

public BooleanExpression eq(ScalarExpression expr)
Description copied from class: ScalarExpression
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

noteq

public BooleanExpression noteq(ScalarExpression expr)
Description copied from class: ScalarExpression
Equality operator (not equals to)

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

lt

public BooleanExpression lt(ScalarExpression expr)
Description copied from class: ScalarExpression
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.

lteq

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

Overrides:
lteq 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(ScalarExpression expr)
Description copied from class: ScalarExpression
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.

gteq

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

Overrides:
gteq 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.


Copyright © 2010. All Rights Reserved.