LibreOffice Module connectivity (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
connectivity::mysql::OTables Class Referencefinal

#include <YTables.hxx>

Inheritance diagram for connectivity::mysql::OTables:
[legend]
Collaboration diagram for connectivity::mysql::OTables:
[legend]

Public Member Functions

 OTables (css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData, ::cppu::OWeakObject &_rParent, ::osl::Mutex &_rMutex, const ::std::vector< OUString > &_rVector)
 
virtual void disposing () override
 
void appendNew (const OUString &_rsNewTable)
 
virtual void addComment (const css::uno::Reference< css::beans::XPropertySet > &descriptor, OUStringBuffer &_rOut) override
 
- Public Member Functions inherited from connectivity::sdbcx::OCollection
virtual ~OCollection ()
 
 DECLARE_SERVICE_INFO ()
 
void reFill (const ::std::vector< OUString > &_rVector)
 
bool isCaseSensitive () const
 
void renameObject (const OUString &_sOldName, const OUString &_sNewName)
 
virtual void disposing ()
 
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 css::uno::Type SAL_CALL getElementType () override
 
virtual sal_Bool SAL_CALL hasElements () override
 
virtual sal_Int32 SAL_CALL getCount () override
 
virtual css::uno::Any SAL_CALL getByIndex (sal_Int32 Index) override
 
virtual css::uno::Any SAL_CALL getByName (const OUString &aName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames () override
 
virtual sal_Bool SAL_CALL hasByName (const OUString &aName) override
 
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration () override
 
virtual void SAL_CALL refresh () override
 
virtual void SAL_CALL addRefreshListener (const css::uno::Reference< css::util::XRefreshListener > &l) override
 
virtual void SAL_CALL removeRefreshListener (const css::uno::Reference< css::util::XRefreshListener > &l) override
 
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor () override
 
virtual void SAL_CALL appendByDescriptor (const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
 
virtual void SAL_CALL dropByName (const OUString &elementName) override
 
virtual void SAL_CALL dropByIndex (sal_Int32 index) override
 
virtual sal_Int32 SAL_CALL findColumn (const OUString &columnName) override
 
virtual void SAL_CALL addContainerListener (const css::uno::Reference< css::container::XContainerListener > &xListener) override
 
virtual void SAL_CALL removeContainerListener (const css::uno::Reference< css::container::XContainerListener > &xListener) override
 
- Public Member Functions inherited from cppu::ImplHelper10< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >
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 addComment (const css::uno::Reference< css::beans::XPropertySet > &descriptor, OUStringBuffer &_rOut)=0
 

Static Public Member Functions

static OUString adjustSQL (const OUString &_sSql)
 convert the sql statement to fit MySQL notation More...
 

Private Member Functions

virtual sdbcx::ObjectType createObject (const OUString &_rName) override
 
virtual void impl_refresh () override
 
virtual css::uno::Reference< css::beans::XPropertySetcreateDescriptor () override
 
virtual sdbcx::ObjectType appendObject (const OUString &_rForName, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
 appends an object described by a descriptor, under a given name More...
 
virtual void dropObject (sal_Int32 _nPos, const OUString &_sElementName) override
 
void createTable (const css::uno::Reference< css::beans::XPropertySet > &descriptor)
 
virtual OUString getNameForObject (const sdbcx::ObjectType &_xObject) override
 returns the name for the object. More...
 

Private Attributes

css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData
 

Additional Inherited Members

- Protected Member Functions inherited from connectivity::sdbcx::OCollection
virtual void impl_refresh ()=0
 
virtual ObjectType createObject (const OUString &_rName)=0
 
virtual css::uno::Reference< css::beans::XPropertySetcreateDescriptor ()
 
virtual ObjectType appendObject (const OUString &_rForName, const css::uno::Reference< css::beans::XPropertySet > &descriptor)
 appends an object described by a descriptor, under a given name More...
 
virtual void dropObject (sal_Int32 _nPos, const OUString &_sElementName)
 
virtual OUString getNameForObject (const ObjectType &_xObject)
 returns the name for the object. More...
 
ObjectType cloneDescriptor (const ObjectType &_descriptor)
 clones the given descriptor More...
 
 OCollection (::cppu::OWeakObject &_rParent, bool _bCase, ::osl::Mutex &_rMutex, const ::std::vector< OUString > &_rVector, bool _bUseIndexOnly=false, bool _bUseHardRef=true)
 
void clear_NoDispose ()
 clear the name map More...
 
void insertElement (const OUString &_sElementName, const ObjectType &_xElement)
 insert a new element into the collection More...
 
ObjectType getObject (sal_Int32 _nIndex)
 return the object, if not existent it creates it. More...
 
- Protected Member Functions inherited from cppu::ImplHelper10< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >
 ~ImplHelper10 () SAL_NOEXCEPT
 
- Protected Member Functions inherited from dbtools::ISQLStatementHelper
 ~ISQLStatementHelper ()
 
- Protected Attributes inherited from connectivity::sdbcx::OCollection
::std::unique_ptr< IObjectCollectionm_pElements
 
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > m_aContainerListeners
 
::comphelper::OInterfaceContainerHelper3< css::util::XRefreshListener > m_aRefreshListeners
 
::cppu::OWeakObjectm_rParent
 
::osl::Mutex & m_rMutex
 
bool m_bUseIndexOnly
 

Detailed Description

Definition at line 27 of file YTables.hxx.

Constructor & Destructor Documentation

◆ OTables()

connectivity::mysql::OTables::OTables ( css::uno::Reference< css::sdbc::XDatabaseMetaData >  _xMetaData,
::cppu::OWeakObject _rParent,
::osl::Mutex &  _rMutex,
const ::std::vector< OUString > &  _rVector 
)
inline

Definition at line 41 of file YTables.hxx.

Member Function Documentation

◆ addComment()

void OTables::addComment ( const css::uno::Reference< css::beans::XPropertySet > &  descriptor,
OUStringBuffer &  _rOut 
)
overridevirtual

◆ adjustSQL()

OUString OTables::adjustSQL ( const OUString &  _sSql)
static

convert the sql statement to fit MySQL notation

Parameters
_sSqlin/out

Definition at line 145 of file YTables.cxx.

References nIndex, and nPos.

Referenced by connectivity::mysql::OMySQLTable::alterColumnByName(), and connectivity::mysql::OMySQLTable::alterColumnType().

◆ appendNew()

void connectivity::mysql::OTables::appendNew ( const OUString &  _rsNewTable)

◆ appendObject()

virtual sdbcx::ObjectType connectivity::mysql::OTables::appendObject ( const OUString &  _rForName,
const css::uno::Reference< css::beans::XPropertySet > &  descriptor 
)
overrideprivatevirtual

appends an object described by a descriptor, under a given name

Parameters
_rForNameis the name under which the object should be appended. Guaranteed to not be empty. This is passed for convenience only, since it's the result of a call of getNameForObject for the given descriptor
descriptordescribes the object to append
Returns
the new object which is to be inserted into the collection. This might be the result of a call of createObject( _rForName ), or a clone of the descriptor.

Reimplemented from connectivity::sdbcx::OCollection.

◆ createDescriptor()

virtual css::uno::Reference< css::beans::XPropertySet > connectivity::mysql::OTables::createDescriptor ( )
overrideprivatevirtual

Reimplemented from connectivity::sdbcx::OCollection.

◆ createObject()

virtual sdbcx::ObjectType connectivity::mysql::OTables::createObject ( const OUString &  _rName)
overrideprivatevirtual

◆ createTable()

void connectivity::mysql::OTables::createTable ( const css::uno::Reference< css::beans::XPropertySet > &  descriptor)
private

◆ disposing()

virtual void connectivity::mysql::OTables::disposing ( )
overridevirtual

Reimplemented from connectivity::sdbcx::OCollection.

◆ dropObject()

virtual void connectivity::mysql::OTables::dropObject ( sal_Int32  _nPos,
const OUString &  _sElementName 
)
overrideprivatevirtual

Reimplemented from connectivity::sdbcx::OCollection.

◆ getNameForObject()

virtual OUString connectivity::mysql::OTables::getNameForObject ( const sdbcx::ObjectType _xObject)
overrideprivatevirtual

returns the name for the object.

The default implementation ask for the property NAME. If this doesn't satisfy, it has to be overridden.

Parameters
_xObjectThe object where the name should be extracted.
Returns
The name of the object.

Reimplemented from connectivity::sdbcx::OCollection.

◆ impl_refresh()

virtual void connectivity::mysql::OTables::impl_refresh ( )
overrideprivatevirtual
Exceptions
css::uno::RuntimeException

Implements connectivity::sdbcx::OCollection.

Member Data Documentation

◆ m_xMetaData

css::uno::Reference< css::sdbc::XDatabaseMetaData > connectivity::mysql::OTables::m_xMetaData
private

Definition at line 30 of file YTables.hxx.


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