Branch libreoffice-5-0-4
[LibreOffice.git] / include / connectivity / sdbcx / VColumn.hxx
blob317436242e7b9b9c68f68fa4e22a8aadbc4122f9
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 .
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/compbase2.hxx>
26 #include <cppuhelper/implbase1.hxx>
27 #include <connectivity/CommonTools.hxx>
28 #include <comphelper/broadcasthelper.hxx>
29 #include <connectivity/sdbcx/VDescriptor.hxx>
30 #include <connectivity/dbtoolsdllapi.hxx>
31 #include <com/sun/star/lang/XServiceInfo.hpp>
33 namespace connectivity
35 namespace sdbcx
37 class OColumn;
38 typedef ::comphelper::OIdPropertyArrayUsageHelper<OColumn> OColumn_PROP;
40 typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::container::XNamed,
41 ::com::sun::star::lang::XServiceInfo> OColumnDescriptor_BASE;
42 typedef ::cppu::ImplHelper1< ::com::sun::star::sdbcx::XDataDescriptorFactory > OColumn_BASE;
45 class OOO_DLLPUBLIC_DBTOOLS OColumn :
46 public comphelper::OBaseMutex,
47 public OColumn_BASE,
48 public OColumnDescriptor_BASE,
49 public OColumn_PROP,
50 public ODescriptor
52 protected:
53 OUString m_TypeName;
54 OUString m_Description;
55 OUString m_DefaultValue;
57 sal_Int32 m_IsNullable;
58 sal_Int32 m_Precision;
59 sal_Int32 m_Scale;
60 sal_Int32 m_Type;
62 bool m_IsAutoIncrement;
63 bool m_IsRowVersion;
64 bool m_IsCurrency;
66 OUString m_CatalogName;
67 OUString m_SchemaName;
68 OUString m_TableName;
70 using OColumnDescriptor_BASE::rBHelper;
71 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( sal_Int32 _nId) const SAL_OVERRIDE;
72 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
74 virtual ~OColumn();
75 public:
76 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
77 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
79 OColumn( bool _bCase);
80 OColumn( const OUString& _Name,
81 const OUString& _TypeName,
82 const OUString& _DefaultValue,
83 const OUString& _Description,
84 sal_Int32 _IsNullable,
85 sal_Int32 _Precision,
86 sal_Int32 _Scale,
87 sal_Int32 _Type,
88 bool _IsAutoIncrement,
89 bool _IsRowVersion,
90 bool _IsCurrency,
91 bool _bCase,
92 const OUString& _CatalogName,
93 const OUString& _SchemaName,
94 const OUString& _TableName);
96 DECLARE_SERVICE_INFO();
97 //XInterface
98 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;
99 //XTypeProvider
100 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
101 // ODescriptor
102 virtual void construct() SAL_OVERRIDE;
103 // ::cppu::OComponentHelper
104 virtual void SAL_CALL disposing() SAL_OVERRIDE;
105 // XPropertySet
106 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
107 // XNamed
108 virtual OUString SAL_CALL getName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
109 virtual void SAL_CALL setName( const OUString& aName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
110 // XDataDescriptorFactory
111 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL createDataDescriptor( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
116 #endif // INCLUDED_CONNECTIVITY_SDBCX_VCOLUMN_HXX
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */