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

java.lang.Object
  extended by org.datanucleus.store.rdbms.sql.expression.SQLExpression
      extended by org.datanucleus.store.rdbms.sql.expression.DelegatedExpression
          extended by org.datanucleus.store.rdbms.sql.expression.StringTemporalExpression
              extended by org.datanucleus.store.rdbms.sql.expression.JavaxTimeLiteral
All Implemented Interfaces:
SQLLiteral
Direct Known Subclasses:
LocalDateLiteral, LocalDateTimeLiteral, LocalTimeLiteral

public abstract class JavaxTimeLiteral
extends StringTemporalExpression
implements SQLLiteral

Abstract representation of a javax.time literal (to be extended by specific cases).


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.DelegatedExpression
delegate
 
Fields inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
LOCALISER, lowestOperator, mapping, parameterName, st, stmt, subExprs, table
 
Constructor Summary
JavaxTimeLiteral(SQLStatement stmt, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping, String parameterName)
          Constructor for a javax.time literal with a value.
 
Method Summary
 BooleanExpression eq(SQLExpression expr)
          Equality operator (equals to)
 BooleanExpression ge(SQLExpression expr)
          Relational operator (greater than or equals)
 BooleanExpression gt(SQLExpression expr)
          Relational operator (greater than)
 boolean isParameter()
           
 BooleanExpression le(SQLExpression expr)
          Relational operator (lower than or equals)
 BooleanExpression lt(SQLExpression expr)
          Relational operator (lower than)
 BooleanExpression ne(SQLExpression expr)
          Not equality operator (not equals to)
 void setNotParameter()
          Method to set this literal as not being a parameter.
 
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.DelegatedExpression
add, div, getDelegate, invoke, mod, mul, sub, toSQLText
 
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
and, cast, com, distinct, encloseInParentheses, eor, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, in, ior, is, neg, not, setJavaTypeMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.datanucleus.store.rdbms.sql.expression.SQLLiteral
getValue
 

Constructor Detail

JavaxTimeLiteral

public JavaxTimeLiteral(SQLStatement stmt,
                        org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
                        String parameterName)
Constructor for a javax.time literal with a value.

Parameters:
stmt - the SQL statement
mapping - the mapping
parameterName - Name of the parameter that this represents if any (as JDBC "?")
Method Detail

eq

public BooleanExpression eq(SQLExpression expr)
Description copied from class: SQLExpression
Equality operator (equals to)

Overrides:
eq in class DelegatedExpression
Parameters:
expr - the right-hand operand
Returns:
The type of an equality expression is a boolean

ge

public BooleanExpression ge(SQLExpression expr)
Description copied from class: SQLExpression
Relational operator (greater than or equals)

Overrides:
ge in class DelegatedExpression
Parameters:
expr - the right-hand operand
Returns:
true if the value of the left-hand operand is greater than or equal the value of the right-hand operand, and otherwise is false.

gt

public BooleanExpression gt(SQLExpression expr)
Description copied from class: SQLExpression
Relational operator (greater than)

Overrides:
gt in class DelegatedExpression
Parameters:
expr - the right-hand operand
Returns:
true if the value of the left-hand operand is greater than the value of the right-hand operand, and otherwise is false.

le

public BooleanExpression le(SQLExpression expr)
Description copied from class: SQLExpression
Relational operator (lower than or equals)

Overrides:
le in class DelegatedExpression
Parameters:
expr - the right-hand operand
Returns:
true if the value of the left-hand operand is less than or equal to the value of the right-hand operand, and otherwise is false.

lt

public BooleanExpression lt(SQLExpression expr)
Description copied from class: SQLExpression
Relational operator (lower than)

Overrides:
lt in class DelegatedExpression
Parameters:
expr - the right-hand operand
Returns:
true if the value of the left-hand operand is less than the value of the right-hand operand, and otherwise is false.

ne

public BooleanExpression ne(SQLExpression expr)
Description copied from class: SQLExpression
Not equality operator (not equals to)

Overrides:
ne in class DelegatedExpression
Parameters:
expr - the right-hand operand
Returns:
The type of an equality expression is a boolean

isParameter

public boolean isParameter()
Overrides:
isParameter in class SQLExpression

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


Copyright © 2012. All Rights Reserved.