public class TableParameter
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 boolean |
input
true if the parameter mode is INPUT or INPUT-OUTPUT. |
private boolean |
isTableHandle
Flag indicating this is a TABLE-HANDLE argument.
|
private java.util.EnumSet<ParameterOption> |
options
Table parameter option (APPEND, BY-VALUE, BIND or BY-REFERENCE).
|
private boolean |
output
true if the parameter mode is OUTPUT or INPUT-OUTPUT. |
private int |
parameterIndex
1-based index of the table parameter (in declaration of the function).
|
private boolean |
remoteParameter
Determines if this is a remote (passed to appserver) parameter.
|
private TableWrapper |
resultSet
Calling- or called-side result set (for remote parameters).
|
private int |
schemaMarshalLevel
Table SCHEMA-MARSHAL attribute value encodes as int
|
private Temporary |
table
Buffer of the wrapped table.
|
private handle |
tableHandle
Table handle.
|
| Constructor and Description |
|---|
TableParameter(handle tableHandle)
Create an instance using a table handle.
|
TableParameter(handle tableHandle,
java.util.EnumSet<ParameterOption> options)
Create an instance using a table handle.
|
TableParameter(handle tableHandle,
java.util.EnumSet<ParameterOption> options,
boolean input,
boolean output)
Create an instance using a table handle.
|
TableParameter(handle tableHandle,
ParameterOption option)
Create an instance using a table handle.
|
TableParameter(handle tableHandle,
ParameterOption option,
boolean input,
boolean output)
Create an instance using a table handle.
|
TableParameter(TableWrapper resultSet)
Create an instance using a result set (for remote parameters).
|
TableParameter(TableWrapper resultSet,
java.util.EnumSet<ParameterOption> options,
boolean input,
boolean output)
Create an instance using a result set (for remote parameters).
|
TableParameter(TableWrapper resultSet,
ParameterOption option)
Create an instance using a result set (for remote parameters).
|
TableParameter(TableWrapper resultSet,
ParameterOption option,
boolean input,
boolean output)
Create an instance using a result set (for remote parameters).
|
TableParameter(Temporary table)
Create an instance using a buffer.
|
TableParameter(Temporary table,
java.util.EnumSet<ParameterOption> options)
Create an instance using a buffer.
|
TableParameter(Temporary table,
java.util.EnumSet<ParameterOption> options,
boolean input,
boolean output)
Create an instance using a buffer.
|
TableParameter(Temporary table,
ParameterOption option)
Create an instance using a buffer.
|
TableParameter(Temporary table,
ParameterOption option,
boolean input,
boolean output)
Create an instance using a buffer.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getParameterIndex()
Get 1-based index of the table parameter (in declaration of the function).
|
java.util.EnumSet<ParameterOption> |
getParameterOptions()
Get the table parameter options for this argument.
|
TableWrapper |
getResultSet()
Get the result set (for remote parameters).
|
int |
getSchemaMarshalLevel()
Get encoded table SCHEMA-MARSHAL attribute value.
|
Temporary |
getTable()
Get the buffer of the wrapped table.
|
handle |
getTableHandle()
Get the table-handle which references the wrapped table.
|
boolean |
isAppend()
Determines if the APPEND option was specified on the calling side.
|
boolean |
isBind()
Determines if the
BIND option was specified on the calling side. |
boolean |
isByReference()
Determines if the
BY-REFERENCE option was specified on the calling side. |
boolean |
isByValue()
Determines if the
BY-VALUE option was specified on the calling side. |
boolean |
isInputMode()
Determines if this parameter is INPUT or INPUT-OUTPUT.
|
boolean |
isOutputMode()
Determines if this parameter is OUTPUT or INPUT-OUTPUT.
|
boolean |
isRemoteParameter()
Determines if this is a remote parameter.
|
boolean |
isTableHandle()
Get the state of the
isTableHandle flag. |
boolean |
isValid()
Return
true if the table parameter is valid. |
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 table parameter (in declaration of the function).
|
void |
setParameterOptions(java.util.EnumSet<ParameterOption> options)
Set the table parameter options for this argument.
|
void |
setResultSet(TableWrapper resultSet)
Set the result set (for remote parameters).
|
void |
setTable(Temporary table)
Set the parameter's table.
|
private Temporary table
private final handle tableHandle
private java.util.EnumSet<ParameterOption> options
private TableWrapper resultSet
private boolean remoteParameter
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.private int schemaMarshalLevel
private boolean isTableHandle
private int parameterIndex
0
if it is not defined.public TableParameter(Temporary table)
table - Buffer of the wrapped table.public TableParameter(Temporary table, ParameterOption option)
table - Buffer of the wrapped table.option - Table parameter option (APPEND, BY-VALUE, BIND or BY-REFERENCE).public TableParameter(Temporary table, java.util.EnumSet<ParameterOption> options)
table - Buffer of the wrapped table.options - Table parameter options (APPEND, BY-VALUE, BIND or BY-REFERENCE).public TableParameter(Temporary table, ParameterOption option, boolean input, boolean output)
table - Buffer of the wrapped table.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 TableParameter(Temporary table, java.util.EnumSet<ParameterOption> options, boolean input, boolean output)
table - Buffer of the wrapped table.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 TableParameter(handle tableHandle)
tableHandle - Handle to the wrapped table.public TableParameter(handle tableHandle, ParameterOption option)
tableHandle - Handle to the wrapped table.option - Table parameter option (APPEND, BY-VALUE, BIND or BY-REFERENCE).public TableParameter(handle tableHandle, java.util.EnumSet<ParameterOption> options)
tableHandle - Handle to the wrapped table.options - Table parameter options (APPEND, BY-VALUE, BIND or BY-REFERENCE).public TableParameter(handle tableHandle, ParameterOption option, boolean input, boolean output)
tableHandle - Handle to the wrapped table.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 TableParameter(handle tableHandle, java.util.EnumSet<ParameterOption> options, boolean input, boolean output)
tableHandle - Handle to the wrapped table.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 TableParameter(TableWrapper resultSet)
resultSet - Result set containing input data.public TableParameter(TableWrapper resultSet, ParameterOption option)
resultSet - Result set containing input data.option - Table parameter option (APPEND, BY-VALUE, BIND or BY-REFERENCE).public TableParameter(TableWrapper resultSet, ParameterOption option, boolean input, boolean output)
resultSet - Result set containing input data.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 TableParameter(TableWrapper resultSet, java.util.EnumSet<ParameterOption> options, boolean input, boolean output)
resultSet - Result set containing input data.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 isTableHandle()
isTableHandle flag.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 boolean isRemoteParameter()
true if this is a remote parameter, false if this is a
local parameter.public TableWrapper getResultSet()
public void setResultSet(TableWrapper resultSet)
resultSet - Result set, normally containing output data.public handle getTableHandle()
public void setTable(Temporary table)
table - The tablepublic Temporary getTable()
public boolean isAppend()
true if the APPEND option was specified on the calling side.public boolean isByValue()
BY-VALUE option was specified on the calling side.true if the BY-VALUE option was specified on the calling side.public boolean isBind()
BIND option was specified on the calling side.true if the BIND option was specified on the calling side.public boolean isByReference()
BY-REFERENCE option was specified on the calling side.true if the BY-REFERENCE option was specified on the calling side.public java.util.EnumSet<ParameterOption> getParameterOptions()
public void setParameterOptions(java.util.EnumSet<ParameterOption> options)
options - The table parameter options.public int getParameterIndex()
0 if it is not defined.public int getSchemaMarshalLevel()
public void setParameterIndex(int parameterIndex)
parameterIndex - 1-based index of the table parameter.public boolean isValid()
true if the table parameter is valid. It can be invalid, say, if an unknown table
handle has been assigned to it.true if the table parameter is valid.