org.datanucleus.jdo.query
Class NumericExpressionImpl<T>

java.lang.Object
  extended by org.datanucleus.jdo.query.ExpressionImpl<T>
      extended by org.datanucleus.jdo.query.ComparableExpressionImpl<java.lang.Number>
          extended by org.datanucleus.jdo.query.NumericExpressionImpl<T>
All Implemented Interfaces:
ComparableExpression<java.lang.Number>, Expression<java.lang.Number>, NumericExpression<T>

public class NumericExpressionImpl<T>
extends ComparableExpressionImpl<java.lang.Number>
implements NumericExpression<T>

Implementation of a NumericExpression.


Constructor Summary
NumericExpressionImpl(java.lang.Class<java.lang.Number> cls, java.lang.String name, ExpressionType type)
           
NumericExpressionImpl(Expression queryExpr)
           
NumericExpressionImpl(PersistableExpression parent, java.lang.String name)
           
 
Method Summary
 NumericExpression<T> abs()
          Method to return the absolute value expression of this expression.
 NumericExpression acos()
          Method to return the arc cosine value expression of this expression.
 NumericExpression add(Expression expr)
          Method to return an expression for this expression added to the passed expression.
 NumericExpression add(java.lang.Number num)
          Method to return an expression for this expression added to the passed number.
 NumericExpression asin()
          Method to return the arc sine value expression of this expression.
 NumericExpression atan()
          Method to return the arc tangent value expression of this expression.
 NumericExpression<T> avg()
          Method to return a numeric expression representing the aggregated average of this expression.
 NumericExpression ceil()
          Method to return the ceiling value expression of this expression.
 NumericExpression cos()
          Method to return the cosine value expression of this expression.
 NumericExpression div(Expression expr)
          Method to return an expression for this expression divided by the passed expression.
 NumericExpression div(java.lang.Number num)
          Method to return an expression for this expression divided by the passed number.
 NumericExpression exp()
          Method to return the exponential value expression of this expression.
 NumericExpression floor()
          Method to return the floor value expression of this expression.
 NumericExpression log()
          Method to return the logarithm value expression of this expression.
 NumericExpression mod(Expression expr)
          Method to return an expression for this expression modulus the passed expression (
 NumericExpression mod(java.lang.Number num)
          Method to return an expression for this expression modulus the passed number.
 NumericExpression mul(Expression expr)
          Method to return an expression for this expression multiplied by the passed expression.
 NumericExpression mul(java.lang.Number num)
          Method to return an expression for this expression multiplied by the passed number.
 NumericExpression sin()
          Method to return the sine value expression of this expression.
 NumericExpression<T> sqrt()
          Method to return the square-root value expression of this expression.
 NumericExpression sub(Expression expr)
          Method to return an expression for this expression subtracting the passed expression.
 NumericExpression sub(java.lang.Number num)
          Method to return an expression for this expression subtracting the passed number.
 NumericExpression<T> sum()
          Method to return a numeric expression representing the aggregated sum of this expression.
 NumericExpression tan()
          Method to return the tangent value expression of this expression.
 
Methods inherited from class org.datanucleus.jdo.query.ComparableExpressionImpl
asc, desc, gt, gt, gteq, gteq, lt, lt, lteq, lteq, max, min
 
Methods inherited from class org.datanucleus.jdo.query.ExpressionImpl
cast, count, countDistinct, eq, eq, getQueryExpression, instanceOf, isParameter, isVariable, ne, ne
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.datanucleus.query.typesafe.ComparableExpression
asc, desc, gt, gt, gteq, gteq, lt, lt, lteq, lteq, max, min
 
Methods inherited from interface org.datanucleus.query.typesafe.Expression
cast, count, countDistinct, eq, eq, instanceOf, ne, ne
 

Constructor Detail

NumericExpressionImpl

public NumericExpressionImpl(PersistableExpression parent,
                             java.lang.String name)

NumericExpressionImpl

public NumericExpressionImpl(Expression queryExpr)

NumericExpressionImpl

public NumericExpressionImpl(java.lang.Class<java.lang.Number> cls,
                             java.lang.String name,
                             ExpressionType type)
Method Detail

add

public NumericExpression add(Expression expr)
Description copied from interface: NumericExpression
Method to return an expression for this expression added to the passed expression.

Specified by:
add in interface NumericExpression<T>
Parameters:
expr - The other expression
Returns:
The summation

add

public NumericExpression add(java.lang.Number num)
Description copied from interface: NumericExpression
Method to return an expression for this expression added to the passed number.

Specified by:
add in interface NumericExpression<T>
Parameters:
num - Number to add
Returns:
The summation

mul

public NumericExpression mul(Expression expr)
Description copied from interface: NumericExpression
Method to return an expression for this expression multiplied by the passed expression.

Specified by:
mul in interface NumericExpression<T>
Parameters:
expr - The other expression
Returns:
The multiplication

mul

public NumericExpression mul(java.lang.Number num)
Description copied from interface: NumericExpression
Method to return an expression for this expression multiplied by the passed number.

Specified by:
mul in interface NumericExpression<T>
Parameters:
num - Number
Returns:
The multiplication

sub

public NumericExpression sub(Expression expr)
Description copied from interface: NumericExpression
Method to return an expression for this expression subtracting the passed expression.

Specified by:
sub in interface NumericExpression<T>
Parameters:
expr - The other expression
Returns:
The difference

sub

public NumericExpression sub(java.lang.Number num)
Description copied from interface: NumericExpression
Method to return an expression for this expression subtracting the passed number.

Specified by:
sub in interface NumericExpression<T>
Parameters:
num - Number to subtract
Returns:
The difference

div

public NumericExpression div(Expression expr)
Description copied from interface: NumericExpression
Method to return an expression for this expression divided by the passed expression.

Specified by:
div in interface NumericExpression<T>
Parameters:
expr - The other expression
Returns:
The division

div

public NumericExpression div(java.lang.Number num)
Description copied from interface: NumericExpression
Method to return an expression for this expression divided by the passed number.

Specified by:
div in interface NumericExpression<T>
Parameters:
num - Number to divide by
Returns:
The division

mod

public NumericExpression mod(Expression expr)
Description copied from interface: NumericExpression
Method to return an expression for this expression modulus the passed expression (
a % b
).

Specified by:
mod in interface NumericExpression<T>
Parameters:
expr - The other expression
Returns:
The modulus

mod

public NumericExpression mod(java.lang.Number num)
Description copied from interface: NumericExpression
Method to return an expression for this expression modulus the passed number.

Specified by:
mod in interface NumericExpression<T>
Parameters:
num - Number
Returns:
The modulus

avg

public NumericExpression<T> avg()
Description copied from interface: NumericExpression
Method to return a numeric expression representing the aggregated average of this expression.

Specified by:
avg in interface NumericExpression<T>
Returns:
Numeric expression for the average

sum

public NumericExpression<T> sum()
Description copied from interface: NumericExpression
Method to return a numeric expression representing the aggregated sum of this expression.

Specified by:
sum in interface NumericExpression<T>
Returns:
Numeric expression for the sum

abs

public NumericExpression<T> abs()
Description copied from interface: NumericExpression
Method to return the absolute value expression of this expression.

Specified by:
abs in interface NumericExpression<T>
Returns:
The absolute value expression

sqrt

public NumericExpression<T> sqrt()
Description copied from interface: NumericExpression
Method to return the square-root value expression of this expression.

Specified by:
sqrt in interface NumericExpression<T>
Returns:
The square-root value expression

acos

public NumericExpression acos()
Description copied from interface: NumericExpression
Method to return the arc cosine value expression of this expression.

Specified by:
acos in interface NumericExpression<T>
Returns:
The arc cosine value expression

asin

public NumericExpression asin()
Description copied from interface: NumericExpression
Method to return the arc sine value expression of this expression.

Specified by:
asin in interface NumericExpression<T>
Returns:
The arc sine value expression

atan

public NumericExpression atan()
Description copied from interface: NumericExpression
Method to return the arc tangent value expression of this expression.

Specified by:
atan in interface NumericExpression<T>
Returns:
The arc tangent value expression

sin

public NumericExpression sin()
Description copied from interface: NumericExpression
Method to return the sine value expression of this expression.

Specified by:
sin in interface NumericExpression<T>
Returns:
The sine value expression

cos

public NumericExpression cos()
Description copied from interface: NumericExpression
Method to return the cosine value expression of this expression.

Specified by:
cos in interface NumericExpression<T>
Returns:
The cosine value expression

tan

public NumericExpression tan()
Description copied from interface: NumericExpression
Method to return the tangent value expression of this expression.

Specified by:
tan in interface NumericExpression<T>
Returns:
The tangent value expression

exp

public NumericExpression exp()
Description copied from interface: NumericExpression
Method to return the exponential value expression of this expression.

Specified by:
exp in interface NumericExpression<T>
Returns:
The exponential value expression

log

public NumericExpression log()
Description copied from interface: NumericExpression
Method to return the logarithm value expression of this expression.

Specified by:
log in interface NumericExpression<T>
Returns:
The logarithm value expression

ceil

public NumericExpression ceil()
Description copied from interface: NumericExpression
Method to return the ceiling value expression of this expression.

Specified by:
ceil in interface NumericExpression<T>
Returns:
The ceiling value expression

floor

public NumericExpression floor()
Description copied from interface: NumericExpression
Method to return the floor value expression of this expression.

Specified by:
floor in interface NumericExpression<T>
Returns:
The floor value expression


Copyright © 2011. All Rights Reserved.