planetj.dataengine.parameter
Class SQLPromptParameter

java.lang.Object
  |
  +--planetj.dataengine.parameter.AbstractParameter
        |
        +--planetj.dataengine.parameter.RequestParameter
              |
              +--planetj.dataengine.parameter.RequestPromptParameter
                    |
                    +--planetj.dataengine.parameter.SQLPromptParameter
All Implemented Interfaces:
Cloneable, IDisplayParameter, IJDBCSQLParameter, INamedParameter, IParameter, Serializable

public class SQLPromptParameter
extends RequestPromptParameter

A parameter which corresponds to an SQLComparison. Note that a single comparison may have multiple parameters, but each parameter has a single SQLComparison

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
SQLPromptParameter()
           
 
Method Summary
 SQLComparison getComparison()
          Gets the comparison for this parameter
 Field getDisplayField(ExecutingContext ec)
          Gets the field to use when displaying a prompt to the user.
 FieldDescriptorRow getDisplayFieldDescriptor()
          Gets the field descriptor to use when prompting the user for the parameter value.
 String getOperationString()
          Gets a String representing an operation which applies to this parameter.
 String getParameterName()
          Gets the name of this parameter (may be null).
 SQLContext getSQLContext()
          Gets the SQLContext associated with this parameter
 Object loadValueFromSource(Object source)
          Loads this parameter's value from a source.
 void setComparison(SQLComparison comparison)
          Sets the comparison for this parameter
 void setOperationString(String operationString)
          Sets a String representing an operation which applies to this parameter.
 void setToken(String token)
          Sets the literal token that was used to denote this parameter in code
 
Methods inherited from class planetj.dataengine.parameter.RequestPromptParameter
clearValue, cloneParameter, getDisplayField, isDisplay, setDisplay
 
Methods inherited from class planetj.dataengine.parameter.RequestParameter
getRequestKey
 
Methods inherited from class planetj.dataengine.parameter.AbstractParameter
clone, equals, getCodeReplacementString, getContext, getContextIndex, getContextSpecificId, getDataType, getDefaultValueAsString, getSource, getTargetFieldDescriptor, getToken, getValue, hashCode, isSQLParameter, 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.IParameter
clone, getCodeReplacementString, getContext, getContextIndex, getContextSpecificId, getDataType, getSource, getTargetFieldDescriptor, getToken, getValue, setContext, setDataType, setSource, setValue
 
Methods inherited from interface planetj.dataengine.parameter.IJDBCSQLParameter
isSQLParameter, setSQLParameter
 

Constructor Detail

SQLPromptParameter

public SQLPromptParameter()
Method Detail

getComparison

public SQLComparison getComparison()
Gets the comparison for this parameter


getDisplayField

public Field getDisplayField(ExecutingContext ec)
                      throws CMException
Gets the field to use when displaying a prompt to the user.

Specified by:
getDisplayField in interface IDisplayParameter
Overrides:
getDisplayField in class RequestPromptParameter
Parameters:
ec - current context in which code is executing.
Returns:
parameter's Field object to display.
CMException

getDisplayFieldDescriptor

public FieldDescriptorRow getDisplayFieldDescriptor()
                                             throws CMException
Gets the field descriptor to use when prompting the user for the parameter value. This may or may not be the same as the target field descriptor

CMException

getOperationString

public String getOperationString()
Gets a String representing an operation which applies to this parameter. "<=", "IS NULL", and "BETWEEN" are all examples of possible operation strings


getParameterName

public String getParameterName()
                        throws CMException
Gets the name of this parameter (may be null).

Specified by:
getParameterName in interface INamedParameter
Overrides:
getParameterName in class RequestParameter
CMException

getSQLContext

public SQLContext getSQLContext()
Gets the SQLContext associated with this parameter


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
Overrides:
loadValueFromSource in class RequestParameter
CMException

setComparison

public void setComparison(SQLComparison comparison)
Sets the comparison for this parameter


setOperationString

public void setOperationString(String operationString)
Sets a String representing an operation which applies to this parameter. "<=", "IS NULL", and "BETWEEN" are all examples of possible operation strings


setToken

public void setToken(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 RequestPromptParameter
CMException