public class CassandraDataHandler extends Object implements ODataDataHandler
ODataDataHandler| Constructor and Description |
|---|
CassandraDataHandler(String configID,
com.datastax.driver.core.Session session,
String keyspace) |
| Modifier and Type | Method and Description |
|---|---|
void |
commitTransaction() |
boolean |
deleteEntityInTable(String tableName,
ODataEntry entity)
This method deletes entity from table.
|
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.
|
String |
insertEntityToTable(String tableName,
ODataEntry entity)
This method inserts entity to table.
|
void |
openTransaction() |
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() |
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 |
updatePropertyInTable(String tableName,
ODataEntry property)
This method update property to table, which updates a single column of the table.
|
public List<ODataEntry> readTable(String tableName) throws ODataServiceFault
ODataDataHandlerreadTable in interface ODataDataHandlertableName - Name of the tableODataServiceFaultDataEntrypublic List<ODataEntry> readTableWithKeys(String tableName, ODataEntry keys) throws ODataServiceFault
ODataDataHandlerreadTableWithKeys in interface ODataDataHandlertableName - Name of the tablekeys - Keys to checkODataServiceFaultDataEntrypublic String insertEntityToTable(String tableName, ODataEntry entity) throws ODataServiceFault
ODataDataHandlerinsertEntityToTable in interface ODataDataHandlertableName - Name of the tableentity - EntityODataServiceFaultpublic boolean deleteEntityInTable(String tableName, ODataEntry entity) throws ODataServiceFault
ODataDataHandlerdeleteEntityInTable in interface ODataDataHandlertableName - Name of the tableentity - EntityODataServiceFaultpublic 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 Map<String,Map<String,DataColumn>> getTableMetadata()
ODataDataHandlergetTableMetadata in interface ODataDataHandlerDataColumnpublic void updatePropertyInTable(String tableName, ODataEntry property) throws ODataServiceFault
ODataDataHandlerupdatePropertyInTable in interface ODataDataHandlertableName - Name of the tableproperty - PropertyODataServiceFaultpublic List<String> getTableList()
ODataDataHandlergetTableList in interface ODataDataHandlerpublic Map<String,List<String>> getPrimaryKeys()
ODataDataHandlergetPrimaryKeys in interface ODataDataHandlerpublic Map<String,NavigationTable> getNavigationProperties()
ODataDataHandlergetNavigationProperties in interface ODataDataHandlerpublic void openTransaction()
throws ODataServiceFault
openTransaction in interface ODataDataHandlerODataServiceFaultpublic void commitTransaction()
commitTransaction in interface ODataDataHandlerpublic void rollbackTransaction()
throws ODataServiceFault
rollbackTransaction in interface ODataDataHandlerODataServiceFaultCopyright © 2015 WSO2. All rights reserved.