xref: /AOO41X/main/connectivity/source/inc/flat/EResultSet.hxx (revision caf5cd79edad04a48dcaf209068b3b89eae4622e)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _CONNECTIVITY_FLAT_ERESULTSET_HXX_
25 #define _CONNECTIVITY_FLAT_ERESULTSET_HXX_
26 
27 #include "file/FResultSet.hxx"
28 #include <com/sun/star/sdbcx/XRowLocate.hpp>
29 #include <cppuhelper/implbase1.hxx>
30 
31 namespace connectivity
32 {
33     namespace flat
34     {
35         class OFlatResultSet;
36         // these typedef's are only necessary for the compiler
37         typedef ::cppu::ImplHelper1<  ::com::sun::star::sdbcx::XRowLocate> OFlatResultSet_BASE;
38         typedef file::OResultSet                                            OFlatResultSet_BASE2;
39         typedef ::comphelper::OPropertyArrayUsageHelper<OFlatResultSet>     OFlatResultSet_BASE3;
40 
41 
42         class OFlatResultSet :  public OFlatResultSet_BASE2,
43                                 public OFlatResultSet_BASE,
44                                 public OFlatResultSet_BASE3
45         {
46             sal_Bool m_bBookmarkable;
47         protected:
48             // OPropertyArrayUsageHelper
49             virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
50             // OPropertySetHelper
51             virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
52         public:
53             DECLARE_SERVICE_INFO();
54 
55             OFlatResultSet( file::OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator&   _aSQLIterator);
56 
57             // XInterface
58             virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
59             virtual void SAL_CALL acquire() throw();
60             virtual void SAL_CALL release() throw();
61             //XTypeProvider
62             virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
63             // XPropertySet
64             virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
65 
66             // XRowLocate
67             virtual ::com::sun::star::uno::Any SAL_CALL getBookmark(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
68             virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
69             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);
70             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);
71             virtual sal_Bool SAL_CALL hasOrderedBookmarks(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
72             virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
73         };
74     }
75 }
76 #endif //_CONNECTIVITY_FLAT_DRESULTSET_HXX_
77 
78