LibreOffice Module connectivity (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
connectivity::hsqldb::ODriverDelegator Class Referencefinal

delegates all calls to the original driver and extend the existing one with the SDBCX layer. More...

#include <HDriver.hxx>

Inheritance diagram for connectivity::hsqldb::ODriverDelegator:
[legend]
Collaboration diagram for connectivity::hsqldb::ODriverDelegator:
[legend]

Public Member Functions

 ODriverDelegator (const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
 creates a new delegator for a HSQLDB driver More...
 
 DECLARE_SERVICE_INFO ()
 
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL connect (const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
 
virtual sal_Bool SAL_CALL acceptsURL (const OUString &url) override
 
virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo (const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
 
virtual sal_Int32 SAL_CALL getMajorVersion () override
 
virtual sal_Int32 SAL_CALL getMinorVersion () override
 
virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByConnection (const css::uno::Reference< css::sdbc::XConnection > &connection) override
 
virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByURL (const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
 
virtual void SAL_CALL createCatalog (const css::uno::Sequence< css::beans::PropertyValue > &info) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL preCommit (const css::lang::EventObject &aEvent) override
 
virtual void SAL_CALL commited (const css::lang::EventObject &aEvent) override
 
virtual void SAL_CALL preRevert (const css::lang::EventObject &aEvent) override
 
virtual void SAL_CALL reverted (const css::lang::EventObject &aEvent) override
 
void shutdownConnections ()
 
void flushConnections ()
 

Private Member Functions

css::uno::Reference< css::sdbc::XDriver > const & loadDriver ()
 load the driver we want to delegate. More...
 
void shutdownConnection (const TWeakPairVector::iterator &_aIter)
 shut down the connection and revoke the storage from the map More...
 
virtual ~ODriverDelegator () override
 dtor More...
 
virtual void SAL_CALL disposing () override
 
void onConnectedNewDatabase (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection)
 called when we connected to a newly created embedded database More...
 

Private Attributes

TWeakPairVector m_aConnections
 
css::uno::Reference< css::sdbc::XDriver > m_xDriver
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
bool m_bInShutDownConnections
 

Additional Inherited Members

- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

delegates all calls to the original driver and extend the existing one with the SDBCX layer.

Definition at line 51 of file HDriver.hxx.

Constructor & Destructor Documentation

◆ ODriverDelegator()

connectivity::hsqldb::ODriverDelegator::ODriverDelegator ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext)

creates a new delegator for a HSQLDB driver

◆ ~ODriverDelegator()

connectivity::ODriverDelegator::~ODriverDelegator ( )
overrideprivatevirtual

dtor

Definition at line 86 of file HDriver.cxx.

References Exception.

Member Function Documentation

◆ acceptsURL()

sal_Bool SAL_CALL connectivity::ODriverDelegator::acceptsURL ( const OUString &  url)
overridevirtual

Definition at line 401 of file HDriver.cxx.

References JFW_E_DIRECT_MODE, JFW_E_NONE, jfw_getEnabled(), SAL_INFO, and SAL_WARN.

◆ commited()

void SAL_CALL connectivity::ODriverDelegator::commited ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 666 of file HDriver.cxx.

◆ connect()

virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL connectivity::hsqldb::ODriverDelegator::connect ( const OUString &  url,
const css::uno::Sequence< css::beans::PropertyValue > &  info 
)
overridevirtual

◆ createCatalog()

void SAL_CALL connectivity::ODriverDelegator::createCatalog ( const css::uno::Sequence< css::beans::PropertyValue > &  info)
overridevirtual

Definition at line 519 of file HDriver.cxx.

References dbtools::throwFeatureNotImplementedSQLException().

◆ DECLARE_SERVICE_INFO()

connectivity::hsqldb::ODriverDelegator::DECLARE_SERVICE_INFO ( )

◆ disposing() [1/2]

void connectivity::ODriverDelegator::disposing ( )
overrideprivatevirtual

Definition at line 98 of file HDriver.cxx.

References Exception, and m_aMutex.

◆ disposing() [2/2]

void SAL_CALL connectivity::ODriverDelegator::disposing ( const css::lang::EventObject &  Source)
overridevirtual

Definition at line 559 of file HDriver.cxx.

References i, m_aMutex, and Source.

◆ flushConnections()

void connectivity::ODriverDelegator::flushConnections ( )

◆ getDataDefinitionByConnection()

virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL connectivity::hsqldb::ODriverDelegator::getDataDefinitionByConnection ( const css::uno::Reference< css::sdbc::XConnection > &  connection)
overridevirtual

◆ getDataDefinitionByURL()

virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL connectivity::hsqldb::ODriverDelegator::getDataDefinitionByURL ( const OUString &  url,
const css::uno::Sequence< css::beans::PropertyValue > &  info 
)
overridevirtual

◆ getMajorVersion()

sal_Int32 SAL_CALL connectivity::ODriverDelegator::getMajorVersion ( )
overridevirtual

Definition at line 454 of file HDriver.cxx.

◆ getMinorVersion()

sal_Int32 SAL_CALL connectivity::ODriverDelegator::getMinorVersion ( )
overridevirtual

Definition at line 460 of file HDriver.cxx.

◆ getPropertyInfo()

virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL connectivity::hsqldb::ODriverDelegator::getPropertyInfo ( const OUString &  url,
const css::uno::Sequence< css::beans::PropertyValue > &  info 
)
overridevirtual

◆ loadDriver()

Reference< XDriver > const & connectivity::ODriverDelegator::loadDriver ( )
private

load the driver we want to delegate.

The <member>m_xDriver</member> may be <NULL> if the driver could not be loaded.

Returns
The driver which was currently selected.

Definition at line 120 of file HDriver.cxx.

References m_xContext.

◆ onConnectedNewDatabase()

void connectivity::ODriverDelegator::onConnectedNewDatabase ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection)
private

called when we connected to a newly created embedded database

Definition at line 859 of file HDriver.cxx.

References Exception, m_xContext, and TOOLS_WARN_EXCEPTION.

◆ preCommit()

void SAL_CALL connectivity::ODriverDelegator::preCommit ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 623 of file HDriver.cxx.

References aEvent, Exception, i, m_aMutex, and TOOLS_WARN_EXCEPTION.

◆ preRevert()

void SAL_CALL connectivity::ODriverDelegator::preRevert ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 670 of file HDriver.cxx.

◆ reverted()

void SAL_CALL connectivity::ODriverDelegator::reverted ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 674 of file HDriver.cxx.

◆ shutdownConnection()

void connectivity::ODriverDelegator::shutdownConnection ( const TWeakPairVector::iterator &  _aIter)
private

shut down the connection and revoke the storage from the map

Parameters
_aIterThe connection to shut down and storage to revoke.

Definition at line 524 of file HDriver.cxx.

References Exception.

◆ shutdownConnections()

void connectivity::ODriverDelegator::shutdownConnections ( )

Definition at line 588 of file HDriver.cxx.

References Exception.

Referenced by connectivity::hsqldb::OConnectionController::notifyTermination().

Member Data Documentation

◆ m_aConnections

TWeakPairVector connectivity::hsqldb::ODriverDelegator::m_aConnections
private

Definition at line 54 of file HDriver.hxx.

◆ m_bInShutDownConnections

bool connectivity::hsqldb::ODriverDelegator::m_bInShutDownConnections
private

Definition at line 59 of file HDriver.hxx.

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > connectivity::hsqldb::ODriverDelegator::m_xContext
private

Definition at line 58 of file HDriver.hxx.

◆ m_xDriver

css::uno::Reference< css::sdbc::XDriver > connectivity::hsqldb::ODriverDelegator::m_xDriver
private

Definition at line 57 of file HDriver.hxx.


The documentation for this class was generated from the following files: