xref: /trunk/main/connectivity/source/inc/flat/EResultSet.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _CONNECTIVITY_FLAT_ERESULTSET_HXX_
29 #define _CONNECTIVITY_FLAT_ERESULTSET_HXX_
30 
31 #include "file/FResultSet.hxx"
32 #include <com/sun/star/sdbcx/XRowLocate.hpp>
33 #include <cppuhelper/implbase1.hxx>
34 
35 namespace connectivity
36 {
37     namespace flat
38     {
39         class OFlatResultSet;
40         // these typedef's are only necessary for the compiler
41         typedef ::cppu::ImplHelper1<  ::com::sun::star::sdbcx::XRowLocate> OFlatResultSet_BASE;
42         typedef file::OResultSet                                            OFlatResultSet_BASE2;
43         typedef ::comphelper::OPropertyArrayUsageHelper<OFlatResultSet>     OFlatResultSet_BASE3;
44 
45 
46         class OFlatResultSet :  public OFlatResultSet_BASE2,
47                                 public OFlatResultSet_BASE,
48                                 public OFlatResultSet_BASE3
49         {
50             sal_Bool m_bBookmarkable;
51         protected:
52             // OPropertyArrayUsageHelper
53             virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
54             // OPropertySetHelper
55             virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
56         public:
57             DECLARE_SERVICE_INFO();
58 
59             OFlatResultSet( file::OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator&   _aSQLIterator);
60 
61             // XInterface
62             virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
63             virtual void SAL_CALL acquire() throw();
64             virtual void SAL_CALL release() throw();
65             //XTypeProvider
66             virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
67             // XPropertySet
68             virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
69 
70             // XRowLocate
71             virtual ::com::sun::star::uno::Any SAL_CALL getBookmark(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
72             virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
73             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);
74             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);
75             virtual sal_Bool SAL_CALL hasOrderedBookmarks(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
76             virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
77         };
78     }
79 }
80 #endif //_CONNECTIVITY_FLAT_DRESULTSET_HXX_
81 
82