planetj.dataengine.parameter
Class ContextParameterParameter

java.lang.Object
  |
  +--planetj.dataengine.parameter.AbstractParameter
        |
        +--planetj.dataengine.parameter.ContextParameterParameter
All Implemented Interfaces:
Cloneable, IJDBCSQLParameter, IParameter, Serializable

public class ContextParameterParameter
extends AbstractParameter
implements IJDBCSQLParameter

A parameter whose value can be extracted from a AbstractContext object.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface planetj.dataengine.parameter.IParameter
CONTEXT_SPECIFIC_ID_END, CONTEXT_SPECIFIC_ID_START, DEFAULT_DATA_TYPE, ID_START, PARAMETER_INDEX_PREFIX
 
Constructor Summary
ContextParameterParameter()
           
 
Method Summary
 boolean isSQLParameter()
          Tests if this parameter should be sent as a parameter to the DB if it is included in a SQL statement.
 Object loadValueFromSource(Object source)
          Loads this parameter's value from a source.
 void setToken(String token)
          Sets the literal token that was used to denote this parameter in code
 
Methods inherited from class planetj.dataengine.parameter.AbstractParameter
clearValue, clone, cloneParameter, equals, getCodeReplacementString, getContext, getContextIndex, getContextSpecificId, getDataType, getDefaultValueAsString, getSource, getTargetFieldDescriptor, getToken, getValue, hashCode, setContext, setDataType, setDefaultValueAsString, setSource, setSQLParameter, setValue, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface planetj.dataengine.parameter.IJDBCSQLParameter
setSQLParameter
 
Methods inherited from interface planetj.dataengine.parameter.IParameter
clearValue, clone, cloneParameter, getCodeReplacementString, getContext, getContextIndex, getContextSpecificId, getDataType, getSource, getTargetFieldDescriptor, getToken, getValue, setContext, setDataType, setSource, setValue
 

Constructor Detail

ContextParameterParameter

public ContextParameterParameter()
Method Detail

isSQLParameter

public boolean isSQLParameter()
Tests if this parameter should be sent as a parameter to the DB if it is included in a SQL statement. The DB can handle fewer type of parameters than the DataEngine, so not all DataEngine parameters can be sent as parameters to the DB. (For example, table names cannot be sent as DB parameters.) If this parameter is not part of an SQL statement then it does not matter what this method returns.

Specified by:
isSQLParameter in interface IJDBCSQLParameter
Overrides:
isSQLParameter in class AbstractParameter

loadValueFromSource

public Object loadValueFromSource(Object source)
                           throws CMException
Loads this parameter's value from a source. The object passed in may be ignored if the parameter already knows the source from which its value should be extracted.

Specified by:
loadValueFromSource in interface IParameter
CMException

setToken

public void setToken(String token)
Sets the literal token that was used to denote this parameter in code

Specified by:
setToken in interface IParameter
Overrides:
setToken in class AbstractParameter