SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

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

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.impl.jdbc.query.exp.CompareExpression
All Implemented Interfaces:
Expression, JDBCExpression

public class CompareExpression
extends java.lang.Object
implements JDBCExpression

Compares two values.


Field Summary
static java.lang.String GREATER
           
static java.lang.String GREATER_EQUAL
           
static java.lang.String LESS
           
static java.lang.String LESS_EQUAL
           
 
Constructor Summary
CompareExpression(com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue val1, com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue val2, java.lang.String op)
          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.
 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.
 com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins getJoins()
          Return the joins for this expression.
 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
 

Field Detail

LESS

public static final java.lang.String LESS
See Also:
Constant Field Values

GREATER

public static final java.lang.String GREATER
See Also:
Constant Field Values

LESS_EQUAL

public static final java.lang.String LESS_EQUAL
See Also:
Constant Field Values

GREATER_EQUAL

public static final java.lang.String GREATER_EQUAL
See Also:
Constant Field Values
Constructor Detail

CompareExpression

public CompareExpression(com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue val1,
                         com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue val2,
                         java.lang.String op)
Constructor. Supply values and operator.

Method Detail

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

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

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