|
LibreOffice Module connectivity (master) 1
|
#include <TTableHelper.hxx>
Public Member Functions | |
| virtual void | refreshColumns () override |
| virtual void | refreshKeys () override |
| virtual void | refreshIndexes () override |
| const ColumnDesc * | getColumnDescription (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::KeyProperties > | getKeyProperties (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 |
Public Member Functions inherited from cppu::ImplHelper4< class Ifc1, class Ifc2, class Ifc3, class Ifc4 > | |
| virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) SAL_OVERRIDE |
| virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () SAL_OVERRIDE |
| virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () SAL_OVERRIDE |
| virtual void | refreshColumns ()=0 |
Public Member Functions inherited from comphelper::OIdPropertyArrayUsageHelper< class TYPE > | |
| OIdPropertyArrayUsageHelper () | |
| virtual | ~OIdPropertyArrayUsageHelper () |
| ::cppu::IPropertyArrayHelper * | getArrayHelper (sal_Int32 nId) |
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 () |
Public Member Functions inherited from comphelper::OPropertyContainer | |
| virtual | ~OPropertyContainer () |
Protected Member Functions | |
| virtual sdbcx::OCollection * | createColumns (const ::std::vector< OUString > &_rNames)=0 |
| creates the column collection for the table More... | |
| virtual sdbcx::OCollection * | createKeys (const ::std::vector< OUString > &_rNames)=0 |
| creates the key collection for the table More... | |
| virtual sdbcx::OCollection * | createIndexes (const ::std::vector< OUString > &_rNames)=0 |
| creates the index collection for the table More... | |
| virtual void SAL_CALL | disposing () override |
| this function is called upon disposing the component More... | |
| virtual OUString | getRenameStart () const |
| The default returns "RENAME TABLE " or "RENAME VIEW " depending on the type. More... | |
| virtual | ~OTableHelper () override |
Protected Member Functions inherited from connectivity::sdbcx::OTable | |
| virtual ::cppu::IPropertyArrayHelper * | createArrayHelper (sal_Int32 _nId) const override |
| virtual ::cppu::IPropertyArrayHelper &SAL_CALL | getInfoHelper () override |
Protected Member Functions inherited from cppu::ImplHelper4< class Ifc1, class Ifc2, class Ifc3, class Ifc4 > | |
| ~ImplHelper4 () SAL_NOEXCEPT | |
Protected Member Functions inherited from connectivity::sdbcx::IRefreshableColumns | |
| ~IRefreshableColumns () | |
| virtual ::cppu::IPropertyArrayHelper * | createArrayHelper (sal_Int32 nId) const=0 |
Protected Member Functions inherited from connectivity::sdbcx::ODescriptor | |
| ::cppu::IPropertyArrayHelper * | doCreateArrayHelper () const |
| helper for derived classes to implement OPropertyArrayUsageHelper::createArrayHelper More... | |
Protected Member Functions inherited from comphelper::OPropertyContainer | |
| OPropertyContainer (::cppu::OBroadcastHelper &_rBHelper) | |
| virtual sal_Bool SAL_CALL | convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override |
| virtual void SAL_CALL | setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override |
| virtual void SAL_CALL | getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override |
| virtual css::uno::Any SAL_CALL | getFastPropertyValue (sal_Int32 nHandle) override final |
| virtual void | getFastPropertyValue (std::unique_lock< std::mutex > &rGuard, css::uno::Any &rValue, sal_Int32 nHandle) const =0 |
| virtual void SAL_CALL | setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) override final |
Protected Member Functions inherited from comphelper::OPropertyContainerHelper | |
| OPropertyContainerHelper () | |
| ~OPropertyContainerHelper () | |
| void | registerProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType) |
| void | registerMayBeVoidProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, css::uno::Any *_pPointerToMember, const css::uno::Type &_rExpectedType) |
| void | registerPropertyNoMember (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const css::uno::Type &_rType, css::uno::Any const &_pInitialValue) |
| void | revokeProperty (sal_Int32 _nHandle) |
| bool | isRegisteredProperty (sal_Int32 _nHandle) const |
| bool | isRegisteredProperty (const OUString &_rName) const |
| bool | convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) |
| void | setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) |
| void | getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const |
| void | describeProperties (css::uno::Sequence< css::beans::Property > &_rProps) const |
| const css::beans::Property & | getProperty (const OUString &_rName) const |
Private Member Functions | |
| void | refreshPrimaryKeys (::std::vector< OUString > &_rKeys) |
| void | refreshForeignKeys (::std::vector< OUString > &_rKeys) |
Private Attributes | |
| ::std::unique_ptr< OTableHelperImpl > | m_pImpl |
Additional Inherited Members | |
Static Public Member Functions inherited from connectivity::sdbcx::ODescriptor | |
| static bool | isNew (const css::uno::Reference< css::uno::XInterface > &_rxDescriptor) |
Static Protected Member Functions inherited from comphelper::OPropertyContainer | |
| static css::uno::Sequence< css::uno::Type > | getBaseTypes () |
Protected Attributes inherited from connectivity::sdbcx::OTable | |
| OUString | m_CatalogName |
| OUString | m_SchemaName |
| OUString | m_Description |
| OUString | m_Type |
| std::unique_ptr< OCollection > | m_xKeys |
| std::unique_ptr< OCollection > | m_xColumns |
| std::unique_ptr< OCollection > | m_xIndexes |
| OCollection * | m_pTables |
Protected Attributes inherited from cppu::BaseMutex | |
| mutable::osl::Mutex | m_aMutex |
Protected Attributes inherited from connectivity::sdbcx::ODescriptor | |
| OUString | m_Name |
Definition at line 82 of file TTableHelper.hxx.
|
overrideprotectedvirtual |
Definition at line 175 of file TTableHelper.cxx.
| connectivity::OTableHelper::OTableHelper | ( | sdbcx::OCollection * | _pTables, |
| const css::uno::Reference< css::sdbc::XConnection > & | _xConnection, | ||
| bool | _bCase | ||
| ) |
| connectivity::OTableHelper::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() |
||
| ) |
| void OTableHelper::addKey | ( | const OUString & | _sName, |
| const std::shared_ptr< sdbcx::KeyProperties > & | _aKeyProperties | ||
| ) |
Definition at line 574 of file TTableHelper.cxx.
References m_pImpl.
Referenced by connectivity::OKeysHelper::appendObject().
|
overridevirtual |
Reimplemented from connectivity::sdbcx::OTable.
Reimplemented in connectivity::mysqlc::Table.
Definition at line 528 of file TTableHelper.cxx.
References connectivity::sdbcx::OTable::alterColumnByName(), connectivity::checkDisposed(), dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), getString(), index, cppu::BaseMutex::m_aMutex, connectivity::sdbcx::OTable::m_xColumns, and PROPERTY_ID_NAME.
|
protectedpure virtual |
creates the column collection for the table
| _rNames | The column names. |
Implemented in connectivity::hsqldb::OHSQLTable, connectivity::mysql::OMySQLTable, connectivity::firebird::Table, and connectivity::mysqlc::Table.
Referenced by refreshColumns().
|
protectedpure virtual |
creates the index collection for the table
| _rNames | The index names. |
Implemented in connectivity::hsqldb::OHSQLTable, connectivity::mysql::OMySQLTable, connectivity::firebird::Table, and connectivity::mysqlc::Table.
Referenced by refreshIndexes().
|
protectedpure virtual |
creates the key collection for the table
| _rNames | The key names. |
Implemented in connectivity::hsqldb::OHSQLTable, connectivity::mysql::OMySQLTable, connectivity::firebird::Table, and connectivity::mysqlc::Table.
Referenced by refreshKeys().
|
overrideprotectedvirtual |
this function is called upon disposing the component
Reimplemented from connectivity::sdbcx::OTable.
Definition at line 179 of file TTableHelper.cxx.
References connectivity::sdbcx::OTable::disposing(), cppu::BaseMutex::m_aMutex, m_pImpl, connectivity::sdbcx::OTable::m_pTables, and connectivity::sdbcx::OCollection::removeContainerListener().
| Reference< css::sdb::tools::XTableAlteration > const & OTableHelper::getAlterService | ( | ) | const |
Definition at line 594 of file TTableHelper.cxx.
References m_pImpl.
| const ColumnDesc * OTableHelper::getColumnDescription | ( | const OUString & | _sName | ) | const |
Definition at line 302 of file TTableHelper.cxx.
References m_pImpl.
Referenced by connectivity::OColumnsHelper::createObject().
| Reference< XConnection > const & OTableHelper::getConnection | ( | ) | const |
Definition at line 584 of file TTableHelper.cxx.
References m_pImpl.
Referenced by connectivity::mysql::OMySQLTable::alterColumnByName(), connectivity::hsqldb::OHSQLTable::alterColumnType(), connectivity::mysql::OMySQLTable::alterColumnType(), connectivity::OColumnsHelper::appendObject(), connectivity::OIndexesHelper::appendObject(), connectivity::OKeysHelper::appendObject(), connectivity::OIndexColumns::createObject(), connectivity::OColumnsHelper::createObject(), connectivity::OIndexesHelper::createObject(), connectivity::OColumnsHelper::dropObject(), connectivity::OIndexesHelper::dropObject(), connectivity::OKeysHelper::dropObject(), connectivity::hsqldb::OHSQLTable::executeStatement(), and connectivity::mysql::OMySQLTable::executeStatement().
| Reference< css::sdb::tools::XIndexAlteration > const & OTableHelper::getIndexService | ( | ) | const |
Definition at line 604 of file TTableHelper.cxx.
References m_pImpl.
Referenced by connectivity::OIndexesHelper::appendObject(), and connectivity::OIndexesHelper::dropObject().
| std::shared_ptr< sdbcx::KeyProperties > OTableHelper::getKeyProperties | ( | const OUString & | _sName | ) | const |
Definition at line 557 of file TTableHelper.cxx.
References m_pImpl.
Referenced by connectivity::OKeysHelper::createObject().
| Reference< css::sdb::tools::XKeyAlteration > const & OTableHelper::getKeyService | ( | ) | const |
Definition at line 599 of file TTableHelper.cxx.
References m_pImpl.
Referenced by connectivity::OKeysHelper::appendObject(), and connectivity::OKeysHelper::dropObject().
|
overridevirtual |
Reimplemented from connectivity::sdbcx::OTable.
Definition at line 523 of file TTableHelper.cxx.
References m_pImpl.
Referenced by connectivity::hsqldb::OHSQLTable::alterColumnByName(), connectivity::mysql::OMySQLTable::alterColumnByName(), connectivity::mysql::OMySQLTable::alterColumnType(), connectivity::hsqldb::OHSQLTable::alterDefaultValue(), connectivity::mysql::OMySQLTable::alterDefaultValue(), connectivity::OIndexesHelper::appendObject(), connectivity::OKeysHelper::appendObject(), connectivity::OKeyColumnsHelper::createObject(), connectivity::OIndexesHelper::createObject(), connectivity::hsqldb::OHSQLTable::dropDefaultValue(), connectivity::mysql::OMySQLTable::dropDefaultValue(), connectivity::OIndexesHelper::dropObject(), connectivity::hsqldb::OHSQLTable::getAlterTableColumnPart(), connectivity::mysql::OMySQLTable::getAlterTableColumnPart(), getName(), connectivity::OIndexHelper::refreshColumns(), connectivity::OTableKeyHelper::refreshColumns(), refreshColumns(), refreshForeignKeys(), refreshIndexes(), refreshPrimaryKeys(), connectivity::hsqldb::OHSQLTable::rename(), and rename().
|
overridevirtual |
Reimplemented from connectivity::sdbcx::OTable.
Definition at line 546 of file TTableHelper.cxx.
References dbtools::composeTableName(), getMetaData(), connectivity::sdbcx::OTable::m_CatalogName, connectivity::sdbcx::ODescriptor::m_Name, connectivity::sdbcx::OTable::m_SchemaName, and sComposedName.
Referenced by connectivity::OIndexesHelper::appendObject().
| Reference< css::sdb::tools::XTableRename > const & OTableHelper::getRenameService | ( | ) | const |
Definition at line 589 of file TTableHelper.cxx.
References m_pImpl.
|
protectedvirtual |
The default returns "RENAME TABLE " or "RENAME VIEW " depending on the type.
Reimplemented in connectivity::mysqlc::Table, and connectivity::mysql::OMySQLTable.
Definition at line 466 of file TTableHelper.cxx.
References connectivity::sdbcx::OTable::m_Type.
Referenced by rename().
| const OUString & OTableHelper::getTableName | ( | ) |
Definition at line 552 of file TTableHelper.cxx.
References connectivity::sdbcx::ODescriptor::m_Name.
|
virtual |
Reimplemented in connectivity::mysql::OMySQLTable.
Definition at line 579 of file TTableHelper.cxx.
Referenced by connectivity::OColumnsHelper::appendObject().
|
overridevirtual |
Reimplemented from connectivity::sdbcx::OTable.
Definition at line 259 of file TTableHelper.cxx.
References Any, copy(), createColumns(), connectivity::sdbcx::OTable::getColumns(), getMetaData(), connectivity::sdbcx::ODescriptor::isNew(), connectivity::sdbcx::OTable::m_CatalogName, connectivity::sdbcx::ODescriptor::m_Name, m_pImpl, connectivity::sdbcx::OTable::m_SchemaName, and connectivity::sdbcx::OTable::m_xColumns.
Referenced by connectivity::OColumnsHelper::impl_refresh().
|
private |
Definition at line 348 of file TTableHelper.cxx.
References connectivity::sdbcx::OCollection::addContainerListener(), aName, Any, dbtools::composeTableName(), getMetaData(), connectivity::sdbcx::OCollection::hasByName(), connectivity::sdbcx::OTable::m_CatalogName, connectivity::sdbcx::ODescriptor::m_Name, m_pImpl, connectivity::sdbcx::OTable::m_pTables, connectivity::sdbcx::OTable::m_SchemaName, and sCatalog.
Referenced by refreshKeys().
|
overridevirtual |
Reimplemented from connectivity::sdbcx::OTable.
Definition at line 426 of file TTableHelper.cxx.
References aName, Any, createIndexes(), getMetaData(), connectivity::sdbcx::ODescriptor::isNew(), connectivity::sdbcx::OTable::m_CatalogName, connectivity::sdbcx::ODescriptor::m_Name, connectivity::sdbcx::OTable::m_SchemaName, and connectivity::sdbcx::OTable::m_xIndexes.
Referenced by connectivity::OIndexesHelper::impl_refresh().
|
overridevirtual |
Reimplemented from connectivity::sdbcx::OTable.
Definition at line 406 of file TTableHelper.cxx.
References createKeys(), connectivity::sdbcx::ODescriptor::isNew(), m_pImpl, connectivity::sdbcx::OTable::m_xKeys, refreshForeignKeys(), and refreshPrimaryKeys().
Referenced by connectivity::OKeysHelper::impl_refresh().
|
private |
Definition at line 312 of file TTableHelper.cxx.
References Any, getMetaData(), connectivity::sdbcx::OTable::m_CatalogName, connectivity::sdbcx::ODescriptor::m_Name, m_pImpl, connectivity::sdbcx::OTable::m_SchemaName, and SAL_WARN_IF.
Referenced by refreshKeys().
|
overridevirtual |
Reimplemented from connectivity::sdbcx::OTable.
Reimplemented in connectivity::hsqldb::OHSQLTable, and connectivity::firebird::Table.
Definition at line 478 of file TTableHelper.cxx.
References connectivity::checkDisposed(), dbtools::composeTableName(), getMetaData(), getRenameStart(), connectivity::sdbcx::ODescriptor::isNew(), cppu::BaseMutex::m_aMutex, connectivity::sdbcx::OTable::m_CatalogName, connectivity::sdbcx::ODescriptor::m_Name, m_pImpl, connectivity::sdbcx::OTable::m_SchemaName, newName(), dbtools::qualifiedNameComponents(), connectivity::sdbcx::OTable::rename(), sCatalog, sComposedName, and sSchema.
|
private |
Definition at line 84 of file TTableHelper.hxx.
Referenced by addKey(), disposing(), getAlterService(), getColumnDescription(), getConnection(), getIndexService(), getKeyProperties(), getKeyService(), getMetaData(), getRenameService(), refreshColumns(), refreshForeignKeys(), refreshKeys(), refreshPrimaryKeys(), and rename().