Update ooo320-m1
[ooovba.git] / dbaccess / source / core / api / CRowSetDataColumn.hxx
blob2d386de9588ec690b9552b2e1abb010a78f57f4f
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: CRowSetDataColumn.hxx,v $
10 * $Revision: 1.17 $
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 ************************************************************************/
30 #ifndef DBACCESS_CORE_API_CROWSETDATACOLUMN_HXX
31 #define DBACCESS_CORE_API_CROWSETDATACOLUMN_HXX
33 #ifndef _DBACORE_DATACOLUMN_HXX_
34 #include "datacolumn.hxx"
35 #endif
36 #ifndef DBACCESS_CORE_API_ROWSETROW_HXX
37 #include "RowSetRow.hxx"
38 #endif
39 #ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
40 #include <connectivity/CommonTools.hxx>
41 #endif
42 #ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
43 #include <comphelper/proparrhlp.hxx>
44 #endif
45 #ifndef DBACCESS_ROWSETCACHEITERATOR_HXX
46 #include "RowSetCacheIterator.hxx"
47 #endif
49 namespace dbaccess
51 class ORowSetDataColumn;
52 typedef ::comphelper::OPropertyArrayUsageHelper<ORowSetDataColumn> ORowSetDataColumn_PROP;
54 class ORowSetDataColumn : public ODataColumn,
55 public OColumnSettings,
56 public ORowSetDataColumn_PROP
58 protected:
59 ORowSetCacheIterator m_aColumnValue;
60 ::com::sun::star::uno::Any m_aOldValue;
62 ::rtl::OUString m_aDescription; // description
63 ORowSetBase* m_pRowSet;
65 virtual ~ORowSetDataColumn();
66 public:
67 ORowSetDataColumn(const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
68 const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow >& _xRow,
69 const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRowUpdate >& _xRowUpdate,
70 sal_Int32 _nPos,
71 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMeta,
72 const ::rtl::OUString& _rDescription,
73 const ORowSetCacheIterator& _rColumnValue);
76 // com::sun::star::lang::XTypeProvider
77 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
78 // comphelper::OPropertyArrayUsageHelper
79 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
81 // cppu::OPropertySetHelper
82 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
84 virtual sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue,
85 ::com::sun::star::uno::Any & rOldValue,
86 sal_Int32 nHandle,
87 const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException);
88 virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
89 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue )throw (::com::sun::star::uno::Exception);
91 virtual void fireValueChange(const ::connectivity::ORowSetValue& _rOldValue);
93 protected:
94 using ODataColumn::getFastPropertyValue;
96 // -------------------------------------------------------------------------
97 // typedef connectivity::ORefVector< ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> >
98 // ORowSetDataColumns_COLLECTION;
100 typedef connectivity::sdbcx::OCollection ORowSetDataColumns_BASE;
101 class ORowSetDataColumns : public ORowSetDataColumns_BASE
103 ::vos::ORef< ::connectivity::OSQLColumns> m_aColumns;
104 protected:
105 virtual connectivity::sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
106 virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
107 public:
108 ORowSetDataColumns(
109 sal_Bool _bCase,
110 const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,
111 ::cppu::OWeakObject& _rParent,
112 ::osl::Mutex& _rMutex,
113 const ::std::vector< ::rtl::OUString> &_rVector
115 virtual ~ORowSetDataColumns();
116 // only the name is identical to ::cppu::OComponentHelper
117 virtual void SAL_CALL disposing(void);
118 void assign(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector);
122 #endif