Class AbstractRDBMSDataProvider

    • Constructor Detail

      • AbstractRDBMSDataProvider

        public AbstractRDBMSDataProvider()
    • Method Detail

      • init

        public DataProvider init​(String topic,
                                 String sessionId,
                                 com.google.gson.JsonElement jsonElement)
                          throws DataProviderException
        Description copied from interface: DataProvider
        Initialize the instance with the session id.
        Parameters:
        topic - to receive topic messages, data provider send event with this topic.
        sessionId - data provider send event for this session.
        jsonElement - provider configuration message in json format.
        Returns:
        data provider initialized with provider configuration.
        Throws:
        DataProviderException - if there any initialization failures.
      • getConnection

        public static Connection getConnection​(String dataSourceName)
                                        throws SQLException,
                                               org.wso2.carbon.datasource.core.exception.DataSourceException
        get connection object for the instance.
        Returns:
        java.sql.Connection object for the dataProvider Configuration
        Throws:
        SQLException
        org.wso2.carbon.datasource.core.exception.DataSourceException
      • getMetadataTypes

        public DataSetMetadata.Types getMetadataTypes​(String dataType)
        Get metadata type(linear,ordinal,time) for the given data type of the data base.
        Parameters:
        dataType - String data type name provided by the result set metadata
        Returns:
        String metadata type
      • querySanitizingValidator

        public boolean querySanitizingValidator​(String query,
                                                String tableName)
      • getRecordLimitQuery

        public String getRecordLimitQuery()
      • getPurgingQuery

        public String getPurgingQuery()
      • getTotalRecordCountQuery

        public String getTotalRecordCountQuery()
      • getColumnCount

        public int getColumnCount()
      • getGreaterThanWhereSQLQuery

        public String getGreaterThanWhereSQLQuery()
      • setProviderConfig

        public void setProviderConfig​(ProviderConfig providerConfig)
        Description copied from class: AbstractDataProvider
        Set the provider configuration, child class will be maintained its own provider configuration bean object.
        Specified by:
        setProviderConfig in class AbstractDataProvider
        Parameters:
        providerConfig - client provided configuration.
      • providerName

        public String providerName()
        Description copied from interface: DataProvider
        Get the data provider name.
        Returns:
        name of the data provider.
      • dataSetMetadata

        public DataSetMetadata dataSetMetadata()
        Description copied from interface: DataProvider
        Get the data provider meta data object.
        Returns:
        meta data of the data provider.
      • providerConfig

        public String providerConfig()
        Description copied from interface: DataProvider
        Get the data provider configuration.
        Returns:
        configuration of the data provider.