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