LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Attributes | List of all members
dbaccess::ORowSetNotifier Class Reference

eases the handling of the doCancelModification and notifyCancelInsert methods More...

#include <RowSetBase.hxx>

Collaboration diagram for dbaccess::ORowSetNotifier:
[legend]

Public Member Functions

 ORowSetNotifier (ORowSetBase *m_pRowSet)
 constructs the object, and cancels the insertion More...
 
 ORowSetNotifier (ORowSetBase *m_pRowSet, ORowSetValueVector::Vector &&i_aRow)
 use this one to construct a vector for change value notification More...
 
 ~ORowSetNotifier ()
 
void fire ()
 notifies the insertion More...
 
void firePropertyChange ()
 notifies value change events and notifies IsModified More...
 
std::vector< sal_Int32 > & getChangedColumns ()
 use this one to store the index of the changed column values More...
 

Private Attributes

std::vector< sal_Int32 > aChangedColumns
 
ORowSetValueVector::Vector aRow
 
ORowSetBasem_pRowSet
 
bool m_bWasNew
 
bool m_bWasModified
 

Detailed Description

eases the handling of the doCancelModification and notifyCancelInsert methods

The class can only be used on the stack, within a method of ORowSetBase (or derivees)

Definition at line 348 of file RowSetBase.hxx.

Constructor & Destructor Documentation

◆ ORowSetNotifier() [1/2]

dbaccess::ORowSetNotifier::ORowSetNotifier ( ORowSetBase m_pRowSet)
explicit

◆ ORowSetNotifier() [2/2]

dbaccess::ORowSetNotifier::ORowSetNotifier ( ORowSetBase m_pRowSet,
ORowSetValueVector::Vector &&  i_aRow 
)

use this one to construct a vector for change value notification

Definition at line 1379 of file RowSetBase.cxx.

References aRow, and m_pRowSet.

◆ ~ORowSetNotifier()

dbaccess::ORowSetNotifier::~ORowSetNotifier ( )

Definition at line 1388 of file RowSetBase.cxx.

Member Function Documentation

◆ fire()

void dbaccess::ORowSetNotifier::fire ( )

notifies the insertion

This has not been put into the destructor by intention!

The destructor is called during stack unwinding in case of an exception, so if we would do listener notification there, this would have the potential of another exception during stack unwinding, which would terminate the application.

See also
ORowSetBase::notifyCancelInsert

Definition at line 1392 of file RowSetBase.cxx.

References dbaccess::ORowSetBase::fireProperty(), dbaccess::ORowSetBase::isModified(), dbaccess::ORowSetBase::isNew(), m_bWasModified, m_bWasNew, m_pRowSet, PROPERTY_ID_ISMODIFIED, and PROPERTY_ID_ISNEW.

Referenced by dbaccess::ORowSetBase::absolute(), dbaccess::ORowSetBase::afterLast(), dbaccess::ORowSetBase::beforeFirst(), dbaccess::ORowSet::deleteRow(), dbaccess::ORowSet::deleteRows(), dbaccess::ORowSetBase::move(), dbaccess::ORowSetBase::moveRelativeToBookmark(), dbaccess::ORowSetBase::moveToBookmark(), dbaccess::ORowSet::moveToCurrentRow(), dbaccess::ORowSetBase::next(), dbaccess::ORowSetBase::previous(), dbaccess::ORowSet::refreshRow(), and dbaccess::ORowSetBase::relative().

◆ firePropertyChange()

void dbaccess::ORowSetNotifier::firePropertyChange ( )

notifies value change events and notifies IsModified

Parameters
i_aChangedColumnsthe index of the changed value columns
i_aRowthe old values
See also
ORowSetBase::notifyCancelInsert

Definition at line 1413 of file RowSetBase.cxx.

References aChangedColumns, aRow, dbaccess::ORowSetBase::fireProperty(), dbaccess::ORowSetBase::firePropertyChange(), m_pRowSet, and PROPERTY_ID_ISMODIFIED.

Referenced by dbaccess::ORowSet::updateCharacterStream(), dbaccess::ORowSet::updateNull(), dbaccess::ORowSet::updateNumericObject(), dbaccess::ORowSet::updateObject(), and dbaccess::ORowSet::updateValue().

◆ getChangedColumns()

std::vector< sal_Int32 > & dbaccess::ORowSetNotifier::getChangedColumns ( )

Member Data Documentation

◆ aChangedColumns

std::vector<sal_Int32> dbaccess::ORowSetNotifier::aChangedColumns
private

Definition at line 351 of file RowSetBase.hxx.

Referenced by firePropertyChange(), and getChangedColumns().

◆ aRow

ORowSetValueVector::Vector dbaccess::ORowSetNotifier::aRow
private

Definition at line 352 of file RowSetBase.hxx.

Referenced by firePropertyChange(), and ORowSetNotifier().

◆ m_bWasModified

bool dbaccess::ORowSetNotifier::m_bWasModified
private

Definition at line 357 of file RowSetBase.hxx.

Referenced by fire(), and ORowSetNotifier().

◆ m_bWasNew

bool dbaccess::ORowSetNotifier::m_bWasNew
private

Definition at line 356 of file RowSetBase.hxx.

Referenced by fire(), and ORowSetNotifier().

◆ m_pRowSet

ORowSetBase* dbaccess::ORowSetNotifier::m_pRowSet
private

Definition at line 353 of file RowSetBase.hxx.

Referenced by fire(), firePropertyChange(), and ORowSetNotifier().


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