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

#include <WCopyTable.hxx>

Inheritance diagram for dbaui::ObjectCopySource:
[legend]
Collaboration diagram for dbaui::ObjectCopySource:
[legend]

Public Member Functions

 ObjectCopySource (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const css::uno::Reference< css::beans::XPropertySet > &_rxObject)
 
virtual OUString getQualifiedObjectName () const override
 retrieves the fully qualified name of the object to copy More...
 
virtual bool isView () const override
 determines whether the object is a view More...
 
virtual void copyUISettingsTo (const css::uno::Reference< css::beans::XPropertySet > &_rxObject) const override
 copies the UI settings of the object to the given target object. More...
 
virtual void copyFilterAndSortingTo (const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Reference< css::beans::XPropertySet > &_rxObject) const override
 copies the filter and sorting More...
 
virtual css::uno::Sequence< OUString > getColumnNames () const override
 retrieves the column names of the to-be-copied object More...
 
virtual css::uno::Sequence< OUString > getPrimaryKeyColumnNames () const override
 retrieves the names of the primary keys of the to-be-copied object More...
 
virtual OFieldDescriptioncreateFieldDescription (const OUString &_rColumnName) const override
 creates a OFieldDescription for the given column of the to-be-copied object More...
 
virtual OUString getSelectStatement () const override
 returns the SELECT statement which can be used to retrieve the data of the to-be-copied object More...
 
virtual ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement > getPreparedSelectStatement () const override
 returns the prepared statement which can be used to retrieve the data of the to-be-copied object More...
 
- Public Member Functions inherited from dbaui::ICopyTableSourceObject
virtual OUString getQualifiedObjectName () const =0
 retrieves the fully qualified name of the object to copy More...
 
virtual bool isView () const =0
 determines whether the object is a view More...
 
virtual void copyUISettingsTo (const css::uno::Reference< css::beans::XPropertySet > &_rxObject) const =0
 copies the UI settings of the object to the given target object. More...
 
virtual css::uno::Sequence< OUString > getColumnNames () const =0
 retrieves the column names of the to-be-copied object More...
 
virtual css::uno::Sequence< OUString > getPrimaryKeyColumnNames () const =0
 retrieves the names of the primary keys of the to-be-copied object More...
 
virtual OFieldDescriptioncreateFieldDescription (const OUString &_rColumnName) const =0
 creates a OFieldDescription for the given column of the to-be-copied object More...
 
virtual OUString getSelectStatement () const =0
 returns the SELECT statement which can be used to retrieve the data of the to-be-copied object More...
 
virtual void copyFilterAndSortingTo (const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Reference< css::beans::XPropertySet > &_rxObject) const =0
 copies the filter and sorting More...
 
virtual ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement > getPreparedSelectStatement () const =0
 returns the prepared statement which can be used to retrieve the data of the to-be-copied object More...
 
virtual ~ICopyTableSourceObject ()
 

Private Attributes

css::uno::Reference< css::sdbc::XConnection > m_xConnection
 
css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData
 
css::uno::Reference< css::beans::XPropertySetm_xObject
 
css::uno::Reference< css::beans::XPropertySetInfo > m_xObjectPSI
 
css::uno::Reference< css::container::XNameAccess > m_xObjectColumns
 

Detailed Description

Definition at line 140 of file WCopyTable.hxx.

Constructor & Destructor Documentation

◆ ObjectCopySource()

ObjectCopySource::ObjectCopySource ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection,
const css::uno::Reference< css::beans::XPropertySet > &  _rxObject 
)

Definition at line 95 of file WCopyTable.cxx.

Member Function Documentation

◆ copyFilterAndSortingTo()

void ObjectCopySource::copyFilterAndSortingTo ( const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
const css::uno::Reference< css::beans::XPropertySet > &  _rxObject 
) const
overridevirtual

copies the filter and sorting

Returns

Implements dbaui::ICopyTableSourceObject.

Definition at line 146 of file WCopyTable.cxx.

References Any, aProperties, Exception, m_xConnection, m_xObject, m_xObjectPSI, PROPERTY_APPLYFILTER(), PROPERTY_FILTER(), and PROPERTY_ORDER().

◆ copyUISettingsTo()

void ObjectCopySource::copyUISettingsTo ( const css::uno::Reference< css::beans::XPropertySet > &  _rxObject) const
overridevirtual

