Line data Source code
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 : #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_XINDEXCOLUMNS_HXX
38 : #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_XINDEXCOLUMNS_HXX
39 :
40 : #include "pq_xcontainer.hxx"
41 :
42 : namespace pq_sdbc_driver
43 : {
44 :
45 : class IndexColumns : public Container
46 : {
47 : OUString m_schemaName;
48 : OUString m_tableName;
49 : OUString m_indexName;
50 : com::sun::star::uno::Sequence< OUString > m_columns;
51 :
52 : public: // instances IndexColumns 'exception safe'
53 : static com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > create(
54 : const ::rtl::Reference< RefCountedMutex > & refMutex,
55 : const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin,
56 : ConnectionSettings *pSettings,
57 : const OUString &schemaName,
58 : const OUString &tableName,
59 : const OUString &indexName,
60 : const com::sun::star::uno::Sequence< OUString > &columns );
61 :
62 : protected:
63 : IndexColumns(
64 : const ::rtl::Reference< RefCountedMutex > & refMutex,
65 : const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin,
66 : ConnectionSettings *pSettings,
67 : const OUString &schemaName,
68 : const OUString &tableName,
69 : const OUString &indexName,
70 : const com::sun::star::uno::Sequence< OUString > &columns );
71 :
72 : virtual ~IndexColumns();
73 :
74 : public: // XAppend
75 : virtual void SAL_CALL appendByDescriptor(
76 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor )
77 : throw (::com::sun::star::sdbc::SQLException,
78 : ::com::sun::star::container::ElementExistException,
79 : ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 :
81 : public: // XDrop
82 : virtual void SAL_CALL dropByName( const OUString& elementName )
83 : throw (::com::sun::star::sdbc::SQLException,
84 : ::com::sun::star::container::NoSuchElementException,
85 : ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
86 : virtual void SAL_CALL dropByIndex( sal_Int32 index )
87 : throw (::com::sun::star::sdbc::SQLException,
88 : ::com::sun::star::lang::IndexOutOfBoundsException,
89 : ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
90 :
91 : public: // XRefreshable
92 : virtual void SAL_CALL refresh( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
93 :
94 : public: // XDataDescriptorFactory
95 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL createDataDescriptor( )
96 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
97 : };
98 :
99 :
100 0 : class IndexColumnDescriptors : public Container
101 : {
102 :
103 : public: // instances IndexColumns 'exception safe'
104 : static com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > create(
105 : const ::rtl::Reference< RefCountedMutex > & refMutex,
106 : const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin,
107 : ConnectionSettings *pSettings );
108 :
109 : protected:
110 : IndexColumnDescriptors(
111 : const ::rtl::Reference< RefCountedMutex > & refMutex,
112 : const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin,
113 : ConnectionSettings *pSettings);
114 :
115 : public: // XDataDescriptorFactory
116 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL createDataDescriptor( )
117 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
118 : };
119 :
120 : }
121 : #endif
122 :
123 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|