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

java.lang.Object
  extended by org.datanucleus.store.rdbms.sql.expression.SQLExpression
      extended by org.datanucleus.store.rdbms.sql.expression.TemporalExpression
          extended by org.datanucleus.store.rdbms.sql.expression.TemporalLiteral
All Implemented Interfaces:
SQLLiteral

public class TemporalLiteral
extends TemporalExpression
implements SQLLiteral

Representation of temporal literal in a Query. Can be used for anything based on java.util.Date.


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
TemporalLiteral(SQLStatement stmt, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping, java.lang.Object value, boolean parameter)
          Constructor for a temporal literal with a value.
 
Method Summary
 java.lang.Object getValue()
          Accessor to the literal value
 SQLExpression invoke(java.lang.String methodName, java.util.List args)
          Invocation of a method on this expression.
 void setNotParameter()
          Method to set this literal as not being a parameter.
protected  void setStatement()
           
 java.lang.String toString()
           
 
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.TemporalExpression
eq, ge, gt, in, le, lt, ne
 
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
add, and, cast, checkForAndCorrectParameterComparison, com, div, encloseInParentheses, eor, getJavaTypeMapping, getNumberOfSubExpressions, getSQLStatement, getSQLTable, ior, is, isParameter, mod, mul, neg, not, sub, toSQLText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemporalLiteral

public TemporalLiteral(SQLStatement stmt,
                       org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
                       java.lang.Object value,
                       boolean parameter)
Constructor for a temporal literal with a value.

Parameters:
stmt - the SQL statement
mapping - the mapping
value - the value
parameter - Whether this is treated as a parameter (JDBC "?")
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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 TemporalExpression
Parameters:
methodName - name of the method to invoke
args - Args to this method (if any)
Returns:
the converted value

getValue

public java.lang.Object getValue()
Description copied from interface: SQLLiteral
Accessor to the literal value

Specified by:
getValue in interface SQLLiteral
Returns:
the value of the literal

setNotParameter

public void setNotParameter()
Description copied from interface: SQLLiteral
Method to set this literal as not being a parameter. If the literal if not currently a parameter then does nothing. Updates any underlying SQL to have the value.

Specified by:
setNotParameter in interface SQLLiteral

setStatement

protected void setStatement()


Copyright © 2009. All Rights Reserved.