public class InMemoryDataSource.InMemoryDataTable extends Object implements DataTable
Constructor and Description |
---|
InMemoryDataTable(List<DataColumn> columns) |
Modifier and Type | Method and Description |
---|---|
void |
deleteData(long... ids)
Deletes rows from the data table.
|
Map<Long,DataRow> |
filterData(String column,
Object value,
TabularDataBasedDS.FilterOperator operator)
Returns filtered data according to the given criteria.
|
List<DataColumn> |
getColumns() |
Map<Long,DataRow> |
getData() |
Map<Long,DataRow> |
getData(long start,
long length)
Returns all the data in the table.
|
List<DataColumn> |
getDataColumns()
Returns all the data table columns available.
|
void |
insertData(DataRow... values)
Inserts a new row in to the data table.
|
void |
updateData(Map<Long,DataRow> values)
Updates the data table with the given values.
|
public InMemoryDataTable(List<DataColumn> columns)
public List<DataColumn> getDataColumns()
DataTable
getDataColumns
in interface DataTable
public List<DataColumn> getColumns()
public Map<Long,DataRow> getData(long start, long length) throws DataServiceFault
DataTable
getData
in interface DataTable
start
- The 0-based starting index of the results to be returnedlength
- The length of the result set size to be limited to, -1 if unlimitedDataServiceFault
public Map<Long,DataRow> filterData(String column, Object value, TabularDataBasedDS.FilterOperator operator) throws DataServiceFault
DataTable
filterData
in interface DataTable
column
- The column the filtering to be based onvalue
- The value used to evaluate the criteriaoperator
- The operator used to do the evaluationDataServiceFault
- Thrown if any error occurspublic void updateData(Map<Long,DataRow> values)
DataTable
updateData
in interface DataTable
values
- The rows to be updatedpublic void insertData(DataRow... values)
DataTable
insertData
in interface DataTable
values
- The values of the new data rowpublic void deleteData(long... ids)
DataTable
deleteData
in interface DataTable
ids
- The row ids of the rows to be deletedCopyright © 2019 WSO2. All rights reserved.