SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.impl.jdbc.query.exp
Class Variable

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.impl.jdbc.query.exp.Variable
All Implemented Interfaces:
JDBCValue, Value

public class Variable
extends java.lang.Object
implements JDBCValue

A variable in a JDOQL filter.


Constructor Summary
Variable(java.lang.String name, com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping type)
          Constructor.
 
Method Summary
 void appendIsEmpty(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql)
          Append the SQL testing whether this value is empty to the given buffer.
 void appendIsNotNull(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql)
          Append the SQL testing whether this value is not null to the given buffer.
 void appendIsNull(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql)
          Append the SQL testing whether this value is null to the given buffer.
 void appendTo(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql, int index)
          Append the SQL for this value to the given buffer.
 void calculateValue(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm, java.util.Map params, com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue other)
          Calculate and cache the SQL for this value.
 void castTo(java.lang.Class cls)
          Cast this value to the given class.
 java.lang.Object getDataStoreValue(java.lang.Object val)
          Transform the given value into its datastore equivalent.
 com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins getJoins()
          Return the joins for this value.
 java.lang.String getName()
          Return the variable name.
 com.solarmetric.rd.kodo.impl.jdbc.query.exp.SQLPath getSQLPath()
          Return the path this variable is aliased to.
 com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getType()
          Return the variable type.
 void initialize(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm, com.solarmetric.rd.kodo.impl.jdbc.runtime.Select select, boolean nullTest)
          Initialize the value.
 boolean isBound()
          Return true if the variable is bound.
 boolean isVariable()
          Return true if this value is a variable.
 int length()
          Return the number of SQL elements in this value.
 void setSQLPath(com.solarmetric.rd.kodo.impl.jdbc.query.exp.SQLPath path)
          Set the path this variable is aliased to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Variable

public Variable(java.lang.String name,
                com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping type)
Constructor. Supply variable name and type.

Method Detail

isVariable

public boolean isVariable()
Description copied from interface: Value
Return true if this value is a variable.

Specified by:
isVariable in interface Value

getName

public java.lang.String getName()
Return the variable name.


getType

public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getType()
Return the variable type.


isBound

public boolean isBound()
Return true if the variable is bound.


getSQLPath

public com.solarmetric.rd.kodo.impl.jdbc.query.exp.SQLPath getSQLPath()
Return the path this variable is aliased to.


setSQLPath

public void setSQLPath(com.solarmetric.rd.kodo.impl.jdbc.query.exp.SQLPath path)
Set the path this variable is aliased to.


initialize

public void initialize(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm,
                       com.solarmetric.rd.kodo.impl.jdbc.runtime.Select select,
                       boolean nullTest)
Description copied from interface: JDBCValue
Initialize the value. This method should recursively initialize any sub-values. It should also cache the Joins instance containing the joins for this value.

Specified by:
initialize in interface JDBCValue
Parameters:
pm - the persistence manager for the query
select - used to create Joins instances
nullTest - if true, then this value will be compared to null or tested for emptiness

castTo

public void castTo(java.lang.Class cls)
Description copied from interface: JDBCValue
Cast this value to the given class.

Specified by:
castTo in interface JDBCValue

calculateValue

public void calculateValue(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm,
                           java.util.Map params,
                           com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue other)
Description copied from interface: JDBCValue
Calculate and cache the SQL for this value.

Specified by:
calculateValue in interface JDBCValue

length

public int length()
Description copied from interface: JDBCValue
Return the number of SQL elements in this value.

Specified by:
length in interface JDBCValue

appendTo

public void appendTo(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql,
                     int index)
Description copied from interface: JDBCValue
Append the SQL for this value to the given buffer.

Specified by:
appendTo in interface JDBCValue

appendIsEmpty

public void appendIsEmpty(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql)
Description copied from interface: JDBCValue
Append the SQL testing whether this value is empty to the given buffer.

Specified by:
appendIsEmpty in interface JDBCValue

appendIsNull

public void appendIsNull(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql)
Description copied from interface: JDBCValue
Append the SQL testing whether this value is null to the given buffer.

Specified by:
appendIsNull in interface JDBCValue

appendIsNotNull

public void appendIsNotNull(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql)
Description copied from interface: JDBCValue
Append the SQL testing whether this value is not null to the given buffer.

Specified by:
appendIsNotNull in interface JDBCValue

getJoins

public com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins getJoins()
Description copied from interface: JDBCValue
Return the joins for this value. These joins should be created and cached during the JDBCValue.initialize(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl, com.solarmetric.rd.kodo.impl.jdbc.runtime.Select, boolean) method. The parent expression might modify these joins during its own initialization so that common joins are moved up the expression tree. These joins should not be included in the SQL appended through any of the append methods.

Specified by:
getJoins in interface JDBCValue

getDataStoreValue

public java.lang.Object getDataStoreValue(java.lang.Object val)
Description copied from interface: JDBCValue
Transform the given value into its datastore equivalent.

Specified by:
getDataStoreValue in interface JDBCValue

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.