1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_UCBHELPER_RESULTSET_HXX
21 #define INCLUDED_UCBHELPER_RESULTSET_HXX
23 #include <com/sun/star/lang/XTypeProvider.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/lang/XComponent.hpp>
26 #include <com/sun/star/ucb/ResultSetException.hpp>
27 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
28 #include <com/sun/star/ucb/XContentAccess.hpp>
29 #include <com/sun/star/sdbc/XResultSet.hpp>
30 #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
31 #include <com/sun/star/sdbc/XRow.hpp>
32 #include <com/sun/star/sdbc/XCloseable.hpp>
33 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <rtl/ref.hxx>
36 #include <salhelper/simplereferenceobject.hxx>
37 #include <cppuhelper/weak.hxx>
38 #include <ucbhelper/macros.hxx>
39 #include <ucbhelper/ucbhelperdllapi.h>
45 #define RESULTSET_SERVICE_NAME "com.sun.star.ucb.ContentResultSet"
49 class ResultSetDataSupplier
;
50 struct ResultSet_Impl
;
53 * This is an implementation of the service com.sun.star.ucb.ContentResultSet.
54 * It can be used to implement the method XDynamicResultSet::getStaticResultSet,
55 * which needs to be implemented for instance to implement the command "open"
56 * at folder objects. This class uses a user supplied ResultSetDataSupplier
57 * object to request data on demand.
59 * @see ResultSetDataSupplier
61 class UCBHELPER_DLLPUBLIC ResultSet
:
62 public cppu::OWeakObject
,
63 public com::sun::star::lang::XTypeProvider
,
64 public com::sun::star::lang::XServiceInfo
,
65 public com::sun::star::lang::XComponent
,
66 public com::sun::star::ucb::XContentAccess
,
67 public com::sun::star::sdbc::XResultSet
,
68 public com::sun::star::sdbc::XResultSetMetaDataSupplier
,
69 public com::sun::star::sdbc::XRow
,
70 public com::sun::star::sdbc::XCloseable
,
71 public com::sun::star::beans::XPropertySet
73 ResultSet_Impl
* m_pImpl
;
79 * @param rxSMgr is a Service Manager.
80 * @param rProperties is a sequence of properties for that the resultset
81 * shall be able to obtain the values.
82 * @param rDataSupplier is a supplier for the resultset data.
85 const com::sun::star::uno::Reference
<
86 com::sun::star::uno::XComponentContext
>& rxContext
,
87 const com::sun::star::uno::Sequence
<
88 com::sun::star::beans::Property
>& rProperties
,
89 const rtl::Reference
< ResultSetDataSupplier
>& rDataSupplier
);
93 * @param rxSMgr is a Service Manager.
94 * @param rProperties is a sequence of properties for that the resultset
95 * shall be able to obtain the values.
96 * @param rDataSupplier is a supplier for the resultset data.
97 * @param rxEnv is the environment for interactions, progress propagation,
101 const com::sun::star::uno::Reference
<
102 com::sun::star::uno::XComponentContext
>& rxContext
,
103 const com::sun::star::uno::Sequence
<
104 com::sun::star::beans::Property
>& rProperties
,
105 const rtl::Reference
< ResultSetDataSupplier
>& rDataSupplier
,
106 const com::sun::star::uno::Reference
<
107 com::sun::star::ucb::XCommandEnvironment
>& rxEnv
);
108 virtual ~ResultSet();
111 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
)
112 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
113 virtual void SAL_CALL
acquire()
114 throw() SAL_OVERRIDE
;
115 virtual void SAL_CALL
release()
116 throw() SAL_OVERRIDE
;
119 virtual com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
120 getImplementationId()
121 throw( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
122 virtual com::sun::star::uno::Sequence
< com::sun::star::uno::Type
> SAL_CALL
124 throw( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
127 virtual OUString SAL_CALL
getImplementationName()
128 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
129 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
130 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
131 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
132 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
134 static OUString
getImplementationName_Static();
135 static css::uno::Sequence
< OUString
> getSupportedServiceNames_Static();
138 virtual void SAL_CALL
140 throw( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
141 virtual void SAL_CALL
142 addEventListener( const com::sun::star::uno::Reference
<
143 com::sun::star::lang::XEventListener
>& Listener
)
144 throw( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
145 virtual void SAL_CALL
146 removeEventListener( const com::sun::star::uno::Reference
<
147 com::sun::star::lang::XEventListener
>& Listener
)
148 throw( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
151 virtual OUString SAL_CALL
152 queryContentIdentifierString()
153 throw( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
154 virtual com::sun::star::uno::Reference
<
155 com::sun::star::ucb::XContentIdentifier
> SAL_CALL
156 queryContentIdentifier()
157 throw( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
158 virtual com::sun::star::uno::Reference
<
159 com::sun::star::ucb::XContent
> SAL_CALL
161 throw( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
163 // XResultSetMetaDataSupplier
164 virtual com::sun::star::uno::Reference
<
165 com::sun::star::sdbc::XResultSetMetaData
> SAL_CALL
167 throw( com::sun::star::sdbc::SQLException
,
168 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
171 virtual sal_Bool SAL_CALL
173 throw( com::sun::star::sdbc::SQLException
,
174 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
175 virtual sal_Bool SAL_CALL
177 throw( com::sun::star::sdbc::SQLException
,
178 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
179 virtual sal_Bool SAL_CALL
181 throw( com::sun::star::sdbc::SQLException
,
182 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
183 virtual sal_Bool SAL_CALL
185 throw( com::sun::star::sdbc::SQLException
,
186 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
187 virtual sal_Bool SAL_CALL
189 throw( com::sun::star::sdbc::SQLException
,
190 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
191 virtual void SAL_CALL
193 throw( com::sun::star::sdbc::SQLException
,
194 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
195 virtual void SAL_CALL
197 throw( com::sun::star::sdbc::SQLException
,
198 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
199 virtual sal_Bool SAL_CALL
201 throw( com::sun::star::sdbc::SQLException
,
202 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
203 virtual sal_Bool SAL_CALL
205 throw( com::sun::star::sdbc::SQLException
,
206 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
207 virtual sal_Int32 SAL_CALL
209 throw( com::sun::star::sdbc::SQLException
,
210 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
211 virtual sal_Bool SAL_CALL
212 absolute( sal_Int32 row
)
213 throw( com::sun::star::sdbc::SQLException
,
214 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
215 virtual sal_Bool SAL_CALL
216 relative( sal_Int32 rows
)
217 throw( com::sun::star::sdbc::SQLException
,
218 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
219 virtual sal_Bool SAL_CALL
221 throw( com::sun::star::sdbc::SQLException
,
222 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
223 virtual void SAL_CALL
225 throw( com::sun::star::sdbc::SQLException
,
226 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
227 virtual sal_Bool SAL_CALL
229 throw( com::sun::star::sdbc::SQLException
,
230 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
231 virtual sal_Bool SAL_CALL
233 throw( com::sun::star::sdbc::SQLException
,
234 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
235 virtual sal_Bool SAL_CALL
237 throw( com::sun::star::sdbc::SQLException
,
238 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
239 virtual com::sun::star::uno::Reference
<
240 com::sun::star::uno::XInterface
> SAL_CALL
242 throw( com::sun::star::sdbc::SQLException
,
243 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
246 virtual sal_Bool SAL_CALL
248 throw( com::sun::star::sdbc::SQLException
,
249 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
250 virtual OUString SAL_CALL
251 getString( sal_Int32 columnIndex
)
252 throw( com::sun::star::sdbc::SQLException
,
253 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
254 virtual sal_Bool SAL_CALL
255 getBoolean( sal_Int32 columnIndex
)
256 throw( com::sun::star::sdbc::SQLException
,
257 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
258 virtual sal_Int8 SAL_CALL
259 getByte( sal_Int32 columnIndex
)
260 throw( com::sun::star::sdbc::SQLException
,
261 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
262 virtual sal_Int16 SAL_CALL
263 getShort( sal_Int32 columnIndex
)
264 throw( com::sun::star::sdbc::SQLException
,
265 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
266 virtual sal_Int32 SAL_CALL
267 getInt( sal_Int32 columnIndex
)
268 throw( com::sun::star::sdbc::SQLException
,
269 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
270 virtual sal_Int64 SAL_CALL
271 getLong( sal_Int32 columnIndex
)
272 throw( com::sun::star::sdbc::SQLException
,
273 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
274 virtual float SAL_CALL
275 getFloat( sal_Int32 columnIndex
)
276 throw( com::sun::star::sdbc::SQLException
,
277 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
278 virtual double SAL_CALL
279 getDouble( sal_Int32 columnIndex
)
280 throw( com::sun::star::sdbc::SQLException
,
281 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
282 virtual com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
283 getBytes( sal_Int32 columnIndex
)
284 throw( com::sun::star::sdbc::SQLException
,
285 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
286 virtual com::sun::star::util::Date SAL_CALL
287 getDate( sal_Int32 columnIndex
)
288 throw( com::sun::star::sdbc::SQLException
,
289 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
290 virtual com::sun::star::util::Time SAL_CALL
291 getTime( sal_Int32 columnIndex
)
292 throw( com::sun::star::sdbc::SQLException
,
293 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
294 virtual com::sun::star::util::DateTime SAL_CALL
295 getTimestamp( sal_Int32 columnIndex
)
296 throw( com::sun::star::sdbc::SQLException
,
297 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
298 virtual com::sun::star::uno::Reference
<
299 com::sun::star::io::XInputStream
> SAL_CALL
300 getBinaryStream( sal_Int32 columnIndex
)
301 throw( com::sun::star::sdbc::SQLException
,
302 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
303 virtual com::sun::star::uno::Reference
<
304 com::sun::star::io::XInputStream
> SAL_CALL
305 getCharacterStream( sal_Int32 columnIndex
)
306 throw( com::sun::star::sdbc::SQLException
,
307 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
308 virtual com::sun::star::uno::Any SAL_CALL
309 getObject( sal_Int32 columnIndex
,
310 const com::sun::star::uno::Reference
<
311 com::sun::star::container::XNameAccess
>& typeMap
)
312 throw( com::sun::star::sdbc::SQLException
,
313 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
314 virtual com::sun::star::uno::Reference
<
315 com::sun::star::sdbc::XRef
> SAL_CALL
316 getRef( sal_Int32 columnIndex
)
317 throw( com::sun::star::sdbc::SQLException
,
318 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
319 virtual com::sun::star::uno::Reference
<
320 com::sun::star::sdbc::XBlob
> SAL_CALL
321 getBlob( sal_Int32 columnIndex
)
322 throw( com::sun::star::sdbc::SQLException
,
323 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
324 virtual com::sun::star::uno::Reference
<
325 com::sun::star::sdbc::XClob
> SAL_CALL
326 getClob( sal_Int32 columnIndex
)
327 throw( com::sun::star::sdbc::SQLException
,
328 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
329 virtual com::sun::star::uno::Reference
<
330 com::sun::star::sdbc::XArray
> SAL_CALL
331 getArray( sal_Int32 columnIndex
)
332 throw( com::sun::star::sdbc::SQLException
,
333 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
336 virtual void SAL_CALL
338 throw( com::sun::star::sdbc::SQLException
,
339 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
342 virtual com::sun::star::uno::Reference
<
343 com::sun::star::beans::XPropertySetInfo
> SAL_CALL
345 throw( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
346 virtual void SAL_CALL
347 setPropertyValue( const OUString
& aPropertyName
,
348 const com::sun::star::uno::Any
& aValue
)
349 throw( com::sun::star::beans::UnknownPropertyException
,
350 com::sun::star::beans::PropertyVetoException
,
351 com::sun::star::lang::IllegalArgumentException
,
352 com::sun::star::lang::WrappedTargetException
,
353 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
354 virtual com::sun::star::uno::Any SAL_CALL
355 getPropertyValue( const OUString
& PropertyName
)
356 throw( com::sun::star::beans::UnknownPropertyException
,
357 com::sun::star::lang::WrappedTargetException
,
358 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
359 virtual void SAL_CALL
360 addPropertyChangeListener( const OUString
& aPropertyName
,
361 const com::sun::star::uno::Reference
<
362 com::sun::star::beans::XPropertyChangeListener
>& xListener
)
363 throw( com::sun::star::beans::UnknownPropertyException
,
364 com::sun::star::lang::WrappedTargetException
,
365 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
366 virtual void SAL_CALL
367 removePropertyChangeListener( const OUString
& aPropertyName
,
368 const com::sun::star::uno::Reference
<
369 com::sun::star::beans::XPropertyChangeListener
>& aListener
)
370 throw( com::sun::star::beans::UnknownPropertyException
,
371 com::sun::star::lang::WrappedTargetException
,
372 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
373 virtual void SAL_CALL
374 addVetoableChangeListener( const OUString
& PropertyName
,
375 const com::sun::star::uno::Reference
<
376 com::sun::star::beans::XVetoableChangeListener
>& aListener
)
377 throw( com::sun::star::beans::UnknownPropertyException
,
378 com::sun::star::lang::WrappedTargetException
,
379 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
380 virtual void SAL_CALL
381 removeVetoableChangeListener( const OUString
& PropertyName
,
382 const com::sun::star::uno::Reference
<
383 com::sun::star::beans::XVetoableChangeListener
>& aListener
)
384 throw( com::sun::star::beans::UnknownPropertyException
,
385 com::sun::star::lang::WrappedTargetException
,
386 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
389 // Non-interface methods.
393 * This method propagates property value changes to all registered
396 * @param rEvt is a property change event.
398 void propertyChanged(
399 const com::sun::star::beans::PropertyChangeEvent
& rEvt
);
402 * This method should be called by the data supplier for the result set
403 * to indicate that there were new data obtained from the data source.
405 * @param nOld is the old count of rows; must be non-negative.
406 * @param nnew is the new count of rows; must be non-negative.
408 void rowCountChanged( sal_uInt32 nOld
, sal_uInt32 nNew
);
411 * This method should be called by the data supplier for the result set
412 * to indicate that there were all rows obtained from the data source.
414 void rowCountFinal();
417 * This method returns a sequence containing all properties ( not the
418 * values! ) of the result set.
420 * @return a sequence of properties.
422 const com::sun::star::uno::Sequence
< com::sun::star::beans::Property
>&
426 * This method returns the environment to use for interactions, progress
427 * propagation, ... It can by empty.
429 * @return an environment or an empty reference.
431 const com::sun::star::uno::Reference
<
432 com::sun::star::ucb::XCommandEnvironment
>&
439 * This is the base class for an object that supplies data to a result set
443 class ResultSetDataSupplier
: public salhelper::SimpleReferenceObject
445 friend class ResultSet
;
447 // No ref, otherwise we get a cyclic reference between supplier and set!
448 // Will be set from ResultSet ctor.
449 ResultSet
* m_pResultSet
;
452 ResultSetDataSupplier() : m_pResultSet( 0 ) {}
455 * This method returns the resultset this supplier belongs to.
457 * @return the resultset for that the supplier supplies data.
459 rtl::Reference
< ResultSet
> getResultSet() const { return m_pResultSet
; }
462 * This method returns the identifier string of the content at the
465 * @param nIndex is the zero-based index within the logical data array
466 * of the supplier; must be non-negative.
467 * @return the content's identifier string.
469 virtual OUString
queryContentIdentifierString( sal_uInt32 nIndex
) = 0;
472 * This method returns the identifier of the content at the specified index.
474 * @param nIndex is the zero-based index within the logical data array
475 * of the supplier; must be non-negative.
476 * @return the content's identifier.
478 virtual com::sun::star::uno::Reference
<
479 com::sun::star::ucb::XContentIdentifier
>
480 queryContentIdentifier( sal_uInt32 nIndex
) = 0;
483 * This method returns the content at the specified index.
485 * @param nIndex is the zero-based index within the logical data array
486 * of the supplier; must be non-negative.
487 * @return the content.
489 virtual com::sun::star::uno::Reference
< com::sun::star::ucb::XContent
>
490 queryContent( sal_uInt32 nIndex
) = 0;
493 * This method returns whether there is a content at the specified index.
495 * @param nIndex is the zero-based index within the logical data array
496 * of the supplier; must be non-negative.
497 * @return true, if there is a content at the given index.
499 virtual bool getResult( sal_uInt32 nIndex
) = 0;
502 * This method returns the total count of objects in the logical data array
503 * of the supplier. The implementation of this method may be very
504 * "expensive", because it can be necessary to obtain all data in order
505 * to determine the count. Therefore the ResultSet implementation calls
508 * @return the total count of objects; will always be non-negative.
510 virtual sal_uInt32
totalCount() = 0;
513 * This method returns the count of objects obtained so far. There is no
514 * for the implementation to obtain all objects at once. It can obtain
515 * all data on demand.
517 * The implementation should call m_pResultSet->rowCountChanged(...)
518 * every time it has inserted a new entry in its logical result array.
520 * @return the count of objects obtained so far; will always be
523 virtual sal_uInt32
currentCount() = 0;
526 * This method returns whether the value returned by currentCount() is
527 * "final". This is the case, if that there was all data obtained by the
528 * supplier and the current count won't increase any more.
530 * The implementation should call m_pResultSet->rowCountFinal(...) if
531 * it has inserted all entries in its logical result array.
533 * @return true, if the value returned by currentCount() won't change
536 virtual bool isCountFinal() = 0;
539 * This method returns an object for accessing the property values at
540 * the specified index. The implementation may use the helper class
541 * ucb::PropertyValueSet to provide the return value.
543 * @param nIndex is the zero-based index within the logical data array
545 * @return the object for accessing the property values.
547 virtual com::sun::star::uno::Reference
< com::sun::star::sdbc::XRow
>
548 queryPropertyValues( sal_uInt32 nIndex
) = 0;
551 * This method is called to instruct the supplier to release the (possibly
552 * presnt) property values at the given index.
554 * @param nIndex is the zero-based index within the logical data array
557 virtual void releasePropertyValues( sal_uInt32 nIndex
) = 0;
560 * This method will be called by the resultset implementation in order
561 * to instruct the data supplier to release all resources it has
562 * allocated so far. In case the supplier is collecting data
563 * asynchronously, that process must be stopped.
565 virtual void close() = 0;
568 * This method will be called by the resultset implementation in order
569 * check, whether an error has occurred while collecting data. The
570 * implementation of this method must throw an exception in that case.
572 * Note: An exception thrown to indicate an error must always be thrown
573 * by the thread that created the data supplier. If the supplier collects
574 * data asynchronously ( i.e. in a separate thread ) and an error
575 * occurs, throwing of the appropriate exception must be deferred
576 * until validate() is called by the ResultSet implementation from
577 * inside the main thread.
578 * In case data are obtained synchronously, the ResultSetException can
579 * be thrown directly.
581 * @exception ResultSetException thrown, if an error has occurred
583 virtual void validate()
584 throw( com::sun::star::ucb::ResultSetException
) = 0;
589 #endif /* ! INCLUDED_UCBHELPER_RESULTSET_HXX */
591 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */