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

#include <table.hxx>

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

Public Member Functions

 ODBTable (connectivity::sdbcx::OCollection *_pTables, const css::uno::Reference< css::sdbc::XConnection > &_rxConn, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName, const OUString &_rType, const OUString &_rDesc, const css::uno::Reference< css::container::XNameAccess > &_rxColumnDefinitions)
 constructs a wrapper supporting the com.sun.star.sdb.Table service. More...
 
 ODBTable (connectivity::sdbcx::OCollection *_pTables, const css::uno::Reference< css::sdbc::XConnection > &_rxConn)
 
virtual ~ODBTable () override
 
virtual void construct () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
 DECLARE_SERVICE_INFO ()
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override
 
virtual void SAL_CALL rename (const OUString &_rNewName) override
 
virtual void SAL_CALL alterColumnByName (const OUString &_rName, const css::uno::Reference< css::beans::XPropertySet > &_rxDescriptor) override
 
- Public Member Functions inherited from comphelper::OIdPropertyArrayUsageHelper< class TYPE >
 OIdPropertyArrayUsageHelper ()
 
virtual ~OIdPropertyArrayUsageHelper ()
 
::cppu::IPropertyArrayHelpergetArrayHelper (sal_Int32 nId)
 
- Public Member Functions inherited from connectivity::OTableHelper
virtual void refreshColumns () override
 
virtual void refreshKeys () override
 
virtual void refreshIndexes () override
 
const ColumnDescgetColumnDescription (const OUString &_sName) const
 
 OTableHelper (sdbcx::OCollection *_pTables, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, bool _bCase)
 
 OTableHelper (sdbcx::OCollection *_pTables, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, bool _bCase, const OUString &Name, const OUString &Type, const OUString &Description=OUString(), const OUString &SchemaName=OUString(), const OUString &CatalogName=OUString())
 
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > getMetaData () const override
 
css::uno::Reference< css::sdbc::XConnection > const & getConnection () const
 
virtual void SAL_CALL rename (const OUString &newName) override
 
