Modifier and Type | Field and Description |
---|---|
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 ScopedDictionary<java.lang.String,DataSet> |
registry
The registry with all static
Datasets mapped by their name. |
Modifier | Constructor and Description |
---|---|
private |
DataSetManager()
Default c'tor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
(package private) static void |
initialize()
Register with the
TransactionManager a factory object which creates instances of this
class, so that they can be registered to receive notifications of
runtime scope start and finish events. |
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 |
registerOutputDataSetHandleCopier(OutputDataSetHandleCopier copier)
Register the output table copier.
|
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()
Provides a notification that a new scope is about to be entered.
|
void |
unregister(DataSet dataSet)
Unregisters a
DataSet when it is no more valid. |
void |
unregisterOutputDataSetHandleCopier(OutputDataSetHandleCopier copier)
Unregister the output dataset copier in the current scope.
|
private static final ContextLocal<DataSetManager> instance
private ScopedDictionary<java.lang.String,DataSet> registry
Datasets
mapped by their name.private final ScopedDictionary<OutputDataSetHandleCopier,java.lang.Integer> dshOutputParams
private final ScopedDictionary<DataSet,java.lang.Integer> byReferenceParameters
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
.static void initialize()
TransactionManager
a factory object which creates instances of this
class, so that they can be registered to receive notifications of
runtime scope start and finish events.
This method should be invoked once during the server bootstrap phase.
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 unregister(DataSet dataSet)
DataSet
when it is no more valid.dataSet
- The DataSet
to be unregistered.public 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()
scopeStart
in interface Scopeable
public void scopeFinished()
scopeFinished
in interface Scopeable
public void scopeDeleted()
scopeDeleted
in interface Scopeable
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(OutputDataSetHandleCopier copier)
copier
- Copier to register.public void unregisterOutputDataSetHandleCopier(OutputDataSetHandleCopier copier)
copier
- Copier to unregister.