|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanetj.dataengine.AbstractContext
!!DA (6/11/2003 8:06:21 AM) documentation needed
Field Summary | |
static java.lang.String |
className
Class name. |
static int |
DEFAULT_TYPE
Default type for parameter values. |
protected java.lang.String |
mCode
Get this context's code string (may contain possible parameters). |
protected boolean |
mLocked
Variable used to lock this context. |
protected boolean |
mParameterized
Indicates if this context is parameterized (if its code string contains parameters). |
protected java.util.List |
mParameterNames
List of parameter names. |
protected Row |
mParameterSource
Source Row used to set the parameter values. |
protected java.util.List |
mParameterValues
Parameter values. |
static java.lang.String |
PARAM_ESCAPE_NUMBERED
|
static java.lang.String |
PARAM_ESCAPE_TABLE
|
static java.lang.String |
PARAM_ESCAPE_USAGE_ID
|
static java.lang.String |
PARAM_ESCAPE_USER
|
static java.lang.String |
PARAM_ESCAPE_USER_USAGE_ID
|
static java.lang.String |
PARAM_NUMBERED
|
static java.lang.String |
PARAM_TABLE
|
static java.lang.String |
PARAM_USAGE_ID
|
static java.lang.String |
PARAM_USER
|
static java.lang.String |
PARAM_USER_USAGE_ID
|
protected static int |
TYPE_TABLE_PARAMETER
|
Constructor Summary | |
AbstractContext()
AbstractContext constructor comment. |
|
AbstractContext(ExecutingContext ec)
AbstractContext constructor comment. |
|
AbstractContext(IUser user)
Deprecated. replaced with AbstractContext(ExecutingContext) |
Method Summary | |
protected java.lang.StringBuffer |
appendParameters(java.lang.StringBuffer info)
Appends this context's String representation of its parameters on the given buffer. |
protected java.lang.StringBuffer |
appendProperties(java.lang.StringBuffer info)
Gets a String representation of this context. |
void |
clear()
Wipes out info in this context, restoring the default values. |
void |
clearParameterValues()
Clears all the parameter values for this context, as well as any validation exceptions. |
java.lang.Object |
clone()
Creates an unlocked copy of this context. |
protected java.lang.String |
createParameter(java.lang.String parameterToken)
Creates a parameter of the appropriate type, stores it in this context, and returns a String to take the place of the parameter token in the String of code |
static boolean |
equals(java.lang.Object one,
java.lang.Object two)
|
abstract java.lang.Object |
execute()
Executes this context. |
java.lang.String |
getCode()
Gets this context's code string. |
java.lang.String |
getCreationSource()
Gets this context's source of where it was created. |
long |
getDataTimestamp()
Gets the time when the data in this context was read from its source. |
java.util.Iterator |
getDisplayParameters()
Iterates over the parameters in this context which should be displayed to the user. |
ExecutingContext |
getExecutingContext()
Gets this context's executing context. |
IDisplayParameter |
getFirstDisplayParameter()
Gets the first parameter which the user is expected to enter information into. |
IParameter |
getFirstParameterForInput()
Gets the first parameter which the user is expected to enter information into. |
java.lang.String |
getNavigationKey()
Get the key used to store/retrieve this Row to/from navigation. |
java.lang.String |
getNavigationListKey()
Get the key used to store and retrieve a List of Rows that have been put into navigation. |
java.lang.String |
getOriginalCode()
Gets this context's original code string. |
IParameter |
getParameter(int index)
Gets a parameter, based on its index |
IParameter |
getParameter(java.lang.String uniqueId)
Gets a parameter by its unique id, or by its context specific id |
protected java.lang.Class |
getParameterClass(java.lang.String parameterToken)
Returns the appropriate class for creating a parameter based on the parameter token. |
ParameterCollection |
getParameterCollection()
Gets the ParameterCollection which contains this context's parameters |
int |
getParameterCount()
Gets the number of parameters present in this context |
int |
getParameterCount(java.lang.Class paramClass)
Gets the number of parameters present in this context which are of the specified class (or are subclasses of the specified class) |
java.util.Iterator |
getParameterDisplayFields()
Deprecated. (6/11/2003 8:01:23 AM) This method will not allow setting the Field's default value from a user property. Replaced by getParameterDisplayFields(ExecutingContext) |
java.util.Iterator |
getParameterDisplayFields(ExecutingContext ec)
Gets an Iterator for all of the display fields for this context's display parameters. |
Row |
getParameterRow()
Convience method to get the parameter row from the parameter collection. |
java.util.List |
getParameters()
Gets a List of this context's IParameter objects. |
java.util.Iterator |
getParameters(java.lang.Class paramType)
Iterates over the parameters in this context which are compatable with the specified Java type |
Row |
getParameterSource()
Gets the row that was used to set the named parameters in this context, or null if no such row exists. |
ValidationExceptionCollection |
getParameterValidationExceptions()
Be careful when you call this method because it is derived and spins through all the fields. |
int |
getParameterValuesType()
Get the type of value a parameter holds. |
AbstractContext |
getPrimaryContext()
Gets this context's primary context. |
PropertyGroup |
getPropertyGroup(java.lang.String groupName)
Gets the first PropertyGroup with the given property group name. |
abstract PropertyGroupList |
getPropertyGroups()
Get all the property groups associated with this context. |
java.util.List |
getPropertyGroups(java.lang.String groupName)
Get this RowCollection's property groups with the given group name. |
java.util.Iterator |
getRowParameters()
Gets an Iterator for iterating over this context's RowParameter objects |
protected int |
handleParameter(int startIndex,
java.lang.StringBuffer code)
Handles a parameter token in a StringBuffer of code. |
protected void |
initializeAndStore(IParameter param,
java.lang.String parameterToken)
Initializes and stores the parameter in this context |
boolean |
isCloneNeeded()
Test to see if tiis navigation object should be clone upon storing and retrieving. |
boolean |
isContainsDisplayParameters()
Tests if there are any parameters which should be displayed |
boolean |
isContainsParameters(java.lang.Class paramType)
Tests if this context contains any parameters which are of the specified Java type, or are subclasses of the specified Java type. |
boolean |
isLocked()
Check to see if this context is locked. |
boolean |
isParameterized()
Check if this context code is parameterized. |
protected abstract boolean |
isParameterTokenEnd(char c)
Tests if the specified character signals the end of a parameter token |
protected boolean |
isParameterTokenEnd(int index,
java.lang.StringBuffer sb)
Tests if the specified character in the StringBuffer ends a parameter token |
boolean |
isRefreshing()
Check whether or not this context is refreshing its original return object. |
boolean |
isSecondaryContext()
Tests if this context is a secondary context. |
void |
loadGlobalValues()
Loads Global variables. |
void |
loadParameterRequestAndSessionValues()
When this method is invoked, values are taken from request parameters, request attributes, and session attributes. |
void |
loadSQLTextReplacementValues()
Loads Global SQL Text Replacement variables. |
void |
loadUserAndExecutingContextValues()
When this method is invoked, values are taken from the user object and executing context and set on the appropriate Parameters. |
void |
lock()
Locks this context, preventing its state from being altered. |
void |
parameterAltered()
Callback method so that parameters can inform their context when they are alerted |
protected java.lang.String |
prepareForExecution()
This method is invoked just before the context's code is executed. |
protected abstract java.lang.String |
rectifyCode(java.lang.String code)
Subclasses need to handle the logic of finding parameters out of the code string. |
void |
removeNavigationKey()
Clears out any navigation key that may have been set on this Row. |
void |
setCode(java.lang.String code)
Sets this context's code string. |
void |
setCode(java.lang.String code,
boolean shadowize)
Sets this context's code string. |
protected void |
setCodeInternal(java.lang.String code)
Sets this context's code string. |
void |
setCreationSource(java.lang.String creationSource)
Sets the source where this context was created. |
void |
setDataTimestamp(long timestamp)
Sets the time when the data in this context was read from its source. |
void |
setExecutingContext(ExecutingContext excontext)
Sets this context's executing context. |
void |
setNavigationKey(java.lang.String key)
Set the key used to store/retrieve this Row to/from navigation. |
void |
setParameterCollection(ParameterCollection newParameters)
Sets the ParameterCollection which contains this context's parameters. |
void |
setParameterDisplayValues(Row row)
Provides values for all of this context's display parameters. |
void |
setParameterValue(int position,
int value)
Provides a value to a parameter for this context's code string. |
void |
setParameterValue(int position,
java.lang.Object value)
Provides a value to a parameter for this context's code string. |
void |
setParameterValues(Row row)
Provides values for all of this context's RowParameters and ContextParameterParameters. |
void |
setParameterValues(java.lang.String parameterId,
java.lang.Object value)
Sets the value of parameters in this context |
void |
setParameterValuesType(int parameterValuesType)
Set the type of value parameters are to hold. |
void |
setPrimaryContext(AbstractContext ac)
Sets this context's primary context. |
void |
setRefreshing(boolean refreshing)
Set whether or not this context is refreshing its original return object. |
java.lang.String |
toString()
Gets a String representation of this context |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String className
protected boolean mLocked
protected java.util.List mParameterValues
protected java.util.List mParameterNames
protected java.lang.String mCode
protected boolean mParameterized
protected Row mParameterSource
public static final java.lang.String PARAM_USER
public static final java.lang.String PARAM_NUMBERED
public static final java.lang.String PARAM_USAGE_ID
public static final java.lang.String PARAM_USER_USAGE_ID
public static final java.lang.String PARAM_TABLE
public static final java.lang.String PARAM_ESCAPE_USER
public static final java.lang.String PARAM_ESCAPE_NUMBERED
public static final java.lang.String PARAM_ESCAPE_USAGE_ID
public static final java.lang.String PARAM_ESCAPE_USER_USAGE_ID
public static final java.lang.String PARAM_ESCAPE_TABLE
public static final int DEFAULT_TYPE
protected static final int TYPE_TABLE_PARAMETER
Constructor Detail |
public AbstractContext()
public AbstractContext(IUser user)
public AbstractContext(ExecutingContext ec)
Method Detail |
protected java.lang.StringBuffer appendParameters(java.lang.StringBuffer info)
protected java.lang.StringBuffer appendProperties(java.lang.StringBuffer info)
public void clear() throws DataEngineException
DataEngineException
public void clearParameterValues() throws CMException
CMException
public java.lang.Object clone()
clone
in interface INavigationObject
protected java.lang.String createParameter(java.lang.String parameterToken) throws CMException
parameterToken
- The token such as "?", "??MY_COLUMN", or "???^22"
which indicates what type of parameter should be created
CMException
public static final boolean equals(java.lang.Object one, java.lang.Object two)
public abstract java.lang.Object execute() throws CMException
CMException
public java.lang.String getCode()
public java.lang.String getCreationSource()
public long getDataTimestamp()
public java.util.Iterator getDisplayParameters()
getDisplayParameters
in interface IContext
public ExecutingContext getExecutingContext()
getExecutingContext
in interface IContext
public IDisplayParameter getFirstDisplayParameter()
public IParameter getFirstParameterForInput()
public java.lang.String getNavigationKey()
getNavigationKey
in interface INavigationObject
public java.lang.String getNavigationListKey()
getNavigationListKey
in interface INavigationObject
public java.lang.String getOriginalCode()
getOriginalCode
in interface IContext
public IParameter getParameter(int index)
getParameter
in interface IContext
public IParameter getParameter(java.lang.String uniqueId)
getParameter
in interface IContext
protected java.lang.Class getParameterClass(java.lang.String parameterToken)
parameterToken
- The token such as "?", "??MY_COLUMN", or "???^22"
which indicates what type of parameter should be createdpublic ParameterCollection getParameterCollection()
public int getParameterCount()
getParameterCount
in interface IContext
public int getParameterCount(java.lang.Class paramClass)
getParameterCount
in interface IContext
public java.util.Iterator getParameterDisplayFields()
public java.util.Iterator getParameterDisplayFields(ExecutingContext ec)
ec
- current context in which code is executing.
public Row getParameterRow() throws CMException
CMException
ParameterCollection.getParameterRow()
public java.util.List getParameters()
getParameters
in interface IContext
public java.util.Iterator getParameters(java.lang.Class paramType)
getParameters
in interface IContext
public Row getParameterSource()
public ValidationExceptionCollection getParameterValidationExceptions()
getParameterValidationExceptions
in interface IContext
public AbstractContext getPrimaryContext()
public PropertyGroup getPropertyGroup(java.lang.String groupName)
getPropertyGroup
in interface IContext
public abstract PropertyGroupList getPropertyGroups()
getPropertyGroups
in interface IContext
public java.util.List getPropertyGroups(java.lang.String groupName)
getPropertyGroups
in interface IContext
public java.util.Iterator getRowParameters()
protected int handleParameter(int startIndex, java.lang.StringBuffer code)
protected void initializeAndStore(IParameter param, java.lang.String parameterToken) throws CMException
CMException
public boolean isCloneNeeded()
INavigationObject
isCloneNeeded
in interface INavigationObject
public boolean isContainsDisplayParameters()
isContainsDisplayParameters
in interface IContext
public boolean isContainsParameters(java.lang.Class paramType)
public boolean isLocked()
public boolean isParameterized()
isParameterized
in interface IContext
protected abstract boolean isParameterTokenEnd(char c)
protected boolean isParameterTokenEnd(int index, java.lang.StringBuffer sb)
public boolean isRefreshing()
public boolean isSecondaryContext()
isSecondaryContext
in interface IContext
public void loadGlobalValues() throws DataEngineException
DataEngineException
public void loadSQLTextReplacementValues() throws DataEngineException
DataEngineException
public void loadParameterRequestAndSessionValues() throws DataEngineException
DataEngineException
public void loadUserAndExecutingContextValues() throws DataEngineException
DataEngineException
public void lock()
public void parameterAltered() throws DataEngineException
parameterAltered
in interface IContext
DataEngineException
protected java.lang.String prepareForExecution() throws DataEngineException
DataEngineException
protected abstract java.lang.String rectifyCode(java.lang.String code)
public void removeNavigationKey()
removeNavigationKey
in interface INavigationObject
public void setCode(java.lang.String code)
public void setCode(java.lang.String code, boolean shadowize)
protected void setCodeInternal(java.lang.String code)
public void setCreationSource(java.lang.String creationSource)
public void setDataTimestamp(long timestamp)
public void setExecutingContext(ExecutingContext excontext)
setExecutingContext
in interface IContext
public void setNavigationKey(java.lang.String key)
setNavigationKey
in interface INavigationObject
public void setParameterCollection(ParameterCollection newParameters)
public void setParameterDisplayValues(Row row) throws CMException
CMException
public void setParameterValue(int position, int value) throws CMException
position
- The index of the parameter whose value is being supplied.
The first parameter is 0, the second is 1, etc.value
- The value to give to the parameter.
CMException
public void setParameterValue(int position, java.lang.Object value) throws CMException
position
- The index of the parameter whose value is being supplied.
The first parameter is 0, the second is 1, etc.value
- The value to give to the parameter. This value may be null.
After the value is passed to this method it must never
be changed. If it is possible for this value to change, you
should clone it and pass a clone which will not change to this
method.
CMException
public void setParameterValues(java.lang.String parameterId, java.lang.Object value) throws CMException
setParameterValues
in interface IContext
parameterId
- A String which identifies the parameters whose values
will be set. This String can either be a context specific id,
a name, or by a named index. The context specific id looks
like ¤3¿ or ¤0¿ The parameter name is the string corresponding
to the parameter's key or column (e.g. BALANCE or VAL) A
parameter name may correspond to multiple parameters, in which
case all of these parameters will have their values set by
this method The named index is the string "_parm" with the
parameter's index appended on the end (e.g. _parm0 or _parm2)value
- The value to set parameters to
CMException
public void setParameterValues(Row row) throws CMException
setParameterValues
in interface IContext
CMException
public void setPrimaryContext(AbstractContext ac)
public void setRefreshing(boolean refreshing)
public java.lang.String toString()
public int getParameterValuesType()
getParameterValuesType
in interface IContext
public void setParameterValuesType(int parameterValuesType)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |