planetj.dataengine.parameter
Class ParameterParameter

java.lang.Object
  extended byplanetj.dataengine.parameter.AbstractParameter
      extended byplanetj.dataengine.parameter.ParameterParameter
All Implemented Interfaces:
java.lang.Cloneable, IJDBCSQLParameter, IParameter, java.io.Serializable

public class ParameterParameter
extends AbstractParameter
implements IJDBCSQLParameter

A parameter which gets its value from another parameter.

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, PARAMETER_VALUE_ACTUAL, PARAMETER_VALUE_DISPLAY, PARAMETER_VALUE_UNKNOWN
 
Constructor Summary
ParameterParameter()
           
 
Method Summary
 int getDataType()
          Gets the SQL data type of the parameter
protected  IParameter getSourceParameter()
          Gets the source parameter from which this parameter reads its value
protected  int getSourceParameterIndex()
          Gets the 0-based index of the source parameter from which this parameter reads its value
 java.lang.Object getValue()
          Gets the value of the parameter
 boolean isSQLParameter()
          Tests if this parameter should be sent as a parameter to the DB if it is included in a SQL statement.
 void setDataType(int newDataType)
          Sets the SQL data type of the parameter
 void setToken(java.lang.String token)
          Sets the literal token that was used to denote this parameter in code
 void setValue(java.lang.Object value)
          Sets the value of the parameter
 
Methods inherited from class planetj.dataengine.parameter.AbstractParameter
clearValue, clone, cloneParameter, equals, getCodeReplacementString, getContext, getContextIndex, getContextSpecificId, getDefaultValueAsString, getId, getSource, getTargetFieldDescriptor, getToken, hasAssignedValue, hashCode, isValueLoaded, loadValueFromSource, loadValueFromSource, setContext, setContextIndex, setContextInternal, setDefaultValueAsString, setSource, setSQLParameter, setTokenInternal, setValueInternal, toString
 
Methods inherited from class java.lang.Object
finalize, 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, getSource, getTargetFieldDescriptor, getToken, hasAssignedValue, loadValueFromSource, loadValueFromSource, setContext, setSource
 

Constructor Detail

ParameterParameter

public ParameterParameter()
Method Detail

getDataType

public int getDataType()
Gets the SQL data type of the parameter

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

getSourceParameter

protected IParameter getSourceParameter()
Gets the source parameter from which this parameter reads its value


getSourceParameterIndex

protected int getSourceParameterIndex()
Gets the 0-based index of the source parameter from which this parameter reads its value


getValue

public java.lang.Object getValue()
Gets the value of the parameter

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

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

setDataType

public void setDataType(int newDataType)
Sets the SQL data type of the parameter

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

setToken

public void setToken(java.lang.String token)
              throws CMException
Sets the literal token that was used to denote this parameter in code

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

setValue

public void setValue(java.lang.Object value)
              throws CMException
Sets the value of the parameter

Specified by:
setValue in interface IParameter
Overrides:
setValue in class AbstractParameter
Throws:
CMException