LibreOffice Module dbaccess (master) 1
|
#include <datasource.hxx>
Classes | |
struct | DBContextAccess |
Public Member Functions | |
ODatabaseSource (const ::rtl::Reference< ODatabaseModelImpl > &_pImpl) | |
virtual void SAL_CALL | elementInserted (const css::container::ContainerEvent &Event) override |
virtual void SAL_CALL | elementRemoved (const css::container::ContainerEvent &Event) override |
virtual void SAL_CALL | elementReplaced (const css::container::ContainerEvent &Event) override |
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL | getTables () override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &rType) override |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual void SAL_CALL | disposing () override |
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL | getPropertySetInfo () override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) override |
virtual ::cppu::IPropertyArrayHelper * | createArrayHelper () const override |
virtual ::cppu::IPropertyArrayHelper &SAL_CALL | getInfoHelper () override |
virtual sal_Bool SAL_CALL | convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override |
virtual void SAL_CALL | setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override |
virtual void SAL_CALL | getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override |
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL | connectWithCompletion (const css::uno::Reference< css::task::XInteractionHandler > &handler) override |
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL | getConnection (const OUString &user, const OUString &password) override |
virtual void SAL_CALL | setLoginTimeout (sal_Int32 seconds) override |
virtual sal_Int32 SAL_CALL | getLoginTimeout () override |
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL | getBookmarks () override |
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL | getQueryDefinitions () override |
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL | getIsolatedConnection (const OUString &user, const OUString &password) override |
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL | getIsolatedConnectionWithCompletion (const css::uno::Reference< css::task::XInteractionHandler > &handler) override |
virtual void SAL_CALL | flush () override |
virtual void SAL_CALL | addFlushListener (const css::uno::Reference< css::util::XFlushListener > &l) override |
virtual void SAL_CALL | removeFlushListener (const css::uno::Reference< css::util::XFlushListener > &l) override |
virtual void SAL_CALL | flushed (const css::lang::EventObject &rEvent) override |
virtual css::uno::Reference< css::sdb::XOfficeDatabaseDocument > SAL_CALL | getDatabaseDocument () override |
virtual void SAL_CALL | initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override |
Public Member Functions inherited from dbaccess::ModelDependentComponent | |
void | checkDisposed () const |
checks whether the component is already disposed, throws a DisposedException if so More... | |
void | lockModify () |
void | unlockModify () |
Public Member Functions inherited from cppu::OPropertySetHelper | |
OPropertySetHelper (OBroadcastHelper &rBHelper) | |
OPropertySetHelper (OBroadcastHelper &rBHelper, bool bIgnoreRuntimeExceptionsWhileFiring) | |
OPropertySetHelper (OBroadcastHelper &rBHelper, IEventNotificationHook *i_pFireEvents, bool bIgnoreRuntimeExceptionsWhileFiring=false) | |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &rType) SAL_OVERRIDE |
css::uno::Sequence< css::uno::Type > | getTypes () |
void SAL_CALL | disposing () |
virtual void SAL_CALL | setPropertyValue (const ::rtl::OUString &rPropertyName, const css::uno::Any &aValue) SAL_OVERRIDE |
virtual css::uno::Any SAL_CALL | getPropertyValue (const ::rtl::OUString &aPropertyName) SAL_OVERRIDE |
virtual void SAL_CALL | addPropertyChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE |
virtual void SAL_CALL | removePropertyChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE |
virtual void SAL_CALL | addVetoableChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE |
virtual void SAL_CALL | removeVetoableChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE |
virtual void SAL_CALL | setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) SAL_OVERRIDE |
virtual css::uno::Any SAL_CALL | getFastPropertyValue (sal_Int32 nHandle) SAL_OVERRIDE |
virtual void SAL_CALL | setPropertyValues (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Sequence< css::uno::Any > &Values) SAL_OVERRIDE |
virtual css::uno::Sequence< css::uno::Any > SAL_CALL | getPropertyValues (const css::uno::Sequence< ::rtl::OUString > &PropertyNames) SAL_OVERRIDE |
virtual void SAL_CALL | addPropertiesChangeListener (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE |
virtual void SAL_CALL | removePropertiesChangeListener (const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE |
virtual void SAL_CALL | firePropertiesChangeEvent (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE |
Public Member Functions inherited from comphelper::OPropertyArrayUsageHelper< ODatabaseSource > | |
OPropertyArrayUsageHelper () | |
virtual | ~OPropertyArrayUsageHelper () |
::cppu::IPropertyArrayHelper * | getArrayHelper () |
Static Public Member Functions | |
static void | setName (const css::uno::Reference< css::sdb::XDocumentDataSource > &_rxDocument, const OUString &_rNewName, DBContextAccess) |
sets a new name for the data source More... | |
Static Public Member Functions inherited from cppu::OPropertySetHelper | |
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL | createPropertySetInfo (IPropertyArrayHelper &rProperties) |
Protected Member Functions | |
virtual css::uno::Reference< css::uno::XInterface > | getThis () const override |
returns the component itself More... | |
Protected Member Functions inherited from dbaccess::ModelDependentComponent | |
ModelDependentComponent (::rtl::Reference< ODatabaseModelImpl > _model) | |
virtual | ~ModelDependentComponent () |
virtual css::uno::Reference< css::uno::XInterface > | getThis () const =0 |
returns the component itself More... | |
::osl::Mutex & | getMutex () |
Protected Member Functions inherited from cppu::OPropertySetHelper | |
void SAL_CALL | fire (sal_Int32 *pnHandles, const css::uno::Any *pNewValues, const css::uno::Any *pOldValues, sal_Int32 nCount, sal_Bool bVetoable) |
void SAL_CALL | setFastPropertyValues (sal_Int32 nSeqLen, sal_Int32 *pHandles, const css::uno::Any *pValues, sal_Int32 nHitCount) |
virtual IPropertyArrayHelper &SAL_CALL | getInfoHelper ()=0 |
virtual sal_Bool SAL_CALL | convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)=0 |
virtual void SAL_CALL | setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue)=0 |
virtual void SAL_CALL | getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const=0 |
void | setDependentFastPropertyValue (sal_Int32 i_handle, const css::uno::Any &i_value) |
~OPropertySetHelper () | |
virtual ::cppu::IPropertyArrayHelper * | createArrayHelper () const =0 |
Private Member Functions | |
virtual | ~ODatabaseSource () override |
css::uno::Reference< css::sdbc::XConnection > | buildLowLevelConnection (const OUString &_rUid, const OUString &_rPwd) |
open a connection for the current settings. More... | |
css::uno::Reference< css::sdbc::XConnection > | buildIsolatedConnection (const OUString &user, const OUString &password) |
css::uno::Reference< css::sdbc::XConnection > | getConnection (const OUString &user, const OUString &password, bool _bIsolated) |
css::uno::Reference< css::sdbc::XConnection > | connectWithCompletion (const css::uno::Reference< css::task::XInteractionHandler > &handler, bool _bIsolated) |
Private Attributes | |
OBookmarkContainer | m_Bookmarks |
::comphelper::OInterfaceContainerHelper3< css::util::XFlushListener > | m_aFlushListeners |
Friends | |
class | ODatabaseContext |
class | OConnection |
class | OSharedConnectionManager |
Additional Inherited Members | |
Static Protected Member Functions inherited from comphelper::OPropertyArrayUsageHelper< ODatabaseSource > | |
static std::mutex & | theMutex () |
Protected Attributes inherited from dbaccess::ModelDependentComponent | |
::rtl::Reference< ODatabaseModelImpl > | m_pImpl |
::osl::Mutex | m_aMutex |
Protected Attributes inherited from cppu::OPropertySetHelper | |
OBroadcastHelper & | rBHelper |
OMultiTypeInterfaceContainerHelperInt32 | aBoundLC |
OMultiTypeInterfaceContainerHelperInt32 | aVetoableLC |
Impl *const | m_pReserved |
Static Protected Attributes inherited from comphelper::OPropertyArrayUsageHelper< ODatabaseSource > | |
static sal_Int32 | s_nRefCount |
::cppu::IPropertyArrayHelper * | s_pProps |
Definition at line 74 of file datasource.hxx.
|
overrideprivatevirtual |
Definition at line 487 of file datasource.cxx.
References acquire(), dispose(), dbaccess::ModelDependentComponent::m_pImpl, and SAL_INFO.
|
explicit |
Definition at line 476 of file datasource.cxx.
References getMutex(), dbaccess::ModelDependentComponent::m_pImpl, and SAL_INFO.
|
overridevirtualnoexcept |
Definition at line 533 of file datasource.cxx.
Referenced by ~ODatabaseSource().
|
overridevirtual |
Definition at line 1370 of file datasource.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::addInterface(), and m_aFlushListeners.
|
private |
Definition at line 1210 of file datasource.cxx.
References buildLowLevelConnection(), dbaccess::ModelDependentComponent::m_pImpl, and OConnection.
Referenced by dbaccess::OSharedConnectionManager::getConnection(), and getConnection().
|
private |
open a connection for the current settings.
this is the simple connection we get from the driver manager, so it can be used as a master for a "high level" sdb connection.
Definition at line 598 of file datasource.cxx.
References Any, DBA_RES, Exception, comphelper::NamedValueCollection::get(), getDatabaseDocument(), dbaccess::ODatabaseModelImpl::getDefaultDataSourceSettings(), Application::IsHeadlessModeEnabled(), dbaccess::ModelDependentComponent::m_pImpl, nCount, pData, RET_OK, weld::DialogController::run(), SAL_INFO, sMessage, throwGenericSQLException(), TOOLS_WARN_EXCEPTION, u, and xModel.
Referenced by buildIsolatedConnection().
|
overridevirtual |
Referenced by getIsolatedConnectionWithCompletion().
|
private |
css::sdbc::SQLException | |
css::uno::RuntimeException |
|
overridevirtual |
Implements cppu::OPropertySetHelper.
Definition at line 826 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl, nHandle, PROPERTY_ID_INFO, PROPERTY_ID_ISPASSWORDREQUIRED, PROPERTY_ID_LAYOUTINFORMATION, PROPERTY_ID_PASSWORD, PROPERTY_ID_SUPPRESSVERSIONCL, PROPERTY_ID_TABLEFILTER, PROPERTY_ID_TABLETYPEFILTER, PROPERTY_ID_URL, PROPERTY_ID_USER, and SAL_WARN.
|
overridevirtual |
Implements comphelper::OPropertyArrayUsageHelper< ODatabaseSource >.
Definition at line 797 of file datasource.cxx.
References cppu::UnoType< typename T >::get(), PROPERTY_ID_INFO, PROPERTY_ID_ISPASSWORDREQUIRED, PROPERTY_ID_ISREADONLY, PROPERTY_ID_LAYOUTINFORMATION, PROPERTY_ID_NAME, PROPERTY_ID_NUMBERFORMATSSUPPLIER, PROPERTY_ID_PASSWORD, PROPERTY_ID_SETTINGS, PROPERTY_ID_SUPPRESSVERSIONCL, PROPERTY_ID_TABLEFILTER, PROPERTY_ID_TABLETYPEFILTER, PROPERTY_ID_URL, PROPERTY_ID_USER, PROPERTY_INFO(), PROPERTY_ISPASSWORDREQUIRED(), PROPERTY_ISREADONLY(), PROPERTY_LAYOUTINFORMATION(), PROPERTY_NAME(), PROPERTY_NUMBERFORMATSSUPPLIER(), PROPERTY_PASSWORD(), PROPERTY_SETTINGS(), PROPERTY_SUPPRESSVERSIONCL(), PROPERTY_TABLEFILTER(), PROPERTY_TABLETYPEFILTER(), PROPERTY_URL(), and PROPERTY_USER().
|
overridevirtual |
Definition at line 566 of file datasource.cxx.
References dbaccess::ODatabaseDocument::clearObjectContainer(), comphelper::OInterfaceContainerHelper3< class ListenerT >::disposeAndClear(), comphelper::OPropertySetHelper::disposing(), m_aFlushListeners, dbaccess::ModelDependentComponent::m_pImpl, and SAL_INFO.
|
overridevirtual |
Definition at line 543 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl, and Source.
|
overridevirtual |
Definition at line 1380 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl.
|
overridevirtual |
Definition at line 1387 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl.
|
overridevirtual |
Definition at line 1394 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl.
|
overridevirtual |
Definition at line 1310 of file datasource.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, m_aFlushListeners, dbaccess::ModelDependentComponent::m_pImpl, comphelper::OInterfaceContainerHelper3< class ListenerT >::notifyEach(), and xModel.
|
overridevirtual |
Definition at line 1338 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl.
|
overridevirtual |
Definition at line 1259 of file datasource.cxx.
References m_Bookmarks.
|
overridevirtual |
Definition at line 1112 of file datasource.cxx.
References getConnection().
Referenced by getConnection(), and getIsolatedConnection().
|
private |
css::sdbc::SQLException | |
css::uno::RuntimeException |
Definition at line 1224 of file datasource.cxx.
References buildIsolatedConnection(), dbaccess::ModelDependentComponent::m_pImpl, manager, and OSharedConnectionManager.
|
overridevirtual |
Definition at line 1402 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl, and xModel.
Referenced by buildLowLevelConnection().
|
overridevirtual |
Implements cppu::OPropertySetHelper.
Definition at line 1008 of file datasource.cxx.
References begin, DBG_UNHANDLED_EXCEPTION, end, Exception, dbaccess::ModelDependentComponent::m_pImpl, nHandle, PROPERTY_ID_INFO, PROPERTY_ID_ISPASSWORDREQUIRED, PROPERTY_ID_ISREADONLY, PROPERTY_ID_LAYOUTINFORMATION, PROPERTY_ID_NAME, PROPERTY_ID_NUMBERFORMATSSUPPLIER, PROPERTY_ID_PASSWORD, PROPERTY_ID_SETTINGS, PROPERTY_ID_SUPPRESSVERSIONCL, PROPERTY_ID_TABLEFILTER, PROPERTY_ID_TABLETYPEFILTER, PROPERTY_ID_URL, PROPERTY_ID_USER, and SAL_WARN.
|
overridevirtual |
Definition at line 519 of file datasource.cxx.
|
overridevirtual |
Definition at line 550 of file datasource.cxx.
|
overridevirtual |
Implements cppu::OPropertySetHelper.
Definition at line 821 of file datasource.cxx.
References comphelper::OPropertyArrayUsageHelper< ODatabaseSource >::getArrayHelper().
Referenced by getPropertySetInfo().
|
overridevirtual |
Definition at line 1117 of file datasource.cxx.
References getConnection().
|
overridevirtual |
Definition at line 1122 of file datasource.cxx.
References connectWithCompletion().
|
overridevirtual |
Definition at line 1100 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl.
|
overridevirtual |
Definition at line 791 of file datasource.cxx.
References cppu::OPropertySetHelper::createPropertySetInfo(), and getInfoHelper().
|
overridevirtual |
Definition at line 1266 of file datasource.cxx.
References Any, dbtools::getDataSourceSetting(), dbaccess::ModelDependentComponent::m_pImpl, and dbaccess::ODatabaseModelImpl::Query.
|
overridevirtual |
Definition at line 555 of file datasource.cxx.
References SERVICE_SDB_DATASOURCE.
|
overridevirtual |
Definition at line 1296 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl, and dbaccess::ODatabaseModelImpl::Table.
|
overrideprotectedvirtual |
returns the component itself
Implements dbaccess::ModelDependentComponent.
Definition at line 1420 of file datasource.cxx.
|
overridevirtual |
Definition at line 507 of file datasource.cxx.
|
overridevirtual |
Definition at line 1413 of file datasource.cxx.
References aProperties, and dbaccess::ModelDependentComponent::m_pImpl.
|
overridevirtual |
Reimplemented from cppu::OPropertySetHelper.
Definition at line 525 of file datasource.cxx.
References Any, and cppu::OPropertySetHelper::queryInterface().
|
overridevirtualnoexcept |
Definition at line 538 of file datasource.cxx.
|
overridevirtual |
Definition at line 1375 of file datasource.cxx.
References m_aFlushListeners, and comphelper::OInterfaceContainerHelper3< class ListenerT >::removeInterface().
|
overridevirtual |
Implements cppu::OPropertySetHelper.
Definition at line 964 of file datasource.cxx.
References any2bool(), dbaccess::ModelDependentComponent::m_pImpl, nHandle, PROPERTY_ID_INFO, PROPERTY_ID_ISPASSWORDREQUIRED, PROPERTY_ID_LAYOUTINFORMATION, PROPERTY_ID_PASSWORD, PROPERTY_ID_SUPPRESSVERSIONCL, PROPERTY_ID_TABLEFILTER, PROPERTY_ID_TABLETYPEFILTER, PROPERTY_ID_URL, and PROPERTY_ID_USER.
|
overridevirtual |
Definition at line 1094 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl.
|
static |
sets a new name for the data source
The name of a data source (our m_sName member) is the registration name, if the data source actually is registered at the database context.
Normally, this name is passed at time of creation of the ODatabaseModelImpl instance, but if a newly created data source is registered, then it must be possible to propagate the new registration name.
Definition at line 497 of file datasource.cxx.
References dbaccess::ModelDependentComponent::m_pImpl.
Referenced by dbaccess::ODatabaseContext::registerObject().
|
overridevirtual |
Definition at line 560 of file datasource.cxx.
References cppu::supportsService().
|
friend |
Definition at line 80 of file datasource.hxx.
Referenced by buildIsolatedConnection().
|
friend |
Definition at line 79 of file datasource.hxx.
|
friend |
Definition at line 81 of file datasource.hxx.
Referenced by getConnection().
|
private |
Definition at line 87 of file datasource.hxx.
Referenced by addFlushListener(), disposing(), flush(), and removeFlushListener().
|
private |
Definition at line 86 of file datasource.hxx.
Referenced by getBookmarks().