|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectplanetj.dataengine.parameter.AbstractParameter
A general implementation of the IParameter interface
| 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 | |
AbstractParameter()
|
|
| Method Summary | |
java.lang.Object |
clearValue()
Clears this parameter's value, returning the current value after it has been cleared. |
java.lang.Object |
clone()
Clones this parameter |
IParameter |
cloneParameter()
Clones this parameter |
boolean |
equals(java.lang.Object o)
Tests if the context index, token, and value of the passed IParameter object equal those of this object |
java.lang.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 |
java.lang.String |
getContextSpecificId()
Gets the context specific ID of this parameter. |
int |
getDataType()
Gets the SQL data type of the parameter |
java.lang.String |
getDefaultValueAsString()
Gets this parameter's default value as a String |
java.lang.String |
getId()
Returns an ID which uniquely identifies this 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. |
java.lang.String |
getToken()
Gets the literal token that was used to denote this parameter in code |
java.lang.Object |
getValue()
Gets the value of the parameter |
boolean |
hasAssignedValue()
Tests if this parameter has been assigned a value. |
int |
hashCode()
Gets a hashCode based on the context index, token, and value of this parameter |
boolean |
isSQLParameter()
Tests if this parameter should be sent as a parameter to the DB if it is included in a SQL statement. |
boolean |
isValueLoaded()
Tests if the parameter has loaded a value. |
java.lang.Object |
loadValueFromSource(java.lang.Object source)
Loads this parameter's value from a source. |
java.lang.Object |
loadValueFromSource(java.lang.Object o,
int valueType)
Loads this parameter's value from a source. |
void |
setContext(IContext context)
Sets the parameter's context |
protected void |
setContextIndex(int newContextIndex)
Sets the (0-based) index of this parameter within its context |
protected void |
setContextInternal(IContext context)
Sets the parameter's context |
void |
setDataType(int newDataType)
Sets the SQL data type of the parameter |
void |
setDefaultValueAsString(java.lang.String value)
Sets this parameter's default value as a String |
void |
setSource(IParameterSource newSource)
Sets the object from which this parameter was generated. |
void |
setSQLParameter(boolean sqlp)
Sets if this parameter should be sent as a parameter to the DB if it is included in a SQL statement. |
void |
setToken(java.lang.String token)
Sets the literal token that was used to denote this parameter in code. |
protected void |
setTokenInternal(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 |
protected void |
setValueInternal(java.lang.Object value)
Sets the value of the parameter |
java.lang.String |
toString()
Returns a String representation of this object |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AbstractParameter()
| Method Detail |
public java.lang.Object clearValue()
throws CMException
clearValue in interface IParameterCMExceptionpublic final java.lang.Object clone()
clone in interface IParameterpublic IParameter cloneParameter()
cloneParameter in interface IParameterpublic boolean equals(java.lang.Object o)
public java.lang.String getCodeReplacementString()
getCodeReplacementString in interface IParameterpublic IContext getContext()
getContext in interface IParameterpublic int getContextIndex()
getContextIndex in interface IParameterpublic java.lang.String getContextSpecificId()
getContextSpecificId in interface IParameterpublic int getDataType()
getDataType in interface IParameterpublic java.lang.String getDefaultValueAsString()
public java.lang.String getId()
public IParameterSource getSource()
getSource in interface IParameter
public FieldDescriptorRow getTargetFieldDescriptor()
throws CMException
getTargetFieldDescriptor in interface IParameterCMExceptionpublic java.lang.String getToken()
getToken in interface IParameterpublic java.lang.Object getValue()
getValue in interface IParameterpublic int hashCode()
public boolean hasAssignedValue()
hasAssignedValue in interface IParameterpublic boolean isSQLParameter()
public boolean isValueLoaded()
public final java.lang.Object loadValueFromSource(java.lang.Object source)
throws CMException
IParameter
loadValueFromSource in interface IParametersource - source Object to use to extract the parameters value
CMException
public java.lang.Object loadValueFromSource(java.lang.Object o,
int valueType)
throws CMException
IParameter
loadValueFromSource in interface IParametero - source Object to use to extract the parameters valuevalueType - the type of value to extract. (e.g. actual value or a display value)
CMExceptionpublic void setContext(IContext context)
setContext in interface IParameterprotected void setContextIndex(int newContextIndex)
protected final void setContextInternal(IContext context)
public void setDataType(int newDataType)
setDataType in interface IParameterpublic void setDefaultValueAsString(java.lang.String value)
public void setSource(IParameterSource newSource)
setSource in interface IParameterpublic void setSQLParameter(boolean sqlp)
public void setToken(java.lang.String token)
throws CMException
setToken in interface IParameterCMExceptionprotected final void setTokenInternal(java.lang.String token)
public void setValue(java.lang.Object value)
throws CMException
setValue in interface IParameterCMExceptionprotected final void setValueInternal(java.lang.Object value)
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||