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