| Modifier and Type | Field and Description |
|---|---|
protected List<DataColumnImpl> |
columns |
protected Date |
creationDate |
protected DataSetDef |
definition |
protected int |
rowCountNonTrimmed |
protected String |
uuid |
| Constructor and Description |
|---|
DataSetImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_setEmptyRowAt(int row,
boolean insert) |
protected void |
_setValueAt(int row,
int column,
Object value,
boolean insert) |
protected void |
_setValuesAt(int row,
boolean insert,
Object... values) |
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 |
addValueAt(int row,
int column,
Object value) |
DataSet |
addValueAt(int column,
Object value) |
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.
|
DataSetImpl |
cloneEmpty()
Build a data set with the same structure as this but containing no data.
|
DataSetImpl |
cloneInstance()
Build a data set with the same structure and content.
|
Object |
convert(DataColumn column,
Object value) |
Date |
convertToDate(Object value) |
Double |
convertToDouble(Object value) |
String |
convertToString(Object value) |
boolean |
equals(Object obj) |
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.
|
protected Object |
getValueAt(int row,
DataColumn column) |
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.
|
boolean |
isEmpty() |
DataSet |
removeColumn(String id)
Removes an existing column.
|
void |
setColumns(List<DataColumn> columnList) |
void |
setCreationDate(Date creationDate)
The creation date
|
void |
setDefinition(DataSetDef definition)
The data set definition
|
void |
setRowCountNonTrimmed(int rowCountNonTrimmed)
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.
|
protected DataSetDef definition
protected String uuid
protected Date creationDate
protected List<DataColumnImpl> columns
protected int rowCountNonTrimmed
public DataSetMetadata getMetadata()
DataSetgetMetadata in interface DataSetpublic DataSetDef getDefinition()
DataSetgetDefinition in interface DataSetpublic void setDefinition(DataSetDef definition)
DataSetsetDefinition in interface DataSetpublic String getUUID()
DataSetpublic void setUUID(String uuid)
DataSetpublic Date getCreationDate()
DataSetgetCreationDate in interface DataSetpublic void setCreationDate(Date creationDate)
DataSetsetCreationDate in interface DataSetpublic List<DataColumn> getColumns()
DataSetgetColumns in interface DataSetpublic void setColumns(List<DataColumn> columnList)
setColumns in interface DataSetpublic DataColumn getColumnById(String id)
DataSetgetColumnById in interface DataSetpublic DataColumn getColumnByIndex(int index)
DataSetgetColumnByIndex in interface DataSetpublic int getColumnIndex(DataColumn dataColumn)
DataSetgetColumnIndex in interface DataSetpublic DataSet addColumn(String id, ColumnType type)
DataSetpublic DataSet addColumn(String id, ColumnType type, List values)
DataSetpublic DataSet addColumn(DataColumn column)
DataSetpublic DataSet removeColumn(String id)
DataSetremoveColumn in interface DataSetpublic boolean isEmpty()
public int getRowCount()
DataSetgetRowCount in interface DataSetpublic int getRowCountNonTrimmed()
DataSetgetRowCountNonTrimmed in interface DataSetpublic void setRowCountNonTrimmed(int rowCountNonTrimmed)
DataSetsetRowCountNonTrimmed in interface DataSetpublic Object getValueAt(int row, String columnId)
DataSetgetValueAt in interface DataSetrow - The cell row (the first row is 0).columnId - The cell column id.public Object getValueAt(int row, int column)
DataSetgetValueAt in interface DataSetrow - The cell row (the first row is 0).column - The cell column (the first column is 0).protected Object getValueAt(int row, DataColumn column)
public DataSet setValueAt(int row, int column, Object value)
DataSetsetValueAt in interface DataSetrow - The cell row (the first row is 0).column - The cell column (the first column is 0).protected void _setValueAt(int row,
int column,
Object value,
boolean insert)
public DataSet setValuesAt(int row, Object... values)
DataSetsetValuesAt in interface DataSetrow - The cell row (the first row is 0).public DataSet addValuesAt(int row, Object... values)
DataSetaddValuesAt in interface DataSetrow - The cell row (the first row is 0).public DataSet addValues(Object... values)
DataSetprotected void _setValuesAt(int row,
boolean insert,
Object... values)
public DataSet addEmptyRowAt(int row)
DataSetaddEmptyRowAt in interface DataSetrow - The cell row (the first row is 0).protected void _setEmptyRowAt(int row,
boolean insert)
public Object convert(DataColumn column, Object value)
public DataSet trim(int offset, int rows)
DataSetpublic DataSet trim(List<Integer> rows)
DataSetpublic DataSetImpl cloneEmpty()
DataSetcloneEmpty in interface DataSetpublic DataSetImpl cloneInstance()
DataSetcloneInstance in interface DataSetpublic long getEstimatedSize()
DataSetgetEstimatedSize in interface DataSetCopyright © 2017–2020 JBoss by Red Hat. All rights reserved.