xref: /AOO41X/main/ucb/source/cacher/cachedcontentresultset.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef _CACHED_CONTENT_RESULTSET_HXX
29*cdf0e10cSrcweir #define _CACHED_CONTENT_RESULTSET_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <contentresultsetwrapper.hxx>
32*cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp>
33*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
34*cdf0e10cSrcweir #include <com/sun/star/ucb/XFetchProvider.hpp>
35*cdf0e10cSrcweir #include <com/sun/star/ucb/XFetchProviderForContentAccess.hpp>
36*cdf0e10cSrcweir #include <com/sun/star/ucb/FetchResult.hpp>
37*cdf0e10cSrcweir #include <com/sun/star/ucb/XContentIdentifierMapping.hpp>
38*cdf0e10cSrcweir #include <com/sun/star/ucb/XCachedContentResultSetFactory.hpp>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir #define CACHED_CONTENT_RESULTSET_SERVICE_NAME "com.sun.star.ucb.CachedContentResultSet"
41*cdf0e10cSrcweir #define CACHED_CONTENT_RESULTSET_FACTORY_NAME "com.sun.star.ucb.CachedContentResultSetFactory"
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir //=========================================================================
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace script {
46*cdf0e10cSrcweir 	class XTypeConverter;
47*cdf0e10cSrcweir } } } }
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir class CCRS_PropertySetInfo;
50*cdf0e10cSrcweir class CachedContentResultSet
51*cdf0e10cSrcweir 				: public ContentResultSetWrapper
52*cdf0e10cSrcweir 				, public com::sun::star::lang::XTypeProvider
53*cdf0e10cSrcweir 				, public com::sun::star::lang::XServiceInfo
54*cdf0e10cSrcweir {
55*cdf0e10cSrcweir 	//--------------------------------------------------------------------------
56*cdf0e10cSrcweir 	// class CCRS_Cache
57*cdf0e10cSrcweir 
58*cdf0e10cSrcweir 	class CCRS_Cache
59*cdf0e10cSrcweir 	{
60*cdf0e10cSrcweir 	private:
61*cdf0e10cSrcweir 		com::sun::star::ucb::FetchResult*			m_pResult;
62*cdf0e10cSrcweir 		com::sun::star::uno::Reference<
63*cdf0e10cSrcweir 			com::sun::star::ucb::XContentIdentifierMapping >
64*cdf0e10cSrcweir 													m_xContentIdentifierMapping;
65*cdf0e10cSrcweir 		com::sun::star::uno::Sequence< sal_Bool >*	m_pMappedReminder;
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir 	private:
68*cdf0e10cSrcweir 		com::sun::star::uno::Any& SAL_CALL
69*cdf0e10cSrcweir 		getRowAny( sal_Int32 nRow )
70*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
71*cdf0e10cSrcweir 			com::sun::star::uno::RuntimeException );
72*cdf0e10cSrcweir 
73*cdf0e10cSrcweir 		void SAL_CALL clear();
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir 		void SAL_CALL remindMapped( sal_Int32 nRow );
77*cdf0e10cSrcweir 		sal_Bool SAL_CALL isRowMapped( sal_Int32 nRow );
78*cdf0e10cSrcweir 		void SAL_CALL clearMappedReminder();
79*cdf0e10cSrcweir 		com::sun::star::uno::Sequence< sal_Bool >* SAL_CALL getMappedReminder();
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir 	public:
82*cdf0e10cSrcweir 		CCRS_Cache( const com::sun::star::uno::Reference<
83*cdf0e10cSrcweir 				com::sun::star::ucb::XContentIdentifierMapping > & xMapping );
84*cdf0e10cSrcweir 		~CCRS_Cache();
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir 		void SAL_CALL loadData(
87*cdf0e10cSrcweir 			const com::sun::star::ucb::FetchResult& rResult );
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir 		sal_Bool SAL_CALL
90*cdf0e10cSrcweir 		hasRow( sal_Int32 nRow );
91*cdf0e10cSrcweir 
92*cdf0e10cSrcweir 		sal_Bool SAL_CALL
93*cdf0e10cSrcweir 		hasCausedException( sal_Int32 nRow );
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir 		sal_Int32 SAL_CALL
96*cdf0e10cSrcweir 		getMaxRow();
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir 		sal_Bool SAL_CALL
99*cdf0e10cSrcweir 		hasKnownLast();
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir 		//---
102*cdf0e10cSrcweir 		const com::sun::star::uno::Any& SAL_CALL
103*cdf0e10cSrcweir 		getAny( sal_Int32 nRow, sal_Int32 nColumnIndex )
104*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
105*cdf0e10cSrcweir 			com::sun::star::uno::RuntimeException );
106*cdf0e10cSrcweir 
107*cdf0e10cSrcweir 		const rtl::OUString& SAL_CALL
108*cdf0e10cSrcweir 		getContentIdentifierString( sal_Int32 nRow )
109*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir 		const com::sun::star::uno::Reference<
112*cdf0e10cSrcweir 				com::sun::star::ucb::XContentIdentifier >& SAL_CALL
113*cdf0e10cSrcweir 		getContentIdentifier( sal_Int32 nRow )
114*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir 		const com::sun::star::uno::Reference<
117*cdf0e10cSrcweir 				com::sun::star::ucb::XContent >& SAL_CALL
118*cdf0e10cSrcweir 		getContent( sal_Int32 nRow )
119*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
120*cdf0e10cSrcweir 	};
121*cdf0e10cSrcweir 	//-----------------------------------------------------------------
122*cdf0e10cSrcweir 	//members
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
125*cdf0e10cSrcweir                             m_xSMgr;
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir 	//different Interfaces from Origin:
128*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::ucb::XFetchProvider >
129*cdf0e10cSrcweir 							m_xFetchProvider; //XFetchProvider-interface from m_xOrigin
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::ucb::XFetchProviderForContentAccess >
132*cdf0e10cSrcweir 							m_xFetchProviderForContentAccess; //XFetchProviderForContentAccess-interface from m_xOrigin
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir 	//my PropertySetInfo
135*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >
136*cdf0e10cSrcweir 							m_xMyPropertySetInfo;//holds m_pMyPropSetInfo alive
137*cdf0e10cSrcweir 	CCRS_PropertySetInfo*	m_pMyPropSetInfo;
138*cdf0e10cSrcweir 
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir 	//
141*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifierMapping >
142*cdf0e10cSrcweir 							m_xContentIdentifierMapping;// can be used for remote optimized ContentAccess
143*cdf0e10cSrcweir 
144*cdf0e10cSrcweir 	//some Properties and helping variables
145*cdf0e10cSrcweir 	sal_Int32				m_nRow;
146*cdf0e10cSrcweir 	sal_Bool				m_bAfterLast; // TRUE, if m_nRow is after final count; can be TRUE without knowing the exact final count
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir 	sal_Int32				m_nLastAppliedPos;
149*cdf0e10cSrcweir 	sal_Bool				m_bAfterLastApplied;
150*cdf0e10cSrcweir 
151*cdf0e10cSrcweir 	sal_Int32				m_nKnownCount; // count we know from the Origin
152*cdf0e10cSrcweir 	sal_Bool				m_bFinalCount; // TRUE if the Origin has reached final count and we got that count in m_nKnownCount
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir 	sal_Int32				m_nFetchSize;
155*cdf0e10cSrcweir 	sal_Int32				m_nFetchDirection;
156*cdf0e10cSrcweir 
157*cdf0e10cSrcweir 	sal_Bool				m_bLastReadWasFromCache;
158*cdf0e10cSrcweir 	sal_Bool				m_bLastCachedReadWasNull;
159*cdf0e10cSrcweir 
160*cdf0e10cSrcweir 	//cache:
161*cdf0e10cSrcweir 	CCRS_Cache				m_aCache;
162*cdf0e10cSrcweir 	CCRS_Cache				m_aCacheContentIdentifierString;
163*cdf0e10cSrcweir 	CCRS_Cache				m_aCacheContentIdentifier;
164*cdf0e10cSrcweir 	CCRS_Cache				m_aCacheContent;
165*cdf0e10cSrcweir 
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir private:
168*cdf0e10cSrcweir 	//-----------------------------------------------------------------
169*cdf0e10cSrcweir 	//helping XPropertySet methods.
170*cdf0e10cSrcweir 	virtual void SAL_CALL impl_initPropertySetInfo();
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir 	//-----------------------------------------------------------------
174*cdf0e10cSrcweir 	sal_Bool SAL_CALL
175*cdf0e10cSrcweir 	applyPositionToOrigin( sal_Int32 nRow )
176*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
177*cdf0e10cSrcweir 		com::sun::star::uno::RuntimeException );
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir 	void SAL_CALL
180*cdf0e10cSrcweir 	impl_fetchData( sal_Int32 nRow, sal_Int32 nCount
181*cdf0e10cSrcweir 					, sal_Int32 nFetchDirection )
182*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir 	sal_Bool SAL_CALL
185*cdf0e10cSrcweir 	impl_isKnownValidPosition( sal_Int32 nRow );
186*cdf0e10cSrcweir 
187*cdf0e10cSrcweir 	sal_Bool SAL_CALL
188*cdf0e10cSrcweir 	impl_isKnownInvalidPosition( sal_Int32 nRow );
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir 	void SAL_CALL
191*cdf0e10cSrcweir 	impl_changeRowCount( sal_Int32 nOld, sal_Int32 nNew );
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir 	void SAL_CALL
194*cdf0e10cSrcweir 	impl_changeIsRowCountFinal( sal_Bool bOld, sal_Bool bNew );
195*cdf0e10cSrcweir 
196*cdf0e10cSrcweir public:
197*cdf0e10cSrcweir     CachedContentResultSet(
198*cdf0e10cSrcweir                         const com::sun::star::uno::Reference<
199*cdf0e10cSrcweir                             com::sun::star::lang::XMultiServiceFactory > &
200*cdf0e10cSrcweir                                 xSMgr,
201*cdf0e10cSrcweir                         const com::sun::star::uno::Reference<
202*cdf0e10cSrcweir                             com::sun::star::sdbc::XResultSet > & xOrigin,
203*cdf0e10cSrcweir                         const com::sun::star::uno::Reference<
204*cdf0e10cSrcweir                             com::sun::star::ucb::XContentIdentifierMapping > &
205*cdf0e10cSrcweir                                 xContentIdentifierMapping );
206*cdf0e10cSrcweir 
207*cdf0e10cSrcweir 	virtual ~CachedContentResultSet();
208*cdf0e10cSrcweir 
209*cdf0e10cSrcweir 	//-----------------------------------------------------------------
210*cdf0e10cSrcweir 	// XInterface inherited
211*cdf0e10cSrcweir 	//-----------------------------------------------------------------
212*cdf0e10cSrcweir 	XINTERFACE_DECL()
213*cdf0e10cSrcweir 	//-----------------------------------------------------------------
214*cdf0e10cSrcweir 	// XTypeProvider
215*cdf0e10cSrcweir 	//-----------------------------------------------------------------
216*cdf0e10cSrcweir 	XTYPEPROVIDER_DECL()
217*cdf0e10cSrcweir 	//-----------------------------------------------------------------
218*cdf0e10cSrcweir     // XServiceInfo
219*cdf0e10cSrcweir 	//-----------------------------------------------------------------
220*cdf0e10cSrcweir 	XSERVICEINFO_NOFACTORY_DECL()
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir 	//-----------------------------------------------------------------
223*cdf0e10cSrcweir 	// XPropertySet inherited
224*cdf0e10cSrcweir 	//-----------------------------------------------------------------
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir     virtual void SAL_CALL
227*cdf0e10cSrcweir 	setPropertyValue( const rtl::OUString& aPropertyName,
228*cdf0e10cSrcweir 					  const com::sun::star::uno::Any& aValue )
229*cdf0e10cSrcweir 		throw( com::sun::star::beans::UnknownPropertyException,
230*cdf0e10cSrcweir 			   com::sun::star::beans::PropertyVetoException,
231*cdf0e10cSrcweir 			   com::sun::star::lang::IllegalArgumentException,
232*cdf0e10cSrcweir 			   com::sun::star::lang::WrappedTargetException,
233*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
234*cdf0e10cSrcweir 
235*cdf0e10cSrcweir     virtual com::sun::star::uno::Any SAL_CALL
236*cdf0e10cSrcweir 	getPropertyValue( const rtl::OUString& PropertyName )
237*cdf0e10cSrcweir 		throw( com::sun::star::beans::UnknownPropertyException,
238*cdf0e10cSrcweir 		com::sun::star::lang::WrappedTargetException,
239*cdf0e10cSrcweir 		com::sun::star::uno::RuntimeException );
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir 	//-----------------------------------------------------------------
242*cdf0e10cSrcweir 	// own inherited
243*cdf0e10cSrcweir 	//-----------------------------------------------------------------
244*cdf0e10cSrcweir 	virtual void SAL_CALL
245*cdf0e10cSrcweir 	impl_disposing( const com::sun::star::lang::EventObject& Source )
246*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir 	virtual void SAL_CALL
249*cdf0e10cSrcweir 	impl_propertyChange( const com::sun::star::beans::PropertyChangeEvent& evt )
250*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
251*cdf0e10cSrcweir 
252*cdf0e10cSrcweir 	virtual void SAL_CALL
253*cdf0e10cSrcweir 	impl_vetoableChange( const com::sun::star::beans::PropertyChangeEvent& aEvent )
254*cdf0e10cSrcweir 		throw( com::sun::star::beans::PropertyVetoException,
255*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
256*cdf0e10cSrcweir 
257*cdf0e10cSrcweir 	//-----------------------------------------------------------------
258*cdf0e10cSrcweir 	// XContentAccess inherited
259*cdf0e10cSrcweir 	//-----------------------------------------------------------------
260*cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL
261*cdf0e10cSrcweir 	queryContentIdentifierString()
262*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
263*cdf0e10cSrcweir 
264*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
265*cdf0e10cSrcweir 				com::sun::star::ucb::XContentIdentifier > SAL_CALL
266*cdf0e10cSrcweir 	queryContentIdentifier()
267*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
268*cdf0e10cSrcweir 
269*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
270*cdf0e10cSrcweir 				com::sun::star::ucb::XContent > SAL_CALL
271*cdf0e10cSrcweir 	queryContent()
272*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
273*cdf0e10cSrcweir 
274*cdf0e10cSrcweir 	//-----------------------------------------------------------------
275*cdf0e10cSrcweir 	// XResultSet inherited
276*cdf0e10cSrcweir 	//-----------------------------------------------------------------
277*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
278*cdf0e10cSrcweir 	next()
279*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
280*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
281*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
282*cdf0e10cSrcweir 	isBeforeFirst()
283*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
284*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
285*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
286*cdf0e10cSrcweir 	isAfterLast()
287*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
288*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
289*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
290*cdf0e10cSrcweir 	isFirst()
291*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
292*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
293*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
294*cdf0e10cSrcweir 	isLast()
295*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
296*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
297*cdf0e10cSrcweir     virtual void SAL_CALL
298*cdf0e10cSrcweir 	beforeFirst()
299*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
300*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
301*cdf0e10cSrcweir     virtual void SAL_CALL
302*cdf0e10cSrcweir 	afterLast()
303*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
304*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
305*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
306*cdf0e10cSrcweir 	first()
307*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
308*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
309*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
310*cdf0e10cSrcweir 	last()
311*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
312*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
313*cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL
314*cdf0e10cSrcweir 	getRow()
315*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
316*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
317*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
318*cdf0e10cSrcweir 	absolute( sal_Int32 row )
319*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
320*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
321*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
322*cdf0e10cSrcweir 	relative( sal_Int32 rows )
323*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
324*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
325*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
326*cdf0e10cSrcweir 	previous()
327*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
328*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
329*cdf0e10cSrcweir     virtual void SAL_CALL
330*cdf0e10cSrcweir 	refreshRow()
331*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
332*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
333*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
334*cdf0e10cSrcweir 	rowUpdated()
335*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
336*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
337*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
338*cdf0e10cSrcweir 	rowInserted()
339*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
340*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
341*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
342*cdf0e10cSrcweir 	rowDeleted()
343*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
344*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
345*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
346*cdf0e10cSrcweir 				com::sun::star::uno::XInterface > SAL_CALL
347*cdf0e10cSrcweir 	getStatement()
348*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
349*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir 	//-----------------------------------------------------------------
352*cdf0e10cSrcweir 	// XRow inherited
353*cdf0e10cSrcweir 	//-----------------------------------------------------------------
354*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
355*cdf0e10cSrcweir 	wasNull()
356*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
357*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
358*cdf0e10cSrcweir 
359*cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL
360*cdf0e10cSrcweir 	getString( sal_Int32 columnIndex )
361*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
362*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
363*cdf0e10cSrcweir 
364*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
365*cdf0e10cSrcweir 	getBoolean( sal_Int32 columnIndex )
366*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
367*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
368*cdf0e10cSrcweir 
369*cdf0e10cSrcweir     virtual sal_Int8 SAL_CALL
370*cdf0e10cSrcweir 	getByte( sal_Int32 columnIndex )
371*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
372*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir     virtual sal_Int16 SAL_CALL
375*cdf0e10cSrcweir 	getShort( sal_Int32 columnIndex )
376*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
377*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
378*cdf0e10cSrcweir 
379*cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL
380*cdf0e10cSrcweir 	getInt( sal_Int32 columnIndex )
381*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
382*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
383*cdf0e10cSrcweir 
384*cdf0e10cSrcweir     virtual sal_Int64 SAL_CALL
385*cdf0e10cSrcweir 	getLong( sal_Int32 columnIndex )
386*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
387*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
388*cdf0e10cSrcweir 
389*cdf0e10cSrcweir     virtual float SAL_CALL
390*cdf0e10cSrcweir 	getFloat( sal_Int32 columnIndex )
391*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
392*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
393*cdf0e10cSrcweir 
394*cdf0e10cSrcweir     virtual double SAL_CALL
395*cdf0e10cSrcweir 	getDouble( sal_Int32 columnIndex )
396*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
397*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
398*cdf0e10cSrcweir 
399*cdf0e10cSrcweir     virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
400*cdf0e10cSrcweir 	getBytes( sal_Int32 columnIndex )
401*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
402*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
403*cdf0e10cSrcweir 
404*cdf0e10cSrcweir     virtual com::sun::star::util::Date SAL_CALL
405*cdf0e10cSrcweir 	getDate( sal_Int32 columnIndex )
406*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
407*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
408*cdf0e10cSrcweir 
409*cdf0e10cSrcweir     virtual com::sun::star::util::Time SAL_CALL
410*cdf0e10cSrcweir 	getTime( sal_Int32 columnIndex )
411*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
412*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
413*cdf0e10cSrcweir 
414*cdf0e10cSrcweir     virtual com::sun::star::util::DateTime SAL_CALL
415*cdf0e10cSrcweir 	getTimestamp( sal_Int32 columnIndex )
416*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
417*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
418*cdf0e10cSrcweir 
419*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
420*cdf0e10cSrcweir 				com::sun::star::io::XInputStream > SAL_CALL
421*cdf0e10cSrcweir 	getBinaryStream( sal_Int32 columnIndex )
422*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
423*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
424*cdf0e10cSrcweir 
425*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
426*cdf0e10cSrcweir 				com::sun::star::io::XInputStream > SAL_CALL
427*cdf0e10cSrcweir 	getCharacterStream( sal_Int32 columnIndex )
428*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
429*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
430*cdf0e10cSrcweir 
431*cdf0e10cSrcweir     virtual com::sun::star::uno::Any SAL_CALL
432*cdf0e10cSrcweir 	getObject( sal_Int32 columnIndex,
433*cdf0e10cSrcweir 			   const com::sun::star::uno::Reference<
434*cdf0e10cSrcweir 			   	com::sun::star::container::XNameAccess >& typeMap )
435*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
436*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
437*cdf0e10cSrcweir 
438*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
439*cdf0e10cSrcweir 				com::sun::star::sdbc::XRef > SAL_CALL
440*cdf0e10cSrcweir 	getRef( sal_Int32 columnIndex )
441*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
442*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
443*cdf0e10cSrcweir 
444*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
445*cdf0e10cSrcweir 				com::sun::star::sdbc::XBlob > SAL_CALL
446*cdf0e10cSrcweir 	getBlob( sal_Int32 columnIndex )
447*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
448*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
449*cdf0e10cSrcweir 
450*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
451*cdf0e10cSrcweir 				com::sun::star::sdbc::XClob > SAL_CALL
452*cdf0e10cSrcweir 	getClob( sal_Int32 columnIndex )
453*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
454*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
455*cdf0e10cSrcweir 
456*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
457*cdf0e10cSrcweir 				com::sun::star::sdbc::XArray > SAL_CALL
458*cdf0e10cSrcweir 	getArray( sal_Int32 columnIndex )
459*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
460*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
461*cdf0e10cSrcweir 
462*cdf0e10cSrcweir 	//-----------------------------------------------------------------
463*cdf0e10cSrcweir     // Type Converter support
464*cdf0e10cSrcweir 	//-----------------------------------------------------------------
465*cdf0e10cSrcweir 
466*cdf0e10cSrcweir private:
467*cdf0e10cSrcweir     sal_Bool m_bTriedToGetTypeConverter;
468*cdf0e10cSrcweir     com::sun::star::uno::Reference<
469*cdf0e10cSrcweir         com::sun::star::script::XTypeConverter > m_xTypeConverter;
470*cdf0e10cSrcweir 
471*cdf0e10cSrcweir     const com::sun::star::uno::Reference<
472*cdf0e10cSrcweir         com::sun::star::script::XTypeConverter >& getTypeConverter();
473*cdf0e10cSrcweir };
474*cdf0e10cSrcweir 
475*cdf0e10cSrcweir //=========================================================================
476*cdf0e10cSrcweir 
477*cdf0e10cSrcweir class CachedContentResultSetFactory
478*cdf0e10cSrcweir 				: public cppu::OWeakObject
479*cdf0e10cSrcweir 				, public com::sun::star::lang::XTypeProvider
480*cdf0e10cSrcweir 				, public com::sun::star::lang::XServiceInfo
481*cdf0e10cSrcweir 				, public com::sun::star::ucb::XCachedContentResultSetFactory
482*cdf0e10cSrcweir {
483*cdf0e10cSrcweir protected:
484*cdf0e10cSrcweir 	com::sun::star::uno::Reference<
485*cdf0e10cSrcweir 		com::sun::star::lang::XMultiServiceFactory >	m_xSMgr;
486*cdf0e10cSrcweir 
487*cdf0e10cSrcweir public:
488*cdf0e10cSrcweir 
489*cdf0e10cSrcweir 	CachedContentResultSetFactory(
490*cdf0e10cSrcweir 		const com::sun::star::uno::Reference<
491*cdf0e10cSrcweir 		com::sun::star::lang::XMultiServiceFactory > & rSMgr);
492*cdf0e10cSrcweir 
493*cdf0e10cSrcweir 	virtual ~CachedContentResultSetFactory();
494*cdf0e10cSrcweir 
495*cdf0e10cSrcweir 	//-----------------------------------------------------------------
496*cdf0e10cSrcweir 	// XInterface
497*cdf0e10cSrcweir 	XINTERFACE_DECL()
498*cdf0e10cSrcweir 
499*cdf0e10cSrcweir 	//-----------------------------------------------------------------
500*cdf0e10cSrcweir 	// XTypeProvider
501*cdf0e10cSrcweir 	XTYPEPROVIDER_DECL()
502*cdf0e10cSrcweir 
503*cdf0e10cSrcweir 	//-----------------------------------------------------------------
504*cdf0e10cSrcweir     // XServiceInfo
505*cdf0e10cSrcweir 	XSERVICEINFO_DECL()
506*cdf0e10cSrcweir 
507*cdf0e10cSrcweir 	//-----------------------------------------------------------------
508*cdf0e10cSrcweir     // XCachedContentResultSetFactory
509*cdf0e10cSrcweir 
510*cdf0e10cSrcweir 	virtual com::sun::star::uno::Reference<
511*cdf0e10cSrcweir 				com::sun::star::sdbc::XResultSet > SAL_CALL
512*cdf0e10cSrcweir 	createCachedContentResultSet(
513*cdf0e10cSrcweir 			const com::sun::star::uno::Reference<
514*cdf0e10cSrcweir 				com::sun::star::sdbc::XResultSet > & xSource,
515*cdf0e10cSrcweir 			const com::sun::star::uno::Reference<
516*cdf0e10cSrcweir 				com::sun::star::ucb::XContentIdentifierMapping > & xMapping	)
517*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
518*cdf0e10cSrcweir };
519*cdf0e10cSrcweir 
520*cdf0e10cSrcweir #endif
521*cdf0e10cSrcweir 
522