org.datanucleus.store.rdbms.sql.expression
Class ObjectLiteral
java.lang.Object
org.datanucleus.store.rdbms.sql.expression.SQLExpression
org.datanucleus.store.rdbms.sql.expression.ObjectExpression
org.datanucleus.store.rdbms.sql.expression.ObjectLiteral
- All Implemented Interfaces:
- SQLLiteral
public class ObjectLiteral
- extends ObjectExpression
- implements SQLLiteral
Representation of an Object literal in a query.
|
Constructor Summary |
ObjectLiteral(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
Object value,
String parameterName)
Constructor for an Object literal with a value. |
| Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression |
add, and, com, distinct, div, encloseInParentheses, eor, ge, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, gt, ior, isParameter, le, lt, mod, mul, neg, not, setJavaTypeMapping, sub, toSQLText |
ObjectLiteral
public ObjectLiteral(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
Object value,
String parameterName)
- Constructor for an Object literal with a value.
- Parameters:
stmt - the SQL statementmapping - the mappingvalue - the Object valueparameterName - Name of the parameter that this represents if any (as JDBC "?")
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
eq
public BooleanExpression eq(SQLExpression expr)
- Method called when the query contains "object == value".
- Overrides:
eq in class ObjectExpression
- Parameters:
expr - The expression
- Returns:
- The resultant expression for this query relation
ne
public BooleanExpression ne(SQLExpression expr)
- Method called when the query contains "object NOTEQUALS value".
- Overrides:
ne in class ObjectExpression
- Parameters:
expr - The expression
- Returns:
- The resultant expression for this query relation
toString
public String toString()
- Overrides:
toString in class Object
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.