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 .
19 #ifndef INCLUDED_CONNECTIVITY_SDBCX_VCOLUMN_HXX
20 #define INCLUDED_CONNECTIVITY_SDBCX_VCOLUMN_HXX
22 #include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
23 #include <com/sun/star/container/XNamed.hpp>
24 #include <comphelper/IdPropArrayHelper.hxx>
25 #include <cppuhelper/compbase.hxx>
26 #include <cppuhelper/implbase1.hxx>
27 #include <connectivity/CommonTools.hxx>
28 #include <cppuhelper/basemutex.hxx>
29 #include <connectivity/sdbcx/VDescriptor.hxx>
30 #include <connectivity/dbtoolsdllapi.hxx>
31 #include <com/sun/star/lang/XServiceInfo.hpp>
33 namespace connectivity
38 typedef ::comphelper::OIdPropertyArrayUsageHelper
<OColumn
> OColumn_PROP
;
40 typedef ::cppu::WeakComponentImplHelper
< css::container::XNamed
,
41 css::lang::XServiceInfo
> OColumnDescriptor_BASE
;
42 typedef ::cppu::ImplHelper1
< css::sdbcx::XDataDescriptorFactory
> OColumn_BASE
;
45 class OOO_DLLPUBLIC_DBTOOLS OColumn
:
46 public cppu::BaseMutex
,
48 public OColumnDescriptor_BASE
,
54 OUString m_Description
;
55 OUString m_DefaultValue
;
57 sal_Int32 m_IsNullable
;
58 sal_Int32 m_Precision
;
62 bool m_IsAutoIncrement
;
66 OUString m_CatalogName
;
67 OUString m_SchemaName
;
70 using OColumnDescriptor_BASE::rBHelper
;
71 virtual ::cppu::IPropertyArrayHelper
* createArrayHelper( sal_Int32 _nId
) const override
;
72 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() override
;
74 virtual ~OColumn() override
;
76 virtual void SAL_CALL
acquire() throw() override
;
77 virtual void SAL_CALL
release() throw() override
;
79 OColumn( bool _bCase
);
80 OColumn( const OUString
& Name
,
81 const OUString
& TypeName
,
82 const OUString
& DefaultValue
,
83 const OUString
& Description
,
92 const OUString
& CatalogName
,
93 const OUString
& SchemaName
,
94 const OUString
& TableName
);
96 DECLARE_SERVICE_INFO();
98 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
) override
;
100 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
102 virtual void construct() override
;
103 // ::cppu::OComponentHelper
104 virtual void SAL_CALL
disposing() override
;
106 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
108 virtual OUString SAL_CALL
getName( ) override
;
109 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
110 // XDataDescriptorFactory
111 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
createDataDescriptor( ) override
;
116 #endif // INCLUDED_CONNECTIVITY_SDBCX_VCOLUMN_HXX
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */