public class InMemoryDataSource extends Object implements TabularDataBasedDS
Modifier and Type | Class and Description |
---|---|
class |
InMemoryDataSource.InMemoryDataTable
In-memory data table implementation.
|
TabularDataBasedDS.FilterOperator
Modifier and Type | Field and Description |
---|---|
static String |
IN_MEMORY_DATASOURCE_RECORDS |
static String |
IN_MEMORY_DATASOURCE_SCHEMA |
Constructor and Description |
---|
InMemoryDataSource() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the data source.
|
void |
createDataTable(String name,
List<DataColumn> columns)
Creates a data table with the given name and the column information.
|
void |
dropDataTable(String name)
Drops the data table with the given name.
|
String |
getDataSourceId() |
DataTable |
getDataTable(String name)
Returns the data table with the given name.
|
Set<String> |
getDataTableNames()
Returns all the table names of the custom data source.
|
Map<String,InMemoryDataSource.InMemoryDataTable> |
getDataTables() |
void |
init(Map<String,String> props)
Initialized the custom data source.
|
public static final String IN_MEMORY_DATASOURCE_SCHEMA
public static final String IN_MEMORY_DATASOURCE_RECORDS
public Map<String,InMemoryDataSource.InMemoryDataTable> getDataTables()
public void init(Map<String,String> props) throws DataServiceFault
CustomDataSourceBase
init
in interface CustomDataSourceBase
props
- The properties used for initializationDataServiceFault
- Thrown if any error occurspublic String getDataSourceId()
public Set<String> getDataTableNames() throws DataServiceFault
TabularDataBasedDS
getDataTableNames
in interface TabularDataBasedDS
DataServiceFault
- Thrown if any error occurspublic DataTable getDataTable(String name) throws DataServiceFault
TabularDataBasedDS
getDataTable
in interface TabularDataBasedDS
name
- The name of the data tableDataServiceFault
- Thrown if any error occurspublic void createDataTable(String name, List<DataColumn> columns)
TabularDataBasedDS
createDataTable
in interface TabularDataBasedDS
name
- The name of the data table to be createdcolumns
- A list of data column definitionspublic void dropDataTable(String name)
TabularDataBasedDS
dropDataTable
in interface TabularDataBasedDS
name
- The name of the data table to be deletedpublic void close()
CustomDataSourceBase
close
in interface CustomDataSourceBase
Copyright © 2019 WSO2. All rights reserved.