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 #include <resultset.hxx>
21 #include "dbastrings.hrc"
22 #include "apitools.hxx"
23 #include <com/sun/star/lang/DisposedException.hpp>
24 #include <com/sun/star/sdbc/ResultSetType.hpp>
25 #include <cppuhelper/typeprovider.hxx>
26 #include <comphelper/property.hxx>
27 #include <comphelper/sequence.hxx>
28 #include <comphelper/types.hxx>
29 #include <tools/debug.hxx>
30 #include <tools/diagnose_ex.h>
31 #include <datacolumn.hxx>
32 #include <com/sun/star/beans/PropertyAttribute.hpp>
33 #include <connectivity/dbexception.hxx>
34 #include <connectivity/dbtools.hxx>
35 #include <cppuhelper/exc_hlp.hxx>
36 #include <osl/thread.h>
37 #include <rtl/logfile.hxx>
40 using namespace ::com::sun::star::sdbc
;
41 using namespace ::com::sun::star::sdbcx
;
42 using namespace ::com::sun::star::beans
;
43 using namespace ::com::sun::star::uno
;
44 using namespace ::com::sun::star::lang
;
45 using namespace ::com::sun::star::container
;
46 using namespace ::cppu
;
47 using namespace ::osl
;
48 using namespace dbaccess
;
49 using namespace dbtools
;
53 OResultSet::OResultSet(const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
>& _xResultSet
,
54 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& _xStatement
,
55 sal_Bool _bCaseSensitive
)
56 :OResultSetBase(m_aMutex
)
57 ,OPropertySetHelper(OResultSetBase::rBHelper
)
58 ,m_xDelegatorResultSet(_xResultSet
)
59 ,m_aWarnings( Reference
< XWarningsSupplier
>( _xResultSet
, UNO_QUERY
) )
60 ,m_bIsBookmarkable(sal_False
)
62 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::OResultSet" );
63 DBG_CTOR(OResultSet
, NULL
);
65 m_pColumns
= new OColumns(*this, m_aMutex
, _bCaseSensitive
, ::std::vector
< ::rtl::OUString
>(), NULL
,NULL
);
69 m_aStatement
= _xStatement
;
70 m_xDelegatorResultSetUpdate
= m_xDelegatorResultSetUpdate
.query( m_xDelegatorResultSet
);
71 m_xDelegatorRow
= m_xDelegatorRow
.query( m_xDelegatorResultSet
);
72 m_xDelegatorRowUpdate
= m_xDelegatorRowUpdate
.query( m_xDelegatorResultSet
);
74 Reference
< XPropertySet
> xSet(m_xDelegatorResultSet
, UNO_QUERY
);
75 xSet
->getPropertyValue(PROPERTY_RESULTSETTYPE
) >>= m_nResultSetType
;
76 xSet
->getPropertyValue(PROPERTY_RESULTSETCONCURRENCY
) >>= m_nResultSetConcurrency
;
79 if (ResultSetType::FORWARD_ONLY
!= m_nResultSetType
)
81 Reference
<XPropertySetInfo
> xInfo(xSet
->getPropertySetInfo());
82 if (xInfo
->hasPropertyByName(PROPERTY_ISBOOKMARKABLE
))
84 m_bIsBookmarkable
= ::comphelper::getBOOL(xSet
->getPropertyValue(PROPERTY_ISBOOKMARKABLE
));
85 OSL_ENSURE( !m_bIsBookmarkable
|| Reference
< XRowLocate
>(m_xDelegatorResultSet
, UNO_QUERY
).is(),
86 "OResultSet::OResultSet: aggregate is inconsistent in it's bookmarkable attribute!" );
87 m_bIsBookmarkable
= m_bIsBookmarkable
&& Reference
< XRowLocate
>(m_xDelegatorResultSet
, UNO_QUERY
).is();
96 OResultSet::~OResultSet()
98 m_pColumns
->acquire();
99 m_pColumns
->disposing();
102 DBG_DTOR(OResultSet
, NULL
);
105 // com::sun::star::lang::XTypeProvider
106 Sequence
< Type
> OResultSet::getTypes() throw (RuntimeException
)
108 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getTypes" );
109 OTypeCollection
aTypes(::getCppuType( (const Reference
< XPropertySet
> *)0 ),
110 OResultSetBase::getTypes());
112 return aTypes
.getTypes();
115 Sequence
< sal_Int8
> OResultSet::getImplementationId() throw (RuntimeException
)
117 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getImplementationId" );
118 static OImplementationId
* pId
= 0;
121 MutexGuard
aGuard( Mutex::getGlobalMutex() );
124 static OImplementationId aId
;
128 return pId
->getImplementationId();
131 // com::sun::star::uno::XInterface
132 Any
OResultSet::queryInterface( const Type
& rType
) throw (RuntimeException
)
134 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::queryInterface" );
135 Any aIface
= OResultSetBase::queryInterface( rType
);
136 if (!aIface
.hasValue())
137 aIface
= ::cppu::queryInterface(
139 static_cast< XPropertySet
* >( this ));
144 void OResultSet::acquire() throw ()
146 OResultSetBase::acquire();
149 void OResultSet::release() throw ()
151 OResultSetBase::release();
156 void OResultSet::disposing()
158 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::disposing" );
159 OPropertySetHelper::disposing();
161 MutexGuard
aGuard(m_aMutex
);
164 m_pColumns
->disposing();
166 // close the pending result set
167 Reference
< XCloseable
> (m_xDelegatorResultSet
, UNO_QUERY
)->close();
169 m_xDelegatorResultSet
= NULL
;
170 m_xDelegatorRow
= NULL
;
171 m_xDelegatorRowUpdate
= NULL
;
173 m_aStatement
= Reference
< XInterface
>();
177 void OResultSet::close(void) throw( SQLException
, RuntimeException
)
179 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::close" );
181 MutexGuard
aGuard( m_aMutex
);
182 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
188 rtl::OUString
OResultSet::getImplementationName( ) throw(RuntimeException
)
190 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getImplementationName" );
191 return rtl::OUString("com.sun.star.sdb.OResultSet");
194 sal_Bool
OResultSet::supportsService( const ::rtl::OUString
& _rServiceName
) throw (RuntimeException
)
196 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::supportsService" );
197 return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName
, sal_True
).getLength() != 0;
200 Sequence
< ::rtl::OUString
> OResultSet::getSupportedServiceNames( ) throw (RuntimeException
)
202 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getSupportedServiceNames" );
203 Sequence
< ::rtl::OUString
> aSNS( 2 );
204 aSNS
[0] = SERVICE_SDBC_RESULTSET
;
205 aSNS
[1] = SERVICE_SDB_RESULTSET
;
209 // com::sun::star::beans::XPropertySet
210 Reference
< XPropertySetInfo
> OResultSet::getPropertySetInfo() throw (RuntimeException
)
212 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getPropertySetInfo" );
213 return createPropertySetInfo( getInfoHelper() ) ;
216 // comphelper::OPropertyArrayUsageHelper
217 ::cppu::IPropertyArrayHelper
* OResultSet::createArrayHelper( ) const
219 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::createArrayHelper" );
220 BEGIN_PROPERTY_HELPER(6)
221 DECL_PROP1(CURSORNAME
, ::rtl::OUString
, READONLY
);
222 DECL_PROP0(FETCHDIRECTION
, sal_Int32
);
223 DECL_PROP0(FETCHSIZE
, sal_Int32
);
224 DECL_PROP1_BOOL(ISBOOKMARKABLE
, READONLY
);
225 DECL_PROP1(RESULTSETCONCURRENCY
, sal_Int32
, READONLY
);
226 DECL_PROP1(RESULTSETTYPE
, sal_Int32
, READONLY
);
227 END_PROPERTY_HELPER();
230 // cppu::OPropertySetHelper
231 ::cppu::IPropertyArrayHelper
& OResultSet::getInfoHelper()
233 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getInfoHelper" );
234 return *getArrayHelper();
237 sal_Bool
OResultSet::convertFastPropertyValue(Any
& rConvertedValue
, Any
& rOldValue
, sal_Int32 nHandle
, const Any
& rValue
) throw( IllegalArgumentException
)
239 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::convertFastPropertyValue" );
241 rConvertedValue
= rValue
;
242 getFastPropertyValue( rOldValue
, nHandle
);
246 void OResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle
, const Any
& rValue
) throw (Exception
)
248 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::setFastPropertyValue_NoBroadcast" );
249 // set it for the driver result set
250 Reference
< XPropertySet
> xSet(m_xDelegatorResultSet
, UNO_QUERY
);
253 case PROPERTY_ID_FETCHDIRECTION
:
254 xSet
->setPropertyValue(PROPERTY_FETCHDIRECTION
, rValue
);
256 case PROPERTY_ID_FETCHSIZE
:
257 xSet
->setPropertyValue(PROPERTY_FETCHSIZE
, rValue
);
260 OSL_FAIL("unknown Property");
264 void OResultSet::getFastPropertyValue( Any
& rValue
, sal_Int32 nHandle
) const
266 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getFastPropertyValue" );
269 case PROPERTY_ID_ISBOOKMARKABLE
:
271 sal_Bool bVal
= m_bIsBookmarkable
;
272 rValue
.setValue(&bVal
, getBooleanCppuType());
276 // get the property name
277 ::rtl::OUString aPropName
;
278 sal_Int16 nAttributes
;
279 const_cast<OResultSet
*>(this)->getInfoHelper().
280 fillPropertyMembersByHandle(&aPropName
, &nAttributes
, nHandle
);
281 OSL_ENSURE(!aPropName
.isEmpty(), "property not found?");
283 // now read the value
284 rValue
= Reference
< XPropertySet
>(m_xDelegatorResultSet
, UNO_QUERY
)->getPropertyValue(aPropName
);
290 Any
OResultSet::getWarnings(void) throw( SQLException
, RuntimeException
)
292 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getWarnings" );
293 MutexGuard
aGuard(m_aMutex
);
294 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
295 return m_aWarnings
.getWarnings();
298 void OResultSet::clearWarnings(void) throw( SQLException
, RuntimeException
)
300 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::clearWarnings" );
301 MutexGuard
aGuard(m_aMutex
);
302 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
303 m_aWarnings
.clearWarnings();
306 // ::com::sun::star::sdbc::XResultSetMetaDataSupplier
307 Reference
< XResultSetMetaData
> OResultSet::getMetaData(void) throw( SQLException
, RuntimeException
)
309 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getMetaData" );
310 MutexGuard
aGuard(m_aMutex
);
311 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
313 return Reference
< XResultSetMetaDataSupplier
>(m_xDelegatorResultSet
, UNO_QUERY
)->getMetaData();
316 // ::com::sun::star::sdbc::XColumnLocate
317 sal_Int32
OResultSet::findColumn(const rtl::OUString
& columnName
) throw( SQLException
, RuntimeException
)
319 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::findColumn" );
320 MutexGuard
aGuard(m_aMutex
);
321 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
323 return Reference
< XColumnLocate
>(m_xDelegatorResultSet
, UNO_QUERY
)->findColumn(columnName
);
328 static Reference
< XDatabaseMetaData
> lcl_getDBMetaDataFromStatement_nothrow( const Reference
< XInterface
>& _rxStatement
)
330 Reference
< XDatabaseMetaData
> xDBMetaData
;
333 Reference
< XStatement
> xStatement( _rxStatement
, UNO_QUERY
);
334 Reference
< XPreparedStatement
> xPreparedStatement( _rxStatement
, UNO_QUERY
);
335 Reference
< XConnection
> xConn
;
336 if ( xStatement
.is() )
337 xConn
= xStatement
->getConnection();
338 else if ( xPreparedStatement
.is() )
339 xConn
= xPreparedStatement
->getConnection();
341 xDBMetaData
= xConn
->getMetaData();
343 catch( const Exception
& )
345 DBG_UNHANDLED_EXCEPTION();
351 // ::com::sun::star::sdbcx::XColumnsSupplier
352 Reference
< ::com::sun::star::container::XNameAccess
> OResultSet::getColumns(void) throw( RuntimeException
)
354 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getColumns" );
355 MutexGuard
aGuard(m_aMutex
);
356 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
358 // do we have to populate the columns
359 if (!m_pColumns
->isInitialized())
362 Reference
< XResultSetMetaData
> xMetaData
= Reference
< XResultSetMetaDataSupplier
>(m_xDelegatorResultSet
, UNO_QUERY
)->getMetaData();
364 sal_Int32 nColCount
= 0;
365 // do we have columns
368 Reference
< XDatabaseMetaData
> xDBMetaData( lcl_getDBMetaDataFromStatement_nothrow( getStatement() ) );
369 nColCount
= xMetaData
->getColumnCount();
371 for ( sal_Int32 i
= 0; i
< nColCount
; ++i
)
373 // retrieve the name of the column
374 rtl::OUString sName
= xMetaData
->getColumnName(i
+ 1);
375 ODataColumn
* pColumn
= new ODataColumn(xMetaData
, m_xDelegatorRow
, m_xDelegatorRowUpdate
, i
+ 1, xDBMetaData
);
377 // don't silently assume that the name is unique - result set implementations
378 // are allowed to return duplicate names, but we are required to have
379 // unique column names
380 if ( m_pColumns
->hasByName( sName
) )
381 sName
= ::dbtools::createUniqueName( m_pColumns
, sName
);
383 m_pColumns
->append( sName
, pColumn
);
386 catch ( const SQLException
& )
388 DBG_UNHANDLED_EXCEPTION();
390 m_pColumns
->setInitialized();
392 #if OSL_DEBUG_LEVEL > 0
393 // some sanity checks. Especially in case we auto-adjusted the column names above,
394 // this might be reasonable
397 const Reference
< XNameAccess
> xColNames( static_cast< XNameAccess
* >( m_pColumns
), UNO_SET_THROW
);
398 const Sequence
< ::rtl::OUString
> aNames( xColNames
->getElementNames() );
399 OSL_POSTCOND( aNames
.getLength() == nColCount
,
400 "OResultSet::getColumns: invalid column count!" );
401 for ( const ::rtl::OUString
* pName
= aNames
.getConstArray();
402 pName
!= aNames
.getConstArray() + aNames
.getLength();
406 Reference
< XPropertySet
> xColProps( xColNames
->getByName( *pName
), UNO_QUERY_THROW
);
407 ::rtl::OUString sName
;
408 OSL_VERIFY( xColProps
->getPropertyValue( PROPERTY_NAME
) >>= sName
);
409 OSL_POSTCOND( sName
== *pName
, "OResultSet::getColumns: invalid column name!" );
413 catch( const Exception
& )
415 DBG_UNHANDLED_EXCEPTION();
422 // ::com::sun::star::sdbc::XRow
423 sal_Bool
OResultSet::wasNull(void) throw( SQLException
, RuntimeException
)
425 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::wasNull" );
426 MutexGuard
aGuard(m_aMutex
);
427 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
429 return m_xDelegatorRow
->wasNull();
432 rtl::OUString
OResultSet::getString(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
434 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getString" );
435 MutexGuard
aGuard(m_aMutex
);
436 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
438 return m_xDelegatorRow
->getString(columnIndex
);
441 sal_Bool
OResultSet::getBoolean(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
443 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBoolean" );
444 MutexGuard
aGuard(m_aMutex
);
445 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
447 return m_xDelegatorRow
->getBoolean(columnIndex
);
450 sal_Int8
OResultSet::getByte(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
452 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getByte" );
453 MutexGuard
aGuard(m_aMutex
);
454 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
456 return m_xDelegatorRow
->getByte(columnIndex
);
459 sal_Int16
OResultSet::getShort(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
461 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getShort" );
462 MutexGuard
aGuard(m_aMutex
);
463 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
465 return m_xDelegatorRow
->getShort(columnIndex
);
468 sal_Int32
OResultSet::getInt(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
470 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getInt" );
471 MutexGuard
aGuard(m_aMutex
);
472 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
474 return m_xDelegatorRow
->getInt(columnIndex
);
477 sal_Int64
OResultSet::getLong(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
479 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getLong" );
480 MutexGuard
aGuard(m_aMutex
);
481 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
483 return m_xDelegatorRow
->getLong(columnIndex
);
486 float OResultSet::getFloat(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
488 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getFloat" );
489 MutexGuard
aGuard(m_aMutex
);
490 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
492 return m_xDelegatorRow
->getFloat(columnIndex
);
495 double OResultSet::getDouble(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
497 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getDouble" );
498 MutexGuard
aGuard(m_aMutex
);
499 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
501 return m_xDelegatorRow
->getDouble(columnIndex
);
504 Sequence
< sal_Int8
> OResultSet::getBytes(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
506 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBytes" );
507 MutexGuard
aGuard(m_aMutex
);
508 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
510 return m_xDelegatorRow
->getBytes(columnIndex
);
513 ::com::sun::star::util::Date
OResultSet::getDate(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
515 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getDate" );
516 MutexGuard
aGuard(m_aMutex
);
517 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
519 return m_xDelegatorRow
->getDate(columnIndex
);
522 ::com::sun::star::util::Time
OResultSet::getTime(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
524 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getTime" );
525 MutexGuard
aGuard(m_aMutex
);
526 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
528 return m_xDelegatorRow
->getTime(columnIndex
);
531 ::com::sun::star::util::DateTime
OResultSet::getTimestamp(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
533 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getTimestamp" );
534 MutexGuard
aGuard(m_aMutex
);
535 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
537 return m_xDelegatorRow
->getTimestamp(columnIndex
);
540 Reference
< ::com::sun::star::io::XInputStream
> OResultSet::getBinaryStream(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
542 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBinaryStream" );
543 MutexGuard
aGuard(m_aMutex
);
544 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
546 return m_xDelegatorRow
->getBinaryStream(columnIndex
);
549 Reference
< ::com::sun::star::io::XInputStream
> OResultSet::getCharacterStream(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
551 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getCharacterStream" );
552 MutexGuard
aGuard(m_aMutex
);
553 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
555 return m_xDelegatorRow
->getCharacterStream(columnIndex
);
558 Any
OResultSet::getObject(sal_Int32 columnIndex
, const Reference
< ::com::sun::star::container::XNameAccess
> & typeMap
) throw( SQLException
, RuntimeException
)
560 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getObject" );
561 MutexGuard
aGuard(m_aMutex
);
562 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
564 return m_xDelegatorRow
->getObject(columnIndex
, typeMap
);
567 Reference
< XRef
> OResultSet::getRef(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
569 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getRef" );
570 MutexGuard
aGuard(m_aMutex
);
571 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
573 return m_xDelegatorRow
->getRef(columnIndex
);
576 Reference
< XBlob
> OResultSet::getBlob(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
578 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBlob" );
579 MutexGuard
aGuard(m_aMutex
);
580 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
582 return m_xDelegatorRow
->getBlob(columnIndex
);
585 Reference
< XClob
> OResultSet::getClob(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
587 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getClob" );
588 MutexGuard
aGuard(m_aMutex
);
589 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
591 return m_xDelegatorRow
->getClob(columnIndex
);
594 Reference
< XArray
> OResultSet::getArray(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
596 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getArray" );
597 MutexGuard
aGuard(m_aMutex
);
598 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
600 return m_xDelegatorRow
->getArray(columnIndex
);
603 // ::com::sun::star::sdbc::XRowUpdate
604 void OResultSet::updateNull(sal_Int32 columnIndex
) throw( SQLException
, RuntimeException
)
606 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateNull" );
607 MutexGuard
aGuard(m_aMutex
);
608 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
612 m_xDelegatorRowUpdate
->updateNull(columnIndex
);
615 void OResultSet::updateBoolean(sal_Int32 columnIndex
, sal_Bool x
) throw( SQLException
, RuntimeException
)
617 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateBoolean" );
618 MutexGuard
aGuard(m_aMutex
);
619 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
623 m_xDelegatorRowUpdate
->updateBoolean(columnIndex
, x
);
626 void OResultSet::updateByte(sal_Int32 columnIndex
, sal_Int8 x
) throw( SQLException
, RuntimeException
)
628 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateByte" );
629 MutexGuard
aGuard(m_aMutex
);
630 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
634 m_xDelegatorRowUpdate
->updateByte(columnIndex
, x
);
637 void OResultSet::updateShort(sal_Int32 columnIndex
, sal_Int16 x
) throw( SQLException
, RuntimeException
)
639 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateShort" );
640 MutexGuard
aGuard(m_aMutex
);
641 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
645 m_xDelegatorRowUpdate
->updateShort(columnIndex
, x
);
648 void OResultSet::updateInt(sal_Int32 columnIndex
, sal_Int32 x
) throw( SQLException
, RuntimeException
)
650 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateInt" );
651 MutexGuard
aGuard(m_aMutex
);
652 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
656 m_xDelegatorRowUpdate
->updateInt(columnIndex
, x
);
659 void OResultSet::updateLong(sal_Int32 columnIndex
, sal_Int64 x
) throw( SQLException
, RuntimeException
)
661 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateLong" );
662 MutexGuard
aGuard(m_aMutex
);
663 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
667 m_xDelegatorRowUpdate
->updateLong(columnIndex
, x
);
670 void OResultSet::updateFloat(sal_Int32 columnIndex
, float x
) throw( SQLException
, RuntimeException
)
672 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateFloat" );
673 MutexGuard
aGuard(m_aMutex
);
674 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
678 m_xDelegatorRowUpdate
->updateFloat(columnIndex
, x
);
681 void OResultSet::updateDouble(sal_Int32 columnIndex
, double x
) throw( SQLException
, RuntimeException
)
683 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateDouble" );
684 MutexGuard
aGuard(m_aMutex
);
685 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
689 m_xDelegatorRowUpdate
->updateDouble(columnIndex
, x
);
692 void OResultSet::updateString(sal_Int32 columnIndex
, const rtl::OUString
& x
) throw( SQLException
, RuntimeException
)
694 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateString" );
695 MutexGuard
aGuard(m_aMutex
);
696 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
700 m_xDelegatorRowUpdate
->updateString(columnIndex
, x
);
703 void OResultSet::updateBytes(sal_Int32 columnIndex
, const Sequence
< sal_Int8
>& x
) throw( SQLException
, RuntimeException
)
705 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateBytes" );
706 MutexGuard
aGuard(m_aMutex
);
707 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
711 m_xDelegatorRowUpdate
->updateBytes(columnIndex
, x
);
714 void OResultSet::updateDate(sal_Int32 columnIndex
, const ::com::sun::star::util::Date
& x
) throw( SQLException
, RuntimeException
)
716 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateDate" );
717 MutexGuard
aGuard(m_aMutex
);
718 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
722 m_xDelegatorRowUpdate
->updateDate(columnIndex
, x
);
725 void OResultSet::updateTime(sal_Int32 columnIndex
, const ::com::sun::star::util::Time
& x
) throw( SQLException
, RuntimeException
)
727 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateTime" );
728 MutexGuard
aGuard(m_aMutex
);
729 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
733 m_xDelegatorRowUpdate
->updateTime(columnIndex
, x
);
736 void OResultSet::updateTimestamp(sal_Int32 columnIndex
, const ::com::sun::star::util::DateTime
& x
) throw( SQLException
, RuntimeException
)
738 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateTimestamp" );
739 MutexGuard
aGuard(m_aMutex
);
740 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
744 m_xDelegatorRowUpdate
->updateTimestamp(columnIndex
, x
);
747 void OResultSet::updateBinaryStream(sal_Int32 columnIndex
, const Reference
< ::com::sun::star::io::XInputStream
> & x
, sal_Int32 length
) throw( SQLException
, RuntimeException
)
749 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateBinaryStream" );
750 MutexGuard
aGuard(m_aMutex
);
751 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
755 m_xDelegatorRowUpdate
->updateBinaryStream(columnIndex
, x
, length
);
758 void OResultSet::updateCharacterStream(sal_Int32 columnIndex
, const Reference
< ::com::sun::star::io::XInputStream
> & x
, sal_Int32 length
) throw( SQLException
, RuntimeException
)
760 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateCharacterStream" );
761 MutexGuard
aGuard(m_aMutex
);
762 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
766 m_xDelegatorRowUpdate
->updateCharacterStream(columnIndex
, x
, length
);
769 void OResultSet::updateNumericObject(sal_Int32 columnIndex
, const Any
& x
, sal_Int32 scale
) throw( SQLException
, RuntimeException
)
771 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateNumericObject" );
772 MutexGuard
aGuard(m_aMutex
);
773 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
777 m_xDelegatorRowUpdate
->updateNumericObject(columnIndex
, x
, scale
);
780 void OResultSet::updateObject(sal_Int32 columnIndex
, const Any
& x
) throw( SQLException
, RuntimeException
)
782 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateObject" );
783 MutexGuard
aGuard(m_aMutex
);
784 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
788 m_xDelegatorRowUpdate
->updateObject(columnIndex
, x
);
791 // ::com::sun::star::sdbc::XResultSet
792 sal_Bool
OResultSet::next(void) throw( SQLException
, RuntimeException
)
794 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::next" );
795 MutexGuard
aGuard(m_aMutex
);
796 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
798 return m_xDelegatorResultSet
->next();
801 sal_Bool
OResultSet::isBeforeFirst(void) throw( SQLException
, RuntimeException
)
803 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isBeforeFirst" );
804 MutexGuard
aGuard(m_aMutex
);
805 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
807 return m_xDelegatorResultSet
->isBeforeFirst();
810 sal_Bool
OResultSet::isAfterLast(void) throw( SQLException
, RuntimeException
)
812 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isAfterLast" );
813 MutexGuard
aGuard(m_aMutex
);
814 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
816 return m_xDelegatorResultSet
->isAfterLast();
819 sal_Bool
OResultSet::isFirst(void) throw( SQLException
, RuntimeException
)
821 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isFirst" );
822 MutexGuard
aGuard(m_aMutex
);
823 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
825 return m_xDelegatorResultSet
->isFirst();
828 sal_Bool
OResultSet::isLast(void) throw( SQLException
, RuntimeException
)
830 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isLast" );
831 MutexGuard
aGuard(m_aMutex
);
832 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
834 return m_xDelegatorResultSet
->isLast();
837 void OResultSet::beforeFirst(void) throw( SQLException
, RuntimeException
)
839 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::beforeFirst" );
840 MutexGuard
aGuard(m_aMutex
);
841 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
843 m_xDelegatorResultSet
->beforeFirst();
846 void OResultSet::afterLast(void) throw( SQLException
, RuntimeException
)
848 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::afterLast" );
849 MutexGuard
aGuard(m_aMutex
);
850 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
852 m_xDelegatorResultSet
->afterLast();
855 sal_Bool
OResultSet::first(void) throw( SQLException
, RuntimeException
)
857 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::first" );
858 MutexGuard
aGuard(m_aMutex
);
859 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
861 return m_xDelegatorResultSet
->first();
864 sal_Bool
OResultSet::last(void) throw( SQLException
, RuntimeException
)
866 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::last" );
867 MutexGuard
aGuard(m_aMutex
);
868 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
870 return m_xDelegatorResultSet
->last();
873 sal_Int32
OResultSet::getRow(void) throw( SQLException
, RuntimeException
)
875 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getRow" );
876 MutexGuard
aGuard(m_aMutex
);
877 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
879 return m_xDelegatorResultSet
->getRow();
882 sal_Bool
OResultSet::absolute(sal_Int32 row
) throw( SQLException
, RuntimeException
)
884 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::absolute" );
885 MutexGuard
aGuard(m_aMutex
);
886 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
888 return m_xDelegatorResultSet
->absolute(row
);
891 sal_Bool
OResultSet::relative(sal_Int32 rows
) throw( SQLException
, RuntimeException
)
893 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::relative" );
894 MutexGuard
aGuard(m_aMutex
);
895 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
897 return m_xDelegatorResultSet
->relative(rows
);
900 sal_Bool
OResultSet::previous(void) throw( SQLException
, RuntimeException
)
902 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::previous" );
903 MutexGuard
aGuard(m_aMutex
);
904 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
906 return m_xDelegatorResultSet
->previous();
909 void OResultSet::refreshRow(void) throw( SQLException
, RuntimeException
)
911 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::refreshRow" );
912 MutexGuard
aGuard(m_aMutex
);
913 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
915 m_xDelegatorResultSet
->refreshRow();
918 sal_Bool
OResultSet::rowUpdated(void) throw( SQLException
, RuntimeException
)
920 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::rowUpdated" );
921 MutexGuard
aGuard(m_aMutex
);
922 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
924 return m_xDelegatorResultSet
->rowUpdated();
927 sal_Bool
OResultSet::rowInserted(void) throw( SQLException
, RuntimeException
)
929 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::rowInserted" );
930 MutexGuard
aGuard(m_aMutex
);
931 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
933 return m_xDelegatorResultSet
->rowInserted();
936 sal_Bool
OResultSet::rowDeleted(void) throw( SQLException
, RuntimeException
)
938 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::rowDeleted" );
939 MutexGuard
aGuard(m_aMutex
);
940 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
942 return m_xDelegatorResultSet
->rowDeleted();
945 Reference
< XInterface
> OResultSet::getStatement(void) throw( SQLException
, RuntimeException
)
947 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getStatement" );
948 MutexGuard
aGuard(m_aMutex
);
949 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
954 // ::com::sun::star::sdbcx::XRowLocate
955 Any
OResultSet::getBookmark(void) throw( SQLException
, RuntimeException
)
957 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBookmark" );
958 MutexGuard
aGuard(m_aMutex
);
959 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
963 return Reference
< XRowLocate
>(m_xDelegatorResultSet
, UNO_QUERY
)->getBookmark();
966 sal_Bool
OResultSet::moveToBookmark(const Any
& bookmark
) throw( SQLException
, RuntimeException
)
968 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveToBookmark" );
969 MutexGuard
aGuard(m_aMutex
);
970 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
974 return Reference
< XRowLocate
>(m_xDelegatorResultSet
, UNO_QUERY
)->moveToBookmark(bookmark
);
977 sal_Bool
OResultSet::moveRelativeToBookmark(const Any
& bookmark
, sal_Int32 rows
) throw( SQLException
, RuntimeException
)
979 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveRelativeToBookmark" );
980 MutexGuard
aGuard(m_aMutex
);
981 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
985 return Reference
< XRowLocate
>(m_xDelegatorResultSet
, UNO_QUERY
)->moveRelativeToBookmark(bookmark
, rows
);
988 sal_Int32
OResultSet::compareBookmarks(const Any
& _first
, const Any
& _second
) throw( SQLException
, RuntimeException
)
990 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::compareBookmarks" );
991 MutexGuard
aGuard(m_aMutex
);
992 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
996 return Reference
< XRowLocate
>(m_xDelegatorResultSet
, UNO_QUERY
)->compareBookmarks(_first
, _second
);
999 sal_Bool
OResultSet::hasOrderedBookmarks(void) throw( SQLException
, RuntimeException
)
1001 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::hasOrderedBookmarks" );
1002 MutexGuard
aGuard(m_aMutex
);
1003 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
1005 checkBookmarkable();
1007 return Reference
< XRowLocate
>(m_xDelegatorResultSet
, UNO_QUERY
)->hasOrderedBookmarks();
1010 sal_Int32
OResultSet::hashBookmark(const Any
& bookmark
) throw( SQLException
, RuntimeException
)
1012 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::hashBookmark" );
1013 MutexGuard
aGuard(m_aMutex
);
1014 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
1016 checkBookmarkable();
1018 return Reference
< XRowLocate
>(m_xDelegatorResultSet
, UNO_QUERY
)->hashBookmark(bookmark
);
1021 // ::com::sun::star::sdbc::XResultSetUpdate
1022 void OResultSet::insertRow(void) throw( SQLException
, RuntimeException
)
1024 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::insertRow" );
1025 MutexGuard
aGuard(m_aMutex
);
1026 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
1030 m_xDelegatorResultSetUpdate
->insertRow();
1033 void OResultSet::updateRow(void) throw( SQLException
, RuntimeException
)
1035 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateRow" );
1036 MutexGuard
aGuard(m_aMutex
);
1037 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
1041 m_xDelegatorResultSetUpdate
->updateRow();
1044 void OResultSet::deleteRow(void) throw( SQLException
, RuntimeException
)
1046 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::deleteRow" );
1047 MutexGuard
aGuard(m_aMutex
);
1048 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
1052 m_xDelegatorResultSetUpdate
->deleteRow();
1055 void OResultSet::cancelRowUpdates(void) throw( SQLException
, RuntimeException
)
1057 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::cancelRowUpdates" );
1058 MutexGuard
aGuard(m_aMutex
);
1059 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
1063 m_xDelegatorResultSetUpdate
->cancelRowUpdates();
1066 void OResultSet::moveToInsertRow(void) throw( SQLException
, RuntimeException
)
1068 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveToInsertRow" );
1069 MutexGuard
aGuard(m_aMutex
);
1070 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
1074 m_xDelegatorResultSetUpdate
->moveToInsertRow();
1077 void OResultSet::moveToCurrentRow(void) throw( SQLException
, RuntimeException
)
1079 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveToCurrentRow" );
1080 MutexGuard
aGuard(m_aMutex
);
1081 ::connectivity::checkDisposed(OResultSetBase::rBHelper
.bDisposed
);
1085 m_xDelegatorResultSetUpdate
->moveToCurrentRow();
1088 void OResultSet::checkReadOnly() const
1090 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::checkReadOnly" );
1091 if ( ( m_nResultSetConcurrency
== ResultSetConcurrency::READ_ONLY
)
1092 || !m_xDelegatorResultSetUpdate
.is()
1094 throwSQLException( "The result set is read-only.", SQL_GENERAL_ERROR
, *const_cast< OResultSet
* >( this ) );
1097 void OResultSet::checkBookmarkable() const
1099 //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::checkBookmarkable" );
1100 if ( !m_bIsBookmarkable
)
1101 throwSQLException( "The result set does not have bookmark support.", SQL_GENERAL_ERROR
, *const_cast< OResultSet
* >( this ) );
1103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */