1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: CRowSetDataColumn.hxx,v $
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"
36 #ifndef DBACCESS_CORE_API_ROWSETROW_HXX
37 #include "RowSetRow.hxx"
39 #ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
40 #include <connectivity/CommonTools.hxx>
42 #ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
43 #include <comphelper/proparrhlp.hxx>
45 #ifndef DBACCESS_ROWSETCACHEITERATOR_HXX
46 #include "RowSetCacheIterator.hxx"
51 class ORowSetDataColumn
;
52 typedef ::comphelper::OPropertyArrayUsageHelper
<ORowSetDataColumn
> ORowSetDataColumn_PROP
;
54 class ORowSetDataColumn
: public ODataColumn
,
55 public OColumnSettings
,
56 public ORowSetDataColumn_PROP
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();
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
,
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
,
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
);
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
;
105 virtual connectivity::sdbcx::ObjectType
createObject(const ::rtl::OUString
& _rName
);
106 virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException
);
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
);