| Modifier and Type | Field and Description |
|---|---|
private BufferManager |
bm
The buffer helper.
|
private ScopedDictionary<DataSet,java.lang.Integer> |
byReferenceParameters
A dictionary of BY-REFERENCE dataset parameters.
|
private ScopedDictionary<OutputDataSetHandleCopier,java.lang.Integer> |
dshOutputParams
Scoped dictionary which contains the maps of output copiers for a procedure/function to
their 0-based indexes in the set of all DATASET-HANDLE parameters for the procedure/function
(excluding other types of parameters).
|
private static ContextLocal<DataSetManager> |
instance
The context-local manager.
|
private java.util.Set<StaticDataSet> |
pendingRegistry
The pending datasets defined in the next external program being invoked.
|
private ProcedureManager.ProcedureHelper |
pm
The procedure helper.
|
private TransactionManager.TransactionHelper |
tm
The transaction helper.
|
| Modifier | Constructor and Description |
|---|---|
private |
DataSetManager()
Default c'tor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
_registerScopeable()
Register the
DataSetManager for scope notifications at the current block. |
void |
addByReferenceParameter(DataSet ds)
Register the given dataset as BY-REFERENCE, in the
byReferenceParameters dictionary. |
DataSet |
byName(java.lang.String dsName)
Looks up for a
DataSet by its name. |
static DataSet.Builder |
define(java.lang.String legacyName,
boolean isShared,
boolean isNew)
Factory method.
|
ScopeId |
getScopeId()
Get the
ScopeId for the instance. |
static DataSetManager |
instance()
Obtain the instance of
DataSetManager (associated with this work area ?). |
boolean |
isByReferenceParameter(DataSet ds)
Check if the given dataset is passed as a BY-REFERENCE parameter.
|
boolean |
isOutputDataSetHandle(DataSet ds)
Check if the specified dataset instance is registered as an OUTPUT argument.
|
void |
register(DataSet dataSet,
java.lang.String legacyName,
boolean isShared,
boolean isNew)
Registers a ((new) shared) dataset.
|
void |
registerCurrent(handle dsHandle)
Convenient gateway to the transaction manager.
|
void |
registerOutputDataSetHandleCopier(DataSetParameter dsParam,
handle dsHandle)
Create and register the output table copier.
|
static void |
registerScopeable()
Register the
DataSetManager for scope notifications at the current block. |
void |
removeByReferenceParameter(DataSet ds)
Deregister the given dataset as BY-REFERENCE, from the
byReferenceParameters
dictionary. |
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 |
unregisterOutputDataSetHandleCopier(OutputDataSetHandleCopier copier)
Unregister the output dataset copier in the current scope.
|
private static final ContextLocal<DataSetManager> instance
private java.util.Set<StaticDataSet> pendingRegistry
private final ScopedDictionary<OutputDataSetHandleCopier,java.lang.Integer> dshOutputParams
private final ScopedDictionary<DataSet,java.lang.Integer> byReferenceParameters
private final TransactionManager.TransactionHelper tm
private final ProcedureManager.ProcedureHelper pm
private final BufferManager bm
private DataSetManager()
public static DataSet.Builder define(java.lang.String legacyName, boolean isShared, boolean isNew)
DEFINE DATASET statement. Creates a new builder for a
new DataSet and returns it for further setting up of options.legacyName - The legacy name of the DataSet. Used for lookup.isShared - This is a shared DataSet.isNew - This is a new DataSet. Only in combination with isShared.public static DataSetManager instance()
DataSetManager (associated with this work area ?).DataSetManager.public static void registerScopeable()
DataSetManager for scope notifications at the current block.public void register(DataSet dataSet, java.lang.String legacyName, boolean isShared, boolean isNew)
dataSet - The new DataSet to be registered.legacyName - The legacy name of the DataSet.isShared - true if this is a SHARED DATASET.isNew - true if this is a NEW SHARED DATASET.public void _registerScopeable()
DataSetManager for scope notifications at the current block.
This is a convenient method when the manager is already retrieved, so that there is
no need for a further context look-up.public void registerCurrent(handle dsHandle)
dsHandle - the target to be registered with the transaction managerpublic DataSet byName(java.lang.String dsName)
DataSet by its name. Only STATIC dataset are managed.dsName - The name to search.DataSet statically named sdName or null is such
DataSet is not accessible.public void scopeStart(BlockDefinition block)
scopeStart in interface Scopeableblock - The explicit block definition which required this notification.public void scopeFinished()
scopeFinished in interface Scopeablepublic void scopeDeleted()
scopeDeleted in interface Scopeablepublic ScopeId getScopeId()
ScopeId for the instance.getScopeId in interface ScopeableScopeId.DATA_SET_MANAGER.public boolean isByReferenceParameter(DataSet ds)
ds - The dataset to check.true if the dataset exists in the byReferenceParameters
dictionary.public void addByReferenceParameter(DataSet ds)
byReferenceParameters dictionary.ds - The dataset.public void removeByReferenceParameter(DataSet ds)
byReferenceParameters
dictionary.ds - The dataset.public boolean isOutputDataSetHandle(DataSet ds)
ds - The dataset instance.true if the handle originates from the caller as an OUTPUT argument.public void registerOutputDataSetHandleCopier(DataSetParameter dsParam, handle dsHandle)
dsParam - The source dataset parameter.dsHandle - The target dataset handle..public void unregisterOutputDataSetHandleCopier(OutputDataSetHandleCopier copier)
copier - Copier to unregister.