public interface DataSet
| Modifier and Type | Method and Description |
|---|---|
DataSet |
addColumn(DataColumn column)
Add a brand new column.
|
DataSet |
addColumn(String id,
ColumnType type)
Add a brand new column.
|
DataSet |
addColumn(String id,
ColumnType type,
List values)
Add a brand new column populated with the given values.
|
DataSet |
addEmptyRowAt(int row)
Add an empty row at the given position.
|
DataSet |
addValues(Object... values)
Add a row at the end of the data set.
|
DataSet |
addValuesAt(int row,
Object... values)
Add a row at the given position.
|
DataSet |
cloneEmpty()
Build a data set with the same structure as this but containing no data.
|
DataSet |
cloneInstance()
Build a data set with the same structure and content.
|
DataColumn |
getColumnById(String id)
Get a column by its id.
|
DataColumn |
getColumnByIndex(int index)
Get a column by its index (starting at 0).
|
int |
getColumnIndex(DataColumn dataColumn)
Get a column's internal DataSet index.
|
List<DataColumn> |
getColumns()
The dataset columns
|
Date |
getCreationDate()
The creation date
|
DataSetDef |
getDefinition()
The data set definition
|
long |
getEstimatedSize()
Return the estimated memory (in bytes) the data set is consuming.
|
DataSetMetadata |
getMetadata()
The metadata
|
int |
getRowCount()
Get the number of rows in the dataset.
|
int |
getRowCountNonTrimmed()
If this data set is the result of a trim operation this method will return
the total number of rows existing before trim.
|
String |
getUUID()
The unique data set identifier.
|
Object |
getValueAt(int row,
int column)
Get the value at a given cell.
|
Object |
getValueAt(int row,
String columnId)
Get the value at a given cell.
|
DataSet |
removeColumn(String id)
Removes an existing column.
|
void |
setColumns(List<DataColumn> columnList) |
void |
setCreationDate(Date date)
The creation date
|
void |
setDefinition(DataSetDef def)
The data set definition
|
void |
setRowCountNonTrimmed(int count)
If this data set is the result of a trim operation this method will return
the total number of rows existing before trim.
|
void |
setUUID(String uuid)
Set an unique identifier to this data set.
|
DataSet |
setValueAt(int row,
int column,
Object value)
Set the value at a given cell.
|
DataSet |
setValuesAt(int row,
Object... values)
Set all the values for a given row.
|
DataSet |
trim(int offset,
int rows)
Returns a data set containing only the specified row sub set.
|
DataSet |
trim(List<Integer> rows)
Returns a data set containing only the specified row sub set.
|
DataSetMetadata getMetadata()
DataSetDef getDefinition()
void setDefinition(DataSetDef def)
String getUUID()
void setUUID(String uuid)
Date getCreationDate()
void setCreationDate(Date date)
List<DataColumn> getColumns()
void setColumns(List<DataColumn> columnList)
DataColumn getColumnById(String id)
DataColumn getColumnByIndex(int index)
int getColumnIndex(DataColumn dataColumn)
DataSet addColumn(String id, ColumnType type)
DataSet addColumn(String id, ColumnType type, List values)
DataSet addColumn(DataColumn column)
int getRowCount()
Object getValueAt(int row, int column)
row - The cell row (the first row is 0).column - The cell column (the first column is 0).Object getValueAt(int row, String columnId)
row - The cell row (the first row is 0).columnId - The cell column id.DataSet setValueAt(int row, int column, Object value)
row - The cell row (the first row is 0).column - The cell column (the first column is 0).DataSet setValuesAt(int row, Object... values)
row - The cell row (the first row is 0).DataSet addValuesAt(int row, Object... values)
row - The cell row (the first row is 0).DataSet addEmptyRowAt(int row)
row - The cell row (the first row is 0).DataSet trim(int offset, int rows)
offset - The position where the row sub set starts (starting at 0).rows - The number of rows to get.DataSet trim(List<Integer> rows)
rows - The row ordinals to add to the resulting data set.int getRowCountNonTrimmed()
void setRowCountNonTrimmed(int count)
DataSet cloneEmpty()
DataSet cloneInstance()
long getEstimatedSize()
Copyright © 2017–2020 JBoss by Red Hat. All rights reserved.