Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.kodo.impl.jdbc.query.exp
Class SQLPath

    java.lang.Object
      |
      +--com.solarmetric.kodo.impl.jdbc.query.exp.SQLPath

All Implemented Interfaces:
  com.solarmetric.kodo.impl.jdbc.query.exp.JDBCPath, JDBCValue, com.solarmetric.kodo.query.Path, com.solarmetric.kodo.query.Value

public class SQLPath
extends Object
implements com.solarmetric.kodo.impl.jdbc.query.exp.JDBCPath

A path represents a traversal into fields of a candidate object.

Constructor Summary
`SQLPath(ClassMapping type)` Return a path starting with the 'this' ptr.
`SQLPath(ClassMapping candidate, com.solarmetric.kodo.impl.jdbc.query.exp.Variable var)` Return a path starting from the given variable.

Method Summary
`void` | `appendIsEmpty(QuerySQLBuffer sql)` Append the SQL testing whether this value is empty to the given buffer.
`void` | `appendIsNotNull(QuerySQLBuffer sql)` Append the SQL testing whether this value is not null to the given buffer.
`void` | `appendIsNull(QuerySQLBuffer sql)` Append the SQL testing whether this value is null to the given buffer.
`void` | `appendTo(QuerySQLBuffer sql, int index)` Append the SQL for this value to the given buffer.
`void` | `calculateValue(PersistenceManagerImpl pm, Map params, JDBCValue other)` Calculate and cache the SQL for this value.
`void` | `castTo(Class type)` Cast this value to the given class.
`void` | `get(String field)`
`ClassMapping` | `getClassMapping()` Return the class mapping for this path.
`Object` | `getDataStoreValue(Object val)` Transform the given value into its datastore equivalent.
`FieldMapping` | `getFieldMapping()` Return the field mapping for this path.
`FieldMetaData[]` | `getFields()`
`Joins` | `getJoins()` Return the joins for this value.
`void` | `getKey()`
`ClassMetaData` | `getMetaData()`
`String` | `getPath()` Return the string of fields this path traverses.
`void` | `initialize(PersistenceManagerImpl pm, QuerySelect select, boolean nullTest)` Initialize the value.
`boolean` | `isUnaccessedVariable()` Return true if this is a bound variable that has not been accessed after binding.
`boolean` | `isVariable()`
`(package private) void` | `joinRelation()` Join into the relation represented by the current field, if any.
`int` | `length()` Return the number of SQL elements in this value.
`void` | `setContainsId(String id)` If this path is part of a contains clause, then alias it to the proper contains id before initialization.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SQLPath

    public SQLPath(ClassMapping type)

  Return a path starting with the 'this' ptr.

### SQLPath

    public SQLPath(ClassMapping candidate,
                   com.solarmetric.kodo.impl.jdbc.query.exp.Variable var)

  Return a path starting from the given variable.

Method Detail

### getMetaData

    public ClassMetaData getMetaData()

### isVariable

    public boolean isVariable()

  Specified by:
    `isVariable` in interface `com.solarmetric.kodo.query.Value`

### getClassMapping

    public ClassMapping getClassMapping()

  Return the class mapping for this path.

### getFieldMapping

    public FieldMapping getFieldMapping()

  Return the field mapping for this path.

### getPath

    public String getPath()

  Return the string of fields this path traverses.

### isUnaccessedVariable

    public boolean isUnaccessedVariable()

  Return true if this is a bound variable that has not been accessed after binding. Useful for filters like "coll.contains (var) && var == null", which should really just act like "coll.contains (null)".

### setContainsId

    public void setContainsId(String id)

  If this path is part of a contains clause, then alias it to the proper contains id before initialization.

### get

    public void get(String field)

  Specified by:
    `get` in interface `com.solarmetric.kodo.query.Path`

### getKey

    public void getKey()

  Specified by:
    `getKey` in interface `com.solarmetric.kodo.impl.jdbc.query.exp.JDBCPath`

### castTo

    public void castTo(Class type)

  Description copied from interface: `JDBCValue`
  Cast this value to the given class.
  Specified by:
    `castTo` in interface `JDBCValue`

### getFields

    public FieldMetaData[] getFields()

  Specified by:
    `getFields` in interface `com.solarmetric.kodo.query.Path`

### initialize

    public void initialize(PersistenceManagerImpl pm,
                           QuerySelect 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`
  Following copied from interface: `com.solarmetric.kodo.impl.jdbc.query.exp.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

### joinRelation

    void joinRelation()

  Join into the relation represented by the current field, if any.

### calculateValue

    public void calculateValue(PersistenceManagerImpl pm,
                               Map params,
                               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(QuerySQLBuffer 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(QuerySQLBuffer 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(QuerySQLBuffer 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(QuerySQLBuffer 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 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.kodo.runtime.PersistenceManagerImpl, com.solarmetric.kodo.impl.jdbc.query.QuerySelect, 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 Object getDataStoreValue(Object val)

  Description copied from interface: `JDBCValue`
  Transform the given value into its datastore equivalent.
  Specified by:
    `getDataStoreValue` in interface `JDBCValue`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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