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

java.lang.Object
  extended by org.datanucleus.store.rdbms.sql.expression.SQLExpression
      extended by org.datanucleus.store.rdbms.sql.expression.UnboundExpression

public class UnboundExpression
extends SQLExpression

Representation of an expression for an unbound variable. This is used where we have a variable in use in a query and at the point of needing it we haven't yet bound the variable. For example, in the following query

this.names.contains(var) && var == someValue
in the first clause the "var" is unbound when passing in to the InvokeExpression, so it is passed in as an UnboundExpression, and in that contains() method will be bound to the collection (element) table (a join added).


Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
SQLExpression.ColumnExpressionList
 
Field Summary
protected  String variableName
           
 
Fields inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
LOCALISER, lowestOperator, mapping, parameterName, st, stmt, subExprs, table
 
Constructor Summary
UnboundExpression(SQLStatement stmt, String variableName)
          Constructor for an SQL expression for an unbound variable.
 
Method Summary
 String getVariableName()
          Accessor for the variable name
 
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
add, and, cast, com, distinct, div, encloseInParentheses, eor, eq, ge, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, gt, in, invoke, ior, is, isParameter, le, lt, mod, mul, ne, neg, not, setJavaTypeMapping, sub, toSQLText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

variableName

protected String variableName
Constructor Detail

UnboundExpression

public UnboundExpression(SQLStatement stmt,
                         String variableName)
Constructor for an SQL expression for an unbound variable.

Parameters:
stmt - The statement
variableName - name of the variable
Method Detail

getVariableName

public String getVariableName()
Accessor for the variable name

Returns:
Variable name that this represents


Copyright © 2012. All Rights Reserved.