LibreOffice Module ucbhelper (master) 1
Public Member Functions | Private Attributes | Friends | List of all members
ucbhelper::ResultSetDataSupplier Class Referenceabstract

This is the base class for an object that supplies data to a result set. More...

#include <resultset.hxx>

Inheritance diagram for ucbhelper::ResultSetDataSupplier:
[legend]
Collaboration diagram for ucbhelper::ResultSetDataSupplier:
[legend]

Public Member Functions

 ResultSetDataSupplier ()
 
rtl::Reference< ResultSetgetResultSet () const
 This method returns the resultset this supplier belongs to. More...
 
virtual OUString queryContentIdentifierString (sal_uInt32 nIndex)=0
 This method returns the identifier string of the content at the specified index. More...
 
virtual css::uno::Reference< css::ucb::XContentIdentifier > queryContentIdentifier (sal_uInt32 nIndex)=0
 This method returns the identifier of the content at the specified index. More...
 
virtual css::uno::Reference< css::ucb::XContent > queryContent (sal_uInt32 nIndex)=0
 This method returns the content at the specified index. More...
 
virtual bool getResult (sal_uInt32 nIndex)=0
 This method returns whether there is a content at the specified index. More...
 
virtual sal_uInt32 totalCount ()=0
 This method returns the total count of objects in the logical data array of the supplier. More...
 
virtual sal_uInt32 currentCount ()=0
 This method returns the count of objects obtained so far. More...
 
virtual bool isCountFinal ()=0
 This method returns whether the value returned by currentCount() is "final". More...
 
virtual css::uno::Reference< css::sdbc::XRow > queryPropertyValues (sal_uInt32 nIndex)=0
 This method returns an object for accessing the property values at the specified index. More...
 
virtual void releasePropertyValues (sal_uInt32 nIndex)=0
 This method is called to instruct the supplier to release the (possibly present) property values at the given index. More...
 
virtual void close ()=0
 This method will be called by the resultset implementation in order to instruct the data supplier to release all resources it has allocated so far. More...
 
virtual void validate ()=0
 This method will be called by the resultset implementation in order check, whether an error has occurred while collecting data. More...
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Attributes

ResultSetm_pResultSet
 

Friends

class ResultSet
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

This is the base class for an object that supplies data to a result set.

See also
ResultSet

Definition at line 289 of file resultset.hxx.

Constructor & Destructor Documentation

◆ ResultSetDataSupplier()

ucbhelper::ResultSetDataSupplier::ResultSetDataSupplier ( )
inline

Definition at line 298 of file resultset.hxx.

Member Function Documentation

◆ close()

virtual void ucbhelper::ResultSetDataSupplier::close ( )
pure virtual

This method will be called by the resultset implementation in order to instruct the data supplier to release all resources it has allocated so far.

In case the supplier is collecting data asynchronously, that process must be stopped.

◆ currentCount()

virtual sal_uInt32 ucbhelper::ResultSetDataSupplier::currentCount ( )
pure virtual

This method returns the count of objects obtained so far.

There is no for the implementation to obtain all objects at once. It can obtain all data on demand.

The implementation should call m_pResultSet->rowCountChanged(...) every time it has inserted a new entry in its logical result array.

Returns
the count of objects obtained so far; will always be non-negative.

◆ getResult()

virtual bool ucbhelper::ResultSetDataSupplier::getResult ( sal_uInt32  nIndex)
pure virtual

This method returns whether there is a content at the specified index.

Parameters
nIndexis the zero-based index within the logical data array of the supplier; must be non-negative.
Returns
true, if there is a content at the given index.

◆ getResultSet()

rtl::Reference< ResultSet > ucbhelper::ResultSetDataSupplier::getResultSet ( ) const
inline

This method returns the resultset this supplier belongs to.

Returns
the resultset for that the supplier supplies data.

Definition at line 305 of file resultset.hxx.

References m_pResultSet.

◆ isCountFinal()

virtual bool ucbhelper::ResultSetDataSupplier::isCountFinal ( )
pure virtual

This method returns whether the value returned by currentCount() is "final".

This is the case, if that there was all data obtained by the supplier and the current count won't increase any more.

The implementation should call m_pResultSet->rowCountFinal(...) if it has inserted all entries in its logical result array.

Returns
true, if the value returned by currentCount() won't change anymore.

◆ queryContent()

virtual css::uno::Reference< css::ucb::XContent > ucbhelper::ResultSetDataSupplier::queryContent ( sal_uInt32  nIndex)
pure virtual

This method returns the content at the specified index.

Parameters
nIndexis the zero-based index within the logical data array of the supplier; must be non-negative.
Returns
the content.

◆ queryContentIdentifier()

virtual css::uno::Reference< css::ucb::XContentIdentifier > ucbhelper::ResultSetDataSupplier::queryContentIdentifier ( sal_uInt32  nIndex)
pure virtual

This method returns the identifier of the content at the specified index.

Parameters
nIndexis the zero-based index within the logical data array of the supplier; must be non-negative.
Returns
the content's identifier.

◆ queryContentIdentifierString()

virtual OUString ucbhelper::ResultSetDataSupplier::queryContentIdentifierString ( sal_uInt32  nIndex)
pure virtual

This method returns the identifier string of the content at the specified index.

Parameters
nIndexis the zero-based index within the logical data array of the supplier; must be non-negative.
Returns
the content's identifier string.

◆ queryPropertyValues()

virtual css::uno::Reference< css::sdbc::XRow > ucbhelper::ResultSetDataSupplier::queryPropertyValues ( sal_uInt32  nIndex)
pure virtual

This method returns an object for accessing the property values at the specified index.

The implementation may use the helper class ucb::PropertyValueSet to provide the return value.

Parameters
nIndexis the zero-based index within the logical data array of the supplier.
Returns
the object for accessing the property values.

◆ releasePropertyValues()

virtual void ucbhelper::ResultSetDataSupplier::releasePropertyValues ( sal_uInt32  nIndex)
pure virtual

This method is called to instruct the supplier to release the (possibly present) property values at the given index.

Parameters
nIndexis the zero-based index within the logical data array of the supplier.

◆ totalCount()

virtual sal_uInt32 ucbhelper::ResultSetDataSupplier::totalCount ( )
pure virtual

This method returns the total count of objects in the logical data array of the supplier.

The implementation of this method may be very "expensive", because it can be necessary to obtain all data in order to determine the count. Therefore the ResultSet implementation calls it very seldom.

Returns
the total count of objects; will always be non-negative.

◆ validate()

virtual void ucbhelper::ResultSetDataSupplier::validate ( )
pure virtual

This method will be called by the resultset implementation in order check, whether an error has occurred while collecting data.

The implementation of this method must throw an exception in that case.

Note: An exception thrown to indicate an error must always be thrown by the thread that created the data supplier. If the supplier collects data asynchronously ( i.e. in a separate thread ) and an error occurs, throwing of the appropriate exception must be deferred until validate() is called by the ResultSet implementation from inside the main thread. In case data are obtained synchronously, the ResultSetException can be thrown directly.

Exceptions
ResultSetExceptionthrown, if an error has occurred

Friends And Related Function Documentation

◆ ResultSet

friend class ResultSet
friend

Definition at line 291 of file resultset.hxx.

Member Data Documentation

◆ m_pResultSet

ResultSet* ucbhelper::ResultSetDataSupplier::m_pResultSet
private

Definition at line 295 of file resultset.hxx.

Referenced by getResultSet().


The documentation for this class was generated from the following file: