org.datanucleus.store.rdbms.sql.expression
Class TemporalLiteral
java.lang.Object
org.datanucleus.store.rdbms.sql.expression.SQLExpression
org.datanucleus.store.rdbms.sql.expression.TemporalExpression
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.
|
Constructor Summary |
TemporalLiteral(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
Object value,
String parameterName)
Constructor for a temporal literal with a value. |
| Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression |
add, and, cast, com, distinct, div, encloseInParentheses, eor, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, ior, is, isParameter, mod, mul, neg, not, setJavaTypeMapping, sub, toSQLText |
TemporalLiteral
public TemporalLiteral(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
Object value,
String parameterName)
- Constructor for a temporal literal with a value.
- Parameters:
stmt - the SQL statementmapping - the mappingvalue - the valueparameterName - Name of the parameter that this represents if any (as JDBC "?")
toString
public String toString()
- Overrides:
toString in class Object
invoke
public SQLExpression invoke(String methodName,
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 invokeargs - Args to this method (if any)
- Returns:
- the converted value
getValue
public 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 © 2012. All Rights Reserved.