protected static class AbstractParameter.Scope extends java.lang.Object implements OutputParameterAssigner
After exiting a function or procedure, the
OutputParameterAssigner.processAssignments(String, boolean)
method is invoked, which
causes each field assigner to assign the current value of its parameter value back to the
associated DMO property.
Modifier and Type | Field and Description |
---|---|
private java.util.List<AbstractExtentParameter> |
extentParameters
The list with the wrapped extent parameters, created lazily.
|
private java.util.Map<BaseDataType,AbstractSimpleParameter> |
simpleParameters
Map of output simple parameter assigners for this scope, created lazily.
|
Modifier | Constructor and Description |
---|---|
protected |
Scope() |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Some error occurred.
|
void |
addExtentParameter(AbstractExtentParameter<?> param)
Registers an extent parameter wrapper class to be included in the scope processing.
|
protected void |
addSimpleParameter(AbstractSimpleParameter assigner)
Add a parameter assigner to this scope.
|
protected void |
clear()
Clears internal data.
|
protected boolean |
isParameter(BaseDataType key)
Check if the
BaseDataType passed as parameter is used for lookup of an
OUTPUT parameter. |
void |
processAssignments(java.lang.String endingRoutine,
boolean function)
Cause each (if any) field assigner in the current scope to assign the current value of
its parameter value back to the DMO property with which it is associated.
|
protected void |
updateSimpleParameter(BaseDataType key,
BaseDataType newVar,
java.lang.reflect.Constructor<?> convCtor)
Update the wrapper variable for a
AbstractOutputParameterAssigner . |
private java.util.Map<BaseDataType,AbstractSimpleParameter> simpleParameters
private java.util.List<AbstractExtentParameter> extentParameters
public void abort()
abort
in interface OutputParameterAssigner
public void processAssignments(java.lang.String endingRoutine, boolean function)
processAssignments
in interface OutputParameterAssigner
endingRoutine
- The legacy name of the routine that is ending when these back assignments are
performed.function
- true
if the called routine is a function.protected void addSimpleParameter(AbstractSimpleParameter assigner)
assigner
- Simple field assigner.protected boolean isParameter(BaseDataType key)
BaseDataType
passed as parameter is used for lookup of an
OUTPUT
parameter.key
- The variable for lookup in the current scope.true
if the content of key
will be assigned back on return with
success.protected void updateSimpleParameter(BaseDataType key, BaseDataType newVar, java.lang.reflect.Constructor<?> convCtor)
AbstractOutputParameterAssigner
.key
- The old key variable. May be the intermediary wrapper for a field or the real
variable passed as *OUTPUT parameter.newVar
- The new wrapper variable that will be used inside the calling procedure. At the
end of the call its value will be converted using convCtor
and assigned
to wrapped field or original variable.convCtor
- The conversion constructor that will cast the new variable to old variable type
in order to be assigned to field.public void addExtentParameter(AbstractExtentParameter<?> param)
param
- Extent parameter wrapper class.protected void clear()