LibreOffice Module connectivity (master) 1
pq_xindex.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*************************************************************************
3 *
4 * Effective License of whole file:
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License version 2.1, as published by the Free Software Foundation.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 * MA 02111-1307 USA
19 *
20 * Parts "Copyright by Sun Microsystems, Inc" prior to August 2011:
21 *
22 * The Contents of this file are made available subject to the terms of
23 * the GNU Lesser General Public License Version 2.1
24 *
25 * Copyright: 2000 by Sun Microsystems, Inc.
26 *
27 * Contributor(s): Joerg Budischewski
28 *
29 * All parts contributed on or after August 2011:
30 *
31 * This Source Code Form is subject to the terms of the Mozilla Public
32 * License, v. 2.0. If a copy of the MPL was not distributed with this
33 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
34 *
35 ************************************************************************/
36
37#pragma once
38
41
42#include <com/sun/star/lang/XServiceInfo.hpp>
43#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
44#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
45
46#include "pq_connection.hxx"
47#include "pq_xbase.hxx"
48
49namespace pq_sdbc_driver
50{
51
52class Index : public ReflectionBase,
53 public css::sdbcx::XColumnsSupplier
54{
55 css::uno::Reference< css::container::XNameAccess > m_indexColumns;
56
57 OUString m_schemaName;
58 OUString m_tableName;
59
60public:
61 Index( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex,
62 const css::uno::Reference< css::sdbc::XConnection > & connection,
63 ConnectionSettings *pSettings,
64 OUString schemaName,
65 OUString tableName);
66
67public: // XInterface
68 virtual void SAL_CALL acquire() noexcept override { ReflectionBase::acquire(); }
69 virtual void SAL_CALL release() noexcept override { ReflectionBase::release(); }
70 virtual css::uno::Any SAL_CALL queryInterface(
71 const css::uno::Type & reqType ) override;
72
73public: // XColumnsSupplier
74 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL
75 getColumns( ) override;
76
77public: // XTypeProvider, first implemented by OPropertySetHelper
78 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
79 virtual css::uno::Sequence< sal_Int8> SAL_CALL getImplementationId() override;
80
81public: // XDataDescriptorFactory
82 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL
83 createDataDescriptor( ) override;
84
85};
86
87
89 public css::sdbcx::XColumnsSupplier
90{
91 css::uno::Reference< css::container::XNameAccess > m_indexColumns;
92
93public:
95 const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex,
96 const css::uno::Reference< css::sdbc::XConnection > & connection,
97 ConnectionSettings *pSettings);
98
99public: // XInterface
100 virtual void SAL_CALL acquire() noexcept override { ReflectionBase::acquire(); }
101 virtual void SAL_CALL release() noexcept override { ReflectionBase::release(); }
102 virtual css::uno::Any SAL_CALL queryInterface(
103 const css::uno::Type & reqType ) override;
104
105public: // XColumnsSupplier
106 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL
107 getColumns( ) override;
108
109public: // XTypeProvider, first implemented by OPropertySetHelper
110 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
111 virtual css::uno::Sequence< sal_Int8> SAL_CALL getImplementationId() override;
112
113public: // XDataDescriptorFactory
114 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL
115 createDataDescriptor( ) override;
116
117};
118
119
120}
121
122
123/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL release() noexcept override
Definition: pq_xindex.hxx:101
virtual void SAL_CALL acquire() noexcept override
Definition: pq_xindex.hxx:100
IndexDescriptor(const ::rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &connection, ConnectionSettings *pSettings)
Definition: pq_xindex.cxx:123
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &reqType) override
Definition: pq_xindex.cxx:174
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns() override
Definition: pq_xindex.cxx:144
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: pq_xindex.cxx:160
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor() override
Definition: pq_xindex.cxx:136
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: pq_xindex.cxx:169
css::uno::Reference< css::container::XNameAccess > m_indexColumns
Definition: pq_xindex.hxx:91
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns() override
Definition: pq_xindex.cxx:84
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: pq_xindex.cxx:98
virtual void SAL_CALL acquire() noexcept override
Definition: pq_xindex.hxx:68
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &reqType) override
Definition: pq_xindex.cxx:112
Index(const ::rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &connection, ConnectionSettings *pSettings, OUString schemaName, OUString tableName)
css::uno::Reference< css::container::XNameAccess > m_indexColumns
Definition: pq_xindex.hxx:55
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: pq_xindex.cxx:107
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor() override
Definition: pq_xindex.cxx:75
virtual void SAL_CALL release() noexcept override
Definition: pq_xindex.hxx:69
virtual void SAL_CALL release() noexcept override
Definition: pq_xbase.hxx:84
virtual void SAL_CALL acquire() noexcept override
Definition: pq_xbase.hxx:83
const char * tableName
Definition: pq_statics.cxx:57