public class RDBMSDataHandler extends Object implements ODataDataHandler
ODataDataHandler| Modifier and Type | Field and Description |
|---|---|
static String |
MSSQL_SERVER |
static String |
ORACLE_SERVER |
static String |
TABLE |
static String |
TABLE_NAME |
static String |
VIEW |
| Constructor and Description |
|---|
RDBMSDataHandler(DataSource dataSource,
String configId) |
| Modifier and Type | Method and Description |
|---|---|
void |
commitTransaction()
This method commits the transaction.
|
boolean |
deleteEntityInTable(String tableName,
ODataEntry entry)
This method deletes entity from table.
|
void |
deleteReference(String rootTable,
ODataEntry rootTableKeys,
String navigationTable,
ODataEntry navigationTableKeys)
This method deletes the references of the table where the keys were imported.
|
Map<String,NavigationTable> |
getNavigationProperties()
This method returns the navigation property map, which contains the Navigation table which contains the all the navigation paths from the table,
|
Map<String,List<String>> |
getPrimaryKeys()
This method returns the all the primary keys in the database tables.
|
List<String> |
getTableList()
This method return names of all the tables in the database.
|
Map<String,Map<String,DataColumn>> |
getTableMetadata()
This method return database table metadata.
|
ODataEntry |
insertEntityToTable(String tableName,
ODataEntry entry)
This method inserts entity to table.
|
void |
openTransaction()
This method opens the transaction.
|
List<ODataEntry> |
readTable(String tableName)
This method read the table data and return.
|
List<ODataEntry> |
readTableWithKeys(String tableName,
ODataEntry keys)
This method read the table with Keys and return.
|
void |
rollbackTransaction()
This method rollbacks the transaction.
|
boolean |
updateEntityInTable(String tableName,
ODataEntry newProperties)
This method updates entity in table.
|
boolean |
updateEntityInTableTransactional(String tableName,
ODataEntry oldProperties,
ODataEntry newProperties)
This method updates the entity in table when transactional update is necessary.
|
void |
updateReference(String rootTable,
ODataEntry rootTableKeys,
String navigationTable,
ODataEntry navigationTableKeys)
This method updates the references of the table where the keys were imported.
|
public static final String TABLE_NAME
public static final String TABLE
public static final String VIEW
public static final String ORACLE_SERVER
public static final String MSSQL_SERVER
public RDBMSDataHandler(DataSource dataSource, String configId) throws ODataServiceFault
ODataServiceFaultpublic Map<String,NavigationTable> getNavigationProperties()
ODataDataHandlergetNavigationProperties in interface ODataDataHandlerpublic void openTransaction()
throws ODataServiceFault
ODataDataHandleropenTransaction in interface ODataDataHandlerODataServiceFaultpublic void commitTransaction()
throws ODataServiceFault
ODataDataHandlercommitTransaction in interface ODataDataHandlerODataServiceFaultpublic void rollbackTransaction()
throws ODataServiceFault
ODataDataHandlerrollbackTransaction in interface ODataDataHandlerODataServiceFaultpublic void updateReference(String rootTable, ODataEntry rootTableKeys, String navigationTable, ODataEntry navigationTableKeys) throws ODataServiceFault
ODataDataHandlerupdateReference in interface ODataDataHandlerrootTable - Root - Table NamerootTableKeys - Root - Entity keys (Primary Keys)navigationTable - Navigation - Table NamenavigationTableKeys - Navigation - Entity Name (Primary Keys)ODataServiceFaultpublic void deleteReference(String rootTable, ODataEntry rootTableKeys, String navigationTable, ODataEntry navigationTableKeys) throws ODataServiceFault
ODataDataHandlerdeleteReference in interface ODataDataHandlerrootTable - Root - Table NamerootTableKeys - Root - Entity keys (Primary Keys)navigationTable - Navigation - Table NamenavigationTableKeys - Navigation - Entity Name (Primary Keys)ODataServiceFaultpublic List<ODataEntry> readTable(String tableName) throws ODataServiceFault
ODataDataHandlerreadTable in interface ODataDataHandlertableName - Name of the tableODataServiceFaultDataEntrypublic List<String> getTableList()
ODataDataHandlergetTableList in interface ODataDataHandlerpublic Map<String,List<String>> getPrimaryKeys()
ODataDataHandlergetPrimaryKeys in interface ODataDataHandlerpublic ODataEntry insertEntityToTable(String tableName, ODataEntry entry) throws ODataServiceFault
ODataDataHandlerinsertEntityToTable in interface ODataDataHandlertableName - Name of the tableentry - EntityODataServiceFaultpublic List<ODataEntry> readTableWithKeys(String tableName, ODataEntry keys) throws ODataServiceFault
ODataDataHandlerreadTableWithKeys in interface ODataDataHandlertableName - Name of the tablekeys - Keys to checkODataServiceFaultDataEntrypublic boolean updateEntityInTable(String tableName, ODataEntry newProperties) throws ODataServiceFault
ODataDataHandlerupdateEntityInTable in interface ODataDataHandlertableName - Name of the tablenewProperties - New PropertiesODataServiceFaultpublic boolean updateEntityInTableTransactional(String tableName, ODataEntry oldProperties, ODataEntry newProperties) throws ODataServiceFault
ODataDataHandlerupdateEntityInTableTransactional in interface ODataDataHandlertableName - Table NameoldProperties - Old PropertiesnewProperties - New PropertiesODataServiceFaultpublic boolean deleteEntityInTable(String tableName, ODataEntry entry) throws ODataServiceFault
ODataDataHandlerdeleteEntityInTable in interface ODataDataHandlertableName - Name of the tableentry - EntityODataServiceFaultpublic Map<String,Map<String,DataColumn>> getTableMetadata()
ODataDataHandlergetTableMetadata in interface ODataDataHandlerDataColumnCopyright © 2018 WSO2. All rights reserved.