LibreOffice Module dbaccess (master) 1
RowSet.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <sal/config.h>
23
24#include <atomic>
25#include <cstddef>
26
27#include <apitools.hxx>
28#include "RowSetBase.hxx"
29
30#include <com/sun/star/sdbc/XPreparedStatement.hpp>
31#include <com/sun/star/sdbc/XConnection.hpp>
32#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
33#include <com/sun/star/sdb/XResultSetAccess.hpp>
34#include <com/sun/star/sdbc/XRowSetListener.hpp>
35#include <com/sun/star/sdbc/XRowUpdate.hpp>
36#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
37#include <com/sun/star/sdbc/XParameters.hpp>
38#include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
39#include <com/sun/star/util/XCancellable.hpp>
40#include <com/sun/star/sdbcx/XDeleteRows.hpp>
41#include <com/sun/star/sdb/XCompletedExecution.hpp>
42#include <com/sun/star/sdb/XParametersSupplier.hpp>
43#include <com/sun/star/sdb/XRowsChangeBroadcaster.hpp>
44
51
52namespace dbaccess
53{
54 typedef ::cppu::WeakAggComponentImplHelper12 < css::sdb::XResultSetAccess
55 , css::sdb::XRowSetApproveBroadcaster
56 , css::sdb::XRowsChangeBroadcaster
57 , css::sdbcx::XDeleteRows
58 , css::sdbc::XParameters
59 , css::lang::XEventListener
60 , css::sdbc::XResultSetUpdate
61 , css::sdbc::XRowUpdate
62 , css::util::XCancellable
63 , css::sdb::XCompletedExecution
64 , css::sdb::XParametersSupplier
65 , css::sdbc::XWarningsSupplier
67
68 class OTableContainer;
69 class ORowSet final : public cppu::BaseMutex
70 , public ORowSet_BASE1
71 , public ORowSetBase
73 {
74 friend class ORowSetClone;
75
76 css::uno::Reference< css::sdbc::XConnection > m_xOldConnection;
77 css::uno::Reference< css::sdbc::XConnection > m_xActiveConnection;
78 css::uno::Any m_aActiveConnection;
79 css::uno::Reference< css::container::XNameAccess > m_xTypeMap;
80 css::uno::Any m_aTypeMap;
81 css::uno::Reference< css::sdbc::XPreparedStatement > m_xStatement;
82 css::uno::Reference< css::sdb::XSingleSelectQueryComposer > m_xComposer;
83 css::uno::Reference< css::container::XNameAccess > m_xColumns; // the columns from a table or query
84
94 std::vector<bool> m_aParametersSet;
95 std::vector<bool> m_aReadOnlyDataColumns;
96
100
102
103 // no Reference! see OCollection::acquire
104 std::unique_ptr<OTableContainer> m_xTables;
105
106 OUString m_aCommand;
108 OUString m_aURL;
109 OUString m_aUser;
110 OUString m_aPassword;
111 OUString m_aFilter;
113 OUString m_aGroupBy;
114 OUString m_aOrder;
116 OUString m_aUpdateCatalogName; // is set by a query
117 OUString m_aUpdateSchemaName; // is set by a query
118 OUString m_aUpdateTableName; // is set by a query
120
122 sal_Int32 m_nFetchSize;
124 sal_Int32 m_nMaxRows;
126 sal_Int32 m_nCommandType;
128 sal_Int32 m_nPrivileges;
130 std::atomic<std::size_t> m_nInAppend;
135 bool m_bCommandFacetsDirty; // any of the facets which define the active command is dirty
136 bool m_bParametersDirty; // parameters changed since execute
140 bool m_bNew ;
144
153
173 void impl_initComposer_throw( OUString& _out_rCommandToExecute );
174
187 css::uno::Reference< css::container::XNameAccess >
189
193
196 css::uno::Reference< css::sdbc::XResultSet >
199
202 css::uno::Reference< css::sdbc::XConnection > calcConnection(const css::uno::Reference< css::task::XInteractionHandler >& _rxHandler);
203 // free clones and ParseTree. Plus, if _bComplete is <TRUE/>, *all* other associated resources
204 void freeResources( bool _bComplete );
205
207 void notifyRowSetAndClonesRowDelete( const css::uno::Any& _rBookmark );
208
210 void notifyRowSetAndClonesRowDeleted( const css::uno::Any& _rBookmark, sal_Int32 _nPos );
211
212 void checkUpdateIterator();
213 const connectivity::ORowSetValue& getInsertValue(sal_Int32 columnIndex);
214 void setParameter(sal_Int32 parameterIndex, const connectivity::ORowSetValue& x);
215 // resizes the parameter vector if necessary
216 ::connectivity::ORowSetValue& getParameterStorage( sal_Int32 parameterIndex );
217
218 void updateValue(sal_Int32 columnIndex,const connectivity::ORowSetValue& x);
219 void checkUpdateConditions(sal_Int32 columnIndex);
220 void impl_rebuild_throw(::osl::ResettableMutexGuard& _rGuard);
221 // set all data columns to writeable
223 // restore the old state of the data column read-only state
225
226 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const css::uno::Any& rValue) override;
227 virtual void SAL_CALL getFastPropertyValue(css::uno::Any& rValue,sal_Int32 nHandle) const override;
228 virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, css::uno::Any& _rDefault ) const override;
229
230 virtual void fireRowcount() override;
231 void notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& _rGuard,const css::sdb::RowChangeEvent &rEvt);
232 void notifyAllListenersRowChanged(::osl::ResettableMutexGuard& _rGuard,const css::sdb::RowsChangeEvent& rEvt);
233 virtual bool notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard) override;
234 virtual void notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& _rGuard) override;
235 // notify all that rowset changed
236 void notifyAllListeners(::osl::ResettableMutexGuard& _rGuard);
237
238 virtual void doCancelModification( ) override;
239 virtual bool isModification( ) override;
240 virtual bool isModified( ) override;
241 virtual bool isNew( ) override;
242 virtual bool isPropertyChangeNotificationEnabled() const override;
243
244 virtual ~ORowSet() override;
245
246 public:
247 explicit ORowSet(const css::uno::Reference<css::uno::XComponentContext>&);
248
249 // css::lang::XTypeProvider
250 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
251 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
252
253 // css::uno::XInterface
254 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
255 virtual void SAL_CALL acquire() noexcept override;
256 virtual void SAL_CALL release() noexcept override;
257
258 // css::uno::XAggregation
259 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& aType ) override;
260
261 // css::lang::XServiceInfo
262 virtual OUString SAL_CALL getImplementationName( ) override;
263 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
264 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
265
266 // OComponentHelper
267 virtual void SAL_CALL disposing() override;
268
269 // css::lang::XEventListener
270 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
271
272 // css::sdbc::XCloseable
273 virtual void SAL_CALL close( ) override;
274
275 // comphelper::OPropertyArrayUsageHelper
276 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
277
278 // cppu::OPropertySetHelper
279 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
280
281 // css::sdbc::XResultSet
282 virtual void SAL_CALL refreshRow( ) override;
283
284 // XCompletedExecution
285 virtual void SAL_CALL executeWithCompletion( const css::uno::Reference< css::task::XInteractionHandler >& handler ) override;
286
287 // XParametersSupplier
288 virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getParameters( ) override;
289
290 // css::sdbc::XRow
291 virtual sal_Bool SAL_CALL wasNull( ) override;
292 virtual OUString SAL_CALL getString( sal_Int32 columnIndex ) override;
293 virtual sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) override;
294 virtual sal_Int8 SAL_CALL getByte( sal_Int32 columnIndex ) override;
295 virtual sal_Int16 SAL_CALL getShort( sal_Int32 columnIndex ) override;
296 virtual sal_Int32 SAL_CALL getInt( sal_Int32 columnIndex ) override;
297 virtual sal_Int64 SAL_CALL getLong( sal_Int32 columnIndex ) override;
298 virtual float SAL_CALL getFloat( sal_Int32 columnIndex ) override;
299 virtual double SAL_CALL getDouble( sal_Int32 columnIndex ) override;
300 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes( sal_Int32 columnIndex ) override;
301 virtual css::util::Date SAL_CALL getDate( sal_Int32 columnIndex ) override;
302 virtual css::util::Time SAL_CALL getTime( sal_Int32 columnIndex ) override;
303 virtual css::util::DateTime SAL_CALL getTimestamp( sal_Int32 columnIndex ) override;
304 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream( sal_Int32 columnIndex ) override;
305 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream( sal_Int32 columnIndex ) override;
306 virtual css::uno::Any SAL_CALL getObject( sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess >& typeMap ) override;
307 virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef( sal_Int32 columnIndex ) override;
308 virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob( sal_Int32 columnIndex ) override;
309 virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) override;
310 virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) override;
311
312 // css::sdbc::XRowUpdate
313 virtual void SAL_CALL updateNull( sal_Int32 columnIndex ) override;
314 virtual void SAL_CALL updateBoolean( sal_Int32 columnIndex, sal_Bool x ) override;
315 virtual void SAL_CALL updateByte( sal_Int32 columnIndex, sal_Int8 x ) override;
316 virtual void SAL_CALL updateShort( sal_Int32 columnIndex, sal_Int16 x ) override;
317 virtual void SAL_CALL updateInt( sal_Int32 columnIndex, sal_Int32 x ) override;
318 virtual void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) override;
319 virtual void SAL_CALL updateFloat( sal_Int32 columnIndex, float x ) override;
320 virtual void SAL_CALL updateDouble( sal_Int32 columnIndex, double x ) override;
321 virtual void SAL_CALL updateString( sal_Int32 columnIndex, const OUString& x ) override;
322 virtual void SAL_CALL updateBytes( sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 >& x ) override;
323 virtual void SAL_CALL updateDate( sal_Int32 columnIndex, const css::util::Date& x ) override;
324 virtual void SAL_CALL updateTime( sal_Int32 columnIndex, const css::util::Time& x ) override;
325 virtual void SAL_CALL updateTimestamp( sal_Int32 columnIndex, const css::util::DateTime& x ) override;
326 virtual void SAL_CALL updateBinaryStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
327 virtual void SAL_CALL updateCharacterStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
328 virtual void SAL_CALL updateObject( sal_Int32 columnIndex, const css::uno::Any& x ) override;
329 virtual void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, sal_Int32 scale ) override;
330
331 // css::sdbc::XResultSetUpdate
332 virtual void SAL_CALL insertRow( ) override;
333 virtual void SAL_CALL updateRow( ) override;
334 virtual void SAL_CALL deleteRow( ) override;
335 virtual void SAL_CALL cancelRowUpdates( ) override;
336 virtual void SAL_CALL moveToInsertRow( ) override;
337 virtual void SAL_CALL moveToCurrentRow( ) override;
338
339 // css::sdbc::XRowSet
340 virtual void SAL_CALL execute( ) override;
341 virtual void SAL_CALL addRowSetListener( const css::uno::Reference< css::sdbc::XRowSetListener >& listener ) override;
342 virtual void SAL_CALL removeRowSetListener( const css::uno::Reference< css::sdbc::XRowSetListener >& listener ) override;
343
344 // css::sdb::XRowSetApproveBroadcaster
345 virtual void SAL_CALL addRowSetApproveListener( const css::uno::Reference< css::sdb::XRowSetApproveListener >& listener ) override;
346 virtual void SAL_CALL removeRowSetApproveListener( const css::uno::Reference< css::sdb::XRowSetApproveListener >& listener ) override;
347
348 // css::sdb::XRowsChangeBroadcaster
349 virtual void SAL_CALL addRowsChangeListener( const css::uno::Reference< css::sdb::XRowsChangeListener >& listener ) override;
350 virtual void SAL_CALL removeRowsChangeListener( const css::uno::Reference< css::sdb::XRowsChangeListener >& listener ) override;
351
352 // css::sdb::XResultSetAccess
353 virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL createResultSet( ) override;
354
355 // css::util::XCancellable
356 virtual void SAL_CALL cancel( ) override;
357
358 // css::sdbcx::XDeleteRows
359 virtual css::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const css::uno::Sequence< css::uno::Any >& rows ) override;
360
361 // XParameters
362 virtual void SAL_CALL setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) override;
363 virtual void SAL_CALL setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName ) override;
364 virtual void SAL_CALL setBoolean( sal_Int32 parameterIndex, sal_Bool x ) override;
365 virtual void SAL_CALL setByte( sal_Int32 parameterIndex, sal_Int8 x ) override;
366 virtual void SAL_CALL setShort( sal_Int32 parameterIndex, sal_Int16 x ) override;
367 virtual void SAL_CALL setInt( sal_Int32 parameterIndex, sal_Int32 x ) override;
368 virtual void SAL_CALL setLong( sal_Int32 parameterIndex, sal_Int64 x ) override;
369 virtual void SAL_CALL setFloat( sal_Int32 parameterIndex, float x ) override;
370 virtual void SAL_CALL setDouble( sal_Int32 parameterIndex, double x ) override;
371 virtual void SAL_CALL setString( sal_Int32 parameterIndex, const OUString& x ) override;
372 virtual void SAL_CALL setBytes( sal_Int32 parameterIndex, const css::uno::Sequence< sal_Int8 >& x ) override;
373 virtual void SAL_CALL setDate( sal_Int32 parameterIndex, const css::util::Date& x ) override;
374 virtual void SAL_CALL setTime( sal_Int32 parameterIndex, const css::util::Time& x ) override;
375 virtual void SAL_CALL setTimestamp( sal_Int32 parameterIndex, const css::util::DateTime& x ) override;
376 virtual void SAL_CALL setBinaryStream( sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
377 virtual void SAL_CALL setCharacterStream( sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
378 virtual void SAL_CALL setObject( sal_Int32 parameterIndex, const css::uno::Any& x ) override;
379 virtual void SAL_CALL setObjectWithInfo( sal_Int32 parameterIndex, const css::uno::Any& x, sal_Int32 targetSqlType, sal_Int32 scale ) override;
380 virtual void SAL_CALL setRef( sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XRef >& x ) override;
381 virtual void SAL_CALL setBlob( sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XBlob >& x ) override;
382 virtual void SAL_CALL setClob( sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XClob >& x ) override;
383 virtual void SAL_CALL setArray( sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XArray >& x ) override;
384 virtual void SAL_CALL clearParameters( ) override;
385
386 // XWarningsSupplier
387 virtual css::uno::Any SAL_CALL getWarnings( ) override;
388 virtual void SAL_CALL clearWarnings( ) override;
389
394 void execute_NoApprove_NoNewConn(::osl::ResettableMutexGuard& _rClearForNotification);
395
400 void approveExecution();
401
403 void setActiveConnection( css::uno::Reference< css::sdbc::XConnection > const & _rxNewConn, bool _bFireEvent = true );
404
405 void implCancelRowUpdates( bool _bNotifyModified );
406
411 const css::uno::Reference< css::beans::XPropertySet >& _rxStatement,
412 sal_Int32 _nDesiredResultSetType,
413 sal_Int32 _nDesiredResultSetConcurrency
414 );
415
424 const css::uno::Reference< css::beans::XPropertySet >& _rxTemplateColumn,
425 const css::uno::Reference< css::beans::XPropertySet >& _rxRowSetColumn
426 );
427
435
440 using ORowSetBase::isModified;
441 using ORowSetBase::isNew;
442 };
443
444
445 // ORowSetClone
446
447 class ORowSetClone : public cppu::BaseMutex
448 ,public OSubComponent
449 ,public ORowSetBase
451 {
454 sal_Int32 m_nFetchSize;
456
457 protected:
458 // the clone can not insert anything
459 virtual void doCancelModification( ) override;
460 virtual bool isModification( ) override;
461 virtual bool isModified( ) override;
462 virtual bool isNew( ) override;
463
464 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const css::uno::Any& rValue) override;
465 public:
466 ORowSetClone( const css::uno::Reference<css::uno::XComponentContext>& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex );
467 virtual ~ORowSetClone() override;
468
469 // css::lang::XTypeProvider
470 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
471 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
472 {
473 return css::uno::Sequence<sal_Int8>();
474 }
475
476 // css::uno::XInterface
477 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
478 virtual void SAL_CALL acquire() noexcept override;
479 virtual void SAL_CALL release() noexcept override;
480
481 // css::lang::XServiceInfo
482 virtual OUString SAL_CALL getImplementationName( ) override;
483 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
484 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
485
486 // OComponentHelper
487 virtual void SAL_CALL disposing() override;
488
489 // css::sdbc::XCloseable
490 virtual void SAL_CALL close( ) override;
491
492 // css::beans::XPropertySet
493 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override
494 {
495 return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
496 }
497
498 // css::sdbc::XRowSet
499 virtual void SAL_CALL execute( ) override;
500 virtual void SAL_CALL addRowSetListener( const css::uno::Reference< css::sdbc::XRowSetListener >& listener ) override;
501 virtual void SAL_CALL removeRowSetListener( const css::uno::Reference< css::sdbc::XRowSetListener >& listener ) override;
502
503 // comphelper::OPropertyArrayUsageHelper
504 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
505
506 // cppu::OPropertySetHelper
507 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
508
509 protected:
513 using ORowSetBase::isNew;
515 };
516
517}
518
519/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Bool SAL_CALL rowDeleted() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: RowSetBase.hxx:234
virtual bool isModified()=0
virtual void doCancelModification()=0
virtual bool isModification()=0
virtual bool isNew()=0
sal_Int32 m_nFetchSize
Definition: RowSet.hxx:454
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: RowSet.hxx:471
sal_Int32 m_nFetchDirection
Definition: RowSet.hxx:453
bool impl_buildActiveCommand_throw()
builds m_aActiveCommand from our settings
Definition: RowSet.cxx:2304
virtual void SAL_CALL updateNumericObject(sal_Int32 columnIndex, const css::uno::Any &x, sal_Int32 scale) override
Definition: RowSet.cxx:791
sal_Int32 m_nMaxFieldSize
Definition: RowSet.hxx:123
virtual void SAL_CALL execute() override
Definition: RowSet.cxx:1534
void notifyAllListeners(::osl::ResettableMutexGuard &_rGuard)
Definition: RowSet.cxx:1057
css::uno::Reference< css::sdbc::XConnection > m_xActiveConnection
Definition: RowSet.hxx:77
virtual void SAL_CALL updateShort(sal_Int32 columnIndex, sal_Int16 x) override
Definition: RowSet.cxx:668
virtual void SAL_CALL disposing() override
Definition: RowSet.cxx:449
virtual void SAL_CALL removeRowsChangeListener(const css::uno::Reference< css::sdb::XRowsChangeListener > &listener) override
Definition: RowSet.cxx:2045
css::uno::Reference< css::container::XNameAccess > m_xTypeMap
Definition: RowSet.hxx:79
virtual void SAL_CALL updateDouble(sal_Int32 columnIndex, double x) override
Definition: RowSet.cxx:688
void notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard &_rGuard, const css::sdb::RowChangeEvent &rEvt)
Definition: RowSet.cxx:1101
bool m_bIsBookmarkable
Definition: RowSet.hxx:139
virtual void SAL_CALL setCharacterStream(sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
Definition: RowSet.cxx:2555
virtual void SAL_CALL cancel() override
Definition: RowSet.cxx:2069
virtual void doCancelModification() override
Definition: RowSet.cxx:2638
virtual void SAL_CALL setTime(sal_Int32 parameterIndex, const css::util::Time &x) override
Definition: RowSet.cxx:2525
void implCancelRowUpdates(bool _bNotifyModified)
Definition: RowSet.cxx:996
virtual bool isModification() override
Definition: RowSet.cxx:2650
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1399
void checkUpdateConditions(sal_Int32 columnIndex)
Definition: RowSet.cxx:2680
::comphelper::OInterfaceContainerHelper3< css::sdb::XRowSetApproveListener > m_aApproveListeners
Definition: RowSet.hxx:98
virtual void SAL_CALL setDate(sal_Int32 parameterIndex, const css::util::Date &x) override
Definition: RowSet.cxx:2520
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1308
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: RowSet.cxx:407
css::uno::Any m_aActiveConnection
Definition: RowSet.hxx:78
bool m_bUseEscapeProcessing
Definition: RowSet.hxx:133
void checkUpdateIterator()
Definition: RowSet.cxx:2670
css::uno::Reference< css::container::XNameAccess > m_xColumns
Definition: RowSet.hxx:83
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1302
virtual void SAL_CALL setTimestamp(sal_Int32 parameterIndex, const css::util::DateTime &x) override
Definition: RowSet.cxx:2530
bool m_bCommandFacetsDirty
Definition: RowSet.hxx:135
virtual void SAL_CALL addRowsChangeListener(const css::uno::Reference< css::sdb::XRowsChangeListener > &listener) override
Definition: RowSet.cxx:2036
void impl_restoreDataColumnsWriteable_throw()
Definition: RowSet.cxx:1222
sal_Int32 m_nPrivileges
Definition: RowSet.hxx:128
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &aType) override
Definition: RowSet.cxx:423
virtual void getPropertyDefaultByHandle(sal_Int32 _nHandle, css::uno::Any &_rDefault) const override
Definition: RowSet.cxx:201
void impl_ensureStatement_throw()
Definition: RowSet.cxx:1611
css::uno::Reference< css::sdbc::XPreparedStatement > m_xStatement
Definition: RowSet.hxx:81
virtual void SAL_CALL clearWarnings() override
Definition: RowSet.cxx:2633
virtual void SAL_CALL addRowSetApproveListener(const css::uno::Reference< css::sdb::XRowSetApproveListener > &listener) override
Definition: RowSet.cxx:2017
virtual void SAL_CALL removeRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener > &listener) override
Definition: RowSet.cxx:1048
virtual bool notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard &_rGuard) override
Definition: RowSet.cxx:1081
rtl::Reference< ORowSetValueVector > m_aPrematureParamValues
our parameters values, used when we do not yet have a parameters container (since we have not been ex...
Definition: RowSet.hxx:92
virtual void SAL_CALL moveToCurrentRow() override
Definition: RowSet.cxx:1234
OUString m_aFilter
Definition: RowSet.hxx:111
virtual void notifyAllListenersCursorMoved(::osl::ResettableMutexGuard &_rGuard) override
Definition: RowSet.cxx:1065
virtual bool isPropertyChangeNotificationEnabled() const override
Definition: RowSet.cxx:2665
bool m_bLastKnownRowCountFinal
Definition: RowSet.hxx:132
virtual void SAL_CALL updateNull(sal_Int32 columnIndex) override
Definition: RowSet.cxx:643
virtual void SAL_CALL updateTimestamp(sal_Int32 columnIndex, const css::util::DateTime &x) override
Definition: RowSet.cxx:713
sal_Int32 m_nFetchSize
Definition: RowSet.hxx:122
OUString m_aUser
Definition: RowSet.hxx:109
std::vector< bool > m_aParametersSet
Definition: RowSet.hxx:94
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
Definition: RowSet.cxx:1388
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
Definition: RowSet.cxx:622
void notifyRowSetAndClonesRowDelete(const css::uno::Any &_rBookmark)
informs the clones (and ourself) that we are going to delete a record with a given bookmark
Definition: RowSet.cxx:2129
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: RowSet.cxx:437
bool m_bParametersDirty
Definition: RowSet.hxx:136
virtual void SAL_CALL updateCharacterStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
Definition: RowSet.cxx:733
virtual void SAL_CALL setDouble(sal_Int32 parameterIndex, double x) override
Definition: RowSet.cxx:2505
virtual css::uno::Any SAL_CALL getWarnings() override
Definition: RowSet.cxx:2628
sal_Int32 m_nCommandType
Definition: RowSet.hxx:126
virtual void SAL_CALL setObject(sal_Int32 parameterIndex, const css::uno::Any &x) override
Definition: RowSet.cxx:2579
virtual void SAL_CALL setString(sal_Int32 parameterIndex, const OUString &x) override
Definition: RowSet.cxx:2510
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: RowSet.cxx:401
virtual void SAL_CALL updateInt(sal_Int32 columnIndex, sal_Int32 x) override
Definition: RowSet.cxx:673
void notifyRowSetAndClonesRowDeleted(const css::uno::Any &_rBookmark, sal_Int32 _nPos)
inform the clones (and ourself) that we have deleted a record with a given bookmark
Definition: RowSet.cxx:2142
virtual void SAL_CALL setNull(sal_Int32 parameterIndex, sal_Int32 sqlType) override
Definition: RowSet.cxx:2454
css::uno::Any m_aTypeMap
Definition: RowSet.hxx:80
css::uno::Reference< css::sdbc::XConnection > m_xOldConnection
Definition: RowSet.hxx:76
virtual void SAL_CALL updateString(sal_Int32 columnIndex, const OUString &x) override
Definition: RowSet.cxx:693
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1410
rtl::Reference< ORowSetValueVector > m_aParameterValueForCache
Definition: RowSet.hxx:93
virtual void fireRowcount() override
Definition: RowSet.cxx:1122
connectivity::OWeakRefArray m_aClones
Definition: RowSet.hxx:85
virtual void SAL_CALL setByte(sal_Int32 parameterIndex, sal_Int8 x) override
Definition: RowSet.cxx:2480
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1326
virtual void SAL_CALL setRef(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XRef > &x) override
Definition: RowSet.cxx:2596
void notifyAllListenersRowChanged(::osl::ResettableMutexGuard &_rGuard, const css::sdb::RowsChangeEvent &rEvt)
Definition: RowSet.cxx:1073
OUString m_aCommand
Definition: RowSet.hxx:106
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1296
virtual void SAL_CALL cancelRowUpdates() override
Definition: RowSet.cxx:1034
void setStatementResultSetType(const css::uno::Reference< css::beans::XPropertySet > &_rxStatement, sal_Int32 _nDesiredResultSetType, sal_Int32 _nDesiredResultSetConcurrency)
sets the given result set type/concurrency at the given statement, while respecting possibly related ...
Definition: RowSet.cxx:1558
virtual void SAL_CALL updateBoolean(sal_Int32 columnIndex, sal_Bool x) override
Definition: RowSet.cxx:658
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
Definition: RowSet.cxx:253
void setActiveConnection(css::uno::Reference< css::sdbc::XConnection > const &_rxNewConn, bool _bFireEvent=true)
set m_xActiveConnection, fire a PropertyChangeEvent if necessary, do the event listener handling etc
Definition: RowSet.cxx:541
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1362
std::vector< bool > m_aReadOnlyDataColumns
Definition: RowSet.hxx:95
virtual void SAL_CALL setBlob(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XBlob > &x) override
Definition: RowSet.cxx:2601
virtual bool isNew() override
Definition: RowSet.cxx:2660
OUString m_aGroupBy
Definition: RowSet.hxx:113
std::atomic< std::size_t > m_nInAppend
Definition: RowSet.hxx:130
virtual void SAL_CALL executeWithCompletion(const css::uno::Reference< css::task::XInteractionHandler > &handler) override
Definition: RowSet.cxx:1420
const connectivity::ORowSetValue & getInsertValue(sal_Int32 columnIndex)
Definition: RowSet.cxx:1278
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1356
void freeResources(bool _bComplete)
Definition: RowSet.cxx:480
virtual css::uno::Sequence< sal_Int32 > SAL_CALL deleteRows(const css::uno::Sequence< css::uno::Any > &rows) override
Definition: RowSet.cxx:2075
void impl_setDataColumnsWriteable_throw()
Definition: RowSet.cxx:1206
virtual void SAL_CALL setLong(sal_Int32 parameterIndex, sal_Int64 x) override
Definition: RowSet.cxx:2495
virtual void SAL_CALL setShort(sal_Int32 parameterIndex, sal_Int16 x) override
Definition: RowSet.cxx:2485
virtual void SAL_CALL close() override
Definition: RowSet.cxx:603
void impl_disposeParametersContainer_nothrow()
disposes our parameters container
Definition: RowSet.cxx:2407
virtual void SAL_CALL updateDate(sal_Int32 columnIndex, const css::util::Date &x) override
Definition: RowSet.cxx:703
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1350
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL createResultSet() override
Definition: RowSet.cxx:2055
::dbtools::param::ParametersContainerRef m_pParameters
our parameters as XPropertySet instances and ORowSetValue instances
Definition: RowSet.hxx:88
void execute_NoApprove_NoNewConn(::osl::ResettableMutexGuard &_rClearForNotification)
implement the <method>execute</method>, without calling the approve listeners and without building a ...
Definition: RowSet.cxx:1784
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1314
bool m_bCanUpdateInsertedRows
Definition: RowSet.hxx:141
OUString m_aOrder
Definition: RowSet.hxx:114
ORowSet(const css::uno::Reference< css::uno::XComponentContext > &)
Definition: RowSet.cxx:102
virtual void SAL_CALL updateRow() override
Definition: RowSet.cxx:886
sal_Int32 m_nTransactionIsolation
Definition: RowSet.hxx:127
virtual void SAL_CALL updateObject(sal_Int32 columnIndex, const css::uno::Any &x) override
Definition: RowSet.cxx:746
void setParameter(sal_Int32 parameterIndex, const connectivity::ORowSetValue &x)
Definition: RowSet.cxx:2467
OUString m_sErrorString
Definition: RowSet.hxx:119
virtual void SAL_CALL refreshRow() override
Definition: RowSet.cxx:2696
::dbtools::WarningsContainer m_aWarnings
Definition: RowSet.hxx:101
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
Definition: RowSet.cxx:347
virtual void SAL_CALL deleteRow() override
Definition: RowSet.cxx:945
virtual void SAL_CALL addRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener > &listener) override
Definition: RowSet.cxx:1039
virtual void SAL_CALL updateBinaryStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
Definition: RowSet.cxx:718
::comphelper::OInterfaceContainerHelper3< css::sdb::XRowsChangeListener > m_aRowsChangeListener
Definition: RowSet.hxx:99
sal_Int32 m_nMaxRows
Definition: RowSet.hxx:124
OUString m_aPassword
Definition: RowSet.hxx:110
::connectivity::ORowSetValue & getParameterStorage(sal_Int32 parameterIndex)
Definition: RowSet.cxx:2424
css::uno::Reference< css::sdbc::XResultSet > impl_prepareAndExecute_throw()
prepares and executes our command
Definition: RowSet.cxx:1661
css::uno::Reference< css::sdbc::XConnection > calcConnection(const css::uno::Reference< css::task::XInteractionHandler > &_rxHandler)
Definition: RowSet.cxx:2155
sal_Int32 m_nFetchDirection
Definition: RowSet.hxx:121
virtual void SAL_CALL setBytes(sal_Int32 parameterIndex, const css::uno::Sequence< sal_Int8 > &x) override
Definition: RowSet.cxx:2515
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
Definition: RowSet.cxx:614
virtual void SAL_CALL setInt(sal_Int32 parameterIndex, sal_Int32 x) override
Definition: RowSet.cxx:2490
virtual OUString SAL_CALL getImplementationName() override
Definition: RowSet.cxx:432
sal_Int32 m_nLastKnownRowCount
Definition: RowSet.hxx:129
OUString m_aUpdateTableName
Definition: RowSet.hxx:118
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1415
void approveExecution()
call the RowSetApproveListeners
Definition: RowSet.cxx:1505
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: RowSet.cxx:392
bool m_bPropChangeNotifyEnabled
Definition: RowSet.hxx:143
virtual void SAL_CALL acquire() noexcept override
Definition: RowSet.cxx:412
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1394
virtual void SAL_CALL setObjectWithInfo(sal_Int32 parameterIndex, const css::uno::Any &x, sal_Int32 targetSqlType, sal_Int32 scale) override
Definition: RowSet.cxx:2588
OUString m_aUpdateCatalogName
Definition: RowSet.hxx:116
virtual void SAL_CALL removeRowSetApproveListener(const css::uno::Reference< css::sdb::XRowSetApproveListener > &listener) override
Definition: RowSet.cxx:2026
OUString m_aURL
Definition: RowSet.hxx:108
virtual void SAL_CALL setClob(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XClob > &x) override
Definition: RowSet.cxx:2606
virtual void SAL_CALL updateBytes(sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 > &x) override
Definition: RowSet.cxx:698
std::unique_ptr< OTableContainer > m_xTables
Definition: RowSet.hxx:104
virtual void SAL_CALL clearParameters() override
Definition: RowSet.cxx:2616
::comphelper::OInterfaceContainerHelper3< css::sdbc::XRowSetListener > m_aRowsetListeners
Definition: RowSet.hxx:97
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1344
void impl_resetTables_nothrow()
cleans up m_pTables, and resets it to <NULL>
Definition: RowSet.cxx:2235
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1375
virtual sal_Bool SAL_CALL wasNull() override
Definition: RowSet.cxx:1270
void impl_rebuild_throw(::osl::ResettableMutexGuard &_rGuard)
Definition: RowSet.cxx:2714
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1290
virtual void SAL_CALL setArray(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XArray > &x) override
Definition: RowSet.cxx:2611
friend class ORowSetClone
Definition: RowSet.hxx:74
css::uno::Reference< css::container::XNameAccess > impl_getTables_throw()
returns the table container of our active connection
Definition: RowSet.cxx:2197
OUString m_aActiveCommand
Definition: RowSet.hxx:115
bool m_bOwnConnection
Definition: RowSet.hxx:142
void impl_initComposer_throw(OUString &_out_rCommandToExecute)
initializes our query composer, and everything which has to do with it
Definition: RowSet.cxx:2252
OUString m_aHavingClause
Definition: RowSet.hxx:112
void impl_initParametersContainer_nothrow()
initializes our parameters container (m_pParameters) according to the parameter columns as obtained f...
Definition: RowSet.cxx:2394
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1332
virtual void SAL_CALL updateFloat(sal_Int32 columnIndex, float x) override
Definition: RowSet.cxx:683
void impl_initializeColumnSettings_nothrow(const css::uno::Reference< css::beans::XPropertySet > &_rxTemplateColumn, const css::uno::Reference< css::beans::XPropertySet > &_rxRowSetColumn)
initializes a given RowSet column with the ColumnSettings (width, format, hidden, etc....
Definition: RowSet.cxx:1699
OUString m_aUpdateSchemaName
Definition: RowSet.hxx:117
void firePropertyChange(const ORowSetRow &_rOldRow)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: RowSet.cxx:442
virtual void SAL_CALL moveToInsertRow() override
Definition: RowSet.cxx:1146
sal_Int32 m_nQueryTimeOut
Definition: RowSet.hxx:125
virtual ~ORowSet() override
Definition: RowSet.cxx:191
virtual bool isModified() override
Definition: RowSet.cxx:2655
virtual void SAL_CALL setBoolean(sal_Int32 parameterIndex, sal_Bool x) override
Definition: RowSet.cxx:2475
virtual void SAL_CALL setFloat(sal_Int32 parameterIndex, float x) override
Definition: RowSet.cxx:2500
void updateValue(sal_Int32 columnIndex, const connectivity::ORowSetValue &x)
Definition: RowSet.cxx:627
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1320
virtual void SAL_CALL insertRow() override
Definition: RowSet.cxx:827
virtual void SAL_CALL setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString &typeName) override
Definition: RowSet.cxx:2462
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > m_xComposer
Definition: RowSet.hxx:82
bool m_bRebuildConnOnExecute
Definition: RowSet.hxx:138
virtual void SAL_CALL updateByte(sal_Int32 columnIndex, sal_Int8 x) override
Definition: RowSet.cxx:663
OUString m_aDataSourceName
Definition: RowSet.hxx:107
virtual void SAL_CALL setBinaryStream(sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
Definition: RowSet.cxx:2535
bool m_bInsertingRow
Definition: RowSet.hxx:131
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getParameters() override
Definition: RowSet.cxx:1476
virtual void SAL_CALL updateTime(sal_Int32 columnIndex, const css::util::Time &x) override
Definition: RowSet.cxx:708
virtual void SAL_CALL updateLong(sal_Int32 columnIndex, sal_Int64 x) override
Definition: RowSet.cxx:678
virtual void SAL_CALL release() noexcept override
Definition: RowSet.cxx:417
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
Definition: RowSet.cxx:1338
Type
std::vector< css::uno::WeakReferenceHelper > OWeakRefArray
::cppu::WeakAggComponentImplHelper12< css::sdb::XResultSetAccess, css::sdb::XRowSetApproveBroadcaster, css::sdb::XRowsChangeBroadcaster, css::sdbcx::XDeleteRows, css::sdbc::XParameters, css::lang::XEventListener, css::sdbc::XResultSetUpdate, css::sdbc::XRowUpdate, css::util::XCancellable, css::sdb::XCompletedExecution, css::sdb::XParametersSupplier, css::sdbc::XWarningsSupplier > ORowSet_BASE1
Definition: RowSet.hxx:66
unsigned char sal_Bool
signed char sal_Int8