Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > fc480f9d5aabed8eeaffe8ad3401a94c > files > 5342

openoffice.org-devel-doc-3.2.1-0.3mdv2010.2.i586.rpm

<html>
<head>
<title>Interface XDatabaseDocumentUI</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../idl.css">
</head>
<body>
<div id="adc-idlref">

<a name="_top_"> </a><table class="navimain" border="0" cellpadding="3">
<tr>
<td class="navimain"><a href="../../module-ix.html" class="navimain">Overview</a></td>
<td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td>
<td class="navimain"><a href="XDatabaseDocumentUI-xref.html" class="navimain">Use</a></td>
<td class="navimainnone">Devguide</td>
<td class="navimain"><a href="../../../../../index-files/index-1.html" class="navimain">Index</a></td>
</tr>
</table>
<table class="navisub" border="0" cellpadding="0">
<tr>
<td class="navisub"><a href="#MethodsSummary" class="navisub">Methods' Summary</a></td>
<td class="navisub"><a href="#AttributesSummary" class="navisub">Attributes' Summary</a></td>
<td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td>
<td class="navisub"><a href="#AttributesDetails" class="navisub">Attributes' Details</a></td>
</tr>
</table>
<hr>
<table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;">
<tr>
<td><p class="namechain"><a href="../../../../../module-ix.html" class="namechain">::</a> <a href="../../../../module-ix.html" class="namechain">com</a> :: <a href="../../../module-ix.html" class="namechain">sun</a> :: <a href="../../module-ix.html" class="namechain">star</a> :: <a href="../module-ix.html" class="namechain">sdb</a> :: <a href="module-ix.html" class="namechain">application</a> :: </p>
</td>
</tr>
<tr>
<td class="title"><table class="title-table" width="99%">
<tr>
<td width="25%" class="title2">unpublished </td>
<td width="50%" class="title">interface XDatabaseDocumentUI</td>
<td width="*"/></tr>
</table>
</td>
</tr>
<tr>
<td/></tr>
<tr>
<td><dl>
<dt><b>Usage Restrictions</b></dt>
<dd><i>not published</i></dd>
<dt><b>Description</b></dt>
<dd>provides access to the user interface of a database document

 </dd>
<dd><p>This interface is available when a database document has been loaded into
 a frame, at the controller of this frame.</p>

 </dd>
<dt><b>Since </b></dt>
<dd>OpenOffice 2.2.0</dd>
<dt><b>See also</b></dt>
<dd>::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/Controller.html">Controller</a>, ::com::sun::star::<a href="../module-ix.html">sdb</a>::<a href="../DatabaseDocument.html">DatabaseDocument</a></dd>
</dl>
</td>
</tr>
</table>
<hr>
<a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Methods' Summary</td>
</tr>
<tr>
<td class="imsum_left"><a href="#isConnected">isConnected</a></td>
<td class="imsum_right">determines whether the application is currently connected to the database
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#connect">connect</a></td>
<td class="imsum_right">lets the application connect to the database

 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#closeSubComponents">closeSubComponents</a></td>
<td class="imsum_right">closes all sub components of the database document.

 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#loadComponent">loadComponent</a></td>
<td class="imsum_right">loads the given sub component of the database document

 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#loadComponentWithArguments">loadComponentWithArguments</a></td>
<td class="imsum_right">loads the given sub component of the database document

 &nbsp;</td>
</tr>
</table>
<a name="AttributesSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Attributes' Summary</td>
</tr>
<tr>
<td class="imsum_left"><a href="#DataSource">DataSource</a></td>
<td class="imsum_right">provides access to the data source belong to the database document
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#ApplicationMainWindow">ApplicationMainWindow</a></td>
<td class="imsum_right">provides access to the applicatio's main window

 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#ActiveConnection">ActiveConnection</a></td>
<td class="imsum_right">provides access to the current connection of the application

 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#SubComponents">SubComponents</a></td>
<td class="imsum_right">contains all sub components of the database document

 &nbsp;</td>
