org.datanucleus.store.mapped.expression
Class MathExpression

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

public class MathExpression
extends ScalarExpression

Representation of Math functions in query languages.


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
MathExpression(QueryExpression qs)
           
 
Method Summary
 ScalarExpression absMethod(ScalarExpression expr)
          Returns the absolute value of the argument.
 ScalarExpression acosMethod(ScalarExpression expr)
          Returns the arc cosine of the argument.
 ScalarExpression asinMethod(ScalarExpression expr)
          Returns the arc sine of the argument.
 ScalarExpression atanMethod(ScalarExpression expr)
          Returns the arc tangent of the argument.
 ScalarExpression ceilrMethod(ScalarExpression expr)
          Returns the ceiling of the argument.
 ScalarExpression cosMethod(ScalarExpression expr)
          Returns the cosine of the argument.
 ScalarExpression expMethod(ScalarExpression expr)
          Returns the exponent of the argument.
 ScalarExpression floorMethod(ScalarExpression expr)
          Returns the floor of the argument.
 ScalarExpression logMethod(ScalarExpression expr)
          Returns the log of the argument.
 ScalarExpression sinMethod(ScalarExpression expr)
          Returns the sine of the argument.
 ScalarExpression sqrtMethod(ScalarExpression expr)
          Returns the square root of the argument.
 ScalarExpression tanMethod(ScalarExpression expr)
          Returns the tangent of the argument.
 
Methods inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
accessField, add, and, as, assertValidTypeForParameterComparison, callMethod, cast, checkForTypeAssignability, com, div, encloseWithInParentheses, eor, eq, equals, getAlias, getConsistentTypeForParameterComparison, getExpressionList, getLogicSetExpression, getMapping, getNonAliasExpression, getParameterName, getQueryExpression, gt, gteq, in, instanceOf, ior, isParameter, lt, lteq, mod, mul, neg, not, noteq, setParameterName, sub, toStatementText, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MathExpression

public MathExpression(QueryExpression qs)
Parameters:
qs - The query statement
Method Detail

absMethod

public ScalarExpression absMethod(ScalarExpression expr)
Returns the absolute value of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

sqrtMethod

public ScalarExpression sqrtMethod(ScalarExpression expr)
Returns the square root of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

cosMethod

public ScalarExpression cosMethod(ScalarExpression expr)
Returns the cosine of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

sinMethod

public ScalarExpression sinMethod(ScalarExpression expr)
Returns the sine of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

tanMethod

public ScalarExpression tanMethod(ScalarExpression expr)
Returns the tangent of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

acosMethod

public ScalarExpression acosMethod(ScalarExpression expr)
Returns the arc cosine of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

asinMethod

public ScalarExpression asinMethod(ScalarExpression expr)
Returns the arc sine of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

atanMethod

public ScalarExpression atanMethod(ScalarExpression expr)
Returns the arc tangent of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

expMethod

public ScalarExpression expMethod(ScalarExpression expr)
Returns the exponent of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

logMethod

public ScalarExpression logMethod(ScalarExpression expr)
Returns the log of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

floorMethod

public ScalarExpression floorMethod(ScalarExpression expr)
Returns the floor of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance

ceilrMethod

public ScalarExpression ceilrMethod(ScalarExpression expr)
Returns the ceiling of the argument.

Parameters:
expr - the expression
Returns:
the result in a ScalarExpression instance


Copyright © 2009. All Rights Reserved.