LibreOffice Module dbaccess (master) 1
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
dbaccess::OFilteredContainer Class Referenceabstract

#include <FilteredContainer.hxx>

Inheritance diagram for dbaccess::OFilteredContainer:
[legend]
Collaboration diagram for dbaccess::OFilteredContainer:
[legend]

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::XPropertySetcreateDescriptor ()
 
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

IRefreshListenerm_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< IObjectCollectionm_pElements
 
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > m_aContainerListeners
 
::comphelper::OInterfaceContainerHelper3< css::util::XRefreshListener > m_aRefreshListeners
 
::cppu::OWeakObjectm_rParent
 
::osl::Mutex & m_rMutex
 
bool m_bUseIndexOnly
 

Private Attributes

bool m_bConstructed
 

Detailed Description

Definition at line 40 of file FilteredContainer.hxx.

Constructor & Destructor Documentation

◆ OFilteredContainer()

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.

Parameters
_rParentthe object which acts as parent for the container. all refcounting is rerouted to this object
_rMutexthe access safety object of the parent
_rTableFilterrestricts the visible tables by name
_rTableTypeFilterrestricts the visible tables by type
See also
construct

Definition at line 237 of file FilteredContainer.cxx.

Member Function Documentation

◆ addMasterContainerListener()

virtual void dbaccess::OFilteredContainer::addMasterContainerListener ( )
inlineprotectedvirtual

Reimplemented in dbaccess::OTableContainer.

Definition at line 59 of file FilteredContainer.hxx.

◆ construct() [1/2]

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.

◆ construct() [2/2]

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).

◆ dispose()

void dbaccess::OFilteredContainer::dispose ( void  )
inline

Definition at line 113 of file FilteredContainer.hxx.

References disposing().

◆ disposing()

void dbaccess::OFilteredContainer::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().

◆ getAllTableTypeFilter()

void dbaccess::OFilteredContainer::getAllTableTypeFilter ( css::uno::Sequence< OUString > &  _rFilter) const
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().

◆ getNameForObject()

OUString dbaccess::OFilteredContainer::getNameForObject ( const ::connectivity::sdbcx::ObjectType _xObject)
overrideprotectedvirtual

Definition at line 401 of file FilteredContainer.cxx.

References m_xMetaData.

Referenced by dbaccess::OTableContainer::appendObject().

◆ getTableTypeRestriction()

virtual OUString dbaccess::OFilteredContainer::getTableTypeRestriction ( ) const
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.

◆ impl_refresh()

void dbaccess::OFilteredContainer::impl_refresh ( )
overrideprotectedvirtual

◆ isInitialized()

bool dbaccess::OFilteredContainer::isInitialized ( ) const
inline

Definition at line 132 of file FilteredContainer.hxx.

References m_bConstructed.

◆ removeMasterContainerListener()

virtual void dbaccess::OFilteredContainer::removeMasterContainerListener ( )
inlineprotectedvirtual

Reimplemented in dbaccess::OTableContainer.

Definition at line 60 of file FilteredContainer.hxx.

Referenced by disposing().

Member Data Documentation

◆ m_bConstructed

bool dbaccess::OFilteredContainer::m_bConstructed
mutableprivate

Definition at line 43 of file FilteredContainer.hxx.

Referenced by disposing(), impl_refresh(), and isInitialized().

◆ m_nInAppend

std::atomic<std::size_t>& dbaccess::OFilteredContainer::m_nInAppend
protected

◆ m_pRefreshListener

IRefreshListener* dbaccess::OFilteredContainer::m_pRefreshListener
protected

Definition at line 46 of file FilteredContainer.hxx.

Referenced by disposing(), and impl_refresh().

◆ m_xConnection

css::uno::WeakReference< css::sdbc::XConnection > dbaccess::OFilteredContainer::m_xConnection
protected

◆ m_xMasterContainer

css::uno::Reference< css::container::XNameAccess > dbaccess::OFilteredContainer::m_xMasterContainer
protected

◆ m_xMetaData

css::uno::Reference< css::sdbc::XDatabaseMetaData > dbaccess::OFilteredContainer::m_xMetaData
protected

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