20#ifndef INCLUDED_CONNECTIVITY_SDBCX_VCOLLECTION_HXX
21#define INCLUDED_CONNECTIVITY_SDBCX_VCOLLECTION_HXX
23#include <config_options.h>
25#include <com/sun/star/container/XNameAccess.hpp>
26#include <com/sun/star/container/XIndexAccess.hpp>
27#include <com/sun/star/container/XEnumerationAccess.hpp>
28#include <com/sun/star/beans/XPropertySet.hpp>
29#include <com/sun/star/util/XRefreshable.hpp>
30#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
31#include <com/sun/star/sdbcx/XAppend.hpp>
32#include <com/sun/star/sdbcx/XDrop.hpp>
33#include <com/sun/star/sdbc/XColumnLocate.hpp>
35#include <com/sun/star/lang/XServiceInfo.hpp>
37#include <com/sun/star/container/XContainer.hpp>
49 css::container::XIndexAccess,
50 css::container::XEnumerationAccess,
51 css::container::XContainer,
52 css::sdbc::XColumnLocate,
53 css::util::XRefreshable,
54 css::sdbcx::XDataDescriptorFactory,
59 typedef css::uno::Reference< css::beans::XPropertySet >
ObjectType;
65 virtual bool exists(
const OUString& _sName ) = 0;
70 virtual void reFill(const ::std::vector< OUString> &_rVector) = 0;
72 virtual bool rename(
const OUString& _sOldName,
const OUString& _sNewName) = 0;
73 virtual sal_Int32
size() = 0;
75 virtual OUString
getName(sal_Int32 _nIndex) = 0;
110 virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor();
123 virtual ObjectType appendObject(
const OUString& _rForName,
const css::uno::Reference< css::beans::XPropertySet >& descriptor );
126 virtual void dropObject(sal_Int32 _nPos,
const OUString& _sElementName);
132 virtual OUString getNameForObject(
const ObjectType& _xObject);
147 ::osl::Mutex& _rMutex,
148 const ::std::vector< OUString> &_rVector,
149 bool _bUseIndexOnly =
false,
150 bool _bUseHardRef =
true);
155 void clear_NoDispose();
159 void insertElement(
const OUString& _sElementName,
const ObjectType& _xElement);
172 void reFill(const ::std::vector< OUString> &_rVector);
174 void renameObject(
const OUString& _sOldName,
const OUString& _sNewName);
177 virtual void disposing();
179 virtual void SAL_CALL acquire() noexcept override;
180 virtual
void SAL_CALL release() noexcept override;
183 virtual css::
uno::Any SAL_CALL queryInterface( const css::
uno::
Type & rType ) override;
184 virtual css::
uno::Sequence< css::
uno::
Type > SAL_CALL getTypes() override;
187 virtual css::
uno::
Type SAL_CALL getElementType( ) override;
188 virtual
sal_Bool SAL_CALL hasElements( ) override;
190 virtual sal_Int32 SAL_CALL getCount( ) override;
191 virtual css::
uno::Any SAL_CALL getByIndex( sal_Int32
Index ) override;
194 virtual css::
uno::Any SAL_CALL getByName( const OUString& aName ) override;
195 virtual css::
uno::Sequence< OUString > SAL_CALL getElementNames( ) override;
196 virtual
sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
198 virtual css::
uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration( ) override;
200 virtual
void SAL_CALL refresh( ) override;
201 virtual
void SAL_CALL addRefreshListener( const css::
uno::Reference< css::util::XRefreshListener >& l ) override;
202 virtual
void SAL_CALL removeRefreshListener( const css::
uno::Reference< css::util::XRefreshListener >& l ) override;
204 virtual css::
uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor( ) override;
206 virtual
void SAL_CALL appendByDescriptor( const css::
uno::Reference< css::beans::XPropertySet >& descriptor ) override;
208 virtual
void SAL_CALL dropByName( const OUString& elementName ) override;
209 virtual
void SAL_CALL dropByIndex( sal_Int32 index ) override;
211 virtual sal_Int32 SAL_CALL findColumn( const OUString&
columnName ) override;
213 virtual
void SAL_CALL addContainerListener( const css::
uno::Reference< css::container::XContainerListener >& xListener ) override;
214 virtual
void SAL_CALL removeContainerListener( const css::
uno::Reference< css::container::XContainerListener >& xListener ) override;
216 void notifyElementRemoved(const OUString& _sName);
217 void disposeElements();
218 void dropImpl(sal_Int32 _nIndex,
bool _bReallyDrop = true);
virtual bool rename(const OUString &_sOldName, const OUString &_sNewName)=0
virtual void disposeElements()=0
virtual void setObject(sal_Int32 _nIndex, const ObjectType &_xObject)=0
virtual ObjectType getObject(sal_Int32 _nIndex)=0
virtual sal_Int32 size()=0
virtual OUString getName(sal_Int32 _nIndex)=0
virtual ObjectType getObject(const OUString &columnName)=0
virtual bool isCaseSensitive() const =0
virtual bool exists(const OUString &_sName)=0
virtual void insert(const OUString &_sName, const ObjectType &_xObject)=0
virtual void disposeAndErase(sal_Int32 _nIndex)=0
virtual sal_Int32 findColumn(const OUString &columnName)=0
virtual css::uno::Sequence< OUString > getElementNames()=0
virtual void reFill(const ::std::vector< OUString > &_rVector)=0
virtual void impl_refresh()=0
virtual ObjectType createObject(const OUString &_rName)=0
bool isCaseSensitive() const
::cppu::OWeakObject & m_rParent
::std::unique_ptr< IObjectCollection > m_pElements
::comphelper::OInterfaceContainerHelper3< css::util::XRefreshListener > m_aRefreshListeners
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > m_aContainerListeners
::cppu::ImplHelper10< css::container::XNameAccess, css::container::XIndexAccess, css::container::XEnumerationAccess, css::container::XContainer, css::sdbc::XColumnLocate, css::util::XRefreshable, css::sdbcx::XDataDescriptorFactory, css::sdbcx::XAppend, css::sdbcx::XDrop, css::lang::XServiceInfo > OCollectionBase
css::uno::Reference< css::beans::XPropertySet > ObjectType