private static class ArrayAssigner.WorkArea extends java.lang.Object implements Scopeable
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<BaseDataType[],java.lang.Boolean> |
dynamicArrayCaseSens
Map of text dynamic array case-sensitive.
|
private java.util.Map<BaseDataType[],java.lang.Integer> |
dynamicArrayPrecisions
Map of decimal dynamic array precisions.
|
private java.util.Deque<java.util.Set<BaseDataType[]>> |
dynamicArrays
Stack of dynamic-extent arrays, per each scope.
|
private java.util.Map<object<? extends _BaseObject_>[],java.lang.Class<? extends _BaseObject_>> |
dynamicArrayType
Mapping of the dynamic extent underlying 4GL class type - required when setting the
size of this array.
|
private java.util.Map<java.lang.Object,java.util.Deque<java.util.Map<BaseDataType[],java.lang.Integer>>> |
dynamicUndoableArrays
Stack of undoable dynamic-extent arrays, per each scope and each external program.
|
private java.util.Deque<java.util.Map<BaseDataType[],AbstractExtentParameter<?>>> |
extentParameters
Map of extent parameter instances
|
private java.util.Set<BaseDataType[]> |
pendingDynamicArrays
The dynamic arrays declared before the next top-level block will start, to be registered with it.
|
private java.util.Map<BaseDataType[],AbstractExtentParameter<?>> |
pendingExtentParameters
The extent arguments to be passed to the next top-level block, to be registered with it.
|
private java.util.Map<java.lang.Object,java.util.Set<BaseDataType[]>> |
persistentProcDynArrays
Map of dynamic arrays created in a persistent program.
|
private ProcedureManager.ProcedureHelper |
pm
Helper to use the ProcedureManager without any context local lookups.
|
private TransactionManager.TransactionHelper |
tm
Helper to use the TM without any context local lookups.
|
| Constructor and Description |
|---|
WorkArea() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Boolean |
getCaseSensitive(Text[] array)
Retrieve the case sensitivity of the supplied array or
null if case sens
was not previously set for the array argument. |
java.lang.Integer |
getDecimalPrecision(decimal[] array)
Retrieve the decimal precision of the supplied array or
null if precision
was not previously set for the array argument. |
<T extends BaseDataType> |
getExtentParameter(BaseDataType[] array)
Returns a previously registered extent parameter instance,
see
registerExtentParameter(AbstractExtentParameter) for more info. |
ScopeId |
getScopeId()
Get the
ScopeId for the instance. |
boolean |
isRegistered(BaseDataType[] array)
Returns
true if the supplied array argument has been
previously registered, false otherwise. |
void |
register(BaseDataType[] array)
Register the given
array as a dynamic-extent array. |
void |
register(BaseDataType[] array,
boolean pending)
Register the given
array as a dynamic-extent array. |
void |
registerDynamicUndoable(java.util.Set<BaseDataType[]> arrays,
int transLevel)
Register the set of given arrays as dynamic extent.
|
<T extends BaseDataType> |
registerExtentParameter(AbstractExtentParameter<T> extentParameter)
Registers an unfixed indeterminate extent parameter instance into
the current scope.
|
void |
reRegister(BaseDataType[] oldArray,
BaseDataType[] newArray,
ArrayAssigner.WorkArea wa)
Deregisters
oldArray and registers newArray into the scope
previously occupied by oldArray. |
void |
scopeDeleted()
Provides a notification that an external scope is about to be deleted.
|
void |
scopeFinished()
Provides a notification that a scope is about to be exited.
|
void |
scopeStart(BlockDefinition block)
Provides a notification that a new scope is about to be entered.
|
void |
setCaseSensitive(Text[] array,
boolean caseSens)
Sets case sensitivity for the array argument.
|
void |
setDecimalPrecision(decimal[] array,
int precision)
Sets decimal precision for the array argument.
|
private final ProcedureManager.ProcedureHelper pm
private TransactionManager.TransactionHelper tm
private java.util.Deque<java.util.Set<BaseDataType[]>> dynamicArrays
private java.util.Set<BaseDataType[]> pendingDynamicArrays
private java.util.Map<java.lang.Object,java.util.Deque<java.util.Map<BaseDataType[],java.lang.Integer>>> dynamicUndoableArrays
private java.util.Map<BaseDataType[],java.lang.Integer> dynamicArrayPrecisions
private java.util.Map<BaseDataType[],java.lang.Boolean> dynamicArrayCaseSens
private java.util.Map<BaseDataType[],AbstractExtentParameter<?>> pendingExtentParameters
private java.util.Deque<java.util.Map<BaseDataType[],AbstractExtentParameter<?>>> extentParameters
private java.util.Map<object<? extends _BaseObject_>[],java.lang.Class<? extends _BaseObject_>> dynamicArrayType
private java.util.Map<java.lang.Object,java.util.Set<BaseDataType[]>> persistentProcDynArrays
public void scopeStart(BlockDefinition block)
ScopeablescopeStart in interface Scopeableblock - The explicit block definition which required this notification.public void scopeDeleted()
ScopeablescopeDeleted in interface Scopeablepublic void scopeFinished()
ScopeablescopeFinished in interface Scopeablepublic ScopeId getScopeId()
ScopeId for the instance.getScopeId in interface ScopeableScopeId.ARRAY_ASSIGNER.public boolean isRegistered(BaseDataType[] array)
true if the supplied array argument has been
previously registered, false otherwise.array - A valid array instance.public void register(BaseDataType[] array)
array as a dynamic-extent array. If the array is already
registered the method doesn't register it again and simply returns.
The registration of this array will be done in the current block - the API is executed only by legacy APIs which are executed within the top-level block.
array - The dynamic-extent array reference, must not be null.public void register(BaseDataType[] array, boolean pending)
array as a dynamic-extent array. If the array is already
registered the method doesn't register it again and simply returns.array - The dynamic-extent array reference, must not be null.pending - Flag indicating if the copy is pending (as the call is made before the top-level block starts).public void registerDynamicUndoable(java.util.Set<BaseDataType[]> arrays, int transLevel)
arrays - The set of dynamic arrays to register.transLevel - The transaction nesting level where this instance was created.public void reRegister(BaseDataType[] oldArray, BaseDataType[] newArray, ArrayAssigner.WorkArea wa)
oldArray and registers newArray into the scope
previously occupied by oldArray.oldArray - A valid array instance.newArray - A valid array instance.wa - The ArrayAssigner.WorkArea instance.public java.lang.Integer getDecimalPrecision(decimal[] array)
null if precision
was not previously set for the array argument.array - Array representing an extent variable.null, see above.public java.lang.Boolean getCaseSensitive(Text[] array)
null if case sens
was not previously set for the array argument.array - Array representing an extent variable.null, see above.public void setDecimalPrecision(decimal[] array, int precision)
array - The array to be set with the supplied precision.precision - Decimal precision to be set for the supplied array.public void setCaseSensitive(Text[] array, boolean caseSens)
array - The array to be set with the supplied case sensitivity.caseSens - Case sensitivity to be set for the supplied array.public <T extends BaseDataType> void registerExtentParameter(AbstractExtentParameter<T> extentParameter)
AbstractExtentParameter.getParameter() as the registration key.
To get the registered instance back, use that reference in the call to
getExtentParameter(BaseDataType[]).extentParameter - An extent parameter instance.public <T extends BaseDataType> AbstractExtentParameter<T> getExtentParameter(BaseDataType[] array)
registerExtentParameter(AbstractExtentParameter) for more info.array - A valid dynamic array instance.