virtual void SAL_CALL alterColumnByIndex (sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
 
virtual OUString SAL_CALL getName () override
 
const OUString & getTableName ()
 
std::shared_ptr< sdbcx::KeyPropertiesgetKeyProperties (const OUString &_sName) const
 
void addKey (const OUString &_sName, const std::shared_ptr< sdbcx::KeyProperties > &_aKeyProperties)
 
virtual OUString getTypeCreatePattern () const
 
css::uno::Reference< css::sdb::tools::XTableRename > const & getRenameService () const
 
css::uno::Reference< css::sdb::tools::XTableAlteration > const & getAlterService () const
 
css::uno::Reference< css::sdb::tools::XKeyAlteration > const & getKeyService () const
 
css::uno::Reference< css::sdb::tools::XIndexAlteration > const & getIndexService () const
 
- Public Member Functions inherited from connectivity::sdbcx::OTable
 OTable (OCollection *_pTables, bool _bCase)
 
 OTable (OCollection *_pTables, bool _bCase, const OUString &Name, OUString Type, OUString Description=OUString(), OUString SchemaName=OUString(), OUString CatalogName=OUString())
 
virtual ~OTable () override
 
 DECLARE_SERVICE_INFO ()
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual void construct () override
 
virtual void refreshColumns () override
 
virtual void refreshKeys ()
 
virtual void refreshIndexes ()
 
virtual void SAL_CALL disposing () override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns () override
 
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getKeys () override
 
virtual OUString SAL_CALL getName () override
 
virtual void SAL_CALL setName (const OUString &aName) override
 
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor () override
 
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getIndexes () override
 
virtual void SAL_CALL rename (const OUString &newName) override
 
virtual void SAL_CALL alterColumnByName (const OUString &colName, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
 
virtual void SAL_CALL alterColumnByIndex (sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
 
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > getMetaData () const
 
virtual void refreshColumns ()=0
 
- Public Member Functions inherited from connectivity::sdbcx::ODescriptor
 ODescriptor (::cppu::OBroadcastHelper &_rBHelper, bool _bCase, bool _bNew=false)
 
virtual ~ODescriptor () override
 
bool isNew () const
 
void setNew (bool _bNew)
 
bool isCaseSensitive () const
 
virtual void construct ()
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes ()
 
virtual rtl::Reference< OColumncreateColumn (const OUString &_rName) const =0
 creates an OColumn object which should represent the column with a given name More...
 
virtual css::uno::Reference< css::beans::XPropertySetcreateColumnDescriptor ()=0
 creates a column descriptor object. More...
 
virtual void columnAppended (const css::uno::Reference< css::beans::XPropertySet > &_rxSourceDescriptor)=0
 notifies that a column, created from a column descriptor, has been appended More...
 
virtual void columnDropped (const OUString &_sName)=0
 notifies that a column with a given name has been dropped More...
 

Protected Member Functions

virtual ::cppu::IPropertyArrayHelpercreateArrayHelper (sal_Int32 _nId) const override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override
 
virtual rtl::Reference< OColumncreateColumn (const OUString &_rName) const override
 creates an OColumn object which should represent the column with a given name More...
 
virtual css::uno::Reference< css::beans::XPropertySetcreateColumnDescriptor () override
 creates a column descriptor object. More...
 
virtual void columnAppended (const css::uno::Reference< css::beans::XPropertySet > &_rxSourceDescriptor) override
 notifies that a column, created from a column descriptor, has been appended More...
 
virtual void columnDropped (const OUString &_sName) override
 notifies that a column with a given name has been dropped More...
 
virtual ::connectivity::sdbcx::OCollectioncreateColumns (const ::std::vector< OUString > &_rNames) override
 creates the column collection for the table More...
 
virtual ::connectivity::sdbcx::OCollectioncreateKeys (const ::std::vector< OUString > &_rNames) override
 creates the key collection for the table More...
 
virtual ::connectivity::sdbcx::OCollectioncreateIndexes (const ::std::vector< OUString > &_rNames) override
 creates the index collection for the table More...
 
virtual void SAL_CALL disposing () override
 
- Protected Member Functions inherited from dbaccess::ODataSettings_Base
 ODataSettings_Base ()
 
 ODataSettings_Base (const ODataSettings_Base &_rSource)=delete
 
 ~ODataSettings_Base ()
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper (sal_Int32 nId) const=0
 
- Protected Member Functions inherited from connectivity::OTableHelper
virtual sdbcx::OCollectioncreateColumns (const ::std::vector< OUString > &_rNames)=0
 
virtual sdbcx::OCollectioncreateKeys (const ::std::vector< OUString > &_rNames)=0
 
virtual sdbcx::OCollectioncreateIndexes (const ::std::vector< OUString > &_rNames)=0
 
virtual void SAL_CALL disposing () override
 
virtual OUString getRenameStart () const
 
virtual ~OTableHelper () override
 
- Protected Member Functions inherited from connectivity::sdbcx::OTable
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper (sal_Int32 _nId) const override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override
 
- Protected Member Functions inherited from connectivity::sdbcx::IRefreshableColumns
 ~IRefreshableColumns ()
 
- Protected Member Functions inherited from connectivity::sdbcx::ODescriptor
::cppu::IPropertyArrayHelperdoCreateArrayHelper () const
 
- Protected Member Functions inherited from dbaccess::IColumnFactory
 ~IColumnFactory ()
 

Private Attributes

::rtl::Reference< OContainerMediatorm_pColumnMediator
 
css::uno::Reference< css::container::XNameAccess > m_xColumnDefinitions
 
css::uno::Reference< css::container::XNameAccess > m_xDriverColumns
 
sal_Int32 m_nPrivileges
 

Additional Inherited Members

- Static Public Member Functions inherited from connectivity::sdbcx::ODescriptor
static bool isNew (const css::uno::Reference< css::uno::XInterface > &_rxDescriptor)
 
- Public Attributes inherited from dbaccess::ODataSettings_Base
OUString m_sFilter
 
OUString m_sHavingClause
 
OUString m_sGroupBy
 
OUString m_sOrder
 
bool m_bApplyFilter
 
bool m_bAutoGrow
 
css::awt::FontDescriptor m_aFont
 
css::uno::Any m_aRowHeight
 
css::uno::Any m_aTextColor
 
css::uno::Any m_aTextLineColor
 
sal_Int16 m_nFontEmphasis
 
sal_Int16 m_nFontRelief
 
- Protected Attributes inherited from connectivity::sdbcx::OTable
OUString m_CatalogName
 
OUString m_SchemaName
 
OUString m_Description
 
OUString m_Type
 
std::unique_ptr< OCollectionm_xKeys
 
std::unique_ptr< OCollectionm_xColumns
 
std::unique_ptr< OCollectionm_xIndexes
 
OCollectionm_pTables
 
- Protected Attributes inherited from connectivity::sdbcx::ODescriptor
OUString m_Name
 

Detailed Description

Definition at line 39 of file table.hxx.

Constructor & Destructor Documentation

◆ ODBTable() [1/2]

dbaccess::ODBTable::ODBTable ( connectivity::sdbcx::OCollection _pTables,
const css::uno::Reference< css::sdbc::XConnection > &  _rxConn,
const OUString &  _rCatalog,
const OUString &  _rSchema,
const OUString &  _rName,
const OUString &  _rType,
const OUString &  _rDesc,
const css::uno::Reference< css::container::XNameAccess > &  _rxColumnDefinitions 
)

constructs a wrapper supporting the com.sun.star.sdb.Table service.


Parameters
_rxConnthe connection the table belongs to
_rxTablethe table from the driver can be null
_rCatalogthe name of the catalog the table belongs to. May be empty.
_rSchemathe name of the schema the table belongs to. May be empty.
_rNamethe name of the table
_rTypethe type of the table, as supplied by the driver
_rDescthe description of the table, as supplied by the driver
Exceptions
css::sdbc::SQLException

◆ ODBTable() [2/2]

dbaccess::ODBTable::ODBTable ( connectivity::sdbcx::OCollection _pTables,
const css::uno::Reference< css::sdbc::XConnection > &  _rxConn 
)
Exceptions
css::sdbc::SQLException

◆ ~ODBTable()

ODBTable::~ODBTable ( )
overridevirtual

Definition at line 82 of file table.cxx.

Member Function Documentation

◆ alterColumnByName()

void SAL_CALL ODBTable::alterColumnByName ( const OUString &  _rName,
const css::uno::Reference< css::beans::XPropertySet > &  _rxDescriptor 
)
overridevirtual

◆ columnAppended()

void ODBTable::columnAppended ( const css::uno::Reference< css::beans::XPropertySet > &  _rxSourceDescriptor)
overrideprotectedvirtual

notifies that a column, created from a column descriptor, has been appended

Implements dbaccess::IColumnFactory.

Definition at line 105 of file table.cxx.

◆ columnDropped()

void ODBTable::columnDropped ( const OUString &  _sName)
overrideprotectedvirtual

notifies that a column with a given name has been dropped

Implements dbaccess::IColumnFactory.

Definition at line 110 of file table.cxx.

References m_xColumnDefinitions.

◆ construct()

void ODBTable::construct ( )
overridevirtual

Reimplemented from connectivity::sdbcx::OTable.

Definition at line 144 of file table.cxx.

References connectivity::sdbcx::OTable::construct(), dbaccess::ODataSettings_Base::m_aFont, m_aMutex, dbaccess::ODataSettings_Base::m_aRowHeight, dbaccess::ODataSettings_Base::m_aTextColor, dbaccess::ODataSettings_Base::m_aTextLineColor, dbaccess::ODataSettings_Base::m_bApplyFilter, dbaccess::ODataSettings_Base::m_bAutoGrow, dbaccess::ODataSettings_Base::m_nFontEmphasis, dbaccess::ODataSettings_Base::m_nFontRelief, m_nPrivileges, dbaccess::ODataSettings_Base::m_sFilter, dbaccess::ODataSettings_Base::m_sOrder, PROPERTY_APPLYFILTER(), PROPERTY_AUTOGROW(), PROPERTY_FILTER(), PROPERTY_FONT(), PROPERTY_FONTCHARSET(), PROPERTY_FONTCHARWIDTH(), PROPERTY_FONTFAMILY(), PROPERTY_FONTHEIGHT(), PROPERTY_FONTKERNING(), PROPERTY_FONTNAME(), PROPERTY_FONTORIENTATION(), PROPERTY_FONTPITCH(), PROPERTY_FONTSLANT(), PROPERTY_FONTSTRIKEOUT(), PROPERTY_FONTSTYLENAME(), PROPERTY_FONTTYPE(), PROPERTY_FONTUNDERLINE(), PROPERTY_FONTWEIGHT(), PROPERTY_FONTWIDTH(), PROPERTY_FONTWORDLINEMODE(), PROPERTY_ID_APPLYFILTER, PROPERTY_ID_AUTOGROW, PROPERTY_ID_FILTER, PROPERTY_ID_FONT, PROPERTY_ID_FONTCHARSET, PROPERTY_ID_FONTCHARWIDTH, PROPERTY_ID_FONTFAMILY, PROPERTY_ID_FONTHEIGHT, PROPERTY_ID_FONTKERNING, PROPERTY_ID_FONTNAME, PROPERTY_ID_FONTORIENTATION, PROPERTY_ID_FONTPITCH, PROPERTY_ID_FONTSLANT, PROPERTY_ID_FONTSTRIKEOUT, PROPERTY_ID_FONTSTYLENAME, PROPERTY_ID_FONTTYPE, PROPERTY_ID_FONTUNDERLINE, PROPERTY_ID_FONTWEIGHT, PROPERTY_ID_FONTWIDTH, PROPERTY_ID_FONTWORDLINEMODE, PROPERTY_ID_ORDER, PROPERTY_ID_PRIVILEGES, PROPERTY_ID_ROW_HEIGHT, PROPERTY_ID_TEXTCOLOR, PROPERTY_ID_TEXTEMPHASIS, PROPERTY_ID_TEXTLINECOLOR, PROPERTY_ID_TEXTRELIEF, PROPERTY_ORDER(), PROPERTY_PRIVILEGES(), PROPERTY_ROW_HEIGHT(), PROPERTY_TEXTCOLOR(), PROPERTY_TEXTEMPHASIS(), PROPERTY_TEXTLINECOLOR(), PROPERTY_TEXTRELIEF(), and connectivity::OTableHelper::refreshColumns().

◆ createArrayHelper()

cppu::IPropertyArrayHelper * ODBTable::createArrayHelper ( sal_Int32  _nId) const
overrideprotectedvirtual

◆ createColumn()

rtl::Reference< OColumn > ODBTable::createColumn ( const OUString &  _rName) const
overrideprotectedvirtual

creates an OColumn object which should represent the column with a given name

Implements dbaccess::IColumnFactory.

Definition at line 86 of file table.cxx.

References dbaccess::OColumns::createBaseObject(), m_xColumnDefinitions, connectivity::sdbcx::OTable::m_xColumns, and m_xDriverColumns.

◆ createColumnDescriptor()

Reference< XPropertySet > ODBTable::createColumnDescriptor ( )
overrideprotectedvirtual

creates a column descriptor object.

A column descriptor object is used to append new columns to the collection. If such an append actually happened, columnAppended is called afterwards.

Implements dbaccess::IColumnFactory.

Definition at line 312 of file table.cxx.

◆ createColumns()

sdbcx::OCollection * ODBTable::createColumns ( const ::std::vector< OUString > &  _rNames)
overrideprotectedvirtual

◆ createIndexes()

sdbcx::OCollection * ODBTable::createIndexes ( const ::std::vector< OUString > &  _rNames)
overrideprotectedvirtual

creates the index collection for the table

Parameters
_rNamesThe index names.

Implements connectivity::OTableHelper.

Definition at line 335 of file table.cxx.

References m_aMutex.

◆ createKeys()

sdbcx::OCollection * ODBTable::createKeys ( const ::std::vector< OUString > &  _rNames)
overrideprotectedvirtual

creates the key collection for the table

Parameters
_rNamesThe key names.

Implements connectivity::OTableHelper.

Definition at line 330 of file table.cxx.

References m_aMutex.

◆ DECLARE_SERVICE_INFO()

dbaccess::ODBTable::DECLARE_SERVICE_INFO ( )

◆ disposing()

void SAL_CALL ODBTable::disposing ( )
overrideprotectedvirtual

◆ getFastPropertyValue()

void ODBTable::getFastPropertyValue ( css::uno::Any &  rValue,
sal_Int32  nHandle 
) const
overridevirtual

◆ getImplementationId()

Sequence< sal_Int8 > ODBTable::getImplementationId ( )
overridevirtual

Definition at line 119 of file table.cxx.

◆ getInfoHelper()

cppu::IPropertyArrayHelper &SAL_CALL ODBTable::getInfoHelper ( )
overrideprotected

◆ getTypes()

Sequence< Type > SAL_CALL ODBTable::getTypes ( )
overridevirtual

◆ queryInterface()

Any SAL_CALL ODBTable::queryInterface ( const css::uno::Type &  aType)
overridevirtual

◆ rename()

void SAL_CALL ODBTable::rename ( const OUString &  _rNewName)
overridevirtual

Member Data Documentation

◆ m_nPrivileges

sal_Int32 dbaccess::ODBTable::m_nPrivileges
private

Definition at line 51 of file table.hxx.

Referenced by construct(), and getFastPropertyValue().

◆ m_pColumnMediator

::rtl::Reference< OContainerMediator > dbaccess::ODBTable::m_pColumnMediator
private

Definition at line 45 of file table.hxx.

Referenced by createColumns(), and disposing().

◆ m_xColumnDefinitions

css::uno::Reference< css::container::XNameAccess > dbaccess::ODBTable::m_xColumnDefinitions
private

Definition at line 47 of file table.hxx.

Referenced by columnDropped(), createColumn(), createColumns(), and disposing().

◆ m_xDriverColumns

css::uno::Reference< css::container::XNameAccess > dbaccess::ODBTable::m_xDriverColumns
private

Definition at line 48 of file table.hxx.

Referenced by createColumn(), and disposing().


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