LibreOffice Module dbaccess (master) 1
|
#include <querycontainer.hxx>
Classes | |
class | OAutoActionReset |
Public Member Functions | |
DECLARE_SERVICE_INFO () | |
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::util::XVeto > SAL_CALL | approveInsertElement (const css::container::ContainerEvent &Event) override |
virtual css::uno::Reference< css::util::XVeto > SAL_CALL | approveReplaceElement (const css::container::ContainerEvent &Event) override |
virtual css::uno::Reference< css::util::XVeto > SAL_CALL | approveRemoveElement (const css::container::ContainerEvent &Event) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) 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_Bool SAL_CALL | hasElements () override |
virtual sal_Int32 SAL_CALL | getCount () override |
virtual css::uno::Sequence< OUString > SAL_CALL | getElementNames () override |
Public Member Functions inherited from dbaccess::ODefinitionContainer | |
ODefinitionContainer (const css::uno::Reference< css::uno::XComponentContext > &_xORB, const css::uno::Reference< css::uno::XInterface > &_xParentContainer, const TContentPtr &_pImpl, bool _bCheckSlash=true) | |
constructs the container. More... | |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual css::uno::Type SAL_CALL | getElementType () override |
virtual sal_Bool SAL_CALL | hasElements () override |
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL | createEnumeration () override |
virtual sal_Int32 SAL_CALL | getCount () override |
virtual css::uno::Any SAL_CALL | getByIndex (sal_Int32 _nIndex) override |
virtual void SAL_CALL | insertByName (const OUString &_rName, const css::uno::Any &aElement) override |
virtual void SAL_CALL | removeByName (const OUString &_rName) override |
virtual void SAL_CALL | replaceByName (const OUString &_rName, const css::uno::Any &aElement) 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 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 |
virtual void SAL_CALL | addContainerApproveListener (const css::uno::Reference< css::container::XContainerApproveListener > &Listener) override |
virtual void SAL_CALL | removeContainerApproveListener (const css::uno::Reference< css::container::XContainerApproveListener > &Listener) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) override |
virtual void SAL_CALL | propertyChange (const css::beans::PropertyChangeEvent &evt) override |
virtual void SAL_CALL | vetoableChange (const css::beans::PropertyChangeEvent &aEvent) override |
Public Member Functions inherited from dbaccess::OContentHelper | |
OContentHelper (const css::uno::Reference< css::uno::XComponentContext > &_xORB, const css::uno::Reference< css::uno::XInterface > &_xParentContainer, TContentPtr _pImpl) | |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL | getIdentifier () override |
virtual OUString SAL_CALL | getContentType () override |
virtual void SAL_CALL | addContentEventListener (const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override |
virtual void SAL_CALL | removeContentEventListener (const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override |
virtual sal_Int32 SAL_CALL | createCommandIdentifier () override |
virtual css::uno::Any SAL_CALL | execute (const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override |
virtual void SAL_CALL | abort (sal_Int32 CommandId) override |
virtual void SAL_CALL | addPropertiesChangeListener (const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override |
virtual void SAL_CALL | removePropertiesChangeListener (const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override |
virtual void SAL_CALL | addProperty (const OUString &Name, sal_Int16 Attributes, const css::uno::Any &DefaultValue) override |
virtual void SAL_CALL | removeProperty (const OUString &Name) override |
virtual void SAL_CALL | initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override |
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL | getParent () override |
virtual void SAL_CALL | setParent (const css::uno::Reference< css::uno::XInterface > &Parent) override |
virtual void SAL_CALL | rename (const OUString &newName) override |
const ContentProperties & | getContentProperties () const |
css::uno::Reference< css::sdbc::XRow > | getPropertyValues (const css::uno::Sequence< css::beans::Property > &rProperties) |
const css::uno::Reference< css::uno::XComponentContext > & | getContext () const |
const TContentPtr & | getImpl () const |
Public Member Functions inherited from cppu::ImplHelper7< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > | |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) SAL_OVERRIDE |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () SAL_OVERRIDE |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () SAL_OVERRIDE |
Public Member Functions inherited from cppu::ImplHelper5< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > | |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) SAL_OVERRIDE |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () SAL_OVERRIDE |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () SAL_OVERRIDE |
Static Public Member Functions | |
static rtl::Reference< OQueryContainer > | create (const css::uno::Reference< css::container::XNameContainer > &_rxCommandDefinitions, const css::uno::Reference< css::sdbc::XConnection > &_rxConn, const css::uno::Reference< css::uno::XComponentContext > &_rxORB, ::dbtools::WarningsContainer *_pWarnings) |
Private Types | |
enum class | AggregateAction { NONE , Inserting } |
Private Member Functions | |
virtual css::uno::Reference< css::ucb::XContent > | createObject (const OUString &_rName) override |
create an object from its persistent data within the configuration. More... | |
virtual bool | checkExistence (const OUString &_rName) override |
quickly checks if there already is an element with a given name. More... | |
virtual void SAL_CALL | disposing () override |
virtual | ~OQueryContainer () override |
OQueryContainer (const css::uno::Reference< css::container::XNameContainer > &_rxCommandDefinitions, const css::uno::Reference< css::sdbc::XConnection > &_rxConn, const css::uno::Reference< css::uno::XComponentContext > &_rxORB, ::dbtools::WarningsContainer *_pWarnings) | |
ctor of the container. More... | |
void | init () |
virtual OUString | determineContentType () const override |
css::uno::Reference< css::ucb::XContent > | implCreateWrapper (const OUString &_rName) |
create a query object wrapping a CommandDefinition given by name. More... | |
css::uno::Reference< css::ucb::XContent > | implCreateWrapper (const css::uno::Reference< css::ucb::XContent > &_rxCommandDesc) |
create a query object wrapping a CommandDefinition. The returned object is acquired once. More... | |
Private Attributes | |
::dbtools::WarningsContainer * | m_pWarnings |
css::uno::Reference< css::container::XNameContainer > | m_xCommandDefinitions |
css::uno::Reference< css::sdbc::XConnection > | m_xConnection |
AggregateAction | m_eDoingCurrently |
Friends | |
class | OAutoActionReset |
Additional Inherited Members | |
Protected Types inherited from dbaccess::ODefinitionContainer | |
enum | ContainerOperation { E_REPLACED , E_REMOVED , E_INSERTED } |
enum | ListenerType { ApproveListeners , ContainerListemers } |
typedef std::map< OUString, css::uno::WeakReference< css::ucb::XContent > > | Documents |
Protected Member Functions inherited from dbaccess::ODefinitionContainer | |
void | setElementApproval (PContainerApprove _pElementApproval) |
Additionally to our own approvals which new elements must pass, derived classes can specify an additional approval instance here. More... | |
const PContainerApprove & | getElementApproval () const |
virtual | ~ODefinitionContainer () override |
const ODefinitionContainer_Impl & | getDefinitions () const |
ODefinitionContainer_Impl & | getDefinitions () |
virtual void SAL_CALL | disposing () override |
virtual css::uno::Reference< css::ucb::XContent > | createObject (const OUString &_rName)=0 |
create an object from its persistent data within the configuration. More... | |
css::uno::Reference< css::ucb::XContent > | implGetByName (const OUString &_rName, bool _bCreateIfNecessary) |
get the object specified by the given name. More... | |
virtual bool | checkExistence (const OUString &_rName) |
quickly checks if there already is an element with a given name. More... | |
void | implAppend (const OUString &_rName, const css::uno::Reference< css::ucb::XContent > &_rxNewObject) |
append a new object to the container. More... | |
void | implRemove (const OUString &_rName) |
remove all references to an object from the container. More... | |
void | implReplace (const OUString &_rName, const css::uno::Reference< css::ucb::XContent > &_rxNewObject) |
remove an object in the container. More... | |
void | notifyByName (::osl::ResettableMutexGuard &_rGuard, const OUString &_rName, const css::uno::Reference< css::ucb::XContent > &_xNewElement, const css::uno::Reference< css::ucb::XContent > &xOldElement, ContainerOperation _eOperation, ListenerType _eType) |
notifies our container/approve listeners More... | |
operator css::uno::Reference< css::uno::XInterface > () const | |
Protected Member Functions inherited from dbaccess::OContentHelper | |
virtual void SAL_CALL | disposing () override |
void | notifyDataSourceModified () |
void | notifyPropertiesChange (const css::uno::Sequence< css::beans::PropertyChangeEvent > &evt) const |
This method can be used to propagate changes of property values. More... | |
OUString | impl_getHierarchicalName (bool _includingRootContainer) const |
virtual OUString | determineContentType () const =0 |
Protected Member Functions inherited from cppu::ImplHelper7< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > | |
~ImplHelper7 () SAL_NOEXCEPT | |
Protected Member Functions inherited from cppu::ImplHelper5< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > | |
~ImplHelper5 () SAL_NOEXCEPT | |
Protected Attributes inherited from dbaccess::ODefinitionContainer | |
std::vector< Documents::iterator > | m_aDocuments |
Documents | m_aDocumentMap |
::comphelper::OInterfaceContainerHelper2 | m_aApproveListeners |
::comphelper::OInterfaceContainerHelper2 | m_aContainerListeners |
bool | m_bInPropertyChange |
bool | m_bCheckSlash |
Protected Attributes inherited from dbaccess::OContentHelper | |
::comphelper::OInterfaceContainerHelper3< css::ucb::XContentEventListener > | m_aContentListeners |
PropertyChangeListenerContainer | m_aPropertyChangeListeners |
css::uno::Reference< css::uno::XInterface > | m_xParentContainer |
const css::uno::Reference< css::uno::XComponentContext > | m_aContext |
const ::connectivity::SQLError | m_aErrorHelper |
TContentPtr | m_pImpl |
sal_uInt32 | m_nCommandId |
Protected Attributes inherited from cppu::BaseMutex | |
mutable::osl::Mutex | m_aMutex |
Definition at line 54 of file querycontainer.hxx.
|
strongprivate |
Enumerator | |
---|---|
NONE | |
Inserting |
Definition at line 64 of file querycontainer.hxx.
|
overrideprivatevirtual |
Definition at line 107 of file querycontainer.cxx.
|
private |
ctor of the container.
The parent has to support the <type scope="css::sdbc">XConnection</type> interface.
_pWarnings | specifies a warnings container (May be <NULL>) |
Any errors which occur during the lifetime of the query container, which cannot be reported as exceptions (for instance in methods where throwing an SQLException is not allowed) will be appended to this container.
The caller is responsible for ensuring the lifetime of the object pointed to by this parameter.
Definition at line 59 of file querycontainer.cxx.
References make_shared(), and NONE.
Referenced by create().
|
overridevirtual |
Definition at line 160 of file querycontainer.cxx.
References Any, dbaccess::ODefinitionContainer::ApproveListeners, dbaccess::ODefinitionContainer::ContainerListemers, disposeComponent(), dbaccess::ODefinitionContainer::E_INSERTED, Exception, dbaccess::ODefinitionContainer::implAppend(), implCreateWrapper(), Inserting, dbaccess::OContentHelper::m_aContext, cppu::BaseMutex::m_aMutex, m_eDoingCurrently, m_xCommandDefinitions, dbaccess::ODefinitionContainer::notifyByName(), and PROPERTY_NAME().
|
overridevirtual |
Definition at line 299 of file querycontainer.cxx.
References Exception, dbaccess::ODefinitionContainer::getElementApproval(), and sName.
|
overridevirtual |
Definition at line 322 of file querycontainer.cxx.
|
overridevirtual |
Definition at line 317 of file querycontainer.cxx.
|
overrideprivatevirtual |
quickly checks if there already is an element with a given name.
No access to the configuration occurs, i.e. if there is such an object which is not already loaded, it won't be loaded now.
_rName | the object name to check |
Reimplemented from dbaccess::ODefinitionContainer.
Definition at line 389 of file querycontainer.cxx.
References dbaccess::ODefinitionContainer::implAppend(), dbaccess::ODefinitionContainer::m_aDocumentMap, dbaccess::ODefinitionContainer::m_aDocuments, dbaccess::ODefinitionContainer::m_bInPropertyChange, and m_xCommandDefinitions.
Referenced by dropByName().
|
static |
Definition at line 94 of file querycontainer.cxx.
References OQueryContainer().
|
overridevirtual |
Definition at line 154 of file querycontainer.cxx.
|
overrideprivatevirtual |
create an object from its persistent data within the configuration.
To be overwritten by derived classes.
_rName | the name the object has within the container |
Implements dbaccess::ODefinitionContainer.
Definition at line 384 of file querycontainer.cxx.
References implCreateWrapper().
dbaccess::OQueryContainer::DECLARE_SERVICE_INFO | ( | ) |
|
overrideprivatevirtual |
Implements dbaccess::OContentHelper.
Definition at line 350 of file querycontainer.cxx.
|
overrideprivatevirtual |
Reimplemented from dbaccess::ODefinitionContainer.
Definition at line 117 of file querycontainer.cxx.
References dbaccess::ODefinitionContainer::disposing(), m_aMutex, and m_xConnection.
|
overridevirtual |
Reimplemented from dbaccess::ODefinitionContainer.
Definition at line 327 of file querycontainer.cxx.
References dispose(), dbaccess::ODefinitionContainer::disposing(), dbaccess::ODefinitionContainer::m_aDocumentMap, and m_xCommandDefinitions.
|
overridevirtual |
Definition at line 228 of file querycontainer.cxx.
References dropByName(), dbaccess::ODefinitionContainer::getByIndex(), getCount(), cppu::BaseMutex::m_aMutex, m_xCommandDefinitions, PROPERTY_NAME(), and sName.
|
overridevirtual |
Definition at line 214 of file querycontainer.cxx.
References checkExistence(), cppu::BaseMutex::m_aMutex, and m_xCommandDefinitions.
Referenced by dropByIndex().
|
overridevirtual |
Definition at line 245 of file querycontainer.cxx.
References Any, dbaccess::ODefinitionContainer::hasByName(), implCreateWrapper(), dbaccess::ODefinitionContainer::insertByName(), Inserting, dbaccess::ODefinitionContainer::m_aDocumentMap, cppu::BaseMutex::m_aMutex, and m_eDoingCurrently.
|
overridevirtual |
Definition at line 267 of file querycontainer.cxx.
References dbaccess::ODefinitionContainer::hasByName(), dbaccess::ODefinitionContainer::m_aDocumentMap, and dbaccess::ODefinitionContainer::removeByName().
|
overridevirtual |
Definition at line 280 of file querycontainer.cxx.
References Any, dbaccess::ODefinitionContainer::hasByName(), implCreateWrapper(), dbaccess::ODefinitionContainer::m_aDocumentMap, cppu::BaseMutex::m_aMutex, and dbaccess::ODefinitionContainer::replaceByName().
|
overridevirtual |
Reimplemented from dbaccess::ODefinitionContainer.
Definition at line 415 of file querycontainer.cxx.
References cppu::BaseMutex::m_aMutex, and m_xCommandDefinitions.
Referenced by dropByIndex().
|
overridevirtual |
Reimplemented from dbaccess::ODefinitionContainer.
Definition at line 421 of file querycontainer.cxx.
References cppu::BaseMutex::m_aMutex, and m_xCommandDefinitions.
|
overridevirtual |
Reimplemented from dbaccess::ODefinitionContainer.
Definition at line 409 of file querycontainer.cxx.
References cppu::BaseMutex::m_aMutex, and m_xCommandDefinitions.
|
private |
create a query object wrapping a CommandDefinition. The returned object is acquired once.
|
private |
create a query object wrapping a CommandDefinition given by name.
To retrieve the object, the CommandDescription container will be asked for the given name.
The returned object is acquired once.
Definition at line 355 of file querycontainer.cxx.
References implCreateWrapper(), and m_xCommandDefinitions.
Referenced by appendByDescriptor(), createObject(), elementInserted(), elementReplaced(), and implCreateWrapper().
|
private |
Definition at line 72 of file querycontainer.cxx.
References dbaccess::ODefinitionContainer::getDefinitions(), dbaccess::ODefinitionContainer_Impl::insert(), dbaccess::ODefinitionContainer::m_aDocumentMap, dbaccess::ODefinitionContainer::m_aDocuments, m_xCommandDefinitions, m_xConnection, dbaccess::ODefinitionContainer::setElementApproval(), and dbaccess::ObjectNameApproval::TypeQuery.
|
friend |
Definition at line 70 of file querycontainer.hxx.
|
private |
Definition at line 65 of file querycontainer.hxx.
Referenced by appendByDescriptor(), elementInserted(), and dbaccess::OQueryContainer::OAutoActionReset::~OAutoActionReset().
|
private |
Definition at line 58 of file querycontainer.hxx.
|
private |
Definition at line 60 of file querycontainer.hxx.
Referenced by appendByDescriptor(), checkExistence(), disposing(), dropByIndex(), dropByName(), getCount(), getElementNames(), hasElements(), implCreateWrapper(), and init().
|
private |
Definition at line 62 of file querycontainer.hxx.
Referenced by init().