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
Representation of temporal literal in a Query.
Can be used for anything based on java.util.Date.
Also supports a temporal literal specified as a String in JDBC escape syntax i.e "{d 'yyyy-mm-dd'}", "{t 'hh:mm:ss'}", "{ts 'yyyy-mm-dd hh:mm:ss.f...'}"
-
Nested Class Summary
Nested classes/interfaces inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
SQLExpression.ColumnExpressionList -
Field Summary
FieldsFields inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
lowestOperator, mapping, parameterName, st, stmt, subExprs, table -
Constructor Summary
ConstructorsConstructorDescriptionTemporalLiteral(SQLStatement stmt, JavaTypeMapping mapping, Object value, String parameterName) Constructor for a temporal literal with a value. -
Method Summary
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.TemporalExpression
add, eq, ge, gt, in, le, lt, ne, subMethods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
and, bitAnd, bitOr, cast, com, distinct, div, encloseInParentheses, eor, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, ior, is, isParameter, mod, mul, neg, not, setJavaTypeMapping, toSQLText, unDistinct
-
Field Details
-
value
-
jdbcEscapeValue
-
-
Constructor Details
-
TemporalLiteral
public TemporalLiteral(SQLStatement stmt, 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 "?")
-
-
Method Details
-
toString
-
invoke
Description copied from class:SQLExpressionInvocation of a method on this expression.- Overrides:
invokein classTemporalExpression- Parameters:
methodName- name of the method to invokeargs- Args to this method (if any)- Returns:
- the converted value
-
getValue
Description copied from interface:SQLLiteralAccessor to the literal value- Specified by:
getValuein interfaceSQLLiteral- Returns:
- the value of the literal
-
setNotParameter
public void setNotParameter()Description copied from interface:SQLLiteralMethod 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:
setNotParameterin interfaceSQLLiteral
-
setStatement
protected void setStatement()
-