com.triactive.jdo.store.sql.expr
Class IntegerLiteral

java.lang.Object
  extended by com.triactive.jdo.store.sql.expr.AbstractSqlExpression
      extended by com.triactive.jdo.store.sql.expr.NumericExpression
          extended by com.triactive.jdo.store.sql.expr.IntegerLiteral
All Implemented Interfaces:
SqlExpression, StatementTextGenerator

public class IntegerLiteral
extends NumericExpression


Nested Class Summary
 
Nested classes/interfaces inherited from class com.triactive.jdo.store.sql.expr.AbstractSqlExpression
AbstractSqlExpression.Body, AbstractSqlExpression.CompoundExpression, AbstractSqlExpression.SimpleColumnReference, AbstractSqlExpression.SubqueryExpression
 
Field Summary
protected  java.lang.Number value
           
 
Fields inherited from class com.triactive.jdo.store.sql.expr.AbstractSqlExpression
body, qs
 
Constructor Summary
IntegerLiteral(QueryStatement qs, int value)
           
IntegerLiteral(QueryStatement qs, java.lang.Number value)
           
 
Method Summary
 SqlExpression add(SqlExpression expr)
          Returns a new expression representing "this + expr".
 java.math.BigDecimal decimalValue()
          Returns the value of the literal as a BigDecimal.
 SqlExpression div(SqlExpression expr)
          Returns a new expression representing "this / expr".
 double doubleValue()
          Returns the value of the literal as a Java double.
 BooleanExpression eq(SqlExpression expr)
          Returns a new expression representing "this == expr".
 BooleanExpression gt(SqlExpression expr)
          Returns a new expression representing "this > expr".
 BooleanExpression gteq(SqlExpression expr)
          Returns a new expression representing "this >= expr".
 java.math.BigInteger integerValue()
           
 BooleanExpression lt(SqlExpression expr)
          Returns a new expression representing "this < expr".
 BooleanExpression lteq(SqlExpression expr)
          Returns a new expression representing "this <= expr".
 SqlExpression mod(SqlExpression expr)
          Returns a new expression representing "this % expr".
 SqlExpression mul(SqlExpression expr)
          Returns a new expression representing "this * expr".
 SqlExpression neg()
          Returns a new expression representing "-this".
 BooleanExpression noteq(SqlExpression expr)
          Returns a new expression representing "this != expr".
 SqlExpression sub(SqlExpression expr)
          Returns a new expression representing "this - expr".
 StatementText toStatementText()
          Returns the SQL statement text which this object generates.
 
Methods inherited from class com.triactive.jdo.store.sql.expr.NumericExpression
cast
 
Methods inherited from class com.triactive.jdo.store.sql.expr.AbstractSqlExpression
accessField, and, callMethod, com, eor, getColumnMapping, getJavaType, getMapping, getQueryStatement, getReferencedColumns, innermostQuery, innermostQuery, ior, newBody, newBody, newBody, newBody, newBody, newBody, newResultExpression, newSubqueryBody, not, select, setMapping, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected final java.lang.Number value
Constructor Detail

IntegerLiteral

public IntegerLiteral(QueryStatement qs,
                      int value)

IntegerLiteral

public IntegerLiteral(QueryStatement qs,
                      java.lang.Number value)
Method Detail

decimalValue

public java.math.BigDecimal decimalValue()
Returns the value of the literal as a BigDecimal.


integerValue

public java.math.BigInteger integerValue()

add

public SqlExpression add(SqlExpression expr)
Returns a new expression representing "this + expr".

Specified by:
add in interface SqlExpression
Parameters:
expr - The right-hand side of the operator.

sub

public SqlExpression sub(SqlExpression expr)
Returns a new expression representing "this - expr".

Specified by:
sub in interface SqlExpression
Parameters:
expr - The right-hand side of the operator.

mul

public SqlExpression mul(SqlExpression expr)
Returns a new expression representing "this * expr".

Specified by:
mul in interface SqlExpression
Parameters:
expr - The right-hand side of the operator.

mod

public SqlExpression mod(SqlExpression expr)
Returns a new expression representing "this % expr".

Specified by:
mod in interface SqlExpression
Parameters:
expr - The right-hand side of the operator.

neg

public SqlExpression neg()
Description copied from interface: SqlExpression
Returns a new expression representing "-this".

Specified by:
neg in interface SqlExpression
Overrides:
neg in class NumericExpression

doubleValue

public double doubleValue()
Returns the value of the literal as a Java double.


eq

public BooleanExpression eq(SqlExpression expr)
Returns a new expression representing "this == expr".

Specified by:
eq in interface SqlExpression
Overrides:
eq in class NumericExpression
Parameters:
expr - The right-hand side of the operator.

noteq

public BooleanExpression noteq(SqlExpression expr)
Returns a new expression representing "this != expr".

Specified by:
noteq in interface SqlExpression
Overrides:
noteq in class NumericExpression
Parameters:
expr - The right-hand side of the operator.

lt

public BooleanExpression lt(SqlExpression expr)
Returns a new expression representing "this < expr".

Specified by:
lt in interface SqlExpression
Overrides:
lt in class NumericExpression
Parameters:
expr - The right-hand side of the operator.

lteq

public BooleanExpression lteq(SqlExpression expr)
Returns a new expression representing "this <= expr".

Specified by:
lteq in interface SqlExpression
Overrides:
lteq in class NumericExpression
Parameters:
expr - The right-hand side of the operator.

gt

public BooleanExpression gt(SqlExpression expr)
Returns a new expression representing "this > expr".

Specified by:
gt in interface SqlExpression
Overrides:
gt in class NumericExpression
Parameters:
expr - The right-hand side of the operator.

gteq

public BooleanExpression gteq(SqlExpression expr)
Returns a new expression representing "this >= expr".

Specified by:
gteq in interface SqlExpression
Overrides:
gteq in class NumericExpression
Parameters:
expr - The right-hand side of the operator.

div

public SqlExpression div(SqlExpression expr)
Returns a new expression representing "this / expr".

Specified by:
div in interface SqlExpression
Overrides:
div in class NumericExpression
Parameters:
expr - The right-hand side of the operator.

toStatementText

public StatementText toStatementText()
Description copied from interface: StatementTextGenerator
Returns the SQL statement text which this object generates.

Specified by:
toStatementText in interface StatementTextGenerator
Overrides:
toStatementText in class AbstractSqlExpression


Copyright ? 2001-2007 The TJDO Project All Rights Reserved.