planetj.dataengine.parameter
Class TableParameter

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.TableParameter
All Implemented Interfaces:
java.lang.Cloneable, IDisplayParameter, IJDBCSQLParameter, INamedParameter, IParameter, java.io.Serializable

public class TableParameter
extends RequestPromptParameter

A parameter whose value is a String which indentifies a table.

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
TableParameter()
           
 
Method Summary
 FieldDescriptorRow getDisplayFieldDescriptor()
          Gets the FieldDescriptor for this parameter.
 TableDescriptor getDisplayTableDescriptor()
          Gets the TableDescriptor for this parameter
 java.lang.String getFullyQualifiedVirtualTableName()
          Gets the name of the virtual table (including the library name).
 java.lang.String getOperationString()
          Gets a String representing an operation which applies to this parameter.
 java.lang.String getRequestKey()
          Gets the key with which this parameter's value is stored in the request
 java.lang.String getVirtualLibraryName()
          Gets the name of the library containing the virtual table.
 Table getVirtualTable()
          Gets the virtual table.
 java.lang.String getVirtualTableName()
          Gets the name of the virtual table (not including the library name).
 boolean isSQLParameter()
          TableParameters can never be sent to the DB as parameters
 java.lang.Object loadValueFromSource(java.lang.Object source, int valueType)
          Loads this parameter's value from a source.
 void setContext(IContext context)
          Sets the parameter's context
 void setOperationString(java.lang.String os)
          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.
protected  void setVirtualLibraryName(java.lang.String libName)
          Sets the name of the library containing the virtual table.
protected  void setVirtualTableName(java.lang.String tableName)
          Gets the name of the virtual table (not including the library name).
 
Methods inherited from class planetj.dataengine.parameter.RequestPromptParameter
clearValue, cloneParameter, getDisplayField, getDisplayField, isDisplay, setDisplay
 
Methods inherited from class planetj.dataengine.parameter.AbstractNamedParameter
getParameterName, getValueKey, setValueKey
 
Methods inherited from class planetj.dataengine.parameter.AbstractParameter
clone, equals, getCodeReplacementString, getContext, getContextIndex, getContextSpecificId, getDataType, getDefaultValueAsString, getId, getSource, getTargetFieldDescriptor, getToken, getValue, hasAssignedValue, hashCode, isValueLoaded, loadValueFromSource, setContextIndex, setContextInternal, setDataType, setDefaultValueAsString, setSource, setSQLParameter, setTokenInternal, setValue, 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, getValue, hasAssignedValue, loadValueFromSource, setDataType, setSource, setValue
 
Methods inherited from interface planetj.dataengine.parameter.IJDBCSQLParameter
setSQLParameter
 

Constructor Detail

TableParameter

public TableParameter()
Method Detail

getDisplayFieldDescriptor

public FieldDescriptorRow getDisplayFieldDescriptor()
                                             throws CMException
Gets the FieldDescriptor for this parameter. This will be a TableDescriptor

Throws:
CMException

getDisplayTableDescriptor

public TableDescriptor getDisplayTableDescriptor()
                                          throws CMException
Gets the TableDescriptor for this parameter

Throws:
CMException

getFullyQualifiedVirtualTableName

public java.lang.String getFullyQualifiedVirtualTableName()
Gets the name of the virtual table (including the library name). The virtual table is the table that the parameterized code refers to - it may not actually exist, and it may be replaced with a different table (which must exist) before the code is executed. The only requirement for a virtual table is that is must have a table descriptor


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


getRequestKey

public java.lang.String getRequestKey()
                               throws CMException
Gets the key with which this parameter's value is stored in the request

Throws:
CMException

getVirtualLibraryName

public java.lang.String getVirtualLibraryName()
Gets the name of the library containing the virtual table. The virtual table is the table that the parameterized code refers to - it may not actually exist, and it may be replaced with a different table (which must exist) before the code is executed. The only requirement for a virtual table is that is must have a table descriptor


getVirtualTable

public Table getVirtualTable()
                      throws CMException
Gets the virtual table. The virtual table is the table that the parameterized code refers to - it may not actually exist, and it may be replaced with a different table (which must exist) before the code is executed. The only requirement for a virtual table is that is must have a table descriptor

Throws:
CMException

getVirtualTableName

public java.lang.String getVirtualTableName()
Gets the name of the virtual table (not including the library name). The virtual table is the table that the parameterized code refers to - it may not actually exist, and it may be replaced with a different table (which must exist) before the code is executed. The only requirement for a virtual table is that is must have a table descriptor


isSQLParameter

public boolean isSQLParameter()
TableParameters can never be sent to the DB as parameters

Specified by:
isSQLParameter in interface IJDBCSQLParameter
Overrides:
isSQLParameter 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

setContext

public void setContext(IContext context)
Sets the parameter's context

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

setOperationString

public void setOperationString(java.lang.String os)
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. Subclasses may override this method if they need to do additional processing on the token as long as they invoke the setTokenInternal() method to actually set the token

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

setVirtualLibraryName

protected void setVirtualLibraryName(java.lang.String libName)
Sets the name of the library containing the virtual table. The virtual table is the table that the parameterized code refers to - it may not actually exist, and it may be replaced with a different table (which must exist) before the code is executed. The only requirement for a virtual table is that is must have a table descriptor


setVirtualTableName

protected void setVirtualTableName(java.lang.String tableName)
Gets the name of the virtual table (not including the library name). The virtual table is the table that the parameterized code refers to - it may not actually exist, and it may be replaced with a different table (which must exist) before the code is executed. The only requirement for a virtual table is that is must have a table descriptor