xref: /AOO41X/main/xmlhelp/source/cxxhelp/provider/resultsetbase.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 #ifndef _RESULTSETBASE_HXX
28*cdf0e10cSrcweir #define _RESULTSETBASE_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #ifndef INCLUDED_STL_VECTOR
31*cdf0e10cSrcweir #include <vector>
32*cdf0e10cSrcweir #define INCLUDED_STL_VECTOR
33*cdf0e10cSrcweir #endif
34*cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
35*cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.hxx>
36*cdf0e10cSrcweir #include <com/sun/star/lang/XComponent.hpp>
37*cdf0e10cSrcweir #include <com/sun/star/ucb/XContentAccess.hpp>
38*cdf0e10cSrcweir #include <com/sun/star/sdbc/XCloseable.hpp>
39*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
40*cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSet.hpp>
41*cdf0e10cSrcweir #include <com/sun/star/sdbc/XRow.hpp>
42*cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
43*cdf0e10cSrcweir #include <com/sun/star/ucb/NumberedSortingInfo.hpp>
44*cdf0e10cSrcweir #include <com/sun/star/ucb/XContentProvider.hpp>
45*cdf0e10cSrcweir #include <com/sun/star/ucb/XContentIdentifier.hpp>
46*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
47*cdf0e10cSrcweir #include <com/sun/star/beans/Property.hpp>
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir 
50*cdf0e10cSrcweir namespace chelp {
51*cdf0e10cSrcweir 
52*cdf0e10cSrcweir 	class ResultSetBase
53*cdf0e10cSrcweir 		: public cppu::OWeakObject,
54*cdf0e10cSrcweir 		  public com::sun::star::lang::XComponent,
55*cdf0e10cSrcweir 		  public com::sun::star::sdbc::XRow,
56*cdf0e10cSrcweir 		  public com::sun::star::sdbc::XResultSet,
57*cdf0e10cSrcweir 		  public com::sun::star::sdbc::XCloseable,
58*cdf0e10cSrcweir 		  public com::sun::star::sdbc::XResultSetMetaDataSupplier,
59*cdf0e10cSrcweir 		  public com::sun::star::beans::XPropertySet,
60*cdf0e10cSrcweir 		  public com::sun::star::ucb::XContentAccess
61*cdf0e10cSrcweir 	{
62*cdf0e10cSrcweir 	public:
63*cdf0e10cSrcweir 
64*cdf0e10cSrcweir 		ResultSetBase( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&  xMSF,
65*cdf0e10cSrcweir 					   const com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider >&  xProvider,
66*cdf0e10cSrcweir 					   sal_Int32 nOpenMode,
67*cdf0e10cSrcweir 					   const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& seq,
68*cdf0e10cSrcweir 					   const com::sun::star::uno::Sequence< com::sun::star::ucb::NumberedSortingInfo >& seqSort );
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir 		virtual ~ResultSetBase();
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir 		// XInterface
73*cdf0e10cSrcweir 		virtual com::sun::star::uno::Any SAL_CALL
74*cdf0e10cSrcweir 		queryInterface(
75*cdf0e10cSrcweir 			const com::sun::star::uno::Type& aType )
76*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException);
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir 		virtual void SAL_CALL
79*cdf0e10cSrcweir 		acquire(
80*cdf0e10cSrcweir 			void )
81*cdf0e10cSrcweir 			throw();
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir 		virtual void SAL_CALL
84*cdf0e10cSrcweir 		release(
85*cdf0e10cSrcweir 			void )
86*cdf0e10cSrcweir 			throw();
87*cdf0e10cSrcweir 
88*cdf0e10cSrcweir 		// XComponent
89*cdf0e10cSrcweir 		virtual void SAL_CALL
90*cdf0e10cSrcweir 		dispose(
91*cdf0e10cSrcweir 			void )
92*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
93*cdf0e10cSrcweir 
94*cdf0e10cSrcweir 		virtual void SAL_CALL
95*cdf0e10cSrcweir 		addEventListener(
96*cdf0e10cSrcweir 			const com::sun::star::uno::Reference< com::sun::star::lang::XEventListener >& xListener )
97*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
98*cdf0e10cSrcweir 
99*cdf0e10cSrcweir 		virtual void SAL_CALL
100*cdf0e10cSrcweir 		removeEventListener( const com::sun::star::uno::Reference< com::sun::star::lang::XEventListener >& aListener )
101*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir 		// XRow
105*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
106*cdf0e10cSrcweir 		wasNull(
107*cdf0e10cSrcweir 			void )
108*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
109*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException )
110*cdf0e10cSrcweir 		{
111*cdf0e10cSrcweir 			if( 0<= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
112*cdf0e10cSrcweir 				m_nWasNull = m_aItems[m_nRow]->wasNull();
113*cdf0e10cSrcweir 			else
114*cdf0e10cSrcweir 				m_nWasNull = true;
115*cdf0e10cSrcweir 			return m_nWasNull;
116*cdf0e10cSrcweir 		}
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir 		virtual rtl::OUString SAL_CALL
119*cdf0e10cSrcweir 		getString(
120*cdf0e10cSrcweir 			sal_Int32 columnIndex )
121*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
122*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
123*cdf0e10cSrcweir 		{
124*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
125*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getString( columnIndex );
126*cdf0e10cSrcweir 			else
127*cdf0e10cSrcweir 				return rtl::OUString();
128*cdf0e10cSrcweir 		}
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
131*cdf0e10cSrcweir 		getBoolean(
132*cdf0e10cSrcweir 			sal_Int32 columnIndex )
133*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
134*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
135*cdf0e10cSrcweir 		{
136*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
137*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getBoolean( columnIndex );
138*cdf0e10cSrcweir 			else
139*cdf0e10cSrcweir 				return false;
140*cdf0e10cSrcweir 		}
141*cdf0e10cSrcweir 
142*cdf0e10cSrcweir 		virtual sal_Int8 SAL_CALL
143*cdf0e10cSrcweir 		getByte(
144*cdf0e10cSrcweir 			sal_Int32 columnIndex )
145*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
146*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
147*cdf0e10cSrcweir 		{
148*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
149*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getByte( columnIndex );
150*cdf0e10cSrcweir 			else
151*cdf0e10cSrcweir 				return sal_Int8( 0 );
152*cdf0e10cSrcweir 		}
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir 		virtual sal_Int16 SAL_CALL
155*cdf0e10cSrcweir 		getShort(
156*cdf0e10cSrcweir 			sal_Int32 columnIndex )
157*cdf0e10cSrcweir 			throw(
158*cdf0e10cSrcweir 				com::sun::star::sdbc::SQLException,
159*cdf0e10cSrcweir 				com::sun::star::uno::RuntimeException)
160*cdf0e10cSrcweir 		{
161*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
162*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getShort( columnIndex );
163*cdf0e10cSrcweir 			else
164*cdf0e10cSrcweir 				return sal_Int16( 0 );
165*cdf0e10cSrcweir 		}
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL
168*cdf0e10cSrcweir 		getInt(
169*cdf0e10cSrcweir 			sal_Int32 columnIndex )
170*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
171*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException )
172*cdf0e10cSrcweir 		{
173*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
174*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getInt( columnIndex );
175*cdf0e10cSrcweir 			else
176*cdf0e10cSrcweir 				return sal_Int32( 0 );
177*cdf0e10cSrcweir 		}
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir 		virtual sal_Int64 SAL_CALL
180*cdf0e10cSrcweir 		getLong(
181*cdf0e10cSrcweir 			sal_Int32 columnIndex )
182*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
183*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
184*cdf0e10cSrcweir 		{
185*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
186*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getLong( columnIndex );
187*cdf0e10cSrcweir 			else
188*cdf0e10cSrcweir 				return sal_Int64( 0 );
189*cdf0e10cSrcweir 		}
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir 		virtual float SAL_CALL
192*cdf0e10cSrcweir 		getFloat(
193*cdf0e10cSrcweir 			sal_Int32 columnIndex )
194*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
195*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException )
196*cdf0e10cSrcweir 		{
197*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
198*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getFloat( columnIndex );
199*cdf0e10cSrcweir 			else
200*cdf0e10cSrcweir 				return float( 0 );
201*cdf0e10cSrcweir 		}
202*cdf0e10cSrcweir 
203*cdf0e10cSrcweir 		virtual double SAL_CALL
204*cdf0e10cSrcweir 		getDouble(
205*cdf0e10cSrcweir 			sal_Int32 columnIndex )
206*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
207*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException )
208*cdf0e10cSrcweir 		{
209*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
210*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getDouble( columnIndex );
211*cdf0e10cSrcweir 			else
212*cdf0e10cSrcweir 				return double( 0 );
213*cdf0e10cSrcweir 		}
214*cdf0e10cSrcweir 
215*cdf0e10cSrcweir 		virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
216*cdf0e10cSrcweir 		getBytes(
217*cdf0e10cSrcweir 			sal_Int32 columnIndex )
218*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
219*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException )
220*cdf0e10cSrcweir 		{
221*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
222*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getBytes( columnIndex );
223*cdf0e10cSrcweir 			else
224*cdf0e10cSrcweir 				return com::sun::star::uno::Sequence< sal_Int8 >();
225*cdf0e10cSrcweir 		}
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir 		virtual com::sun::star::util::Date SAL_CALL
228*cdf0e10cSrcweir 		getDate(
229*cdf0e10cSrcweir 			sal_Int32 columnIndex )
230*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
231*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
232*cdf0e10cSrcweir 		{
233*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
234*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getDate( columnIndex );
235*cdf0e10cSrcweir 			else
236*cdf0e10cSrcweir 				return com::sun::star::util::Date();
237*cdf0e10cSrcweir 		}
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir 		virtual com::sun::star::util::Time SAL_CALL
240*cdf0e10cSrcweir 		getTime(
241*cdf0e10cSrcweir 			sal_Int32 columnIndex )
242*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
243*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
244*cdf0e10cSrcweir 		{
245*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
246*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getTime( columnIndex );
247*cdf0e10cSrcweir 			else
248*cdf0e10cSrcweir 				return com::sun::star::util::Time();
249*cdf0e10cSrcweir 		}
250*cdf0e10cSrcweir 
251*cdf0e10cSrcweir 		virtual com::sun::star::util::DateTime SAL_CALL
252*cdf0e10cSrcweir 		getTimestamp(
253*cdf0e10cSrcweir 			sal_Int32 columnIndex )
254*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
255*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
256*cdf0e10cSrcweir 		{
257*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
258*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getTimestamp( columnIndex );
259*cdf0e10cSrcweir 			else
260*cdf0e10cSrcweir 				return com::sun::star::util::DateTime();
261*cdf0e10cSrcweir 		}
262*cdf0e10cSrcweir 
263*cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL
264*cdf0e10cSrcweir 		getBinaryStream(
265*cdf0e10cSrcweir 			sal_Int32 columnIndex )
266*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
267*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
268*cdf0e10cSrcweir 		{
269*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
270*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getBinaryStream( columnIndex );
271*cdf0e10cSrcweir 			else
272*cdf0e10cSrcweir 				return com::sun::star::uno::Reference< com::sun::star::io::XInputStream >();
273*cdf0e10cSrcweir 		}
274*cdf0e10cSrcweir 
275*cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL
276*cdf0e10cSrcweir 		getCharacterStream(
277*cdf0e10cSrcweir 			sal_Int32 columnIndex )
278*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
279*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
280*cdf0e10cSrcweir 		{
281*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
282*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getCharacterStream( columnIndex );
283*cdf0e10cSrcweir 			else
284*cdf0e10cSrcweir 				return com::sun::star::uno::Reference< com::sun::star::io::XInputStream >();
285*cdf0e10cSrcweir 		}
286*cdf0e10cSrcweir 
287*cdf0e10cSrcweir 		virtual com::sun::star::uno::Any SAL_CALL
288*cdf0e10cSrcweir 		getObject(
289*cdf0e10cSrcweir 			sal_Int32 columnIndex,
290*cdf0e10cSrcweir 			const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& typeMap )
291*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
292*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
293*cdf0e10cSrcweir 		{
294*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
295*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getObject( columnIndex,typeMap );
296*cdf0e10cSrcweir 			else
297*cdf0e10cSrcweir 				return com::sun::star::uno::Any();
298*cdf0e10cSrcweir 		}
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRef > SAL_CALL
301*cdf0e10cSrcweir 		getRef(
302*cdf0e10cSrcweir 			sal_Int32 columnIndex )
303*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
304*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
305*cdf0e10cSrcweir 		{
306*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
307*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getRef( columnIndex );
308*cdf0e10cSrcweir 			else
309*cdf0e10cSrcweir 				return com::sun::star::uno::Reference< com::sun::star::sdbc::XRef >();
310*cdf0e10cSrcweir 		}
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XBlob > SAL_CALL
313*cdf0e10cSrcweir 		getBlob(
314*cdf0e10cSrcweir 			sal_Int32 columnIndex )
315*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
316*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
317*cdf0e10cSrcweir 		{
318*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
319*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getBlob( columnIndex );
320*cdf0e10cSrcweir 			else
321*cdf0e10cSrcweir 				return com::sun::star::uno::Reference< com::sun::star::sdbc::XBlob >();
322*cdf0e10cSrcweir 		}
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XClob > SAL_CALL
325*cdf0e10cSrcweir 		getClob(
326*cdf0e10cSrcweir 			sal_Int32 columnIndex )
327*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
328*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
329*cdf0e10cSrcweir 		{
330*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
331*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getClob( columnIndex );
332*cdf0e10cSrcweir 			else
333*cdf0e10cSrcweir 				return com::sun::star::uno::Reference< com::sun::star::sdbc::XClob >();
334*cdf0e10cSrcweir 		}
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XArray > SAL_CALL
337*cdf0e10cSrcweir 		getArray(
338*cdf0e10cSrcweir 			sal_Int32 columnIndex )
339*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
340*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException)
341*cdf0e10cSrcweir 		{
342*cdf0e10cSrcweir 			if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
343*cdf0e10cSrcweir 				return m_aItems[m_nRow]->getArray( columnIndex );
344*cdf0e10cSrcweir 			else
345*cdf0e10cSrcweir 				return com::sun::star::uno::Reference< com::sun::star::sdbc::XArray >();
346*cdf0e10cSrcweir 		}
347*cdf0e10cSrcweir 
348*cdf0e10cSrcweir 
349*cdf0e10cSrcweir 		// XResultSet
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
352*cdf0e10cSrcweir 		next(
353*cdf0e10cSrcweir 			void )
354*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
355*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
356*cdf0e10cSrcweir 
357*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
358*cdf0e10cSrcweir 		isBeforeFirst(
359*cdf0e10cSrcweir 			void )
360*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
361*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
362*cdf0e10cSrcweir 
363*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
364*cdf0e10cSrcweir 		isAfterLast(
365*cdf0e10cSrcweir 			void )
366*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
367*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
368*cdf0e10cSrcweir 
369*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
370*cdf0e10cSrcweir 		isFirst(
371*cdf0e10cSrcweir 			void  )
372*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
373*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
374*cdf0e10cSrcweir 
375*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
376*cdf0e10cSrcweir 		isLast(
377*cdf0e10cSrcweir 			void  )
378*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
379*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
380*cdf0e10cSrcweir 
381*cdf0e10cSrcweir 		virtual void SAL_CALL
382*cdf0e10cSrcweir 		beforeFirst(
383*cdf0e10cSrcweir 			void  )
384*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
385*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
386*cdf0e10cSrcweir 
387*cdf0e10cSrcweir 		virtual void SAL_CALL
388*cdf0e10cSrcweir 		afterLast(
389*cdf0e10cSrcweir 			void  )
390*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
391*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
392*cdf0e10cSrcweir 
393*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
394*cdf0e10cSrcweir 		first(
395*cdf0e10cSrcweir 			void  )
396*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
397*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
398*cdf0e10cSrcweir 
399*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
400*cdf0e10cSrcweir 		last(
401*cdf0e10cSrcweir 			void  )
402*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
403*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
404*cdf0e10cSrcweir 
405*cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL
406*cdf0e10cSrcweir 		getRow(
407*cdf0e10cSrcweir 			void  )
408*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
409*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
410*cdf0e10cSrcweir 
411*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
412*cdf0e10cSrcweir 		absolute(
413*cdf0e10cSrcweir 			sal_Int32 row )
414*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
415*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
416*cdf0e10cSrcweir 
417*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
418*cdf0e10cSrcweir 		relative(
419*cdf0e10cSrcweir 			sal_Int32 rows )
420*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
421*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
422*cdf0e10cSrcweir 
423*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
424*cdf0e10cSrcweir 		previous(
425*cdf0e10cSrcweir 			void  )
426*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
427*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
428*cdf0e10cSrcweir 
429*cdf0e10cSrcweir 		virtual void SAL_CALL
430*cdf0e10cSrcweir 		refreshRow(
431*cdf0e10cSrcweir 			void  )
432*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
433*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
434*cdf0e10cSrcweir 
435*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
436*cdf0e10cSrcweir 		rowUpdated(
437*cdf0e10cSrcweir 			void )
438*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
439*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
440*cdf0e10cSrcweir 
441*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
442*cdf0e10cSrcweir 		rowInserted(
443*cdf0e10cSrcweir 			void  )
444*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
445*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
446*cdf0e10cSrcweir 
447*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
448*cdf0e10cSrcweir 		rowDeleted(
449*cdf0e10cSrcweir 			void  )
450*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
451*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
452*cdf0e10cSrcweir 
453*cdf0e10cSrcweir 
454*cdf0e10cSrcweir 		virtual  com::sun::star::uno::Reference<  com::sun::star::uno::XInterface > SAL_CALL
455*cdf0e10cSrcweir 		getStatement(
456*cdf0e10cSrcweir 			void  )
457*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
458*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
459*cdf0e10cSrcweir 
460*cdf0e10cSrcweir 		// XCloseable
461*cdf0e10cSrcweir 
462*cdf0e10cSrcweir 		virtual void SAL_CALL
463*cdf0e10cSrcweir 		close(
464*cdf0e10cSrcweir 			void )
465*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
466*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
467*cdf0e10cSrcweir 
468*cdf0e10cSrcweir 		// XContentAccess
469*cdf0e10cSrcweir 
470*cdf0e10cSrcweir 		virtual rtl::OUString SAL_CALL
471*cdf0e10cSrcweir 		queryContentIdentifierString(
472*cdf0e10cSrcweir 			void )
473*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
474*cdf0e10cSrcweir 
475*cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > SAL_CALL
476*cdf0e10cSrcweir 		queryContentIdentifier(
477*cdf0e10cSrcweir 			void )
478*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
479*cdf0e10cSrcweir 
480*cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent > SAL_CALL
481*cdf0e10cSrcweir 		queryContent(
482*cdf0e10cSrcweir 			void )
483*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
484*cdf0e10cSrcweir 
485*cdf0e10cSrcweir 		// XResultSetMetaDataSupplier
486*cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSetMetaData > SAL_CALL
487*cdf0e10cSrcweir 		getMetaData(
488*cdf0e10cSrcweir 			void )
489*cdf0e10cSrcweir 			throw( com::sun::star::sdbc::SQLException,
490*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
491*cdf0e10cSrcweir 
492*cdf0e10cSrcweir 
493*cdf0e10cSrcweir 		// XPropertySet
494*cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL
495*cdf0e10cSrcweir 		getPropertySetInfo()
496*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException);
497*cdf0e10cSrcweir 
498*cdf0e10cSrcweir 		virtual void SAL_CALL setPropertyValue(
499*cdf0e10cSrcweir 			const rtl::OUString& aPropertyName,
500*cdf0e10cSrcweir 			const com::sun::star::uno::Any& aValue )
501*cdf0e10cSrcweir 			throw( com::sun::star::beans::UnknownPropertyException,
502*cdf0e10cSrcweir 				   com::sun::star::beans::PropertyVetoException,
503*cdf0e10cSrcweir 				   com::sun::star::lang::IllegalArgumentException,
504*cdf0e10cSrcweir 				   com::sun::star::lang::WrappedTargetException,
505*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
506*cdf0e10cSrcweir 
507*cdf0e10cSrcweir 		virtual com::sun::star::uno::Any SAL_CALL
508*cdf0e10cSrcweir 		getPropertyValue(
509*cdf0e10cSrcweir 			const rtl::OUString& PropertyName )
510*cdf0e10cSrcweir 			throw( com::sun::star::beans::UnknownPropertyException,
511*cdf0e10cSrcweir 				   com::sun::star::lang::WrappedTargetException,
512*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
513*cdf0e10cSrcweir 
514*cdf0e10cSrcweir 		virtual void SAL_CALL
515*cdf0e10cSrcweir 		addPropertyChangeListener(
516*cdf0e10cSrcweir 			const rtl::OUString& aPropertyName,
517*cdf0e10cSrcweir 			const com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener >& xListener )
518*cdf0e10cSrcweir 			throw( com::sun::star::beans::UnknownPropertyException,
519*cdf0e10cSrcweir 				   com::sun::star::lang::WrappedTargetException,
520*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
521*cdf0e10cSrcweir 
522*cdf0e10cSrcweir 		virtual void SAL_CALL
523*cdf0e10cSrcweir 		removePropertyChangeListener(
524*cdf0e10cSrcweir 			const rtl::OUString& aPropertyName,
525*cdf0e10cSrcweir 			const com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener >& aListener )
526*cdf0e10cSrcweir 			throw( com::sun::star::beans::UnknownPropertyException,
527*cdf0e10cSrcweir 				   com::sun::star::lang::WrappedTargetException,
528*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
529*cdf0e10cSrcweir 
530*cdf0e10cSrcweir 		virtual void SAL_CALL
531*cdf0e10cSrcweir 		addVetoableChangeListener(
532*cdf0e10cSrcweir 			const rtl::OUString& PropertyName,
533*cdf0e10cSrcweir 			const com::sun::star::uno::Reference< com::sun::star::beans::XVetoableChangeListener >& aListener )
534*cdf0e10cSrcweir 			throw( com::sun::star::beans::UnknownPropertyException,
535*cdf0e10cSrcweir 				   com::sun::star::lang::WrappedTargetException,
536*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
537*cdf0e10cSrcweir 
538*cdf0e10cSrcweir 		virtual void SAL_CALL removeVetoableChangeListener(
539*cdf0e10cSrcweir 			const rtl::OUString& PropertyName,
540*cdf0e10cSrcweir 			const com::sun::star::uno::Reference< com::sun::star::beans::XVetoableChangeListener >& aListener )
541*cdf0e10cSrcweir 			throw( com::sun::star::beans::UnknownPropertyException,
542*cdf0e10cSrcweir 				   com::sun::star::lang::WrappedTargetException,
543*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
544*cdf0e10cSrcweir 
545*cdf0e10cSrcweir 	protected:
546*cdf0e10cSrcweir 
547*cdf0e10cSrcweir 		com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >  m_xMSF;
548*cdf0e10cSrcweir 		com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider >  m_xProvider;
549*cdf0e10cSrcweir 		sal_Int32                           m_nRow;
550*cdf0e10cSrcweir 		sal_Bool                            m_nWasNull;
551*cdf0e10cSrcweir 		sal_Int32                           m_nOpenMode;
552*cdf0e10cSrcweir 		sal_Bool                            m_bRowCountFinal;
553*cdf0e10cSrcweir 
554*cdf0e10cSrcweir 		typedef std::vector< com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > > IdentSet;
555*cdf0e10cSrcweir 		typedef std::vector< com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > >              ItemSet;
556*cdf0e10cSrcweir 		typedef std::vector< rtl::OUString >                                                             PathSet;
557*cdf0e10cSrcweir 
558*cdf0e10cSrcweir 		IdentSet                            m_aIdents;
559*cdf0e10cSrcweir 		ItemSet                             m_aItems;
560*cdf0e10cSrcweir 		PathSet                             m_aPath;
561*cdf0e10cSrcweir 
562*cdf0e10cSrcweir 		com::sun::star::uno::Sequence< com::sun::star::beans::Property >           m_sProperty;
563*cdf0e10cSrcweir 		com::sun::star::uno::Sequence< com::sun::star::ucb::NumberedSortingInfo >  m_sSortingInfo;
564*cdf0e10cSrcweir 
565*cdf0e10cSrcweir 		osl::Mutex                          m_aMutex;
566*cdf0e10cSrcweir 		cppu::OInterfaceContainerHelper*    m_pDisposeEventListeners;
567*cdf0e10cSrcweir 
568*cdf0e10cSrcweir 		cppu::OInterfaceContainerHelper*    m_pRowCountListeners;
569*cdf0e10cSrcweir 		cppu::OInterfaceContainerHelper*    m_pIsFinalListeners;
570*cdf0e10cSrcweir 	};
571*cdf0e10cSrcweir 
572*cdf0e10cSrcweir 
573*cdf0e10cSrcweir } // end namespace fileaccess
574*cdf0e10cSrcweir 
575*cdf0e10cSrcweir 
576*cdf0e10cSrcweir #endif
577