LibreOffice Module connectivity (master) 1
pq_xkey.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 Key : public ReflectionBase,
53 public css::sdbcx::XColumnsSupplier
54{
55 css::uno::Reference< css::container::XNameAccess > m_keyColumns;
56
57 OUString m_schemaName;
58 OUString m_tableName;
59
60public:
61 Key( 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
88class KeyDescriptor : public ReflectionBase, public css::sdbcx::XColumnsSupplier
89{
90 css::uno::Reference< css::container::XNameAccess > m_keyColumns;
91
92public:
93 KeyDescriptor( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex,
94 const css::uno::Reference< css::sdbc::XConnection > & connection,
95 ConnectionSettings *pSettings );
96
97public: // XInterface
98 virtual void SAL_CALL acquire() noexcept override { ReflectionBase::acquire(); }
99 virtual void SAL_CALL release() noexcept override { ReflectionBase::release(); }
100 virtual css::uno::Any SAL_CALL queryInterface(
101 const css::uno::Type & reqType ) override;
102
103public: // XColumnsSupplier
104 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL
105 getColumns( ) override;
106
107public: // XTypeProvider, first implemented by OPropertySetHelper
108 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
109 virtual css::uno::Sequence< sal_Int8> SAL_CALL getImplementationId() override;
110
111public: // XDataDescriptorFactory
112 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL
113 createDataDescriptor( ) override;
114};
115
116}
117
118
119/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: pq_xkey.cxx:156
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: pq_xkey.cxx:165
css::uno::Reference< css::container::XNameAccess > m_keyColumns
Definition: pq_xkey.hxx:90
virtual void SAL_CALL release() noexcept override
Definition: pq_xkey.hxx:99
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor() override
Definition: pq_xkey.cxx:137
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &reqType) override
Definition: pq_xkey.cxx:170
KeyDescriptor(const ::rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &connection, ConnectionSettings *pSettings)
Definition: pq_xkey.cxx:124
virtual void SAL_CALL acquire() noexcept override
Definition: pq_xkey.hxx:98
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns() override
Definition: pq_xkey.cxx:146
virtual void SAL_CALL release() noexcept override
Definition: pq_xkey.hxx:69
OUString m_schemaName
Definition: pq_xkey.hxx:57
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns() override
Definition: pq_xkey.cxx:83
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: pq_xkey.cxx:99
virtual void SAL_CALL acquire() noexcept override
Definition: pq_xkey.hxx:68
css::uno::Reference< css::container::XNameAccess > m_keyColumns
Definition: pq_xkey.hxx:55
Key(const ::rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &connection, ConnectionSettings *pSettings, OUString schemaName, OUString tableName)
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor() override
Definition: pq_xkey.cxx:74
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: pq_xkey.cxx:108
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &reqType) override
Definition: pq_xkey.cxx:113
OUString m_tableName
Definition: pq_xkey.hxx:58
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