public class DataSetParameter
extends java.lang.Object
The parameter mode can be implemented in this class or it can be overridden in a subclass. If it is
implemented here, then the input and output flags must be passed to the constructor. If the subclass
overrides the isInputMode() and isOutputMode() methods then the input and output boolean
members will be ignored. This is sub-optimal but it was done deliberately to enable the base class to
be used as a full replacement for any of the subclasses.
| Modifier and Type | Field and Description |
|---|---|
private handle |
dataset
Reference of the wrapped dataset.
|
private DatasetWrapper |
datasetWrapper
Calling- or called-side result set (for remote parameters).
|
private boolean |
input
true if the parameter mode is INPUT or INPUT-OUTPUT. |
private boolean |
isOriginalDataSetProxy
true if the original dataset is a Proxy
|
private java.util.EnumSet<ParameterOption> |
options
Parameter passing mode APPEND, BY-VALUE, BIND or BY-REFERENCE option.
|
private DataSet |
originalDataSet
The original dataset passed as an argument.
|
private boolean |
output
true if the parameter mode is OUTPUT or INPUT-OUTPUT. |
private int |
parameterIndex
1-based index of the dataset parameter (in declaration of the function).
|
private boolean |
remoteParameter
Determines if this is a remote (passed to appserver) parameter.
|
| Constructor and Description |
|---|
DataSetParameter(DataSet dataset)
Create an instance using a dataset reference.
|
DataSetParameter(DataSet dataset,
java.util.EnumSet<ParameterOption> options)
Create an instance using a dataset reference.
|
DataSetParameter(DataSet dataset,
java.util.EnumSet<ParameterOption> options,
boolean input,
boolean output)
Create an instance using a dataset reference.
|
DataSetParameter(DataSetParameter dataset)
Create an instance using a dataset reference.
|
DataSetParameter(DataSet dataset,
ParameterOption option)
Create an instance using a dataset reference.
|
DataSetParameter(DataSet dataset,
ParameterOption option,
boolean input,
boolean output)
Create an instance using a dataset reference.
|
DataSetParameter(DatasetWrapper wrapper)
Create a new parameter for the REMOTE dataset.
|
DataSetParameter(handle dsHandle)
Create an instance using a dataset handle.
|
DataSetParameter(handle dsHandle,
java.util.EnumSet<ParameterOption> options)
Create an instance using a dataset handle.
|
DataSetParameter(handle dsHandle,
java.util.EnumSet<ParameterOption> options,
boolean input,
boolean output)
Create an instance using a dataset handle.
|
DataSetParameter(handle dsHandle,
ParameterOption option)
Create an instance using a dataset handle.
|
DataSetParameter(handle dsHandle,
ParameterOption option,
boolean input,
boolean output)
Create an instance using a dataset handle.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createDataSet(DatasetWrapper wrapper)
Create a new DATASET resource from the specified wrapper, and save it in the
dataset
handle. |
handle |
get()
Obtain the
DataSet handle. |
DataSet |
getDataset()
Returns the unwrapped dataset instance.
|
handle |
getDatasetHandle()
Returns the wrapped dataset instance.
|
DatasetWrapper |
getDatasetWrapper()
Get the
datasetWrapper. |
DataSet |
getOriginalDataSet()
Get the original dataset, as passed by the caller.
|
int |
getParameterIndex()
Get 1-based index of the dataset parameter (in declaration of the function).
|
java.util.EnumSet<ParameterOption> |
getParameterOptions()
Get the table parameter option for this argument.
|
boolean |
isAppend()
Checks whether this parameter was passed with
APPEND option. |
boolean |
isBind()
Checks whether this parameter was passed with
BIND option. |
boolean |
isByReference()
Checks whether this parameter was passed with
BY-REFERENCE option. |
boolean |
isByValue()
Checks whether this parameter was passed with
BY-VALUE option. |
boolean |
isInputMode()
Determines if this parameter is INPUT or INPUT-OUTPUT.
|
boolean |
isOriginalDataSetProxy() |
boolean |
isOutputMode()
Determines if this parameter is OUTPUT or INPUT-OUTPUT.
|
boolean |
isRemoteParameter()
Checks whether this is a remote parameter.
|
void |
setDatasetWrapper(DatasetWrapper datasetWrapper)
Set the
datasetWrapper. |
void |
setInputMode(boolean input)
Set the flag for whether this parameter is INPUT or INPUT-OUTPUT.
|
void |
setOutputMode(boolean output)
Set the flag for whether this parameter is OUTPUT or INPUT-OUTPUT.
|
void |
setParameterIndex(int parameterIndex)
Set 1-based index of the dataset parameter (in declaration of the function).
|
void |
setParameterOptions(java.util.EnumSet<ParameterOption> options)
Set the table parameter option for this argument.
|
java.lang.String |
toString()
Get a string representation of this dataset.
|
private final handle dataset
private java.util.EnumSet<ParameterOption> options
private boolean remoteParameter
private DatasetWrapper datasetWrapper
(equivalent of TableWrapper resultSet in TableParameter).
private int parameterIndex
0 when
not defined.private DataSet originalDataSet
private boolean isOriginalDataSetProxy
private boolean input
true if the parameter mode is INPUT or INPUT-OUTPUT.private boolean output
true if the parameter mode is OUTPUT or INPUT-OUTPUT.public DataSetParameter(DatasetWrapper wrapper)
wrapper - The REMOTE dataset.public DataSetParameter(DataSetParameter dataset)
dataset - Reference of the wrapped dataset.public DataSetParameter(DataSet dataset)
dataset - Reference of the wrapped dataset.public DataSetParameter(DataSet dataset, ParameterOption option)
dataset - Reference of the wrapped dataset.option - Table parameter option (APPEND, BY-VALUE, BIND or BY-REFERENCE).public DataSetParameter(DataSet dataset, java.util.EnumSet<ParameterOption> options)
dataset - Reference of the wrapped dataset.options - Table parameter options (APPEND, BY-VALUE, BIND or BY-REFERENCE).public DataSetParameter(DataSet dataset, ParameterOption option, boolean input, boolean output)
dataset - Reference of the wrapped dataset.option - Table parameter option (APPEND, BY-VALUE, BIND or BY-REFERENCE).input - true if the parameter mode is INPUT or INPUT-OUTPUT.output - true if the parameter mode is OUTPUT or INPUT-OUTPUT.public DataSetParameter(DataSet dataset, java.util.EnumSet<ParameterOption> options, boolean input, boolean output)
dataset - Reference of the wrapped dataset.options - Table parameter options (APPEND, BY-VALUE, BIND or BY-REFERENCE).input - true if the parameter mode is INPUT or INPUT-OUTPUT.output - true if the parameter mode is OUTPUT or INPUT-OUTPUT.public DataSetParameter(handle dsHandle)
dsHandle - Handle to the wrapped dataset.public DataSetParameter(handle dsHandle, ParameterOption option)
dsHandle - Handle to the wrapped dataset.option - Table parameter option (APPEND, BY-VALUE, BIND or BY-REFERENCE).public DataSetParameter(handle dsHandle, java.util.EnumSet<ParameterOption> options)
dsHandle - Handle to the wrapped dataset.options - Table parameter options (APPEND, BY-VALUE, BIND or BY-REFERENCE).public DataSetParameter(handle dsHandle, ParameterOption option, boolean input, boolean output)
dsHandle - Handle to the wrapped dataset.option - Table parameter option (APPEND, BY-VALUE, BIND or BY-REFERENCE).input - true if the parameter mode is INPUT or INPUT-OUTPUT.output - true if the parameter mode is OUTPUT or INPUT-OUTPUT.public DataSetParameter(handle dsHandle, java.util.EnumSet<ParameterOption> options, boolean input, boolean output)
dsHandle - Handle to the wrapped dataset.options - Table parameter options (APPEND, BY-VALUE, BIND or BY-REFERENCE).input - true if the parameter mode is INPUT or INPUT-OUTPUT.output - true if the parameter mode is OUTPUT or INPUT-OUTPUT.public boolean isOriginalDataSetProxy()
public java.util.EnumSet<ParameterOption> getParameterOptions()
public void setParameterOptions(java.util.EnumSet<ParameterOption> options)
options - The table parameter option.public handle get()
DataSet handle.public DataSet getOriginalDataSet()
originalDataSet.public boolean isInputMode()
true if this is INPUT or INPUT-OUTPUT.public void setInputMode(boolean input)
input - true if this is INPUT or INPUT-OUTPUT.public boolean isOutputMode()
true if this is OUTPUT or INPUT-OUTPUT.public void setOutputMode(boolean output)
output - true if this is OUTPUT or INPUT-OUTPUT.public DataSet getDataset()
public handle getDatasetHandle()
public boolean isAppend()
APPEND option.true if this parameter was passed with APPEND option.public boolean isByReference()
BY-REFERENCE option.true if this parameter was passed with BY-REFERENCE option.public boolean isByValue()
BY-VALUE option.true if this parameter was passed with BY-VALUE option.public boolean isBind()
BIND option.true if this parameter was passed with BIND option.public boolean isRemoteParameter()
true if this is a remote parameter, false if this is a local
parameter.public DatasetWrapper getDatasetWrapper()
datasetWrapper.public void setDatasetWrapper(DatasetWrapper datasetWrapper)
datasetWrapper.datasetWrapper - Calling- or called-side result set (for remote parameters).public int getParameterIndex()
0 when not defined.public void setParameterIndex(int parameterIndex)
parameterIndex - 1-based index of the dataset parameter.public void createDataSet(DatasetWrapper wrapper)
dataset
handle.wrapper - The dataset from the remote side.public java.lang.String toString()
toString in class java.lang.Object