LibreOffice Module dbaccess (master) 1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
dbaccess::OCacheSet Class Referenceabstract

#include <CacheSet.hxx>

Inheritance diagram for dbaccess::OCacheSet:
[legend]
Collaboration diagram for dbaccess::OCacheSet:
[legend]

Public Member Functions

virtual void construct (const css::uno::Reference< css::sdbc::XResultSet > &_xDriverSet, const OUString &i_sRowSetFilter)
 
virtual void fillValueRow (ORowSetRow &_rRow, sal_Int32 _nPosition)
 
virtual sal_Bool SAL_CALL wasNull () override
 
virtual OUString SAL_CALL getString (sal_Int32 columnIndex) override
 
virtual sal_Bool SAL_CALL getBoolean (sal_Int32 columnIndex) override
 
virtual sal_Int8 SAL_CALL getByte (sal_Int32 columnIndex) override
 
virtual sal_Int16 SAL_CALL getShort (sal_Int32 columnIndex) override
 
virtual sal_Int32 SAL_CALL getInt (sal_Int32 columnIndex) override
 
virtual sal_Int64 SAL_CALL getLong (sal_Int32 columnIndex) override
 
virtual float SAL_CALL getFloat (sal_Int32 columnIndex) override
 
virtual double SAL_CALL getDouble (sal_Int32 columnIndex) override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes (sal_Int32 columnIndex) override
 
virtual css::util::Date SAL_CALL getDate (sal_Int32 columnIndex) override
 
virtual css::util::Time SAL_CALL getTime (sal_Int32 columnIndex) override
 
virtual css::util::DateTime SAL_CALL getTimestamp (sal_Int32 columnIndex) override
 
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream (sal_Int32 columnIndex) override
 
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream (sal_Int32 columnIndex) override
 
