public abstract class TableResultSet extends MassiveContainer
As transport, any instance of this class will be wrapped in a TableWrapper
instance
internally by P2J.
Note: In the process of building the internal data structures for dynamic temp-tables, internal generic indexed names are used for columns. To obtain the expected column name, the metadata will return the column's legacy name instead of internal database name.
Modifier and Type | Class and Description |
---|---|
private class |
TableResultSet.DataHandler
Handler for the
ResultSet proxy. |
private class |
TableResultSet.MetaDataHandler
Handler for the
ResultSetMetaData proxy. |
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOG
logger
|
private java.util.List<PropertyDefinition> |
properties
The metadata sent by a remote side, after the remote appserver call, when this table is in
OUTPUT or INPUT-OUTPUT mode.
|
private java.util.List<java.lang.Object[]> |
rows
The data sent by a remote side, after the remote appserver call, when this table is in
OUTPUT or INPUT-OUTPUT mode.
|
private java.util.List<java.lang.Object[]> |
rowsMeta
A set of meta information for each row, as given by
TempTableRecord.toArray() . |
append, input, output, structureName
Constructor and Description |
---|
TableResultSet()
Default c'tor, explicitly added to allow instances of this class to be created on
deserialization.
|
TableResultSet(boolean input,
boolean output,
boolean append)
Create a new instance of this result set.
|
Modifier and Type | Method and Description |
---|---|
java.sql.ResultSet |
asResultSet()
Get the data sent by a remote side, after the remote appserver call, as a
ResultSet
instance. |
void |
clearRows()
Delete row data.
|
java.util.List<PropertyDefinition> |
getProperties()
Get the metadata sent by a remote side, after the remote appserver call.
|
java.util.List<java.lang.Object[]> |
getRows()
Get the data sent by a remote side, after the remote appserver call.
|
java.util.List<java.lang.Object[]> |
getRowsMeta()
Get the row meta information sent by a remote side, after the remote appserver call.
|
abstract boolean |
hasMoreProperties()
Used in conjunction with
nextProperty() , it provides a mechanism for subclasses
to send the property list in an iterator-like form. |
abstract boolean |
hasMoreRows()
Used in conjunction with
hasMoreRows() , it provides a mechanism for subclasses to
send the data in an iterator-like form. |
abstract PropertyDefinition |
nextProperty()
Used in conjunction with
hasMoreProperties() , it provides a mechanism for
subclasses to send the property list in an iterator-like form. |
abstract java.lang.Object[] |
nextRow()
Used in conjunction with
hasMoreRows() , it provides a mechanism for subclasses to
send the data in an iterator-like form. |
abstract java.lang.Object[] |
nextRowMeta()
Used in conjunction with
hasMoreRows() , it provides a mechanism for subclasses to
send the row meta information in an iterator-like form. |
void |
setProperties(java.util.List<PropertyDefinition> properties)
Set the metadata sent by a remote side, after the remote appserver call.
|
void |
setRows(java.util.List<java.lang.Object[]> rows)
Set the data sent by a remote side, after the remote appserver call.
|
void |
setRowsMeta(java.util.List<java.lang.Object[]> rowsMeta)
Set the meta row information sent by a remote side, after the remote appserver call.
|
getStructureName, isAppend, isInput, isOutput, setStructureName
private static final java.util.logging.Logger LOG
private java.util.List<java.lang.Object[]> rows
private java.util.List<java.lang.Object[]> rowsMeta
TempTableRecord.toArray()
.private java.util.List<PropertyDefinition> properties
public TableResultSet()
public TableResultSet(boolean input, boolean output, boolean append)
input
- Flag indicating this table is sent in INPUT or INPUT-OUTPUT mode.output
- Flag indicating this table is sent in OUTPUT or INPUT-OUTPUT mode.append
- Flag indicating this table is sent in APPEND mode.public abstract boolean hasMoreProperties()
nextProperty()
, it provides a mechanism for subclasses
to send the property list in an iterator-like form.
Override this method so that it returns false
when nextProperty()
has
sent all properties.
WARNING: this allows only one iteration over the properties and is for internal usage
only. Use asResultSet()
and the associated ResultSetMetaData
instead.
false
.public abstract PropertyDefinition nextProperty()
hasMoreProperties()
, it provides a mechanism for
subclasses to send the property list in an iterator-like form.
Override this method so that when hasMoreProperties()
returns true
, this
will return the name of the next property in the list.
WARNING: this allows only one iteration over the properties and is for internal usage
only. Use asResultSet()
and the associated ResultSetMetaData
instead.
null
.public abstract boolean hasMoreRows()
hasMoreRows()
, it provides a mechanism for subclasses to
send the data in an iterator-like form.
Override this method so that it returns false
when nextRow()
has sent
all data.
WARNING: this allows only one iteration over the properties and is for internal usage
only. Use asResultSet()
instead.
false
.public abstract java.lang.Object[] nextRow()
hasMoreRows()
, it provides a mechanism for subclasses to
send the data in an iterator-like form.
Override this method so that when hasMoreRows()
returns true
, this will
return the next row in the table.
WARNING: this allows only one iteration over the properties and is for internal usage
only. Use asResultSet()
and instead.
null
.public abstract java.lang.Object[] nextRowMeta()
hasMoreRows()
, it provides a mechanism for subclasses to
send the row meta information in an iterator-like form.
Override this method so that when hasMoreRows()
returns true
, this will
return the next row in the table.
WARNING: this allows only one iteration over the properties and is for internal usage
only. Use asResultSet()
and instead.
null
.public void setRows(java.util.List<java.lang.Object[]> rows)
rows
- The data sent by the remote side.public void setRowsMeta(java.util.List<java.lang.Object[]> rowsMeta)
rowsMeta
- The meta information sent by the remote side.public java.util.List<java.lang.Object[]> getRows()
public java.util.List<java.lang.Object[]> getRowsMeta()
public void setProperties(java.util.List<PropertyDefinition> properties)
properties
- The metadata sent by the remote side.public java.util.List<PropertyDefinition> getProperties()
public java.sql.ResultSet asResultSet()
ResultSet
instance. This will be non-null only if the parameter is in OUTPUT or INPUT-OUTPUT mode.public void clearRows()