planetj.dataengine.parameter
Interface IParameter

All Superinterfaces:
Cloneable, Serializable
All Known Subinterfaces:
IDisplayParameter, IJDBCSQLParameter
All Known Implementing Classes:
AbstractParameter, ContextParameterParameter, ExecutingContextParameter, FieldOrUsageIdParameter, ParameterManager, ParameterParameter, RequestAttribute, RequestParameter, RequestPromptParameter, RuntimeParameter

public interface IParameter
extends Cloneable, Serializable

A Parameter in a DataEngnine operation. All classes which implement this interface should provide a default constructor


Field Summary
static char CONTEXT_SPECIFIC_ID_END
          Char with which all parameter context specific id's (NOT unqiue id's) end
static char CONTEXT_SPECIFIC_ID_START
           
static int DEFAULT_DATA_TYPE
          Default data type for parameter values.
static char ID_START
          Char with which all parameter context specific id's begin
static String PARAMETER_INDEX_PREFIX
          Constant which can be used to identify a parameter by index
 
Method Summary
 Object clearValue()
          Clears this parameter's value, returning the current value after it has been cleared.
 Object clone()
          Clones this parameter
 IParameter cloneParameter()
          Clones this parameter
 String getCodeReplacementString()
          Gets the String which represents this parameter's value in a String of code.
 IContext getContext()
          Gets the parameter's context
 int getContextIndex()
          Gets the (0-based) index of this parameter within its context
 String getContextSpecificId()
          Gets the context specific ID of this parameter.
 int getDataType()
          Gets the SQL data type of the parameter
 IParameterSource getSource()
          Gets the object from which this parameter was generated.
 FieldDescriptorRow getTargetFieldDescriptor()
          Gets a field descriptor describing this parameter's target (i.e.
 String getToken()
          Gets the literal token that was used to denote this parameter in code
 Object getValue()
          Gets the value of the parameter
 Object loadValueFromSource(Object source)
          Loads this parameter's value from a source.
 void setContext(IContext context)
          Sets the parameter's context
 void setDataType(int newDataType)
          Sets the SQL data type of the parameter
 void setSource(IParameterSource source)
          Sets the object from which this parameter was generated.
 void setToken(String token)
          Sets the literal token that was used to denote this parameter in code
 void setValue(Object value)
          Sets the value of the parameter
 

Field Detail

DEFAULT_DATA_TYPE

public static final int DEFAULT_DATA_TYPE
Default data type for parameter values.

See Also:
Constant Field Values

ID_START

public static final char ID_START
Char with which all parameter context specific id's begin

See Also:
Constant Field Values

CONTEXT_SPECIFIC_ID_START

public static final char CONTEXT_SPECIFIC_ID_START
See Also:
Constant Field Values

CONTEXT_SPECIFIC_ID_END

public static final char CONTEXT_SPECIFIC_ID_END
Char with which all parameter context specific id's (NOT unqiue id's) end

See Also:
Constant Field Values

PARAMETER_INDEX_PREFIX

public static final String PARAMETER_INDEX_PREFIX
Constant which can be used to identify a parameter by index

See Also:
Constant Field Values
Method Detail

clearValue

public Object clearValue()
                  throws CMException
Clears this parameter's value, returning the current value after it has been cleared.

CMException

clone

public Object clone()
Clones this parameter


cloneParameter

public IParameter cloneParameter()
Clones this parameter


getCodeReplacementString

public String getCodeReplacementString()
                                throws DataEngineException
Gets the String which represents this parameter's value in a String of code. For SQL parameters, this will be a question mark. For most other parameters, this will be a String representation of the parameter value

DataEngineException

getContext

public IContext getContext()
Gets the parameter's context


getContextIndex

public int getContextIndex()
Gets the (0-based) index of this parameter within its context


getContextSpecificId

public String getContextSpecificId()
Gets the context specific ID of this parameter. This is just the context index, with the ID_START char tacked onto the beginning of it and the CONTEXT_SPECIFIC_ID_END char tacked onto the end. Two parameters in different contexts may have the same context specific ID


getDataType

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


getSource

public IParameterSource getSource()
Gets the object from which this parameter was generated. This value may be null


getTargetFieldDescriptor

public FieldDescriptorRow getTargetFieldDescriptor()
                                            throws CMException
Gets a field descriptor describing this parameter's target (i.e. where this parameter's value is being set). Not all parameters will have a target field descriptor.

CMException

getToken

public String getToken()
Gets the literal token that was used to denote this parameter in code


getValue

public Object getValue()
Gets the value of the 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.

CMException

setContext

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


setDataType

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


setSource

public void setSource(IParameterSource source)
Sets the object from which this parameter was generated. This value may be null


setToken

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

CMException

setValue

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

CMException