update dev300-m58
[ooovba.git] / dbaccess / source / core / api / resultcolumn.hxx
blobabbe8c78dffa9c57eb287dfaaefa2bbb669644d2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: resultcolumn.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DBACORE_RESULTCOLUMN_HXX_
32 #define _DBACORE_RESULTCOLUMN_HXX_
34 #ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATA_HDL_
35 #include <com/sun/star/sdbc/XResultSetMetaData.hdl>
36 #endif
37 #ifndef _DBA_COREAPI_COLUMN_HXX_
38 #include <column.hxx>
39 #endif
40 #include <boost/optional.hpp>
41 namespace dbaccess
43 //************************************************************
44 // OResultColumn
45 //************************************************************
46 class OResultColumn : public OColumn,
47 public ::comphelper::OPropertyArrayUsageHelper < OResultColumn >
49 protected:
50 ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData;
51 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xDBMetaData;
52 sal_Int32 m_nPos;
53 ::com::sun::star::uno::Any m_aIsRowVersion;
54 mutable ::boost::optional< sal_Bool > m_isSigned;
55 mutable ::boost::optional< sal_Bool > m_isCurrency;
56 mutable ::boost::optional< sal_Bool > m_bSearchable;
57 mutable ::boost::optional< sal_Bool > m_isCaseSensitive;
58 mutable ::boost::optional< sal_Bool > m_isReadOnly;
59 mutable ::boost::optional< sal_Bool > m_isWritable;
60 mutable ::boost::optional< sal_Bool > m_isDefinitelyWritable;
61 mutable ::boost::optional< sal_Bool > m_isAutoIncrement;
62 mutable ::boost::optional< sal_Int32 > m_isNullable;
63 mutable ::boost::optional< ::rtl::OUString > m_sColumnLabel;
64 mutable ::boost::optional< sal_Int32 > m_nColumnDisplaySize;
65 mutable ::boost::optional< sal_Int32 > m_nColumnType;
66 mutable ::boost::optional< sal_Int32 > m_nPrecision;
67 mutable ::boost::optional< sal_Int32 > m_nScale;
69 virtual ~OResultColumn();
70 public:
71 OResultColumn(
72 const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
73 sal_Int32 _nPos,
74 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMeta );
76 // com::sun::star::lang::XTypeProvider
77 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
79 // com::sun::star::lang::XServiceInfo
80 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
81 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
83 // cppu::OComponentHelper
84 virtual void SAL_CALL disposing(void);
86 // comphelper::OPropertyArrayUsageHelper
87 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
89 // cppu::OPropertySetHelper
90 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
91 virtual void SAL_CALL getFastPropertyValue(
92 ::com::sun::star::uno::Any& rValue,
93 sal_Int32 nHandle
94 ) const;
96 private:
97 void impl_determineIsRowVersion_nothrow();
99 protected:
100 using ::cppu::OPropertySetHelper::getFastPropertyValue;
103 #endif // _DBACORE_RESULTCOLUMN_HXX_