SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.query.exp
Class BoundVariable

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.query.exp.BoundVariable
All Implemented Interfaces:
InMemoryValue, Value

public class BoundVariable
extends java.lang.Object
implements InMemoryValue

Represents a bound variable. Variables are aliased to the collection that is stated to contain them in the query. When the query is evaluated, expressions containing variables will be executed once for every element in the collection.


Constructor Summary
BoundVariable(java.lang.String name, java.lang.Class type)
          Constructor.
 
Method Summary
 void castTo(java.lang.Class type)
          Cast this value to the given type.
 java.lang.Object evaluate(java.lang.Object candidate, java.lang.Object orig, com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm, java.util.Map params)
          Evaluate the given candidate.
 boolean isVariable()
          Return true if this value is a variable.
 boolean setValue(java.lang.Object value)
          Set the value this variable should take for the current iteration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundVariable

public BoundVariable(java.lang.String name,
                     java.lang.Class type)
Constructor. Provide variable name and type.

Method Detail

setValue

public boolean setValue(java.lang.Object value)
Set the value this variable should take for the current iteration.

Returns:
false if the type is incompatible with the variable's declared type

isVariable

public boolean isVariable()
Description copied from interface: Value
Return true if this value is a variable.

Specified by:
isVariable in interface Value

castTo

public void castTo(java.lang.Class type)
Description copied from interface: InMemoryValue
Cast this value to the given type.

Specified by:
castTo in interface InMemoryValue

evaluate

public java.lang.Object evaluate(java.lang.Object candidate,
                                 java.lang.Object orig,
                                 com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm,
                                 java.util.Map params)
Description copied from interface: InMemoryValue
Evaluate the given candidate.

Specified by:
evaluate in interface InMemoryValue

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

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