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 DBACCESS_CORE_API_CROWSETDATACOLUMN_HXX
20 #define DBACCESS_CORE_API_CROWSETDATACOLUMN_HXX
22 #include "datacolumn.hxx"
23 #include "RowSetRow.hxx"
24 #include "RowSetCacheIterator.hxx"
25 #include "columnsettings.hxx"
27 #include <connectivity/CommonTools.hxx>
28 #include <comphelper/proparrhlp.hxx>
32 class ORowSetDataColumn
;
33 typedef ::comphelper::OPropertyArrayUsageHelper
<ORowSetDataColumn
> ORowSetDataColumn_PROP
;
35 class ORowSetDataColumn
: public ODataColumn
,
36 public OColumnSettings
,
37 public ORowSetDataColumn_PROP
40 ORowSetCacheIterator m_aColumnValue
;
41 ::com::sun::star::uno::Any m_aOldValue
;
43 ::rtl::OUString m_sLabel
;
44 ::rtl::OUString m_aDescription
; // description
45 ORowSetBase
* m_pRowSet
;
47 virtual ~ORowSetDataColumn();
49 ORowSetDataColumn(const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSetMetaData
>& _xMetaData
,
50 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XRow
>& _xRow
,
51 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XRowUpdate
>& _xRowUpdate
,
53 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDatabaseMetaData
>& _rxDBMeta
,
54 const ::rtl::OUString
& _rDescription
,
55 const ::rtl::OUString
& i_sLabel
,
56 const ORowSetCacheIterator
& _rColumnValue
);
59 // com::sun::star::lang::XTypeProvider
60 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId() throw (::com::sun::star::uno::RuntimeException
);
61 // comphelper::OPropertyArrayUsageHelper
62 virtual ::cppu::IPropertyArrayHelper
* createArrayHelper( ) const;
64 // cppu::OPropertySetHelper
65 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
67 virtual sal_Bool SAL_CALL
convertFastPropertyValue( ::com::sun::star::uno::Any
& rConvertedValue
,
68 ::com::sun::star::uno::Any
& rOldValue
,
70 const ::com::sun::star::uno::Any
& rValue
) throw (::com::sun::star::lang::IllegalArgumentException
);
71 virtual void SAL_CALL
getFastPropertyValue( ::com::sun::star::uno::Any
& rValue
, sal_Int32 nHandle
) const;
72 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast(sal_Int32 nHandle
,const ::com::sun::star::uno::Any
& rValue
)throw (::com::sun::star::uno::Exception
);
74 virtual void fireValueChange(const ::connectivity::ORowSetValue
& _rOldValue
);
76 using ODataColumn::getFastPropertyValue
;
79 typedef connectivity::sdbcx::OCollection ORowSetDataColumns_BASE
;
80 class ORowSetDataColumns
: public ORowSetDataColumns_BASE
82 ::rtl::Reference
< ::connectivity::OSQLColumns
> m_aColumns
;
84 virtual connectivity::sdbcx::ObjectType
createObject(const ::rtl::OUString
& _rName
);
85 virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException
);
89 const ::rtl::Reference
< ::connectivity::OSQLColumns
>& _rColumns
,
90 ::cppu::OWeakObject
& _rParent
,
91 ::osl::Mutex
& _rMutex
,
92 const ::std::vector
< ::rtl::OUString
> &_rVector
94 virtual ~ORowSetDataColumns();
95 // only the name is identical to ::cppu::OComponentHelper
96 virtual void SAL_CALL
disposing(void);
97 void assign(const ::rtl::Reference
< ::connectivity::OSQLColumns
>& _rColumns
,const ::std::vector
< ::rtl::OUString
> &_rVector
);
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */