Update ooo320-m1
[ooovba.git] / connectivity / source / inc / calc / CResultSet.hxx
blobdc4f19194a2a613507519f96b18a0e4adac96123
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: CResultSet.hxx,v $
10 * $Revision: 1.5 $
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 _CONNECTIVITY_CALC_RESULTSET_HXX_
31 #define _CONNECTIVITY_CALC_RESULTSET_HXX_
33 #include "file/FResultSet.hxx"
34 #include <com/sun/star/sdbcx/XRowLocate.hpp>
35 #include <com/sun/star/sdbcx/XDeleteRows.hpp>
36 #include <cppuhelper/implbase2.hxx>
38 namespace connectivity
40 namespace calc
42 class OCalcResultSet;
43 // these typedef's are only necessary for the compiler
44 typedef ::cppu::ImplHelper2< ::com::sun::star::sdbcx::XRowLocate,
45 ::com::sun::star::sdbcx::XDeleteRows> OCalcResultSet_BASE;
46 typedef file::OResultSet OCalcResultSet_BASE2;
47 typedef ::comphelper::OPropertyArrayUsageHelper<OCalcResultSet> OCalcResultSet_BASE3;
50 class OCalcResultSet : public OCalcResultSet_BASE2,
51 public OCalcResultSet_BASE,
52 public OCalcResultSet_BASE3
54 sal_Bool m_bBookmarkable;
55 protected:
56 // OPropertyArrayUsageHelper
57 virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
58 // OPropertySetHelper
59 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
60 virtual sal_Bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex);
61 public:
62 DECLARE_SERVICE_INFO();
64 OCalcResultSet( file::OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator);
66 private:
67 // XInterface
68 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
69 virtual void SAL_CALL acquire() throw();
70 virtual void SAL_CALL release() throw();
71 //XTypeProvider
72 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
73 // XPropertySet
74 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
76 // XRowLocate
77 virtual ::com::sun::star::uno::Any SAL_CALL getBookmark( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
78 virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
79 virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
80 virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
81 virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
82 virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
83 // XDeleteRows
84 virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
86 virtual sal_Bool isRowDeleted() const { return sal_False; }
92 #endif //_CONNECTIVITY_CALC_RESULTSET_HXX_