public abstract class AbstractSimpleParameter extends AbstractParameter
Upon exit from the procedure or function with which it is associated, it attempts to assign the current value of its contained variable back into the associated item (variable / DMO) optionally using the conversion constructor provided. This may trigger normal validation processing, which may produce error conditions.
AbstractParameter.Scope, AbstractParameter.WorkArea
Modifier and Type | Field and Description |
---|---|
protected java.lang.reflect.Constructor<?> |
convCtor
The optional conversion constructor that will cast the new variable to old variable type in
order to be assigned to field.
|
protected BaseDataType |
outputValue
Data wrapper which is used as a procedure or function parameter.
|
context, LOG
Modifier | Constructor and Description |
---|---|
protected |
AbstractSimpleParameter(BaseDataType outputValue)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
assign()
Assign the current value of the parameter variable back to the associated item (variable or
DMO property.
|
protected BaseDataType |
getLocalParam()
Get the variable container used as parameter inside the procedure body.
|
static void |
update(BaseDataType key,
BaseDataType newVar,
java.lang.reflect.Constructor<?> convCtor)
Update the wrapper variable for a
OutputParameterAssigner . |
getCurrentScope, getScopeable, isParameter
protected BaseDataType outputValue
The variable is used as a key for fast-finding the original item that needs to be updated at the return form the called procedure. In this regard it must be unique in the scope! Indeed, it's at least a strange construct to have the same variable declared twice in OUTPUT mode when calling a procedure.
protected java.lang.reflect.Constructor<?> convCtor
protected AbstractSimpleParameter(BaseDataType outputValue)
outputValue
- Parameter value to and from which we will assign.protected BaseDataType getLocalParam()
getLocalParam
in class AbstractParameter
protected abstract void assign()
public static void update(BaseDataType key, BaseDataType newVar, java.lang.reflect.Constructor<?> convCtor)
OutputParameterAssigner
. Sometimes is required to
change the wrapper variable for an item (Eg. when the ControlFlowOps
detects a
conversion type is necessary).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.