SolarMetric Kodo JDO 3.4.1 generated on May 30 2006

kodo.jdbc.query
Interface Val

All Superinterfaces:
Value
All Known Implementing Classes:
Args

public interface Val
extends Value

A Value represents any non-operator in a query filter, including constants, variables, and object fields.


Method Summary
 void appendIsEmpty(SQLBuffer sql, Select sel, JDBCStoreManager store, Object[] params, JDBCFetchConfiguration fetch)
          Append the SQL testing whether this value is empty to the given buffer.
 void appendIsNotNull(SQLBuffer sql, Select sel, JDBCStoreManager store, Object[] params, JDBCFetchConfiguration fetch)
          Append the SQL testing whether this value is not null to the given buffer.
 void appendIsNull(SQLBuffer sql, Select sel, JDBCStoreManager store, Object[] params, JDBCFetchConfiguration fetch)
          Append the SQL testing whether this value is null to the given buffer.
 void appendTo(SQLBuffer sql, int index, Select sel, JDBCStoreManager store, Object[] params, JDBCFetchConfiguration fetch)
          Append the indexth SQL element to the given buffer.
 void calculateValue(Select sel, JDBCStoreManager store, Object[] params, Val other, JDBCFetchConfiguration fetch)
          Calculate and cache the SQL for this value.
 void clearParameters()
          Clear parameter values held by this value or its subcomponents.
 Object getDataStoreValue(Object val, JDBCStoreManager store)
          Return the datastore value of the given object in the context of this value.
 Joins getJoins()
          Return the joins for this value.
 boolean hasVariable(kodo.jdbc.query.Variable var)
          Return true if this value uses the given variable.
 void initialize(Select sel, JDBCStoreManager store, boolean nullTest)
          Initialize the value.
 int length()
          Return the number of SQL elements in this value.
 Object load(Result res, JDBCStoreManager store, JDBCFetchConfiguration fetch)
          Load the data for this value.
 void select(Select sel, JDBCStoreManager store, Object[] params, boolean pks, JDBCFetchConfiguration fetch)
          Select the data for this value.
 void selectColumns(Select sel, JDBCStoreManager store, Object[] params, boolean pks, JDBCFetchConfiguration fetch)
          Select just the columns for this value.
 
Methods inherited from interface kodo.query.Value
getMetaData, getType, isVariable, setImplicitType, setMetaData
 

Method Detail

initialize

public void initialize(Select sel,
                       JDBCStoreManager store,
                       boolean nullTest)
Initialize the value. This method should recursively initialize any sub-values. It should also cache the Joins instance containing the joins for this value. No additional joins should be made after this call. 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.
Parameters:
sel - used to create Joins instances
store - the store manager for the query
nullTest - if true, then this value will be compared to null or tested for emptiness

getJoins

public Joins getJoins()
Return the joins for this value. These joins should be created and cached during the initialize(kodo.jdbc.sql.Select, kodo.jdbc.runtime.JDBCStoreManager, boolean) method. The parent expression might modify these joins during its own initialization so that common joins are moved up the expression tree.

getDataStoreValue

public Object getDataStoreValue(Object val,
                                JDBCStoreManager store)
Return the datastore value of the given object in the context of this value.

select

public void select(Select sel,
                   JDBCStoreManager store,
                   Object[] params,
                   boolean pks,
                   JDBCFetchConfiguration fetch)
Select the data for this value.

selectColumns

public void selectColumns(Select sel,
                          JDBCStoreManager store,
                          Object[] params,
                          boolean pks,
                          JDBCFetchConfiguration fetch)
Select just the columns for this value.

load

public Object load(Result res,
                   JDBCStoreManager store,
                   JDBCFetchConfiguration fetch)
            throws SQLException
Load the data for this value.

hasVariable

public boolean hasVariable(kodo.jdbc.query.Variable var)
Return true if this value uses the given variable.

calculateValue

public void calculateValue(Select sel,
                           JDBCStoreManager store,
                           Object[] params,
                           Val other,
                           JDBCFetchConfiguration fetch)
Calculate and cache the SQL for this value. This method is called before length or any append methods.
Parameters:
other - the value being compared to, or null if not a comparison

clearParameters

public void clearParameters()
Clear parameter values held by this value or its subcomponents. This method is called sometime after calculateValue.

length

public int length()
Return the number of SQL elements in this value.

appendTo

public void appendTo(SQLBuffer sql,
                     int index,
                     Select sel,
                     JDBCStoreManager store,
                     Object[] params,
                     JDBCFetchConfiguration fetch)
Append the indexth SQL element to the given buffer.

appendIsEmpty

public void appendIsEmpty(SQLBuffer sql,
                          Select sel,
                          JDBCStoreManager store,
                          Object[] params,
                          JDBCFetchConfiguration fetch)
Append the SQL testing whether this value is empty to the given buffer.

appendIsNull

public void appendIsNull(SQLBuffer sql,
                         Select sel,
                         JDBCStoreManager store,
                         Object[] params,
                         JDBCFetchConfiguration fetch)
Append the SQL testing whether this value is null to the given buffer.

appendIsNotNull

public void appendIsNotNull(SQLBuffer sql,
                            Select sel,
                            JDBCStoreManager store,
                            Object[] params,
                            JDBCFetchConfiguration fetch)
Append the SQL testing whether this value is not null to the given buffer.

SolarMetric Kodo JDO 3.4.1 generated on May 30 2006

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