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

encapsulates access to the view of a database object. More...

#include <databaseobjectview.hxx>

Inheritance diagram for dbaui::DatabaseObjectView:
[legend]

Public Member Functions

 DatabaseObjectView (const css::uno::Reference< css::uno::XComponentContext > &_rxORB, const css::uno::Reference< css::sdb::application::XDatabaseDocumentUI > &_rxApplication, const css::uno::Reference< css::frame::XFrame > &_rxParentFrame, OUString _sComponentURL)
 
virtual ~DatabaseObjectView ()
 
void setTargetFrame (const css::uno::Reference< css::frame::XFrame > &_rxFrame)
 sets the target frame into which the view should be loaded. More...
 
css::uno::Reference< css::lang::XComponent > createNew (const css::uno::Reference< css::sdbc::XDataSource > &_xDataSource, const ::comphelper::NamedValueCollection &i_rDispatchArgs=::comphelper::NamedValueCollection())
 opens a view for a to-be-created object More...
 
css::uno::Reference< css::lang::XComponent > openExisting (const css::uno::Any &_aDataSource, const OUString &_rName, const ::comphelper::NamedValueCollection &i_rDispatchArgs)
 opens a view for an existent object More...
 

Protected Member Functions

virtual css::uno::Reference< css::lang::XComponent > doCreateView (const css::uno::Any &_rDataSource, const OUString &_rObjectName, const ::comphelper::NamedValueCollection &i_rCreationArgs)
 creates the desired view More...
 
virtual void fillDispatchArgs (::comphelper::NamedValueCollection &i_rDispatchArgs, const css::uno::Any &_rDataSource, const OUString &_rObjectName)
 
const css::uno::Reference< css::sdb::application::XDatabaseDocumentUI > & getApplicationUI () const
 
css::uno::Reference< css::sdbc::XConnection > getConnection () const
 

Private Member Functions

css::uno::Reference< css::lang::XComponent > doDispatch (const ::comphelper::NamedValueCollection &i_rDispatchArgs)
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > m_xORB
 
css::uno::Reference< css::frame::XFrame > m_xParentFrame
 
css::uno::Reference< css::frame::XComponentLoader > m_xFrameLoader
 
css::uno::Reference< css::sdb::application::XDatabaseDocumentUI > m_xApplication
 
OUString m_sComponentURL
 

Detailed Description

encapsulates access to the view of a database object.

Definition at line 39 of file databaseobjectview.hxx.

Constructor & Destructor Documentation

◆ DatabaseObjectView()

dbaui::DatabaseObjectView::DatabaseObjectView ( const css::uno::Reference< css::uno::XComponentContext > &  _rxORB,
const css::uno::Reference< css::sdb::application::XDatabaseDocumentUI > &  _rxApplication,
const css::uno::Reference< css::frame::XFrame > &  _rxParentFrame,
OUString  _sComponentURL 
)

Definition at line 52 of file databaseobjectview.cxx.

References m_xApplication, and m_xORB.

◆ ~DatabaseObjectView()

virtual dbaui::DatabaseObjectView::~DatabaseObjectView ( )
inlinevirtual

Definition at line 96 of file databaseobjectview.hxx.

Member Function Documentation

◆ createNew()

Reference< XComponent > dbaui::DatabaseObjectView::createNew ( const css::uno::Reference< css::sdbc::XDataSource > &  _xDataSource,
const ::comphelper::NamedValueCollection i_rDispatchArgs = ::comphelper::NamedValueCollection() 
)

opens a view for a to-be-created object

Parameters
_xDataSourcethe data source for which a new object is to be created
Returns
the controller of the newly created document

Definition at line 73 of file databaseobjectview.cxx.

References Any, and doCreateView().

Referenced by dbaui::OApplicationController::Execute().

◆ doCreateView()

Reference< XComponent > dbaui::DatabaseObjectView::doCreateView ( const css::uno::Any &  _rDataSource,
const OUString &  _rObjectName,
const ::comphelper::NamedValueCollection i_rCreationArgs 
)
protectedvirtual

creates the desired view

The default implementation will call <member>fillDispatchArgs</member>, followed by <member>doDispatch</member>.

Parameters
_rDataSourcethe data source, as passed to the <member>createNew</member> or <member>openExisting</member> method.
_rObjectNamethe name of the object for which the view is to be opened, or an empty string if a view for a new object should be created.
_rCreationArgsthe arguments for the view's creation

Reimplemented in dbaui::TableDesigner.

Definition at line 84 of file databaseobjectview.cxx.

References doDispatch(), fillDispatchArgs(), and comphelper::NamedValueCollection::merge().

Referenced by createNew(), dbaui::TableDesigner::doCreateView(), and openExisting().

◆ doDispatch()

Reference< XComponent > dbaui::DatabaseObjectView::doDispatch ( const ::comphelper::NamedValueCollection i_rDispatchArgs)
private

◆ fillDispatchArgs()

void dbaui::DatabaseObjectView::fillDispatchArgs ( ::comphelper::NamedValueCollection i_rDispatchArgs,
const css::uno::Any &  _rDataSource,
const OUString &  _rObjectName 
)
protectedvirtual

◆ getApplicationUI()

const css::uno::Reference< css::sdb::application::XDatabaseDocumentUI > & dbaui::DatabaseObjectView::getApplicationUI ( ) const
inlineprotected

◆ getConnection()

Reference< XConnection > dbaui::DatabaseObjectView::getConnection ( ) const
protected

◆ openExisting()

Reference< XComponent > dbaui::DatabaseObjectView::openExisting ( const css::uno::Any &  _aDataSource,
const OUString &  _rName,
const ::comphelper::NamedValueCollection i_rDispatchArgs 
)

opens a view for an existent object

Parameters
_xDataSourcethe data source for which a new object is to be created
_rObjectNamethe name of the object to be edited
_rArgsAdditional settings which should be forwarded to the frame
Returns
the frame into which the view has been loaded

Definition at line 78 of file databaseobjectview.cxx.

References doCreateView().

◆ setTargetFrame()

void dbaui::DatabaseObjectView::setTargetFrame ( const css::uno::Reference< css::frame::XFrame > &  _rxFrame)
inline

sets the target frame into which the view should be loaded.

By default, the view is loaded into a top-level frame not being part of the Desktop.

Definition at line 103 of file databaseobjectview.hxx.

References m_xFrameLoader.

Member Data Documentation

◆ m_sComponentURL

OUString dbaui::DatabaseObjectView::m_sComponentURL
private

Definition at line 50 of file databaseobjectview.hxx.

Referenced by doDispatch().

◆ m_xApplication

css::uno::Reference< css::sdb::application::XDatabaseDocumentUI > dbaui::DatabaseObjectView::m_xApplication
private

Definition at line 49 of file databaseobjectview.hxx.

Referenced by DatabaseObjectView(), getApplicationUI(), and getConnection().

◆ m_xFrameLoader

css::uno::Reference< css::frame::XComponentLoader > dbaui::DatabaseObjectView::m_xFrameLoader
private

Definition at line 47 of file databaseobjectview.hxx.

Referenced by doDispatch(), and setTargetFrame().

◆ m_xORB

css::uno::Reference< css::uno::XComponentContext > dbaui::DatabaseObjectView::m_xORB
private

Definition at line 43 of file databaseobjectview.hxx.

Referenced by DatabaseObjectView(), and doDispatch().

◆ m_xParentFrame

css::uno::Reference< css::frame::XFrame > dbaui::DatabaseObjectView::m_xParentFrame
private

Definition at line 45 of file databaseobjectview.hxx.

Referenced by doDispatch().


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