virtual css::uno::Any SAL_CALL getObject (sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
 
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef (sal_Int32 columnIndex) override
 
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob (sal_Int32 columnIndex) override
 
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob (sal_Int32 columnIndex) override
 
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray (sal_Int32 columnIndex) override
 
virtual bool next ()
 
virtual void beforeFirst ()
 
virtual void afterLast ()
 
virtual bool first ()
 
virtual bool last ()
 
virtual sal_Int32 getRow ()
 
virtual bool absolute (sal_Int32 row)
 
virtual bool previous ()
 
virtual void refreshRow ()
 
virtual bool rowUpdated ()
 
virtual bool rowInserted ()
 
virtual bool rowDeleted ()
 
virtual css::uno::Any getBookmark ()=0
 
virtual bool moveToBookmark (const css::uno::Any &bookmark)=0
 
virtual sal_Int32 compareBookmarks (const css::uno::Any &first, const css::uno::Any &second)=0
 
virtual bool hasOrderedBookmarks ()=0
 
virtual sal_Int32 hashBookmark (const css::uno::Any &bookmark)=0
 
virtual void insertRow (const ORowSetRow &_rInsertRow, const connectivity::OSQLTable &_xTable)
 
virtual void updateRow (const ORowSetRow &_rInsertRow, const ORowSetRow &_rOriginalRow, const connectivity::OSQLTable &_xTable)
 
virtual void deleteRow (const ORowSetRow &_rDeleteRow, const connectivity::OSQLTable &_xTable)=0
 
virtual bool isResultSetChanged () const
 
virtual void reset (const css::uno::Reference< css::sdbc::XResultSet > &_xDriverSet)=0
 
virtual void mergeColumnValues (sal_Int32 i_nColumnIndex, ORowSetValueVector::Vector &io_aInsertRow, ORowSetValueVector::Vector &io_aRow, std::vector< sal_Int32 > &o_aChangedColumns)
 
virtual bool columnValuesUpdated (ORowSetValueVector::Vector &o_aCachedRow, const ORowSetValueVector::Vector &i_aRow)
 
virtual bool updateColumnValues (const ORowSetValueVector::Vector &io_aCachedRow, ORowSetValueVector::Vector &io_aRow, const std::vector< sal_Int32 > &i_aChangedColumns)
 
virtual void fillMissingValues (ORowSetValueVector::Vector &io_aRow) const
 

Protected Member Functions

 OCacheSet (sal_Int32 i_nMaxRows)
 
virtual ~OCacheSet () override
 
void fillParameters (const ORowSetRow &_rRow, const connectivity::OSQLTable &_xTable, OUStringBuffer &_sCondition, OUStringBuffer &_sParameter, std::vector< sal_Int32 > &_rOrgValues)
 
void fillTableName (const css::uno::Reference< css::beans::XPropertySet > &_xTable)
 
OUString getIdentifierQuoteString () const
 

Static Protected Member Functions

static void setParameter (sal_Int32 nPos, const css::uno::Reference< css::sdbc::XParameters > &_xParameter, const connectivity::ORowSetValue &_rValue, sal_Int32 _nType, sal_Int32 _nScale)
 

Protected Attributes

css::uno::Reference< css::sdbc::XResultSet > m_xDriverSet
 
css::uno::Reference< css::sdbc::XRow > m_xDriverRow
 
css::uno::Reference< css::sdbc::XResultSetMetaData > m_xSetMetaData
 
css::uno::Reference< css::sdbc::XConnection > m_xConnection
 
std::vector< bool > m_aNullable
 
std::vector< bool > m_aSignedFlags
 
std::vector< sal_Int32 > m_aColumnTypes
 
OUString m_aComposedTableName
 
sal_Int32 m_nMaxRows
 
bool m_bInserted
 
bool m_bUpdated
 
bool m_bDeleted
 
OUString m_sRowSetFilter
 

Detailed Description

Definition at line 35 of file CacheSet.hxx.

Constructor & Destructor Documentation

◆ OCacheSet()

OCacheSet::OCacheSet ( sal_Int32  i_nMaxRows)
explicitprotected

Definition at line 56 of file CacheSet.cxx.

◆ ~OCacheSet()

OCacheSet::~OCacheSet ( )
overrideprotectedvirtual

Member Function Documentation

◆ absolute()

bool OCacheSet::absolute ( sal_Int32  row)
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 524 of file CacheSet.cxx.

References m_bDeleted, m_bInserted, m_bUpdated, and m_xDriverSet.

◆ afterLast()

void OCacheSet::afterLast ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 501 of file CacheSet.cxx.

References m_bDeleted, m_bInserted, m_bUpdated, and m_xDriverSet.

◆ beforeFirst()

void OCacheSet::beforeFirst ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 495 of file CacheSet.cxx.

References m_bDeleted, m_bInserted, m_bUpdated, and m_xDriverSet.

◆ columnValuesUpdated()

bool OCacheSet::columnValuesUpdated ( ORowSetValueVector::Vector o_aCachedRow,
const ORowSetValueVector::Vector i_aRow 
)
virtual

Definition at line 566 of file CacheSet.cxx.

◆ compareBookmarks()

virtual sal_Int32 dbaccess::OCacheSet::compareBookmarks ( const css::uno::Any &  first,
const css::uno::Any &  second 
)
pure virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Implemented in dbaccess::OBookmarkSet, dbaccess::OKeySet, dbaccess::OStaticSet, and dbaccess::WrappedResultSet.

◆ construct()

void OCacheSet::construct ( const css::uno::Reference< css::sdbc::XResultSet > &  _xDriverSet,
const OUString &  i_sRowSetFilter 
)
virtual

◆ deleteRow()

void OCacheSet::deleteRow ( const ORowSetRow _rDeleteRow,
const connectivity::OSQLTable _xTable 
)
pure virtual

◆ fillMissingValues()

void OCacheSet::fillMissingValues ( ORowSetValueVector::Vector io_aRow) const
virtual

Definition at line 576 of file CacheSet.cxx.

◆ fillParameters()

void OCacheSet::fillParameters ( const ORowSetRow _rRow,
const connectivity::OSQLTable _xTable,
OUStringBuffer &  _sCondition,
OUStringBuffer &  _sParameter,
std::vector< sal_Int32 > &  _rOrgValues 
)
protected

◆ fillTableName()

void OCacheSet::fillTableName ( const css::uno::Reference< css::beans::XPropertySet > &  _xTable)
protected
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Definition at line 133 of file CacheSet.cxx.

References composeTableName(), comphelper::getString(), m_aComposedTableName, m_xConnection, PROPERTY_CATALOGNAME(), PROPERTY_NAME(), and PROPERTY_SCHEMANAME().

Referenced by deleteRow(), insertRow(), and updateRow().

◆ fillValueRow()

void OCacheSet::fillValueRow ( ORowSetRow _rRow,
sal_Int32  _nPosition 
)
virtual

◆ first()

bool OCacheSet::first ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 507 of file CacheSet.cxx.

References m_bDeleted, m_bInserted, m_bUpdated, and m_xDriverSet.

◆ getArray()

Reference< XArray > SAL_CALL OCacheSet::getArray ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 483 of file CacheSet.cxx.

References m_xDriverRow.

◆ getBinaryStream()

Reference< css::io::XInputStream > SAL_CALL OCacheSet::getBinaryStream ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 453 of file CacheSet.cxx.

References m_xDriverRow.

◆ getBlob()

Reference< XBlob > SAL_CALL OCacheSet::getBlob ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 473 of file CacheSet.cxx.

References m_xDriverRow.

◆ getBookmark()

virtual css::uno::Any dbaccess::OCacheSet::getBookmark ( )
pure virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Implemented in dbaccess::OBookmarkSet, dbaccess::OKeySet, dbaccess::OStaticSet, and dbaccess::WrappedResultSet.

Referenced by fillValueRow(), and lcl_getBookmark().

◆ getBoolean()

sal_Bool SAL_CALL OCacheSet::getBoolean ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 398 of file CacheSet.cxx.

References m_xDriverRow.

◆ getByte()

sal_Int8 SAL_CALL OCacheSet::getByte ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 403 of file CacheSet.cxx.

References m_xDriverRow.

◆ getBytes()

Sequence< sal_Int8 > SAL_CALL OCacheSet::getBytes ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 433 of file CacheSet.cxx.

References m_xDriverRow.

◆ getCharacterStream()

Reference< css::io::XInputStream > SAL_CALL OCacheSet::getCharacterStream ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 458 of file CacheSet.cxx.

References m_xDriverRow.

◆ getClob()

Reference< XClob > SAL_CALL OCacheSet::getClob ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 478 of file CacheSet.cxx.

References m_xDriverRow.

◆ getDate()

css::util::Date SAL_CALL OCacheSet::getDate ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 438 of file CacheSet.cxx.

References m_xDriverRow.

◆ getDouble()

double SAL_CALL OCacheSet::getDouble ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 428 of file CacheSet.cxx.

References m_xDriverRow.

◆ getFloat()

float SAL_CALL OCacheSet::getFloat ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 423 of file CacheSet.cxx.

References m_xDriverRow.

◆ getIdentifierQuoteString()

OUString OCacheSet::getIdentifierQuoteString ( ) const
protected

Definition at line 65 of file CacheSet.cxx.

References m_xConnection, and sQuote.

Referenced by fillParameters(), and insertRow().

◆ getInt()

sal_Int32 SAL_CALL OCacheSet::getInt ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 413 of file CacheSet.cxx.

References m_xDriverRow.

◆ getLong()

sal_Int64 SAL_CALL OCacheSet::getLong ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 418 of file CacheSet.cxx.

References m_xDriverRow.

◆ getObject()

Any SAL_CALL OCacheSet::getObject ( sal_Int32  columnIndex,
const css::uno::Reference< css::container::XNameAccess > &  typeMap 
)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 463 of file CacheSet.cxx.

References Any, and m_xDriverRow.

◆ getRef()

Reference< XRef > SAL_CALL OCacheSet::getRef ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 468 of file CacheSet.cxx.

References m_xDriverRow.

◆ getRow()

sal_Int32 OCacheSet::getRow ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 519 of file CacheSet.cxx.

References m_xDriverSet.

◆ getShort()

sal_Int16 SAL_CALL OCacheSet::getShort ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 408 of file CacheSet.cxx.

References m_xDriverRow.

◆ getString()

OUString SAL_CALL OCacheSet::getString ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 393 of file CacheSet.cxx.

References m_xDriverRow.

◆ getTime()

css::util::Time SAL_CALL OCacheSet::getTime ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 443 of file CacheSet.cxx.

References m_xDriverRow.

◆ getTimestamp()

css::util::DateTime SAL_CALL OCacheSet::getTimestamp ( sal_Int32  columnIndex)
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 448 of file CacheSet.cxx.

References m_xDriverRow.

◆ hashBookmark()

virtual sal_Int32 dbaccess::OCacheSet::hashBookmark ( const css::uno::Any &  bookmark)
pure virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Implemented in dbaccess::OBookmarkSet, dbaccess::OKeySet, dbaccess::OStaticSet, and dbaccess::WrappedResultSet.

◆ hasOrderedBookmarks()

virtual bool dbaccess::OCacheSet::hasOrderedBookmarks ( )
pure virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Implemented in dbaccess::OBookmarkSet, dbaccess::OKeySet, dbaccess::OStaticSet, and dbaccess::WrappedResultSet.

◆ insertRow()

void OCacheSet::insertRow ( const ORowSetRow _rInsertRow,
const connectivity::OSQLTable _xTable 
)
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OBookmarkSet, dbaccess::OKeySet, dbaccess::OStaticSet, and dbaccess::WrappedResultSet.

Definition at line 148 of file CacheSet.cxx.

References fillTableName(), getIdentifierQuoteString(), i, m_aComposedTableName, m_bInserted, m_xConnection, m_xSetMetaData, and setParameter().

Referenced by dbaccess::OStaticSet::insertRow().

◆ isResultSetChanged()

bool OCacheSet::isResultSetChanged ( ) const
virtual

Definition at line 556 of file CacheSet.cxx.

◆ last()

bool OCacheSet::last ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 513 of file CacheSet.cxx.

References m_bDeleted, m_bInserted, m_bUpdated, and m_xDriverSet.

◆ mergeColumnValues()

void OCacheSet::mergeColumnValues ( sal_Int32  i_nColumnIndex,
ORowSetValueVector::Vector io_aInsertRow,
ORowSetValueVector::Vector io_aRow,
std::vector< sal_Int32 > &  o_aChangedColumns 
)
virtual

Definition at line 561 of file CacheSet.cxx.

◆ moveToBookmark()

virtual bool dbaccess::OCacheSet::moveToBookmark ( const css::uno::Any &  bookmark)
pure virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Implemented in dbaccess::OBookmarkSet, dbaccess::OKeySet, dbaccess::OStaticSet, and dbaccess::WrappedResultSet.

◆ next()

bool OCacheSet::next ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 489 of file CacheSet.cxx.

References m_bDeleted, m_bInserted, m_bUpdated, and m_xDriverSet.

◆ previous()

bool OCacheSet::previous ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 530 of file CacheSet.cxx.

References m_bDeleted, m_bInserted, m_bUpdated, and m_xDriverSet.

◆ refreshRow()

void OCacheSet::refreshRow ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 536 of file CacheSet.cxx.

References m_xDriverSet.

◆ reset()

virtual void dbaccess::OCacheSet::reset ( const css::uno::Reference< css::sdbc::XResultSet > &  _xDriverSet)
pure virtual

◆ rowDeleted()

bool OCacheSet::rowDeleted ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 551 of file CacheSet.cxx.

References m_xDriverSet.

◆ rowInserted()

bool OCacheSet::rowInserted ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 546 of file CacheSet.cxx.

References m_xDriverSet.

◆ rowUpdated()

bool OCacheSet::rowUpdated ( )
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OKeySet, and dbaccess::OStaticSet.

Definition at line 541 of file CacheSet.cxx.

References m_xDriverSet.

◆ setParameter()

void OCacheSet::setParameter ( sal_Int32  nPos,
const css::uno::Reference< css::sdbc::XParameters > &  _xParameter,
const connectivity::ORowSetValue _rValue,
sal_Int32  _nType,
sal_Int32  _nScale 
)
staticprotected

Definition at line 361 of file CacheSet.cxx.

References connectivity::ORowSetValue::getTypeKind(), nPos, and nType.

Referenced by deleteRow(), insertRow(), and updateRow().

◆ updateColumnValues()

bool OCacheSet::updateColumnValues ( const ORowSetValueVector::Vector io_aCachedRow,
ORowSetValueVector::Vector io_aRow,
const std::vector< sal_Int32 > &  i_aChangedColumns 
)
virtual

Definition at line 571 of file CacheSet.cxx.

◆ updateRow()

void OCacheSet::updateRow ( const ORowSetRow _rInsertRow,
const ORowSetRow _rOriginalRow,
const connectivity::OSQLTable _xTable 
)
virtual
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Reimplemented in dbaccess::OBookmarkSet, dbaccess::OKeySet, and dbaccess::WrappedResultSet.

Definition at line 269 of file CacheSet.cxx.

References DBA_RES, fillParameters(), fillTableName(), i, m_aComposedTableName, m_bUpdated, m_xConnection, m_xSetMetaData, and setParameter().

◆ wasNull()

sal_Bool SAL_CALL OCacheSet::wasNull ( )
overridevirtual

Reimplemented in dbaccess::OKeySet.

Definition at line 388 of file CacheSet.cxx.

References m_xDriverRow.

Member Data Documentation

◆ m_aColumnTypes

std::vector<sal_Int32> dbaccess::OCacheSet::m_aColumnTypes
protected

Definition at line 45 of file CacheSet.hxx.

Referenced by construct(), and fillValueRow().

◆ m_aComposedTableName

OUString dbaccess::OCacheSet::m_aComposedTableName
protected

Definition at line 46 of file CacheSet.hxx.

Referenced by deleteRow(), fillTableName(), insertRow(), and updateRow().

◆ m_aNullable

std::vector<bool> dbaccess::OCacheSet::m_aNullable
protected

Definition at line 43 of file CacheSet.hxx.

Referenced by construct().

◆ m_aSignedFlags

std::vector<bool> dbaccess::OCacheSet::m_aSignedFlags
protected

◆ m_bDeleted

bool dbaccess::OCacheSet::m_bDeleted
protected

◆ m_bInserted

bool dbaccess::OCacheSet::m_bInserted
protected

◆ m_bUpdated

bool dbaccess::OCacheSet::m_bUpdated
protected

◆ m_nMaxRows

sal_Int32 dbaccess::OCacheSet::m_nMaxRows
protected

Definition at line 47 of file CacheSet.hxx.

Referenced by dbaccess::OStaticSet::fetchRow().

◆ m_sRowSetFilter

OUString dbaccess::OCacheSet::m_sRowSetFilter
protected

◆ m_xConnection

css::uno::Reference< css::sdbc::XConnection> dbaccess::OCacheSet::m_xConnection
protected

◆ m_xDriverRow

css::uno::Reference< css::sdbc::XRow> dbaccess::OCacheSet::m_xDriverRow
protected

◆ m_xDriverSet

css::uno::Reference< css::sdbc::XResultSet> dbaccess::OCacheSet::m_xDriverSet
protected

◆ m_xSetMetaData

css::uno::Reference< css::sdbc::XResultSetMetaData> dbaccess::OCacheSet::m_xSetMetaData
protected

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