</tr>
</table>
<a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle">Methods' Details</td>
</tr>
<tr>
<td class="imdetail"><a name="isConnected" class="membertitle">isConnected</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">boolean</td>
</tr>
<tr>
<td valign="top"><b>isConnected</b>();</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>determines whether the application is currently connected to the database
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="connect" class="membertitle">connect</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">void</td>
</tr>
<tr>
<td valign="top"><b>connect</b>()</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../../sdbc/module-ix.html">sdbc</a>::<a href="../../sdbc/SQLException.html">SQLException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>lets the application connect to the database

 </dd>
<dd><p>If the application is already connected, nothing happens. If it is not
 connected, the application will try to establish a connection by using
 ::com::sun::star::<a href="../../sdbc/module-ix.html">sdbc</a>::<a href="../../sdbc/XDataSource.html">XDataSource</a>::<a href="../../sdbc/XDataSource.html#getConnection">getConnection</a>
 with the current settings, as specified in the
 ::com::sun::star::<a href="../module-ix.html">sdb</a>::<a href="../DataSource.html">DataSource</a>::<a href="../DataSource.html#Settings">Settings</a> member.</p>

 <p>If the connection cannot be established, the respective error message is shown
 in the application window.</p>

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::sdbc::SQLException
 if the connection cannot be established
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="closeSubComponents" class="membertitle">closeSubComponents</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">boolean</td>
</tr>
<tr>
<td valign="top"><b>closeSubComponents</b>();</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>closes all sub components of the database document.

 </dd>
