Branch libreoffice-5-0-4
[LibreOffice.git] / include / connectivity / sdbcx / VIndex.hxx
blobd07a498b025badc304a6a2eec88bf51400dc5af8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CONNECTIVITY_SDBCX_VINDEX_HXX
21 #define INCLUDED_CONNECTIVITY_SDBCX_VINDEX_HXX
23 #include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
24 #include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
25 #include <com/sun/star/container/XNamed.hpp>
26 #include <comphelper/IdPropArrayHelper.hxx>
27 #include <cppuhelper/compbase2.hxx>
28 #include <connectivity/CommonTools.hxx>
29 #include <comphelper/broadcasthelper.hxx>
30 #include <connectivity/sdbcx/VTypeDef.hxx>
31 #include <connectivity/sdbcx/IRefreshable.hxx>
32 #include <connectivity/sdbcx/VDescriptor.hxx>
33 #include <connectivity/dbtoolsdllapi.hxx>
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 #include <cppuhelper/implbase1.hxx>
37 namespace connectivity
39 namespace sdbcx
41 class OCollection;
42 class OIndex;
43 typedef ::cppu::ImplHelper1< ::com::sun::star::sdbcx::XDataDescriptorFactory > OIndex_BASE;
44 typedef ::comphelper::OIdPropertyArrayUsageHelper<OIndex> OIndex_PROP;
46 class OOO_DLLPUBLIC_DBTOOLS OIndex :
47 public comphelper::OBaseMutex,
48 public ODescriptor_BASE,
49 public IRefreshableColumns,
50 public OIndex_PROP,
51 public ODescriptor,
52 public OIndex_BASE
54 protected:
55 OUString m_Catalog;
56 bool m_IsUnique;
57 bool m_IsPrimaryKeyIndex;
58 bool m_IsClustered;
60 OCollection* m_pColumns;
62 using ODescriptor_BASE::rBHelper;
63 virtual void refreshColumns() SAL_OVERRIDE;
64 // OPropertyArrayUsageHelper
65 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( sal_Int32 _nId) const SAL_OVERRIDE;
66 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
67 public:
68 OIndex(bool _bCase);
69 OIndex( const OUString& _Name,
70 const OUString& _Catalog,
71 bool _isUnique,
72 bool _isPrimaryKeyIndex,
73 bool _isClustered,
74 bool _bCase);
76 virtual ~OIndex( );
78 DECLARE_SERVICE_INFO();
80 //XInterface
81 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
82 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
83 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
84 //XTypeProvider
85 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
86 // ODescriptor
87 virtual void construct() SAL_OVERRIDE;
88 // ::cppu::OComponentHelper
89 virtual void SAL_CALL disposing() SAL_OVERRIDE;
90 // XPropertySet
91 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
92 // XColumnsSupplier
93 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
95 // XNamed
96 virtual OUString SAL_CALL getName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
97 virtual void SAL_CALL setName( const OUString& aName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
98 // XDataDescriptorFactory
99 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL createDataDescriptor( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
104 #endif // INCLUDED_CONNECTIVITY_SDBCX_VINDEX_HXX
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */