Files
libreoffice/dbaccess/source/core/api/CRowSetDataColumn.hxx

104 lines
4.8 KiB
C++
Raw Normal View History

2010-10-27 12:33:13 +01:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2012-06-14 17:39:53 +01:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_DBACCESS_SOURCE_CORE_API_CROWSETDATACOLUMN_HXX
#define INCLUDED_DBACCESS_SOURCE_CORE_API_CROWSETDATACOLUMN_HXX
2000-09-18 23:16:46 +00:00
#include "datacolumn.hxx"
#include "RowSetRow.hxx"
#include "RowSetCacheIterator.hxx"
#include "columnsettings.hxx"
2000-09-18 23:16:46 +00:00
#include <connectivity/CommonTools.hxx>
2000-10-11 10:21:40 +00:00
#include <comphelper/proparrhlp.hxx>
2000-09-18 23:16:46 +00:00
namespace dbaccess
{
class ORowSetDataColumn;
2000-10-11 10:21:40 +00:00
typedef ::comphelper::OPropertyArrayUsageHelper<ORowSetDataColumn> ORowSetDataColumn_PROP;
2000-09-18 23:16:46 +00:00
class ORowSetDataColumn : public ODataColumn,
public OColumnSettings,
public ORowSetDataColumn_PROP
{
protected:
2001-01-22 06:38:24 +00:00
ORowSetCacheIterator m_aColumnValue;
2000-09-18 23:16:46 +00:00
::com::sun::star::uno::Any m_aOldValue;
2000-10-17 09:19:03 +00:00
OUString m_sLabel;
OUString m_aDescription; // description
ORowSetBase* m_pRowSet;
2002-08-08 06:08:29 +00:00
virtual ~ORowSetDataColumn();
2000-09-18 23:16:46 +00:00
public:
ORowSetDataColumn(const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow >& _xRow,
const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRowUpdate >& _xRowUpdate,
sal_Int32 _nPos,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMeta,
const OUString& _rDescription,
const OUString& i_sLabel,
const ORowSetCacheIterator& _rColumnValue);
2000-09-18 23:16:46 +00:00
2002-08-08 06:08:29 +00:00
2000-09-18 23:16:46 +00:00
// com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
2000-10-11 10:21:40 +00:00
// comphelper::OPropertyArrayUsageHelper
2000-09-18 23:16:46 +00:00
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
// cppu::OPropertySetHelper
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
virtual sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue,
::com::sun::star::uno::Any & rOldValue,
sal_Int32 nHandle,
const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException);
virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue )throw (::com::sun::star::uno::Exception);
virtual void fireValueChange(const ::connectivity::ORowSetValue& _rOldValue);
protected:
using ODataColumn::getFastPropertyValue;
2000-09-18 23:16:46 +00:00
};
2000-11-03 13:32:31 +00:00
typedef connectivity::sdbcx::OCollection ORowSetDataColumns_BASE;
class ORowSetDataColumns : public ORowSetDataColumns_BASE
2000-09-18 23:16:46 +00:00
{
2010-10-15 12:22:54 -05:00
::rtl::Reference< ::connectivity::OSQLColumns> m_aColumns;
2000-09-18 23:16:46 +00:00
protected:
virtual connectivity::sdbcx::ObjectType createObject(const OUString& _rName);
2001-10-12 11:02:56 +00:00
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
2000-09-18 23:16:46 +00:00
public:
ORowSetDataColumns(
sal_Bool _bCase,
2010-10-15 12:22:54 -05:00
const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,
2000-09-18 23:16:46 +00:00
::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
const ::std::vector< OUString> &_rVector
2001-10-12 11:02:56 +00:00
);
virtual ~ORowSetDataColumns();
2000-11-03 13:32:31 +00:00
// only the name is identical to ::cppu::OComponentHelper
virtual void SAL_CALL disposing(void);
void assign(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< OUString> &_rVector);
2000-09-18 23:16:46 +00:00
};
}
#endif
2010-10-27 12:33:13 +01:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */