1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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
,
57 bool m_IsPrimaryKeyIndex
;
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
;
69 OIndex( const OUString
& _Name
,
70 const OUString
& _Catalog
,
72 bool _isPrimaryKeyIndex
,
78 DECLARE_SERVICE_INFO();
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
;
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
;
87 virtual void construct() SAL_OVERRIDE
;
88 // ::cppu::OComponentHelper
89 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
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
;
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
;
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: */