copies the UI settings of the object to the given target object.

Might be ignored by implementations which do not have Ui settings.

Implements dbaui::ICopyTableSourceObject.

Definition at line 134 of file WCopyTable.cxx.

References m_xObject, m_xObjectPSI, PROPERTY_FONT(), PROPERTY_ROW_HEIGHT(), PROPERTY_TEXTCOLOR(), PROPERTY_TEXTEMPHASIS(), PROPERTY_TEXTLINECOLOR(), and PROPERTY_TEXTRELIEF().

◆ createFieldDescription()

OFieldDescription * ObjectCopySource::createFieldDescription ( const OUString &  _rColumnName) const
overridevirtual

creates a OFieldDescription for the given column of the to-be-copied object

Implements dbaui::ICopyTableSourceObject.

Definition at line 201 of file WCopyTable.cxx.

References m_xObjectColumns, and xColumn.

◆ getColumnNames()

Sequence< OUString > ObjectCopySource::getColumnNames ( ) const
overridevirtual

retrieves the column names of the to-be-copied object

Implements dbaui::ICopyTableSourceObject.

Definition at line 187 of file WCopyTable.cxx.

References m_xObjectColumns.

Referenced by getSelectStatement().

◆ getPreparedSelectStatement()

utl::SharedUNOComponent< XPreparedStatement > ObjectCopySource::getPreparedSelectStatement ( ) const
overridevirtual

returns the prepared statement which can be used to retrieve the data of the to-be-copied object

The default implementation of this method will simply prepare a statement with the return value of ->getSelectStatement.

Implements dbaui::ICopyTableSourceObject.

Definition at line 243 of file WCopyTable.cxx.

References getSelectStatement(), and m_xConnection.

◆ getPrimaryKeyColumnNames()

Sequence< OUString > ObjectCopySource::getPrimaryKeyColumnNames ( ) const
overridevirtual

retrieves the names of the primary keys of the to-be-copied object

Implements dbaui::ICopyTableSourceObject.

Definition at line 192 of file WCopyTable.cxx.

References getPrimaryKeyColumns_throw(), and m_xObject.

◆ getQualifiedObjectName()

OUString ObjectCopySource::getQualifiedObjectName ( ) const
overridevirtual

retrieves the fully qualified name of the object to copy

Implements dbaui::ICopyTableSourceObject.

Definition at line 104 of file WCopyTable.cxx.

References m_xMetaData, m_xObject, m_xObjectPSI, PROPERTY_COMMAND(), PROPERTY_NAME(), and sName.

◆ getSelectStatement()

OUString ObjectCopySource::getSelectStatement ( ) const
overridevirtual

returns the SELECT statement which can be used to retrieve the data of the to-be-copied object

Implements dbaui::ICopyTableSourceObject.

Definition at line 207 of file WCopyTable.cxx.

References getColumnNames(), m_xConnection, m_xMetaData, m_xObject, m_xObjectPSI, PROPERTY_COMMAND(), and sQuote.

Referenced by getPreparedSelectStatement().

◆ isView()

bool ObjectCopySource::isView ( ) const
overridevirtual

determines whether the object is a view

Implements dbaui::ICopyTableSourceObject.

Definition at line 115 of file WCopyTable.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, m_xObject, m_xObjectPSI, and PROPERTY_TYPE().

Member Data Documentation

◆ m_xConnection

css::uno::Reference< css::sdbc::XConnection > dbaui::ObjectCopySource::m_xConnection
private

◆ m_xMetaData

css::uno::Reference< css::sdbc::XDatabaseMetaData > dbaui::ObjectCopySource::m_xMetaData
private

Definition at line 144 of file WCopyTable.hxx.

Referenced by getQualifiedObjectName(), and getSelectStatement().

◆ m_xObject

css::uno::Reference< css::beans::XPropertySet > dbaui::ObjectCopySource::m_xObject
private

◆ m_xObjectColumns

css::uno::Reference< css::container::XNameAccess > dbaui::ObjectCopySource::m_xObjectColumns
private

Definition at line 147 of file WCopyTable.hxx.

Referenced by createFieldDescription(), and getColumnNames().

◆ m_xObjectPSI

css::uno::Reference< css::beans::XPropertySetInfo > dbaui::ObjectCopySource::m_xObjectPSI
private

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