xref: /trunk/main/ucb/source/cacher/contentresultsetwrapper.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1*6df1ea1fSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*6df1ea1fSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*6df1ea1fSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*6df1ea1fSAndrew Rist  * distributed with this work for additional information
6*6df1ea1fSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*6df1ea1fSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*6df1ea1fSAndrew Rist  * "License"); you may not use this file except in compliance
9*6df1ea1fSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*6df1ea1fSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*6df1ea1fSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*6df1ea1fSAndrew Rist  * software distributed under the License is distributed on an
15*6df1ea1fSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*6df1ea1fSAndrew Rist  * KIND, either express or implied.  See the License for the
17*6df1ea1fSAndrew Rist  * specific language governing permissions and limitations
18*6df1ea1fSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*6df1ea1fSAndrew Rist  *************************************************************/
21*6df1ea1fSAndrew Rist 
22*6df1ea1fSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _CONTENT_RESULTSET_WRAPPER_HXX
25cdf0e10cSrcweir #define _CONTENT_RESULTSET_WRAPPER_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <rtl/ustring.hxx>
28cdf0e10cSrcweir #include <ucbhelper/macros.hxx>
29cdf0e10cSrcweir #include <osl/mutex.hxx>
30cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
31cdf0e10cSrcweir #include <com/sun/star/lang/XComponent.hpp>
32cdf0e10cSrcweir #include <com/sun/star/sdbc/XCloseable.hpp>
33cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
34cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSet.hpp>
35cdf0e10cSrcweir #include <com/sun/star/sdbc/XRow.hpp>
36cdf0e10cSrcweir #include <com/sun/star/ucb/XContentAccess.hpp>
37cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
38cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp>
39cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir //=========================================================================
42cdf0e10cSrcweir 
43cdf0e10cSrcweir class ContentResultSetWrapperListener;
44cdf0e10cSrcweir class ContentResultSetWrapper
45cdf0e10cSrcweir                 : public cppu::OWeakObject
46cdf0e10cSrcweir                 , public com::sun::star::lang::XComponent
47cdf0e10cSrcweir                 , public com::sun::star::sdbc::XCloseable
48cdf0e10cSrcweir                 , public com::sun::star::sdbc::XResultSetMetaDataSupplier
49cdf0e10cSrcweir                 , public com::sun::star::beans::XPropertySet
50cdf0e10cSrcweir                 , public com::sun::star::ucb::XContentAccess
51cdf0e10cSrcweir                 , public com::sun::star::sdbc::XResultSet
52cdf0e10cSrcweir                 , public com::sun::star::sdbc::XRow
53cdf0e10cSrcweir {
54cdf0e10cSrcweir protected:
55cdf0e10cSrcweir 
56cdf0e10cSrcweir     //--------------------------------------------------------------------------
57cdf0e10cSrcweir     //class PropertyChangeListenerContainer_Impl.
58cdf0e10cSrcweir 
59cdf0e10cSrcweir     struct equalStr_Impl
60cdf0e10cSrcweir     {
operator ()ContentResultSetWrapper::equalStr_Impl61cdf0e10cSrcweir             bool operator()( const rtl::OUString& s1, const rtl::OUString& s2 ) const
62cdf0e10cSrcweir         {
63cdf0e10cSrcweir             return !!( s1 == s2 );
64cdf0e10cSrcweir         }
65cdf0e10cSrcweir     };
66cdf0e10cSrcweir 
67cdf0e10cSrcweir     struct hashStr_Impl
68cdf0e10cSrcweir     {
operator ()ContentResultSetWrapper::hashStr_Impl69cdf0e10cSrcweir         size_t operator()( const rtl::OUString& rName ) const
70cdf0e10cSrcweir         {
71cdf0e10cSrcweir             return rName.hashCode();
72cdf0e10cSrcweir         }
73cdf0e10cSrcweir     };
74cdf0e10cSrcweir 
75cdf0e10cSrcweir     typedef cppu::OMultiTypeInterfaceContainerHelperVar
76cdf0e10cSrcweir     < rtl::OUString , hashStr_Impl , equalStr_Impl >
77cdf0e10cSrcweir     PropertyChangeListenerContainer_Impl;
78cdf0e10cSrcweir     //--------------------------------------------------------------------------
79cdf0e10cSrcweir     // class ReacquireableGuard
80cdf0e10cSrcweir 
81cdf0e10cSrcweir     class ReacquireableGuard
82cdf0e10cSrcweir     {
83cdf0e10cSrcweir     protected:
84cdf0e10cSrcweir         osl::Mutex* pT;
85cdf0e10cSrcweir     public:
86cdf0e10cSrcweir 
ReacquireableGuard(osl::Mutex * t)87cdf0e10cSrcweir         ReacquireableGuard(osl::Mutex * t) : pT(t)
88cdf0e10cSrcweir         {
89cdf0e10cSrcweir             pT->acquire();
90cdf0e10cSrcweir         }
91cdf0e10cSrcweir 
ReacquireableGuard(osl::Mutex & t)92cdf0e10cSrcweir         ReacquireableGuard(osl::Mutex& t) : pT(&t)
93cdf0e10cSrcweir         {
94cdf0e10cSrcweir             pT->acquire();
95cdf0e10cSrcweir         }
96cdf0e10cSrcweir 
97cdf0e10cSrcweir         /** Releases mutex. */
~ReacquireableGuard()98cdf0e10cSrcweir         ~ReacquireableGuard()
99cdf0e10cSrcweir         {
100cdf0e10cSrcweir             if (pT)
101cdf0e10cSrcweir                 pT->release();
102cdf0e10cSrcweir         }
103cdf0e10cSrcweir 
104cdf0e10cSrcweir         /** Releases mutex. */
clear()105cdf0e10cSrcweir         void clear()
106cdf0e10cSrcweir         {
107cdf0e10cSrcweir             if(pT)
108cdf0e10cSrcweir             {
109cdf0e10cSrcweir                 pT->release();
110cdf0e10cSrcweir                 pT = NULL;
111cdf0e10cSrcweir             }
112cdf0e10cSrcweir         }
113cdf0e10cSrcweir 
114cdf0e10cSrcweir         /** Reacquire mutex. */
reacquire()115cdf0e10cSrcweir         void reacquire()
116cdf0e10cSrcweir         {
117cdf0e10cSrcweir             if(pT)
118cdf0e10cSrcweir             {
119cdf0e10cSrcweir                 pT->acquire();
120cdf0e10cSrcweir             }
121cdf0e10cSrcweir         }
122cdf0e10cSrcweir     };
123cdf0e10cSrcweir 
124cdf0e10cSrcweir     //-----------------------------------------------------------------
125cdf0e10cSrcweir     //members
126cdf0e10cSrcweir 
127cdf0e10cSrcweir     //my Mutex
128cdf0e10cSrcweir     osl::Mutex              m_aMutex;
129cdf0e10cSrcweir 
130cdf0e10cSrcweir     //different Interfaces from Origin:
131cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSet >
132cdf0e10cSrcweir                             m_xResultSetOrigin;
133cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::sdbc::XRow >
134cdf0e10cSrcweir                             m_xRowOrigin; //XRow-interface from m_xOrigin
135cdf0e10cSrcweir                             //!! call impl_init_xRowOrigin() bevor you access this member
136cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::ucb::XContentAccess >
137cdf0e10cSrcweir                             m_xContentAccessOrigin; //XContentAccess-interface from m_xOrigin
138cdf0e10cSrcweir                             //!! call impl_init_xContentAccessOrigin() bevor you access this member
139cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >
140cdf0e10cSrcweir                             m_xPropertySetOrigin; //XPropertySet-interface from m_xOrigin
141cdf0e10cSrcweir                             //!! call impl_init_xPropertySetOrigin() bevor you access this member
142cdf0e10cSrcweir 
143cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >
144cdf0e10cSrcweir                             m_xPropertySetInfo;
145cdf0e10cSrcweir                             //call impl_initPropertySetInfo() bevor you access this member
146cdf0e10cSrcweir 
147cdf0e10cSrcweir     sal_Int32               m_nForwardOnly;
148cdf0e10cSrcweir 
149cdf0e10cSrcweir private:
150cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener >
151cdf0e10cSrcweir                             m_xMyListenerImpl;
152cdf0e10cSrcweir     ContentResultSetWrapperListener*
153cdf0e10cSrcweir                             m_pMyListenerImpl;
154cdf0e10cSrcweir 
155cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSetMetaData >
156cdf0e10cSrcweir                             m_xMetaDataFromOrigin; //XResultSetMetaData from m_xOrigin
157cdf0e10cSrcweir 
158cdf0e10cSrcweir     //management of listeners
159cdf0e10cSrcweir     sal_Bool                m_bDisposed; ///Dispose call ready.
160cdf0e10cSrcweir     sal_Bool                m_bInDispose;///In dispose call
161cdf0e10cSrcweir     osl::Mutex              m_aContainerMutex;
162cdf0e10cSrcweir     cppu::OInterfaceContainerHelper*
163cdf0e10cSrcweir                             m_pDisposeEventListeners;
164cdf0e10cSrcweir     PropertyChangeListenerContainer_Impl*
165cdf0e10cSrcweir                             m_pPropertyChangeListeners;
166cdf0e10cSrcweir     PropertyChangeListenerContainer_Impl*
167cdf0e10cSrcweir                             m_pVetoableChangeListeners;
168cdf0e10cSrcweir 
169cdf0e10cSrcweir     //-----------------------------------------------------------------
170cdf0e10cSrcweir     //methods:
171cdf0e10cSrcweir private:
172cdf0e10cSrcweir     PropertyChangeListenerContainer_Impl* SAL_CALL
173cdf0e10cSrcweir     impl_getPropertyChangeListenerContainer();
174cdf0e10cSrcweir 
175cdf0e10cSrcweir     PropertyChangeListenerContainer_Impl* SAL_CALL
176cdf0e10cSrcweir     impl_getVetoableChangeListenerContainer();
177cdf0e10cSrcweir 
178cdf0e10cSrcweir protected:
179cdf0e10cSrcweir     //-----------------------------------------------------------------
180cdf0e10cSrcweir 
181cdf0e10cSrcweir     ContentResultSetWrapper( com::sun::star::uno::Reference<
182cdf0e10cSrcweir                         com::sun::star::sdbc::XResultSet > xOrigin );
183cdf0e10cSrcweir 
184cdf0e10cSrcweir     virtual ~ContentResultSetWrapper();
185cdf0e10cSrcweir 
186cdf0e10cSrcweir     void SAL_CALL impl_init();
187cdf0e10cSrcweir     void SAL_CALL impl_deinit();
188cdf0e10cSrcweir 
189cdf0e10cSrcweir     //--
190cdf0e10cSrcweir 
191cdf0e10cSrcweir     void SAL_CALL impl_init_xRowOrigin();
192cdf0e10cSrcweir     void SAL_CALL impl_init_xContentAccessOrigin();
193cdf0e10cSrcweir     void SAL_CALL impl_init_xPropertySetOrigin();
194cdf0e10cSrcweir 
195cdf0e10cSrcweir     //--
196cdf0e10cSrcweir 
197cdf0e10cSrcweir     virtual void SAL_CALL impl_initPropertySetInfo(); //helping XPropertySet
198cdf0e10cSrcweir 
199cdf0e10cSrcweir     void SAL_CALL
200cdf0e10cSrcweir     impl_EnsureNotDisposed()
201cdf0e10cSrcweir         throw( com::sun::star::lang::DisposedException,
202cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
203cdf0e10cSrcweir 
204cdf0e10cSrcweir     void SAL_CALL
205cdf0e10cSrcweir     impl_notifyPropertyChangeListeners(
206cdf0e10cSrcweir             const com::sun::star::beans::PropertyChangeEvent& rEvt );
207cdf0e10cSrcweir 
208cdf0e10cSrcweir     void SAL_CALL
209cdf0e10cSrcweir     impl_notifyVetoableChangeListeners(
210cdf0e10cSrcweir             const com::sun::star::beans::PropertyChangeEvent& rEvt )
211cdf0e10cSrcweir             throw( com::sun::star::beans::PropertyVetoException,
212cdf0e10cSrcweir                    com::sun::star::uno::RuntimeException );
213cdf0e10cSrcweir 
214cdf0e10cSrcweir     sal_Bool SAL_CALL impl_isForwardOnly();
215cdf0e10cSrcweir 
216cdf0e10cSrcweir public:
217cdf0e10cSrcweir 
218cdf0e10cSrcweir     //-----------------------------------------------------------------
219cdf0e10cSrcweir     // XInterface
220cdf0e10cSrcweir     //-----------------------------------------------------------------
221cdf0e10cSrcweir     virtual com::sun::star::uno::Any SAL_CALL
222cdf0e10cSrcweir     queryInterface( const com::sun::star::uno::Type & rType )
223cdf0e10cSrcweir         throw( com::sun::star::uno::RuntimeException );
224cdf0e10cSrcweir 
225cdf0e10cSrcweir     //-----------------------------------------------------------------
226cdf0e10cSrcweir     // XComponent
227cdf0e10cSrcweir     //-----------------------------------------------------------------
228cdf0e10cSrcweir     virtual void SAL_CALL
229cdf0e10cSrcweir     dispose() throw( com::sun::star::uno::RuntimeException );
230cdf0e10cSrcweir 
231cdf0e10cSrcweir     virtual void SAL_CALL
232cdf0e10cSrcweir     addEventListener( const com::sun::star::uno::Reference<
233cdf0e10cSrcweir         com::sun::star::lang::XEventListener >& Listener )
234cdf0e10cSrcweir             throw( com::sun::star::uno::RuntimeException );
235cdf0e10cSrcweir 
236cdf0e10cSrcweir     virtual void SAL_CALL
237cdf0e10cSrcweir     removeEventListener( const com::sun::star::uno::Reference<
238cdf0e10cSrcweir         com::sun::star::lang::XEventListener >& Listener )
239cdf0e10cSrcweir             throw( com::sun::star::uno::RuntimeException );
240cdf0e10cSrcweir 
241cdf0e10cSrcweir     //-----------------------------------------------------------------
242cdf0e10cSrcweir     //XCloseable
243cdf0e10cSrcweir     //-----------------------------------------------------------------
244cdf0e10cSrcweir     virtual void SAL_CALL
245cdf0e10cSrcweir     close()
246cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
247cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
248cdf0e10cSrcweir 
249cdf0e10cSrcweir     //-----------------------------------------------------------------
250cdf0e10cSrcweir     //XResultSetMetaDataSupplier
251cdf0e10cSrcweir     //-----------------------------------------------------------------
252cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
253cdf0e10cSrcweir                 com::sun::star::sdbc::XResultSetMetaData > SAL_CALL
254cdf0e10cSrcweir     getMetaData()
255cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
256cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
257cdf0e10cSrcweir 
258cdf0e10cSrcweir     //-----------------------------------------------------------------
259cdf0e10cSrcweir     // XPropertySet
260cdf0e10cSrcweir     //-----------------------------------------------------------------
261cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
262cdf0e10cSrcweir                 com::sun::star::beans::XPropertySetInfo > SAL_CALL
263cdf0e10cSrcweir     getPropertySetInfo()
264cdf0e10cSrcweir         throw( com::sun::star::uno::RuntimeException );
265cdf0e10cSrcweir 
266cdf0e10cSrcweir     virtual void SAL_CALL
267cdf0e10cSrcweir     setPropertyValue( const rtl::OUString& aPropertyName,
268cdf0e10cSrcweir                       const com::sun::star::uno::Any& aValue )
269cdf0e10cSrcweir         throw( com::sun::star::beans::UnknownPropertyException,
270cdf0e10cSrcweir                com::sun::star::beans::PropertyVetoException,
271cdf0e10cSrcweir                com::sun::star::lang::IllegalArgumentException,
272cdf0e10cSrcweir                com::sun::star::lang::WrappedTargetException,
273cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
274cdf0e10cSrcweir 
275cdf0e10cSrcweir     virtual com::sun::star::uno::Any SAL_CALL
276cdf0e10cSrcweir     getPropertyValue( const rtl::OUString& PropertyName )
277cdf0e10cSrcweir         throw( com::sun::star::beans::UnknownPropertyException,
278cdf0e10cSrcweir         com::sun::star::lang::WrappedTargetException,
279cdf0e10cSrcweir         com::sun::star::uno::RuntimeException );
280cdf0e10cSrcweir 
281cdf0e10cSrcweir     virtual void SAL_CALL
282cdf0e10cSrcweir     addPropertyChangeListener( const rtl::OUString& aPropertyName,
283cdf0e10cSrcweir                                const com::sun::star::uno::Reference<
284cdf0e10cSrcweir                                     com::sun::star::beans::XPropertyChangeListener >& xListener )
285cdf0e10cSrcweir         throw( com::sun::star::beans::UnknownPropertyException,
286cdf0e10cSrcweir                com::sun::star::lang::WrappedTargetException,
287cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
288cdf0e10cSrcweir 
289cdf0e10cSrcweir     virtual void SAL_CALL
290cdf0e10cSrcweir     removePropertyChangeListener( const rtl::OUString& aPropertyName,
291cdf0e10cSrcweir                                   const com::sun::star::uno::Reference<
292cdf0e10cSrcweir                                     com::sun::star::beans::XPropertyChangeListener >& aListener )
293cdf0e10cSrcweir         throw( com::sun::star::beans::UnknownPropertyException,
294cdf0e10cSrcweir                com::sun::star::lang::WrappedTargetException,
295cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
296cdf0e10cSrcweir 
297cdf0e10cSrcweir     virtual void SAL_CALL
298cdf0e10cSrcweir     addVetoableChangeListener( const rtl::OUString& PropertyName,
299cdf0e10cSrcweir                                const com::sun::star::uno::Reference<
300cdf0e10cSrcweir                                     com::sun::star::beans::XVetoableChangeListener >& aListener )
301cdf0e10cSrcweir         throw( com::sun::star::beans::UnknownPropertyException,
302cdf0e10cSrcweir                com::sun::star::lang::WrappedTargetException,
303cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
304cdf0e10cSrcweir 
305cdf0e10cSrcweir     virtual void SAL_CALL
306cdf0e10cSrcweir     removeVetoableChangeListener( const rtl::OUString& PropertyName,
307cdf0e10cSrcweir                                   const com::sun::star::uno::Reference<
308cdf0e10cSrcweir                                     com::sun::star::beans::XVetoableChangeListener >& aListener )
309cdf0e10cSrcweir         throw( com::sun::star::beans::UnknownPropertyException,
310cdf0e10cSrcweir                com::sun::star::lang::WrappedTargetException,
311cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
312cdf0e10cSrcweir 
313cdf0e10cSrcweir     //-----------------------------------------------------------------
314cdf0e10cSrcweir     // own methods
315cdf0e10cSrcweir     //-----------------------------------------------------------------
316cdf0e10cSrcweir     virtual void SAL_CALL
317cdf0e10cSrcweir         impl_disposing( const com::sun::star::lang::EventObject& Source )
318cdf0e10cSrcweir         throw( com::sun::star::uno::RuntimeException );
319cdf0e10cSrcweir 
320cdf0e10cSrcweir     virtual void SAL_CALL
321cdf0e10cSrcweir     impl_propertyChange( const com::sun::star::beans::PropertyChangeEvent& evt )
322cdf0e10cSrcweir         throw( com::sun::star::uno::RuntimeException );
323cdf0e10cSrcweir 
324cdf0e10cSrcweir     virtual void SAL_CALL
325cdf0e10cSrcweir     impl_vetoableChange( const com::sun::star::beans::PropertyChangeEvent& aEvent )
326cdf0e10cSrcweir         throw( com::sun::star::beans::PropertyVetoException,
327cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
328cdf0e10cSrcweir 
329cdf0e10cSrcweir     //-----------------------------------------------------------------
330cdf0e10cSrcweir     // XContentAccess
331cdf0e10cSrcweir     //-----------------------------------------------------------------
332cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL
333cdf0e10cSrcweir     queryContentIdentifierString()
334cdf0e10cSrcweir         throw( com::sun::star::uno::RuntimeException );
335cdf0e10cSrcweir 
336cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
337cdf0e10cSrcweir                 com::sun::star::ucb::XContentIdentifier > SAL_CALL
338cdf0e10cSrcweir     queryContentIdentifier()
339cdf0e10cSrcweir         throw( com::sun::star::uno::RuntimeException );
340cdf0e10cSrcweir 
341cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
342cdf0e10cSrcweir                 com::sun::star::ucb::XContent > SAL_CALL
343cdf0e10cSrcweir     queryContent()
344cdf0e10cSrcweir         throw( com::sun::star::uno::RuntimeException );
345cdf0e10cSrcweir 
346cdf0e10cSrcweir     //-----------------------------------------------------------------
347cdf0e10cSrcweir     // XResultSet
348cdf0e10cSrcweir     //-----------------------------------------------------------------
349cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
350cdf0e10cSrcweir     next()
351cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
352cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
353cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
354cdf0e10cSrcweir     isBeforeFirst()
355cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
356cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
357cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
358cdf0e10cSrcweir     isAfterLast()
359cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
360cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
361cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
362cdf0e10cSrcweir     isFirst()
363cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
364cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
365cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
366cdf0e10cSrcweir     isLast()
367cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
368cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
369cdf0e10cSrcweir     virtual void SAL_CALL
370cdf0e10cSrcweir     beforeFirst()
371cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
372cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
373cdf0e10cSrcweir     virtual void SAL_CALL
374cdf0e10cSrcweir     afterLast()
375cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
376cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
377cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
378cdf0e10cSrcweir     first()
379cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
380cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
381cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
382cdf0e10cSrcweir     last()
383cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
384cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
385cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL
386cdf0e10cSrcweir     getRow()
387cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
388cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
389cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
390cdf0e10cSrcweir     absolute( sal_Int32 row )
391cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
392cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
393cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
394cdf0e10cSrcweir     relative( sal_Int32 rows )
395cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
396cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
397cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
398cdf0e10cSrcweir     previous()
399cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
400cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
401cdf0e10cSrcweir     virtual void SAL_CALL
402cdf0e10cSrcweir     refreshRow()
403cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
404cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
405cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
406cdf0e10cSrcweir     rowUpdated()
407cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
408cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
409cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
410cdf0e10cSrcweir     rowInserted()
411cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
412cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
413cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
414cdf0e10cSrcweir     rowDeleted()
415cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
416cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
417cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
418cdf0e10cSrcweir                 com::sun::star::uno::XInterface > SAL_CALL
419cdf0e10cSrcweir     getStatement()
420cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
421cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
422cdf0e10cSrcweir 
423cdf0e10cSrcweir     //-----------------------------------------------------------------
424cdf0e10cSrcweir     // XRow
425cdf0e10cSrcweir     //-----------------------------------------------------------------
426cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
427cdf0e10cSrcweir     wasNull()
428cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
429cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
430cdf0e10cSrcweir 
431cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL
432cdf0e10cSrcweir     getString( sal_Int32 columnIndex )
433cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
434cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
435cdf0e10cSrcweir 
436cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
437cdf0e10cSrcweir     getBoolean( sal_Int32 columnIndex )
438cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
439cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
440cdf0e10cSrcweir 
441cdf0e10cSrcweir     virtual sal_Int8 SAL_CALL
442cdf0e10cSrcweir     getByte( sal_Int32 columnIndex )
443cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
444cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
445cdf0e10cSrcweir 
446cdf0e10cSrcweir     virtual sal_Int16 SAL_CALL
447cdf0e10cSrcweir     getShort( sal_Int32 columnIndex )
448cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
449cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
450cdf0e10cSrcweir 
451cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL
452cdf0e10cSrcweir     getInt( sal_Int32 columnIndex )
453cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
454cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
455cdf0e10cSrcweir 
456cdf0e10cSrcweir     virtual sal_Int64 SAL_CALL
457cdf0e10cSrcweir     getLong( sal_Int32 columnIndex )
458cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
459cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
460cdf0e10cSrcweir 
461cdf0e10cSrcweir     virtual float SAL_CALL
462cdf0e10cSrcweir     getFloat( sal_Int32 columnIndex )
463cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
464cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
465cdf0e10cSrcweir 
466cdf0e10cSrcweir     virtual double SAL_CALL
467cdf0e10cSrcweir     getDouble( sal_Int32 columnIndex )
468cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
469cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
470cdf0e10cSrcweir 
471cdf0e10cSrcweir     virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
472cdf0e10cSrcweir     getBytes( sal_Int32 columnIndex )
473cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
474cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
475cdf0e10cSrcweir 
476cdf0e10cSrcweir     virtual com::sun::star::util::Date SAL_CALL
477cdf0e10cSrcweir     getDate( sal_Int32 columnIndex )
478cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
479cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
480cdf0e10cSrcweir 
481cdf0e10cSrcweir     virtual com::sun::star::util::Time SAL_CALL
482cdf0e10cSrcweir     getTime( sal_Int32 columnIndex )
483cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
484cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
485cdf0e10cSrcweir 
486cdf0e10cSrcweir     virtual com::sun::star::util::DateTime SAL_CALL
487cdf0e10cSrcweir     getTimestamp( sal_Int32 columnIndex )
488cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
489cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
490cdf0e10cSrcweir 
491cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
492cdf0e10cSrcweir                 com::sun::star::io::XInputStream > SAL_CALL
493cdf0e10cSrcweir     getBinaryStream( sal_Int32 columnIndex )
494cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
495cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
496cdf0e10cSrcweir 
497cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
498cdf0e10cSrcweir                 com::sun::star::io::XInputStream > SAL_CALL
499cdf0e10cSrcweir     getCharacterStream( sal_Int32 columnIndex )
500cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
501cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
502cdf0e10cSrcweir 
503cdf0e10cSrcweir     virtual com::sun::star::uno::Any SAL_CALL
504cdf0e10cSrcweir     getObject( sal_Int32 columnIndex,
505cdf0e10cSrcweir                const com::sun::star::uno::Reference<
506cdf0e10cSrcweir                 com::sun::star::container::XNameAccess >& typeMap )
507cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
508cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
509cdf0e10cSrcweir 
510cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
511cdf0e10cSrcweir                 com::sun::star::sdbc::XRef > SAL_CALL
512cdf0e10cSrcweir     getRef( sal_Int32 columnIndex )
513cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
514cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
515cdf0e10cSrcweir 
516cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
517cdf0e10cSrcweir                 com::sun::star::sdbc::XBlob > SAL_CALL
518cdf0e10cSrcweir     getBlob( sal_Int32 columnIndex )
519cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
520cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
521cdf0e10cSrcweir 
522cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
523cdf0e10cSrcweir                 com::sun::star::sdbc::XClob > SAL_CALL
524cdf0e10cSrcweir     getClob( sal_Int32 columnIndex )
525cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
526cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
527cdf0e10cSrcweir 
528cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
529cdf0e10cSrcweir                 com::sun::star::sdbc::XArray > SAL_CALL
530cdf0e10cSrcweir     getArray( sal_Int32 columnIndex )
531cdf0e10cSrcweir         throw( com::sun::star::sdbc::SQLException,
532cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
533cdf0e10cSrcweir };
534cdf0e10cSrcweir 
535cdf0e10cSrcweir //=========================================================================
536cdf0e10cSrcweir 
537cdf0e10cSrcweir class ContentResultSetWrapperListener
538cdf0e10cSrcweir         : public cppu::OWeakObject
539cdf0e10cSrcweir         , public com::sun::star::beans::XPropertyChangeListener
540cdf0e10cSrcweir         , public com::sun::star::beans::XVetoableChangeListener
541cdf0e10cSrcweir {
542cdf0e10cSrcweir protected:
543cdf0e10cSrcweir     ContentResultSetWrapper*    m_pOwner;
544cdf0e10cSrcweir 
545cdf0e10cSrcweir public:
546cdf0e10cSrcweir     ContentResultSetWrapperListener( ContentResultSetWrapper* pOwner );
547cdf0e10cSrcweir 
548cdf0e10cSrcweir     virtual ~ContentResultSetWrapperListener();
549cdf0e10cSrcweir 
550cdf0e10cSrcweir     //-----------------------------------------------------------------
551cdf0e10cSrcweir     // XInterface
552cdf0e10cSrcweir     //-----------------------------------------------------------------
553cdf0e10cSrcweir     XINTERFACE_DECL()
554cdf0e10cSrcweir 
555cdf0e10cSrcweir     //-----------------------------------------------------------------
556cdf0e10cSrcweir     //XEventListener
557cdf0e10cSrcweir     //-----------------------------------------------------------------
558cdf0e10cSrcweir     virtual void SAL_CALL
559cdf0e10cSrcweir         disposing( const com::sun::star::lang::EventObject& Source )
560cdf0e10cSrcweir         throw( com::sun::star::uno::RuntimeException );
561cdf0e10cSrcweir 
562cdf0e10cSrcweir     //-----------------------------------------------------------------
563cdf0e10cSrcweir     //XPropertyChangeListener
564cdf0e10cSrcweir     //-----------------------------------------------------------------
565cdf0e10cSrcweir     virtual void SAL_CALL
566cdf0e10cSrcweir     propertyChange( const com::sun::star::beans::PropertyChangeEvent& evt )
567cdf0e10cSrcweir         throw( com::sun::star::uno::RuntimeException );
568cdf0e10cSrcweir 
569cdf0e10cSrcweir     //-----------------------------------------------------------------
570cdf0e10cSrcweir     //XVetoableChangeListener
571cdf0e10cSrcweir     //-----------------------------------------------------------------
572cdf0e10cSrcweir     virtual void SAL_CALL
573cdf0e10cSrcweir     vetoableChange( const com::sun::star::beans::PropertyChangeEvent& aEvent )
574cdf0e10cSrcweir         throw( com::sun::star::beans::PropertyVetoException,
575cdf0e10cSrcweir                com::sun::star::uno::RuntimeException );
576cdf0e10cSrcweir 
577cdf0e10cSrcweir     //-----------------------------------------------------------------
578cdf0e10cSrcweir     // own methods:
579cdf0e10cSrcweir     void SAL_CALL impl_OwnerDies();
580cdf0e10cSrcweir };
581cdf0e10cSrcweir 
582cdf0e10cSrcweir #endif
583