planetj.dataengine.parameter
Class SQLPromptParameter

java.lang.Object
  extended byplanetj.dataengine.parameter.AbstractParameter
      extended byplanetj.dataengine.parameter.AbstractNamedParameter
          extended byplanetj.dataengine.parameter.RequestParameter
              extended byplanetj.dataengine.parameter.RequestPromptParameter
                  extended byplanetj.dataengine.parameter.SQLPromptParameter
All Implemented Interfaces:
java.lang.Cloneable, IDisplayParameter, IJDBCSQLParameter, INamedParameter, IParameter, java.io.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, PARAMETER_VALUE_ACTUAL, PARAMETER_VALUE_DISPLAY, PARAMETER_VALUE_UNKNOWN
 
Constructor Summary
SQLPromptParameter()
           
 
Method Summary
 SQLComparison getComparison()
          Deprecated. Because it's not used
 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.
protected  int getFieldDescriptorId()
          Gets the ID of the field descriptor to use for display purposes.
 java.lang.String getOperationString()
          Gets a String representing an operation which applies to this parameter.
 java.lang.String getParameterName()
          Gets the name of this parameter (may be null).
 SQLContext getSQLContext()
          Gets the SQLContext associated with this parameter
 java.lang.Object getValue()
          Gets the value of this parameter
 java.lang.Object loadValueFromSource(java.lang.Object source, int valueType)
          Loads this parameter's value from a source.
 void setComparison(SQLComparison comparison)
          Deprecated. Because it's not used
 void setOperationString(java.lang.String operationString)
          Sets a String representing an operation which applies to this 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 this parameter, and possibly the value of its contained display field as well
 void setValue(java.lang.Object value, boolean useField)
          Sets the value of this parameter, and possibly the value of its contained display field as well
 
Methods inherited from class planetj.dataengine.parameter.RequestPromptParameter
clearValue, cloneParameter, getDisplayField, isDisplay, setDisplay
 
Methods inherited from class planetj.dataengine.parameter.AbstractNamedParameter
getValueKey, setValueKey
 
Methods inherited from class planetj.dataengine.parameter.AbstractParameter
clone, equals, getCodeReplacementString, getContext, getContextIndex, getContextSpecificId, getDataType, getDefaultValueAsString, getId, getSource, getTargetFieldDescriptor, getToken, hasAssignedValue, hashCode, isSQLParameter, isValueLoaded, loadValueFromSource, setContext, setContextIndex, setContextInternal, setDataType, 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.IParameter
clone, getCodeReplacementString, getContext, getContextIndex, getContextSpecificId, getDataType, getSource, getTargetFieldDescriptor, getToken, hasAssignedValue, loadValueFromSource, setContext, setDataType, setSource
 
Methods inherited from interface planetj.dataengine.parameter.IJDBCSQLParameter
isSQLParameter, setSQLParameter
 

Constructor Detail

SQLPromptParameter

public SQLPromptParameter()
Method Detail

getComparison

public SQLComparison getComparison()
Deprecated. Because it's not used

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.
Throws:
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

Throws:
CMException

getFieldDescriptorId

protected int getFieldDescriptorId()
Gets the ID of the field descriptor to use for display purposes. A negative value indicates that no display FD was specified, and the default FD should be used


getOperationString

public java.lang.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 java.lang.String getParameterName()
                                  throws CMException
Gets the name of this parameter (may be null).

Specified by:
getParameterName in interface INamedParameter
Overrides:
getParameterName in class AbstractNamedParameter
Throws:
CMException

getSQLContext

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


getValue

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

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

loadValueFromSource

public java.lang.Object loadValueFromSource(java.lang.Object source,
                                            int valueType)
                                     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
Throws:
CMException

setComparison

public void setComparison(SQLComparison comparison)
Deprecated. Because it's not used

Sets the comparison for this parameter


setOperationString

public void setOperationString(java.lang.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(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 RequestPromptParameter
Throws:
CMException

setValue

public void setValue(java.lang.Object value)
              throws CMException
Sets the value of this parameter, and possibly the value of its contained display field as well

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

setValue

public void setValue(java.lang.Object value,
                     boolean useField)
              throws CMException
Sets the value of this parameter, and possibly the value of its contained display field as well

Parameters:
value - The value which is being set
useField - When true, the value passed in is used to set the field's value, and then the field's SQL value is used to set this parameter's value. When false, the value is sent directly to the parameter; the field is ignored.
Throws:
CMException