public class MemoryResultSetImpl extends java.lang.Object implements MemoryResultSet
MemoryResultSet. It provides the
labels and the types of columns as well as several rows (values for the
columns).| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String[] |
columnLabels
The labels of the columns of this
MemoryResultSet. |
protected ProcessConstants.AdeptDataType[] |
columnTypes
The data types of the columns of this
MemoryResultSet. |
protected java.util.List<java.io.Serializable[]> |
values
A list of values where each list entry corresponds to a row.
|
| Modifier | Constructor and Description |
|---|---|
|
MemoryResultSetImpl(java.util.List<java.lang.String> columnLabels,
java.util.List<ProcessConstants.AdeptDataType> columnTypes)
Creates a new
MemoryResultSet with the designated column
labels and types. |
protected |
MemoryResultSetImpl(ProcessConstants.AdeptDataType[] columnTypes,
java.lang.String[] columnLabels)
Creates a new
MemoryResultSet with the designated column
labels and types. |
|
MemoryResultSetImpl(java.lang.String[] columnLabels,
ProcessConstants.AdeptDataType[] columnTypes)
Creates a new
MemoryResultSet with the designated column
labels and types. |
| Modifier and Type | Method and Description |
|---|---|
void |
addValues(int index,
java.util.List<java.io.Serializable> row)
Adds the designated values as row at the designated index to this
MemoryResultSet. |
void |
addValues(int index,
java.io.Serializable[] row)
Adds the designated values as row at the designated index to this
MemoryResultSet. |
void |
addValues(java.util.List<java.io.Serializable> row)
Adds the designated values as row at the end to this
MemoryResultSet. |
void |
addValues(java.io.Serializable[] row)
Adds the designated values as row at the end to this
MemoryResultSet. |
int |
getColumnCount()
Gets the amount of columns of this memory result set.
|
java.lang.String |
getColumnLabel(int column)
Gets the label for the designated column.
|
ProcessConstants.AdeptDataType |
getColumnType(int column)
Gets the data type for the designated column.
|
int |
getRowCount()
Gets the amount of rows of this memory result set.
|
java.io.Serializable[] |
getValues(int row)
Gets the values for the designated rows.
|
void |
setValues(int index,
java.util.List<java.io.Serializable> row)
Sets the values of the designated row to the designated values.
|
void |
setValues(int index,
java.io.Serializable[] row)
Sets the values of the designated row to the designated values.
|
protected final java.lang.String[] columnLabels
MemoryResultSet. These are
usually provided via ResultSetMetaData.getColumnLabel(int).protected final ProcessConstants.AdeptDataType[] columnTypes
MemoryResultSet. Each
AdeptDataType is the type that corresponds closest to the
corresponding SQL type.protected final java.util.List<java.io.Serializable[]> values
AdeptDataType of the column.public MemoryResultSetImpl(java.lang.String[] columnLabels,
ProcessConstants.AdeptDataType[] columnTypes)
MemoryResultSet with the designated column
labels and types. Note that both arrays need to correspond, especially they
need to have the same size.columnLabels - The labels of the columns of the created
MemoryResultSet.columnTypes - The types (as AdeptDataType) of the columns
of the created MemoryResultSet.public MemoryResultSetImpl(java.util.List<java.lang.String> columnLabels,
java.util.List<ProcessConstants.AdeptDataType> columnTypes)
MemoryResultSet with the designated column
labels and types. Note that both lists need to correspond, especially they
need to have the same size.columnLabels - The labels of the columns of the created
MemoryResultSet.columnTypes - The types (as AdeptDataType) of the columns
of the created MemoryResultSet.protected MemoryResultSetImpl(ProcessConstants.AdeptDataType[] columnTypes, java.lang.String[] columnLabels)
MemoryResultSet with the designated column
labels and types. Note that both arrays need to correspond, especially they
need to have the same size. columnLabels - The labels of the columns of the createdcolumnTypes - The types (as AdeptDataType) of the columns
of the created MemoryResultSet.
MemoryResultSet.public void addValues(java.io.Serializable[] row)
MemoryResultSet. Note that the designated array needs to have
the right size (depending on the columns). Since the array is directly
used, the caller must not change the array afterwards.row - The row (array of values) to be added to this
MemoryResultSet.public void addValues(int index,
java.io.Serializable[] row)
MemoryResultSet. The previous row will be shifted towards the
end. Note that the designated array needs to have the right size (depending
on the columns). Since the array is directly used, the caller must not
change the array afterwards.index - The index at which to add the designated row and shift the
existing row to the end.row - The row (array of values) to be added to this
MemoryResultSet at the designated index.public void setValues(int index,
java.io.Serializable[] row)
index - The index at which to replace the row with the designated
values.row - The row (array of values) to replace the current values of this
MemoryResultSet at the designated index.public void addValues(java.util.List<java.io.Serializable> row)
MemoryResultSet. Note that the designated list needs to have
the right size (depending on the columns).row - The row (list of values) to be added to this
MemoryResultSet.public void addValues(int index,
java.util.List<java.io.Serializable> row)
MemoryResultSet. The previous row will be shifted towards the
end. Note that the designated list needs to have the right size (depending
on the columns).index - The index at which to add the designated row and shift the
existing row to the end.row - The row (list of values) to be added to this
MemoryResultSet at the designated index.public void setValues(int index,
java.util.List<java.io.Serializable> row)
index - The index at which to replace the row with the designated
values.row - The row (list of values) to replace the current values of this
MemoryResultSet at the designated index.public int getColumnCount()
MemoryResultSetgetColumnCount in interface MemoryResultSetpublic int getRowCount()
MemoryResultSetgetRowCount in interface MemoryResultSetpublic java.lang.String getColumnLabel(int column)
MemoryResultSetMemoryResultSet.getColumnCount().getColumnLabel in interface MemoryResultSetcolumn - The column for which to get the label.public ProcessConstants.AdeptDataType getColumnType(int column)
MemoryResultSetMemoryResultSet.getColumnCount().getColumnType in interface MemoryResultSetcolumn - The column for which to get the data type.public java.io.Serializable[] getValues(int row)
MemoryResultSetMemoryResultSet.getRowCount(). The values in the array are of the Java-type
corresponding to the ProcessConstants.AdeptDataType of the corresponding column.
null represents a usual null.getValues in interface MemoryResultSetrow - The row for which to get the values.