Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.rd.kodo.impl.jdbc.query.exp
Class CompareEqualExpression

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

All Implemented Interfaces:
  Expression, JDBCExpression

Direct Known Subclasses:
  EqualExpression, NotEqualExpression

public abstract class CompareEqualExpression
extends java.lang.Object
implements JDBCExpression

Compares two values for equality.

Constructor Summary
`CompareEqualExpression(com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue val1, com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue val2)` Constructor.

Method Summary
`void` | `appendOrdering(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer[] orders, boolean[] ascending, int idx, com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm, java.util.Map params)` Append the ordering for this expression to the given buffer.
`protected abstract void` | `appendTo(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer buf, boolean val1Null, boolean val2Null)` Append the SQL for the comparison.
`void` | `appendTo(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer buf, com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm, java.util.Map params)` Append the SQL for this expression to the given buffer.
`protected boolean` | `compareValueToNull()` Subclasses can override this method if, when they compare to null, they compare the field value rather than the entire field to null.
`com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins` | `getJoins()` Return the joins for this expression.
`com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue` | `getValue1()`
`com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue` | `getValue2()`
`void` | `initialize(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm, com.solarmetric.rd.kodo.impl.jdbc.runtime.Select select, java.util.Map containsCounts)` Initialize the expression.

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

Constructor Detail

### CompareEqualExpression

    public CompareEqualExpression(com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue val1,
                                  com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue val2)

  Constructor. Supply values to compare.

Method Detail

### getValue1

    public com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue getValue1()

### getValue2

    public com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue getValue2()

### initialize

    public void initialize(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm,
                           com.solarmetric.rd.kodo.impl.jdbc.runtime.Select select,
                           java.util.Map containsCounts)

  Description copied from interface: `JDBCExpression`
  Initialize the expression. This method should recursively initialize any sub-expressions or values. It should also cache the `Joins` instance containing the joins for this expression.

  Specified by:
    `initialize` in interface `JDBCExpression`
  Parameters:
    `pm` - the persistence manager for this query
    `select` - manage joins made in each query clause
    `containsCounts` - map of relation paths to the number of times the paths appear in a contains() expression; used to ensure paths used for contains() within the same AND expression used different aliases

### appendTo

    public void appendTo(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer buf,
                         com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm,
                         java.util.Map params)

  Description copied from interface: `JDBCExpression`
  Append the SQL for this expression to the given buffer. The SQL should optinally include any joins this expression needs.

  Specified by:
    `appendTo` in interface `JDBCExpression`

### appendOrdering

    public void appendOrdering(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer[] orders,
                               boolean[] ascending,
                               int idx,
                               com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm,
                               java.util.Map params)

  Description copied from interface: `JDBCExpression`
  Append the ordering for this expression to the given buffer.

  Specified by:
    `appendOrdering` in interface `JDBCExpression`

### getJoins

    public com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins getJoins()

  Description copied from interface: `JDBCExpression`
  Return the joins for this expression. These joins should be created and cached during the `JDBCExpression.initialize(com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl, com.solarmetric.rd.kodo.impl.jdbc.runtime.Select, java.util.Map)` method. The parent expression might modify these joins during its own initialization so that common joins are moved up the expression tree.

  Specified by:
    `getJoins` in interface `JDBCExpression`

### appendTo

    protected abstract void appendTo(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer buf,
                                     boolean val1Null,
                                     boolean val2Null)

  Append the SQL for the comparison.

### compareValueToNull

    protected boolean compareValueToNull()

  Subclasses can override this method if, when they compare to null, they compare the field value rather than the entire field to null. For example, field.contains (null) should compare the field value to null, not the field itself.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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