<dd><p>During working with the database, the user might open different sub components:
 forms, reports, tables, queries. If you need to close all those documents, use
 <code>closeSubComponents</code>, which will gracefully do this.</p>

 <p>In a first step, the sub components will be suspended
 (::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/XController.html">XController</a>::<a href="../../frame/XController.html#suspend">suspend</a>). There
 are basically two reasons why suspending a single sub component can fail: The
 user might veto it (she's asked if the document is currently modified), and
 the component might be uncloseable currently, e.g. due to an open modal
 dialog, or a long-lasting operation running currently (e.g. printing).</p>

 <p>Once all sub components have been suspended, they will, in a second step,
 be closed. Again, closing might be vetoed by other instances, e.g. by a close
 listener registered at the component.</p>

 </dd>
<dt><b>Returns</b></dt>
<dd><b>true</b> if and only if both suspending and closing all sub components succeeds.

 </dd>
<dt><b>Since </b></dt>
<dd>OpenOffice 3.0</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="loadComponent" class="membertitle">loadComponent</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">::com::sun::star::<a href="../../lang/module-ix.html">lang</a>::<a href="../../lang/XComponent.html">XComponent</a></td>
</tr>
<tr>
<td valign="top"><b>loadComponent</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;ObjectType,</td>
</tr>
<tr>
<td/><td valign="top">[in] string</td>
<td valign="bottom">&nbsp;ObjectName,</td>
</tr>
<tr>
<td/><td valign="top">[in] boolean</td>
<td valign="bottom">&nbsp;ForEditing )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../../lang/module-ix.html">lang</a>::<a href="../../lang/IllegalArgumentException.html">IllegalArgumentException</a>,<br>
::com::sun::star::<a href="../../container/module-ix.html">container</a>::<a href="../../container/NoSuchElementException.html">NoSuchElementException</a>,<br>
::com::sun::star::<a href="../../sdbc/module-ix.html">sdbc</a>::<a href="../../sdbc/SQLException.html">SQLException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>loads the given sub component of the database document

 </dd>
<dd><p>This method allows programmatic access to the functionality which is present in the UI:
 it allows opening a table, query, form, or report for either editing or viewing.</p>

 <p>This method is a convenience wrapper for API which is also available otherwise. For instance,
 for loading forms and reports, you could use the ::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/XComponentLoader.html">XComponentLoader</a>
 interface of the ::com::sun::star::<a href="../module-ix.html">sdb</a>::<a href="../Forms.html">Forms</a> resp. ::com::sun::star::<a href="../module-ix.html">sdb</a>::<a href="../Reports.html">Reports</a>
 collections.</p>

 <p>Note there must exist a connection to the database before you can call this method.</p>

 <p>If an error occurs opening the given object, then this is reported to the user via an error dialog.</p>

 </dd>
<dt><b>Parameter ObjectType</b></dt>
<dd>specifies the type of the object, must be one of the <a href="DatabaseObject.html">DatabaseObject</a>
 constants.

 </dd>
<dt><b>Parameter ObjectName</b></dt>
<dd>specifies the name of the object. In case hierachical objects are supported
 (as is the case form forms and reports), hierarchical names are supported here, too.

 </dd>
<dt><b>Parameter ForEditing</b></dt>
<dd>specifies whether the object should be opened for editing (<b>true</b>) or viewing (<b>false</b>).

 <p>For the different object types, this means the following
 <a name="component_types"></a>
 <table style="width:100%;" border="1 solid black" cellpadding="2" cellspacing="2"><tbody>
 <tr style="vertical-align: top;">
 <td></td>
 <td><code>ForEditing</code> = <b>true</b></td>
 <td><code>ForEditing</code> = <b>false</b></td>
 </tr>

 <tr style="vertical-align: top;">
 <td><em>Tables</em></td>
 <td>A table designer is opened, and allows to edit the structure of the table.
 See also ::com::sun::star::<a href="../module-ix.html">sdb</a>::<a href="../TableDesign.html">TableDesign</a></td>
 <td>A table data view is opened, and allows to view and edit the data contained in the table.
 See also ::com::sun::star::<a href="../module-ix.html">sdb</a>::<a href="../DataSourceBrowser.html">DataSourceBrowser</a></td>
 </tr>

 <tr style="vertical-align: top;">
 <td><em>Queries</em></td>
 <td>A query designer is opened, and allows to edit the statement constituting the query.
 See also ::com::sun::star::<a href="../module-ix.html">sdb</a>::<a href="../QueryDesign.html">QueryDesign</a></td>
 <td>A table data view is opened, and allows to view and edit the data contained in the query.
 See also ::com::sun::star::<a href="../module-ix.html">sdb</a>::<a href="../DataSourceBrowser.html">DataSourceBrowser</a></td>
 </tr>

 <tr style="vertical-align: top;">
 <td><em>Forms</em></td>
 <td>The form document is opened in design mode, that is, you can modify it.</td>
 <td>The form document is opened in read-only mode, allowing you to view and enter the data
 which the form is based on, but not the form design.</td>
 </tr>

 <tr style="vertical-align: top;">
 <td><em>Reports</em></td>
 <td>The report document is opened in design mode, that is, you can modify it.</td>
 <td>The report is executed, and the results will be displayed.</td>
 </tr>

 </tbody></table>
 </p>

 </dd>
<dt><b>Returns</b></dt>
<dd>the component which has been loaded. This is either an ::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/XModel.html">XModel</a>,
 or an ::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/XController.html">XController</a> if the component does is model-less.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IllegalArgumentException
 if <arg>ObjectType</arg> denotes an invalid object type

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::container::NoSuchElementException
 if an object with the given name and of the given type does not exist

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::sdbc::SQLException
 if there is no connection to the database at the time the method is called.
 </dd>
<dt><b>See also</b></dt>
<dd><a href="#isConnected">isConnected</a>, <a href="#connect">connect</a></dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="loadComponentWithArguments" class="membertitle">loadComponentWithArguments</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">::com::sun::star::<a href="../../lang/module-ix.html">lang</a>::<a href="../../lang/XComponent.html">XComponent</a></td>
</tr>
<tr>
<td valign="top"><b>loadComponentWithArguments</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;ObjectType,</td>
</tr>
<tr>
<td/><td valign="top">[in] string</td>
<td valign="bottom">&nbsp;ObjectName,</td>
</tr>
<tr>
<td/><td valign="top">[in] boolean</td>
<td valign="bottom">&nbsp;ForEditing,</td>
</tr>
<tr>
<td/><td valign="top">[in] sequence&lt; ::com::sun::star::<a href="../../beans/module-ix.html">beans</a>::<a href="../../beans/PropertyValue.html">PropertyValue</a> &gt;</td>
<td valign="bottom">&nbsp;Arguments )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../../lang/module-ix.html">lang</a>::<a href="../../lang/IllegalArgumentException.html">IllegalArgumentException</a>,<br>
::com::sun::star::<a href="../../container/module-ix.html">container</a>::<a href="../../container/NoSuchElementException.html">NoSuchElementException</a>,<br>
::com::sun::star::<a href="../../sdbc/module-ix.html">sdbc</a>::<a href="../../sdbc/SQLException.html">SQLException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>loads the given sub component of the database document

 </dd>
