LibreOffice Module dbaccess (master) 1
|
#include <FilteredContainer.hxx>
Classes | |
class | EnsureReset |
Public Member Functions | |
OFilteredContainer (::cppu::OWeakObject &_rParent, ::osl::Mutex &_rMutex, const css::uno::Reference< css::sdbc::XConnection > &_xCon, bool _bCase, IRefreshListener *_pRefreshListener, std::atomic< std::size_t > &_nInAppend) | |
ctor of the container. More... | |
void | dispose () |
void | construct (const css::uno::Sequence< OUString > &_rTableFilter, const css::uno::Sequence< OUString > &_rTableTypeFilter) |
late ctor. More... | |
void | construct (const css::uno::Reference< css::container::XNameAccess > &_rxMasterContainer, const css::uno::Sequence< OUString > &_rTableFilter, const css::uno::Sequence< OUString > &_rTableTypeFilter) |
late ctor. More... | |
bool | isInitialized () const |
Public Member Functions inherited from connectivity::sdbcx::OCollection | |
virtual | ~OCollection () |
DECLARE_SERVICE_INFO () | |
void | reFill (const ::std::vector< OUString > &_rVector) |
bool | isCaseSensitive () const |
void | renameObject (const OUString &_sOldName, const OUString &_sNewName) |
virtual void | disposing () |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Type SAL_CALL | getElementType () override |
virtual sal_Bool SAL_CALL | hasElements () override |
virtual sal_Int32 SAL_CALL | getCount () override |
virtual css::uno::Any SAL_CALL | getByIndex (sal_Int32 Index) override |
virtual css::uno::Any SAL_CALL | getByName (const OUString &aName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getElementNames () override |
virtual sal_Bool SAL_CALL | hasByName (const OUString &aName) override |
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL | createEnumeration () override |
virtual void SAL_CALL | refresh () override |
virtual void SAL_CALL | addRefreshListener (const css::uno::Reference< css::util::XRefreshListener > &l) override |
virtual void SAL_CALL | removeRefreshListener (const css::uno::Reference< css::util::XRefreshListener > &l) override |
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL | createDataDescriptor () override |
virtual void SAL_CALL | appendByDescriptor (const css::uno::Reference< css::beans::XPropertySet > &descriptor) override |
virtual void SAL_CALL | dropByName (const OUString &elementName) override |
virtual void SAL_CALL | dropByIndex (sal_Int32 index) override |
virtual sal_Int32 SAL_CALL | findColumn (const OUString &columnName) override |
virtual void SAL_CALL | addContainerListener (const css::uno::Reference< css::container::XContainerListener > &xListener) override |
virtual void SAL_CALL | removeContainerListener (const css::uno::Reference< css::container::XContainerListener > &xListener) override |
Protected Member Functions | |
virtual OUString | getTableTypeRestriction () const =0 |
returns a string denoting the only type of tables allowed in this container, or an empty string if there is no such restriction More... | |
virtual void | addMasterContainerListener () |
virtual void | removeMasterContainerListener () |
virtual void | impl_refresh () override |
virtual OUString | getNameForObject (const ::connectivity::sdbcx::ObjectType &_xObject) override |
virtual void | disposing () override |
tell the container to free all elements and all additional resources. More... | |
void | getAllTableTypeFilter (css::uno::Sequence< OUString > &_rFilter) const |
retrieve a table type filter to pass to <member scope="css::sdbc">XDatabaseMetaData::getTables</member>, according to the current data source settings More... | |
Protected Member Functions inherited from connectivity::sdbcx::OCollection | |
virtual void | impl_refresh ()=0 |
virtual ObjectType | createObject (const OUString &_rName)=0 |
virtual css::uno::Reference< css::beans::XPropertySet > | createDescriptor () |
virtual ObjectType | appendObject (const OUString &_rForName, const css::uno::Reference< css::beans::XPropertySet > &descriptor) |
virtual void | dropObject (sal_Int32 _nPos, const OUString &_sElementName) |
virtual OUString | getNameForObject (const ObjectType &_xObject) |
ObjectType | cloneDescriptor (const ObjectType &_descriptor) |
OCollection (::cppu::OWeakObject &_rParent, bool _bCase, ::osl::Mutex &_rMutex, const ::std::vector< OUString > &_rVector, bool _bUseIndexOnly=false, bool _bUseHardRef=true) | |
void | clear_NoDispose () |
void | insertElement (const OUString &_sElementName, const ObjectType &_xElement) |
ObjectType | getObject (sal_Int32 _nIndex) |
Protected Attributes | |
IRefreshListener * | m_pRefreshListener |
std::atomic< std::size_t > & | m_nInAppend |
css::uno::Reference< css::container::XNameAccess > | m_xMasterContainer |
css::uno::WeakReference< css::sdbc::XConnection > | m_xConnection |
css::uno::Reference< css::sdbc::XDatabaseMetaData > | m_xMetaData |
Protected Attributes inherited from connectivity::sdbcx::OCollection | |
::std::unique_ptr< IObjectCollection > | m_pElements |
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > | m_aContainerListeners |
::comphelper::OInterfaceContainerHelper3< css::util::XRefreshListener > | m_aRefreshListeners |
::cppu::OWeakObject & | m_rParent |
::osl::Mutex & | m_rMutex |
bool | m_bUseIndexOnly |
Private Attributes | |
bool | m_bConstructed |
Definition at line 40 of file FilteredContainer.hxx.
dbaccess::OFilteredContainer::OFilteredContainer | ( | ::cppu::OWeakObject & | _rParent, |
::osl::Mutex & | _rMutex, | ||
const css::uno::Reference< css::sdbc::XConnection > & | _xCon, | ||
bool | _bCase, | ||
IRefreshListener * | _pRefreshListener, | ||
std::atomic< std::size_t > & | _nInAppend | ||
) |
ctor of the container.
The parent has to support the <type scope="css::sdbc">XConnection</type> interface.
_rParent | the object which acts as parent for the container. all refcounting is rerouted to this object |
_rMutex | the access safety object of the parent |
_rTableFilter | restricts the visible tables by name |
_rTableTypeFilter | restricts the visible tables by type |
Definition at line 237 of file FilteredContainer.cxx.
|
inlineprotectedvirtual |
Reimplemented in dbaccess::OTableContainer.
Definition at line 59 of file FilteredContainer.hxx.
void dbaccess::OFilteredContainer::construct | ( | const css::uno::Reference< css::container::XNameAccess > & | _rxMasterContainer, |
const css::uno::Sequence< OUString > & | _rTableFilter, | ||
const css::uno::Sequence< OUString > & | _rTableTypeFilter | ||
) |
late ctor.
The container will fill itself with wrapper objects for the tables returned by the given name container.
void dbaccess::OFilteredContainer::construct | ( | const css::uno::Sequence< OUString > & | _rTableFilter, |
const css::uno::Sequence< OUString > & | _rTableTypeFilter | ||
) |
late ctor.
The container will fill itself with the data got by the connection meta data, considering the filters given (the connection is the parent object you passed in the ctor).
|
inline |
Definition at line 113 of file FilteredContainer.hxx.
References disposing().
|
overrideprotectedvirtual |
tell the container to free all elements and all additional resources.
After using this method the object may be reconstructed by calling one of the construct
methods.
Reimplemented from connectivity::sdbcx::OCollection.
Reimplemented in dbaccess::OTableContainer, and dbaccess::OViewContainer.
Definition at line 376 of file FilteredContainer.cxx.
References m_bConstructed, m_pRefreshListener, m_xMasterContainer, m_xMetaData, and removeMasterContainerListener().
Referenced by dispose(), and dbaccess::OTableContainer::disposing().
|
protected |
retrieve a table type filter to pass to <member scope="css::sdbc">XDatabaseMetaData::getTables</member>, according to the current data source settings
Definition at line 420 of file FilteredContainer.cxx.
References Any, FILTER_MODE_FIXED, FILTER_MODE_MIX_ALL, FILTER_MODE_STANDARD, FILTER_MODE_WILDCARD, dbaccess::getDataSource(), getDataSourceSetting(), connectivity::sdbcx::OCollection::m_rParent, SAL_WARN, and u.
Referenced by dbaccess::OTableContainer::createObject().
|
overrideprotectedvirtual |
Definition at line 401 of file FilteredContainer.cxx.
References m_xMetaData.
Referenced by dbaccess::OTableContainer::appendObject().
|
protectedpure virtual |
returns a string denoting the only type of tables allowed in this container, or an empty string if there is no such restriction
Implemented in dbaccess::OTableContainer, and dbaccess::OViewContainer.
|
overrideprotectedvirtual |
Implements connectivity::sdbcx::OCollection.
Definition at line 389 of file FilteredContainer.cxx.
References m_bConstructed, m_pRefreshListener, m_xMasterContainer, and dbaccess::IRefreshListener::refresh().
|
inline |
Definition at line 132 of file FilteredContainer.hxx.
References m_bConstructed.
|
inlineprotectedvirtual |
Reimplemented in dbaccess::OTableContainer.
Definition at line 60 of file FilteredContainer.hxx.
Referenced by disposing().
|
mutableprivate |
Definition at line 43 of file FilteredContainer.hxx.
Referenced by disposing(), impl_refresh(), and isInitialized().
|
protected |
Definition at line 47 of file FilteredContainer.hxx.
Referenced by dbaccess::OTableContainer::appendObject(), dbaccess::OViewContainer::appendObject(), dbaccess::OTableContainer::elementInserted(), and dbaccess::OViewContainer::elementInserted().
|
protected |
Definition at line 46 of file FilteredContainer.hxx.
Referenced by disposing(), and impl_refresh().
|
protected |
Definition at line 51 of file FilteredContainer.hxx.
Referenced by dbaccess::OTableContainer::appendObject(), dbaccess::OViewContainer::appendObject(), dbaccess::OTableContainer::createDescriptor(), dbaccess::OTableContainer::createObject(), dbaccess::OViewContainer::createObject(), dbaccess::OTableContainer::dropObject(), and dbaccess::OViewContainer::dropObject().
|
protected |
Definition at line 50 of file FilteredContainer.hxx.
Referenced by dbaccess::OTableContainer::addMasterContainerListener(), dbaccess::OTableContainer::appendObject(), dbaccess::OViewContainer::appendObject(), dbaccess::OTableContainer::createDescriptor(), dbaccess::OViewContainer::createDescriptor(), dbaccess::OTableContainer::createObject(), dbaccess::OViewContainer::createObject(), disposing(), dbaccess::OTableContainer::dropObject(), dbaccess::OViewContainer::dropObject(), dbaccess::OTableContainer::elementInserted(), impl_refresh(), and dbaccess::OTableContainer::removeMasterContainerListener().
|
protected |
Definition at line 52 of file FilteredContainer.hxx.
Referenced by dbaccess::OViewContainer::appendObject(), dbaccess::OTableContainer::createDescriptor(), dbaccess::OViewContainer::createDescriptor(), dbaccess::OTableContainer::createObject(), dbaccess::OViewContainer::createObject(), disposing(), dbaccess::OTableContainer::dropObject(), dbaccess::OViewContainer::dropObject(), and getNameForObject().