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
Class JDBCExpressionFactory

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

All Implemented Interfaces:
  ExpressionFactory

public class JDBCExpressionFactory
extends java.lang.Object
implements ExpressionFactory

Expression factory implementation that can be used to execute queries via SQL.

Constructor Summary
`JDBCExpressionFactory(com.solarmetric.rd.kodo.impl.jdbc.runtime.Select sel, com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping type, com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm)` Constructor.

Method Summary
`com.solarmetric.rd.kodo.query.Value` | `add(com.solarmetric.rd.kodo.query.Value val1, com.solarmetric.rd.kodo.query.Value val2)` Return a value representing the two values added together.
`com.solarmetric.rd.kodo.query.Expression` | `and(com.solarmetric.rd.kodo.query.Expression exp1, com.solarmetric.rd.kodo.query.Expression exp2)` Return the two expressions AND'd together.
`com.solarmetric.rd.kodo.query.Expression` | `bindKeyVariable(com.solarmetric.rd.kodo.query.Value var, com.solarmetric.rd.kodo.query.Value val)` Bind the given variable to the key set of the given map value.
`com.solarmetric.rd.kodo.query.Expression` | `bindValueVariable(com.solarmetric.rd.kodo.query.Value var, com.solarmetric.rd.kodo.query.Value val)` Bind the given variable to the value set of the given map value.
`com.solarmetric.rd.kodo.query.Expression` | `bindVariable(com.solarmetric.rd.kodo.query.Value var, com.solarmetric.rd.kodo.query.Value val)` Bind the given variable to the given collection value.
`com.solarmetric.rd.kodo.query.Value` | `cast(com.solarmetric.rd.kodo.query.Value val, java.lang.Class cls)` Cast the value to the given class.
`com.solarmetric.rd.kodo.query.Expression` | `contains(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Expression` | `containsKey(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Expression` | `containsValue(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Value` | `divide(com.solarmetric.rd.kodo.query.Value val1, com.solarmetric.rd.kodo.query.Value val2)` Return a value representing the first value divided by the first one.
`com.solarmetric.rd.kodo.query.Expression` | `emptyExpression()` Return a blank expression; this is used when the filter is empty.
`com.solarmetric.rd.kodo.query.Expression` | `endsWith(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Expression` | `equal(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`void` | `evaluate(com.solarmetric.rd.kodo.query.Expression exp, java.util.Map params)` Evaluate this query for the given parameters.
`com.solarmetric.rd.kodo.query.Expression` | `extensionExpression(com.solarmetric.rd.kodo.query.FilterListener listener, com.solarmetric.rd.kodo.query.Value target, com.solarmetric.rd.kodo.query.Value arg)` Return an expression formed by evaluating the given extension.
`boolean[]` | `getAscending()` Return the ordering directions for this query.
`com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins` | `getJoins()` Return the top-level joins for this query.
`com.solarmetric.rd.kodo.query.Value` | `getNull()` Return a value representing null.
`com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer[]` | `getOrdering()` Return the ordering for this query.
`com.solarmetric.rd.kodo.impl.jdbc.runtime.Select` | `getSelect()` Return the select provided on construction.
`com.solarmetric.rd.kodo.query.Value` | `getThis()` Return a value representing `this`.
`com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer` | `getWhere()` Return the WHERE clause for this query.
`com.solarmetric.rd.kodo.query.Expression` | `greaterThan(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Expression` | `greaterThanEqual(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Expression` | `isEmpty(com.solarmetric.rd.kodo.query.Value v1)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Expression` | `lessThan(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Expression` | `lessThanEqual(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Value` | `mod(com.solarmetric.rd.kodo.query.Value val1, com.solarmetric.rd.kodo.query.Value val2)` Return a value representing the first value mod'd by the second one.
`com.solarmetric.rd.kodo.query.Value` | `multiply(com.solarmetric.rd.kodo.query.Value val1, com.solarmetric.rd.kodo.query.Value val2)` Return a value representing the two values multiplied together.
`com.solarmetric.rd.kodo.query.Value` | `newBoundVariable(java.lang.String name, java.lang.Class type)` This method will be called only once per variable bound in a `contains` clause, and the returned value will be reused for any further instances of the variable in subexpression of the filter string.
`com.solarmetric.rd.kodo.query.Value` | `newConstant(java.lang.Object val)` Return a value representing the given constant, which will be a `Number`, `String`, or `Boolean` instance.
`com.solarmetric.rd.kodo.query.Value` | `newExtension(com.solarmetric.rd.kodo.query.FilterListener listener, com.solarmetric.rd.kodo.query.Value target, com.solarmetric.rd.kodo.query.Value arg)` Return the value of the given extension.
`com.solarmetric.rd.kodo.query.Value` | `newParameter(java.lang.String name, java.lang.Class type)` Return a value representing a parameter for the given value.
`com.solarmetric.rd.kodo.query.Path` | `newPath()` Return a value representing a path which will consist of a chain of 1 or more field names starting in the namespace of the candidate class.
`com.solarmetric.rd.kodo.query.Path` | `newPath(com.solarmetric.rd.kodo.query.Value val)` Return a value representing a path which will consist of a chain of 1 or more field names starting in the namespace of the given value.
`com.solarmetric.rd.kodo.query.Value` | `newUnboundVariable(java.lang.String name, java.lang.Class type)` Return an unbound variable.
`com.solarmetric.rd.kodo.query.Expression` | `not(com.solarmetric.rd.kodo.query.Expression exp)` Return the inverse of this expression.
`com.solarmetric.rd.kodo.query.Expression` | `notEqual(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Expression` | `or(com.solarmetric.rd.kodo.query.Expression exp1, com.solarmetric.rd.kodo.query.Expression exp2)` Return the two expressions OR'd together.
`com.solarmetric.rd.kodo.query.Expression` | `orderBy(com.solarmetric.rd.kodo.query.Expression exp, com.solarmetric.rd.kodo.query.Value val, boolean ascending)` Return an expression representing this one, ordered by the given value.
`com.solarmetric.rd.kodo.query.Expression` | `startsWith(com.solarmetric.rd.kodo.query.Value v1, com.solarmetric.rd.kodo.query.Value v2)` Return an expression representing the given condition.
`com.solarmetric.rd.kodo.query.Value` | `subtract(com.solarmetric.rd.kodo.query.Value val1, com.solarmetric.rd.kodo.query.Value val2)` Return a value representing the second value subtracted from the first.

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

Constructor Detail

### JDBCExpressionFactory

    public JDBCExpressionFactory(com.solarmetric.rd.kodo.impl.jdbc.runtime.Select sel,
                                 com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping type,
                                 com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm)

  Constructor. Supply the type we're querying against.

Method Detail

### evaluate

    public void evaluate(com.solarmetric.rd.kodo.query.Expression exp,
                         java.util.Map params)

  Evaluate this query for the given parameters.

### getSelect

    public com.solarmetric.rd.kodo.impl.jdbc.runtime.Select getSelect()

  Return the select provided on construction.

### getWhere

    public com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer getWhere()

  Return the WHERE clause for this query.

### getJoins

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

  Return the top-level joins for this query.

### getOrdering

    public com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer[] getOrdering()

  Return the ordering for this query.

### getAscending

    public boolean[] getAscending()

  Return the ordering directions for this query.

### emptyExpression

    public com.solarmetric.rd.kodo.query.Expression emptyExpression()

  Description copied from interface: `ExpressionFactory`
  Return a blank expression; this is used when the filter is empty.

  Specified by:
    `emptyExpression` in interface `ExpressionFactory`

### equal

    public com.solarmetric.rd.kodo.query.Expression equal(com.solarmetric.rd.kodo.query.Value v1,
                                                          com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `equal` in interface `ExpressionFactory`

### notEqual

    public com.solarmetric.rd.kodo.query.Expression notEqual(com.solarmetric.rd.kodo.query.Value v1,
                                                             com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `notEqual` in interface `ExpressionFactory`

### lessThan

    public com.solarmetric.rd.kodo.query.Expression lessThan(com.solarmetric.rd.kodo.query.Value v1,
                                                             com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `lessThan` in interface `ExpressionFactory`

### greaterThan

    public com.solarmetric.rd.kodo.query.Expression greaterThan(com.solarmetric.rd.kodo.query.Value v1,
                                                                com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `greaterThan` in interface `ExpressionFactory`

### lessThanEqual

    public com.solarmetric.rd.kodo.query.Expression lessThanEqual(com.solarmetric.rd.kodo.query.Value v1,
                                                                  com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `lessThanEqual` in interface `ExpressionFactory`

### greaterThanEqual

    public com.solarmetric.rd.kodo.query.Expression greaterThanEqual(com.solarmetric.rd.kodo.query.Value v1,
                                                                     com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `greaterThanEqual` in interface `ExpressionFactory`

### isEmpty

    public com.solarmetric.rd.kodo.query.Expression isEmpty(com.solarmetric.rd.kodo.query.Value v1)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `isEmpty` in interface `ExpressionFactory`

### contains

    public com.solarmetric.rd.kodo.query.Expression contains(com.solarmetric.rd.kodo.query.Value v1,
                                                             com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `contains` in interface `ExpressionFactory`

### containsKey

    public com.solarmetric.rd.kodo.query.Expression containsKey(com.solarmetric.rd.kodo.query.Value v1,
                                                                com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `containsKey` in interface `ExpressionFactory`

### containsValue

    public com.solarmetric.rd.kodo.query.Expression containsValue(com.solarmetric.rd.kodo.query.Value v1,
                                                                  com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `containsValue` in interface `ExpressionFactory`

### startsWith

    public com.solarmetric.rd.kodo.query.Expression startsWith(com.solarmetric.rd.kodo.query.Value v1,
                                                               com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `startsWith` in interface `ExpressionFactory`

### endsWith

    public com.solarmetric.rd.kodo.query.Expression endsWith(com.solarmetric.rd.kodo.query.Value v1,
                                                             com.solarmetric.rd.kodo.query.Value v2)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing the given condition.

  Specified by:
    `endsWith` in interface `ExpressionFactory`

### and

    public com.solarmetric.rd.kodo.query.Expression and(com.solarmetric.rd.kodo.query.Expression exp1,
                                                        com.solarmetric.rd.kodo.query.Expression exp2)

  Description copied from interface: `ExpressionFactory`
  Return the two expressions AND'd together.

  Specified by:
    `and` in interface `ExpressionFactory`

### or

    public com.solarmetric.rd.kodo.query.Expression or(com.solarmetric.rd.kodo.query.Expression exp1,
                                                       com.solarmetric.rd.kodo.query.Expression exp2)

  Description copied from interface: `ExpressionFactory`
  Return the two expressions OR'd together.

  Specified by:
    `or` in interface `ExpressionFactory`

### not

    public com.solarmetric.rd.kodo.query.Expression not(com.solarmetric.rd.kodo.query.Expression exp)

  Description copied from interface: `ExpressionFactory`
  Return the inverse of this expression.

  Specified by:
    `not` in interface `ExpressionFactory`

### orderBy

    public com.solarmetric.rd.kodo.query.Expression orderBy(com.solarmetric.rd.kodo.query.Expression exp,
                                                            com.solarmetric.rd.kodo.query.Value val,
                                                            boolean ascending)

  Description copied from interface: `ExpressionFactory`
  Return an expression representing this one, ordered by the given value. Multiple calls to this method might be made; the resulting Expression should order by all paths in the proper order.

  Specified by:
    `orderBy` in interface `ExpressionFactory`

### extensionExpression

    public com.solarmetric.rd.kodo.query.Expression extensionExpression(com.solarmetric.rd.kodo.query.FilterListener listener,
                                                                        com.solarmetric.rd.kodo.query.Value target,
                                                                        com.solarmetric.rd.kodo.query.Value arg)

  Description copied from interface: `ExpressionFactory`
  Return an expression formed by evaluating the given extension.

  Specified by:
    `extensionExpression` in interface `ExpressionFactory`

### bindVariable

    public com.solarmetric.rd.kodo.query.Expression bindVariable(com.solarmetric.rd.kodo.query.Value var,
                                                                 com.solarmetric.rd.kodo.query.Value val)

  Description copied from interface: `ExpressionFactory`
  Bind the given variable to the given collection value.

  Specified by:
    `bindVariable` in interface `ExpressionFactory`

### bindKeyVariable

    public com.solarmetric.rd.kodo.query.Expression bindKeyVariable(com.solarmetric.rd.kodo.query.Value var,
                                                                    com.solarmetric.rd.kodo.query.Value val)

  Description copied from interface: `ExpressionFactory`
  Bind the given variable to the key set of the given map value.

  Specified by:
    `bindKeyVariable` in interface `ExpressionFactory`

### bindValueVariable

    public com.solarmetric.rd.kodo.query.Expression bindValueVariable(com.solarmetric.rd.kodo.query.Value var,
                                                                      com.solarmetric.rd.kodo.query.Value val)

  Description copied from interface: `ExpressionFactory`
  Bind the given variable to the value set of the given map value.

  Specified by:
    `bindValueVariable` in interface `ExpressionFactory`

### newPath

    public com.solarmetric.rd.kodo.query.Path newPath()

  Description copied from interface: `ExpressionFactory`
  Return a value representing a path which will consist of a chain of 1 or more field names starting in the namespace of the candidate class.

  Example: `parent.address.city`

  Specified by:
    `newPath` in interface `ExpressionFactory`

### newPath

    public com.solarmetric.rd.kodo.query.Path newPath(com.solarmetric.rd.kodo.query.Value val)

  Description copied from interface: `ExpressionFactory`
  Return a value representing a path which will consist of a chain of 1 or more field names starting in the namespace of the given value.

  Example: `var.address.city`

  Specified by:
    `newPath` in interface `ExpressionFactory`

### newConstant

    public com.solarmetric.rd.kodo.query.Value newConstant(java.lang.Object val)

  Description copied from interface: `ExpressionFactory`
  Return a value representing the given constant, which will be a `Number`, `String`, or `Boolean` instance.

  Specified by:
    `newConstant` in interface `ExpressionFactory`

### getThis

    public com.solarmetric.rd.kodo.query.Value getThis()

  Description copied from interface: `ExpressionFactory`
  Return a value representing `this`.

  Specified by:
    `getThis` in interface `ExpressionFactory`

### getNull

    public com.solarmetric.rd.kodo.query.Value getNull()

  Description copied from interface: `ExpressionFactory`
  Return a value representing null.

  Specified by:
    `getNull` in interface `ExpressionFactory`

### newParameter

    public com.solarmetric.rd.kodo.query.Value newParameter(java.lang.String name,
                                                            java.lang.Class type)

  Description copied from interface: `ExpressionFactory`
  Return a value representing a parameter for the given value.

  Specified by:
    `newParameter` in interface `ExpressionFactory`

### newExtension

    public com.solarmetric.rd.kodo.query.Value newExtension(com.solarmetric.rd.kodo.query.FilterListener listener,
                                                            com.solarmetric.rd.kodo.query.Value target,
                                                            com.solarmetric.rd.kodo.query.Value arg)

  Description copied from interface: `ExpressionFactory`
  Return the value of the given extension.

  Specified by:
    `newExtension` in interface `ExpressionFactory`

### newUnboundVariable

    public com.solarmetric.rd.kodo.query.Value newUnboundVariable(java.lang.String name,
                                                                  java.lang.Class type)

  Description copied from interface: `ExpressionFactory`
  Return an unbound variable. This method will only be called once for a given named unbound variable.

  Specified by:
    `newUnboundVariable` in interface `ExpressionFactory`

### newBoundVariable

    public com.solarmetric.rd.kodo.query.Value newBoundVariable(java.lang.String name,
                                                                java.lang.Class type)

  Description copied from interface: `ExpressionFactory`
  This method will be called only once per variable bound in a `contains` clause, and the returned value will be reused for any further instances of the variable in subexpression of the filter string.

  Specified by:
    `newBoundVariable` in interface `ExpressionFactory`

### cast

    public com.solarmetric.rd.kodo.query.Value cast(com.solarmetric.rd.kodo.query.Value val,
                                                    java.lang.Class cls)

  Description copied from interface: `ExpressionFactory`
  Cast the value to the given class.

  Specified by:
    `cast` in interface `ExpressionFactory`

### add

    public com.solarmetric.rd.kodo.query.Value add(com.solarmetric.rd.kodo.query.Value val1,
                                                   com.solarmetric.rd.kodo.query.Value val2)

  Description copied from interface: `ExpressionFactory`
  Return a value representing the two values added together.

  Specified by:
    `add` in interface `ExpressionFactory`

### subtract

    public com.solarmetric.rd.kodo.query.Value subtract(com.solarmetric.rd.kodo.query.Value val1,
                                                        com.solarmetric.rd.kodo.query.Value val2)

  Description copied from interface: `ExpressionFactory`
  Return a value representing the second value subtracted from the first.

  Specified by:
    `subtract` in interface `ExpressionFactory`

### multiply

    public com.solarmetric.rd.kodo.query.Value multiply(com.solarmetric.rd.kodo.query.Value val1,
                                                        com.solarmetric.rd.kodo.query.Value val2)

  Description copied from interface: `ExpressionFactory`
  Return a value representing the two values multiplied together.

  Specified by:
    `multiply` in interface `ExpressionFactory`

### divide

    public com.solarmetric.rd.kodo.query.Value divide(com.solarmetric.rd.kodo.query.Value val1,
                                                      com.solarmetric.rd.kodo.query.Value val2)

  Description copied from interface: `ExpressionFactory`
  Return a value representing the first value divided by the first one.

  Specified by:
    `divide` in interface `ExpressionFactory`

### mod

    public com.solarmetric.rd.kodo.query.Value mod(com.solarmetric.rd.kodo.query.Value val1,
                                                   com.solarmetric.rd.kodo.query.Value val2)

  Description copied from interface: `ExpressionFactory`
  Return a value representing the first value mod'd by the second one.

  Specified by:
    `mod` in interface `ExpressionFactory`

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.