<dd><p>In opposite to <a href="#loadComponent">loadComponent</a>, this method allows you to specify
 additional arguments which are passed to the to-be-loaded component.</p>

 <p>The meaning of the the arguments is defined at the service which is effectively
 created. See the <a href="#component_types">above table</a> for a list of those
 services.</p>
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<a name="AttributesDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle">Attributes' Details</td>
</tr>
<tr>
<td class="imdetail"><a name="DataSource" class="membertitle">DataSource</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>[ readonly ] ::com::sun::star::<a href="../../sdbc/module-ix.html">sdbc</a>::<a href="../../sdbc/XDataSource.html">XDataSource</a> <b>DataSource</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>provides access to the data source belong to the database document
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="ApplicationMainWindow" class="membertitle">ApplicationMainWindow</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>[ readonly ] ::com::sun::star::<a href="../../awt/module-ix.html">awt</a>::<a href="../../awt/XWindow.html">XWindow</a> <b>ApplicationMainWindow</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>provides access to the applicatio's main window

 </dd>
<dd><p>Note that reading this atttribute is equivalent to querying the component
 for the ::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/XController.html">XController</a> interface,
 asking the controller for its frame, and asking this frame for its
 container window.</p>

 </dd>
<dt><b>See also</b></dt>
<dd>::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/XController.html">XController</a>, ::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/XFrame.html">XFrame</a></dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="ActiveConnection" class="membertitle">ActiveConnection</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>[ readonly ] ::com::sun::star::<a href="../../sdbc/module-ix.html">sdbc</a>::<a href="../../sdbc/XConnection.html">XConnection</a> <b>ActiveConnection</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>provides access to the current connection of the application

 </dd>
<dd><p>Note that the connection returned here is really the working connection
 of the application. Clients should not misuse it, in particular, closing
 the connection can yield unexpected results and should definately be
 avoided. If you need a separate connection to the data source, use
 ::com::sun::star::<a href="../../sdbc/module-ix.html">sdbc</a>::<a href="../../sdbc/XDataSource.html">XDataSource</a>::<a href="../../sdbc/XDataSource.html#getConnection">getConnection</a>.</p>
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="SubComponents" class="membertitle">SubComponents</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>[ readonly ] sequence&lt; ::com::sun::star::<a href="../../lang/module-ix.html">lang</a>::<a href="../../lang/XComponent.html">XComponent</a> &gt; <b>SubComponents</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>contains all sub components of the database document

 </dd>
<dd><p>During working with the database, the user might open different sub components:
 forms, reports, tables, queries. Those components are tracked by the application,
 and provided in this attribute.</p>

 <p>The components here might either be documents (::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/XModel.html">XModel</a>),
 controllers (::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/XController.html">XController</a>), or frames
 (::com::sun::star::<a href="../../frame/module-ix.html">frame</a>::<a href="../../frame/XFrame.html">XFrame</a>).

 </dd>
<dt><b>Since </b></dt>
<dd>OpenOffice 3.0</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p>

</div> <!-- id="adc-idlref" -->
</body>

</html>