blob: 1d6ee9753800dac67e1734951a6b81f92acff263 [file] [log] [blame]
<html>
<head>
<title>Service DataSource</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="http://api.openoffice.org/docs/common/ref/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="DataSource-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">Included Services</td>
<td class="navisub"><a href="#ExportedInterfaces" class="navisub">Exported Interfaces</a></td>
<td class="navisub"><a href="#PropertiesSummary" class="navisub">Properties' Summary</a></td>
<td class="navisub"><a href="#PropertiesDetails" class="navisub">Properties' 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> :: </p>
</td>
</tr>
<tr>
<td class="title">service DataSource</td>
</tr>
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>is a factory to establish database connections. It should be registered at
a ::com::sun::star::<a href="../uno/module-ix.html">uno</a>::<a href="../uno/NamingService.html">NamingService</a> .
</dd>
<dt><b>See also</b></dt>
<dd><a href="DatabaseContext.html">DatabaseContext</a></dd>
</dl>
</td>
</tr>
</table>
<hr>
<a name="ExportedInterfaces"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Exported Interfaces</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertySet.html">XPropertySet</a></td>
<td class="imsum_right"><dl>
<dt>(referenced entity's summary:)</dt>
<dd>provides information about and access to the
properties from an implementation.
</dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XCompletedConnection.html">XCompletedConnection</a></td>
<td class="imsum_right"><dl>
<dt><b>Description</b></dt>
<dd>useful for establishing connections with the completion of connection parameters
provided during user interaction.
</dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../sdbc/module-ix.html">sdbc</a>::<a href="../sdbc/XIsolatedConnection.html">XIsolatedConnection</a></td>
<td class="imsum_right"><dl>
<dt><b>Description</b></dt>
<dd>useful for establishing isolated connections which are not shared among others
as it is the case when using <a href="XCompletedConnection.html">XCompletedConnection</a> or ::com::sun::star::<a href="../sdbc/module-ix.html">sdbc</a>::<a href="../sdbc/XDataSource.html">XDataSource</a> .
</dd>
<dt><b/></dt>
<dd/><dt><b/></dt>
<dd/><dt><b>Since </b></dt>
<dd>OOo 1.1.2 </dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XFlushable.html">XFlushable</a></td>
<td class="imsum_right"><dl>
<dt><b>Description</b></dt>
<dd>is provided to flush a DataSource within to a Database Context.
</dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XQueryDefinitionsSupplier.html">XQueryDefinitionsSupplier</a></td>
<td class="imsum_right"><dl>
<dt><b>Description</b></dt>
<dd>provides the access to DataSource related queries.
</dd>
<dd><p>
The object returned by the
<method scope="com::sun::star::sdb">XQueryDefinitionsSupplier::getQueryDefinitions() </method>
supports the
<service scope="com::sun::star::sdb">DefinitionContainer </service>
service.
</p>
</dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../sdbc/module-ix.html">sdbc</a>::<a href="../sdbc/XDataSource.html">XDataSource</a></td>
<td class="imsum_right"><dl>
<dt>(referenced entity's summary:)</dt>
<dd>is used for establishing connections via a factory which is identified
by its name. A DataSource object is typically registered by a naming service
provider.
</dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XBookmarksSupplier.html">XBookmarksSupplier</a></td>
<td class="imsum_right"><dl>
<dt><b>Usage Restrictions</b></dt>
<dd><i>optional</i></dd>
<dt><b>Description</b></dt>
<dd>provides access to bookmarks to documents associated with the data source
</dd>
<dd><p>
The object returned by the
<method scope="com::sun::star::sdb">XBookmarksSupplier::getBookmarks() </method>
supports the
<service scope="com::sun::star::sdb">DefinitionContainer </service>
service.
</p>
</dd>
</dl>
</td>
</tr>
</table>
<a name="PropertiesSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Properties' Summary</td>
</tr>
<tr>
<td class="imsum_left">[ readonly ] string<br>
<a href="#Name">Name</a></td>
<td class="imsum_right">is the name of the data source.
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">string<br>
<a href="#URL">URL</a></td>
<td class="imsum_right">indicates a database url of the form <br>
<code>jdbc: <em>subprotocol </em>: <em>subname </em></code>
or
<code>sdbc: <em>subprotocol </em>: <em>subname </em></code>
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">sequence&lt; ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a> &gt;<br>
<a href="#Info">Info</a></td>
<td class="imsum_right">is a list of arbitrary string tag/value pairs as connection arguments
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">[ readonly ] ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertySet.html">XPropertySet</a><br>
<a href="#Settings">Settings</a></td>
<td class="imsum_right"><b>[ OPTIONAL ]<br>
</b>is a convenience wrapper around the <a href="#Info">Info</a> property.
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">string<br>
<a href="#User">User</a></td>
<td class="imsum_right">determines a users login name.
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">string<br>
<a href="#Password">Password</a></td>
<td class="imsum_right">determines a users password. The password is not persistent.
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">boolean<br>
<a href="#IsPasswordRequired">IsPasswordRequired</a></td>
<td class="imsum_right">indicates that a password is always necessary.
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">boolean<br>
<a href="#SuppressVersionColumns">SuppressVersionColumns</a></td>
<td class="imsum_right">indicates that components displaying data obtained from this
data source should suppress columns used for versioning.
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">[ readonly ] boolean<br>
<a href="#IsReadOnly">IsReadOnly</a></td>
<td class="imsum_right">determines whether modifications on the data source are allowed or not.
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">[ readonly ] ::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XNumberFormatsSupplier.html">XNumberFormatsSupplier</a><br>
<a href="#NumberFormatsSupplier">NumberFormatsSupplier</a></td>
<td class="imsum_right">provides an object for formatting numbers.
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">sequence&lt; string &gt;<br>
<a href="#TableFilter">TableFilter</a></td>
<td class="imsum_right">defines a list of tables, on which the DataSource should have it's focus.
If empty, all tables are rejected.
&nbsp;</td>
</tr>
<tr>
<td class="imsum_left">sequence&lt; string &gt;<br>
<a href="#TableTypeFilter">TableTypeFilter</a></td>
<td class="imsum_right">defines a list of table types, on which the DataSource should have it's focus.
If empty, all table types are rejected.
&nbsp;</td>
</tr>
</table>
<a name="PropertiesDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle">Properties' Details</td>
</tr>
<tr>
<td class="imdetail"><a name="Name" class="membertitle">Name</a>
<table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>[ readonly ] string <b>Name</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>is the name of the data source.
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="URL" class="membertitle">URL</a>
<table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>string <b>URL</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>indicates a database url of the form <br>
<code>jdbc: <em>subprotocol </em>: <em>subname </em></code>
or
<code>sdbc: <em>subprotocol </em>: <em>subname </em></code>
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="Info" class="membertitle">Info</a>
<table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>sequence&lt; ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a> &gt; <b>Info</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>is a list of arbitrary string tag/value pairs as connection arguments
</dd>
<dd><p>The <a href="DataSource.html">DataSource</a> itself does not attempt to interpret any of those values. </p>
<p>Instead, the values in this property have two use cases:
<ul><li>Upon creating a connection, for every value in this sequence it's checked
whether the ::com::sun::star::<a href="../sdbc/module-ix.html">sdbc</a>::<a href="../sdbc/XDriver.html">XDriver</a> which is to provide
the connection supports a setting with the respective name, using its
If so, the settings is passed to the drivers's
If not,
the setting is ignored. </li>
<li>External components may use the settings to carry arbitrary information with
the data source. Usually, this is used to control the behaviour of components
working with the data source. </li>
</ul>
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="Settings" class="membertitle">Settings</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="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertySet.html">XPropertySet</a> <b>Settings</b>;<hr>
<dl>
<dt><b>Usage Restrictions</b></dt>
<dd><i>optional</i></dd>
<dt><b>Description</b></dt>
<dd>is a convenience wrapper around the <a href="#Info">Info</a> property.
</dd>
<dd><p>Since fiddling around with a sequence of property values is somewhat uncomfortable
in all known UNO language bindings (especially for tasks like simply changing the value
of an existing value), the <a href="#Settings">Settings</a> property wraps the <a href="#Info">Info</a>
property for easier single-value access. </p>
<p>You should use the <a href="#Setting">Setting</a> property if you need to access a few properties only,
and the <a href="#Info">Info</a> property if you need access to all existent settings at once. </p>
<p>The object represented by this property supports the ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyBag.html" title="com::sun::star::beans::PropertyBag">PropertyBag</a>
service. That is, you can at runtime add arbitrary new properties to the bag. </p>
<p>Additionally, the property bag supports default values of properties, and thus the
::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertyState.html">XPropertyState</a> interface. If you add an own property to
the bag using ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertyContainer.html">XPropertyContainer</a>::<a href="../beans/XPropertyContainer.html#addProperty">addProperty</a> , you need
to specifiy an initial value, which is also used as default value (exceptions see below). </p>
<p>Effectively, the property bag represented by <code>Settings </code>contains two classes of properties:
Pre-defined ones and user-defined ones. </p>
<p><em>Pre-defined </em>properties are properties which are potentially used by the data source, the
application UI for the data source, or a particular backend driver employed by the data source. There's
a large set of such properties, no all of them are effectively used for a concrete data source, nonetheless,
they're all present in the <code>Settings </code>. <br/>
Such properties are not removeable from the bag, that is, their
::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyAttribute.html">PropertyAttribute</a>::<a href="../beans/PropertyAttribute.html#REMOVEABLE">REMOVEABLE</a> attribute is <em>not </em>set. <br/>
Usually, you'll find that all of this properties have the
::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyState.html">PropertyState</a>::<a href="../beans/PropertyState.html#PropertyState_DEFAULT_VALUE">PropertyState_DEFAULT_VALUE</a> state. </p>
<p><em>User-defined </em>properties are the ones which are added at runtime by any instance. They might or might
not be removeable, this depends on whether or not the code adding them specifies the
::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyAttribute.html">PropertyAttribute</a>::<a href="../beans/PropertyAttribute.html#REMOVEABLE">REMOVEABLE</a> attribute. Also, they might
or might not have a default value, determined by the
::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyAttribute.html">PropertyAttribute</a>::<a href="../beans/PropertyAttribute.html#MAYBEDEFAULT">MAYBEDEFAULT</a> attribute at the time they're added
to the bag. </p>
<p>When a data source is made persistent, then properties which are not removeable (which are assumed to be the
pre-defined properties) are ignored when they are in <code>DEFAULT </code>state. All other properties are
always made persistent, except when an explicit
::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyAttribute.html">PropertyAttribute</a>::<a href="../beans/PropertyAttribute.html#TRANSIENT">TRANSIENT</a> attribute prohibits this. </p>
<p>Similar, when you obtain the <a href="#Info">Info</a> property of a <code>DataSource </code>, the
<code>Settings </code>bag is asked for all its property values, and the ones which are removeable and
in state default are stripped, and <em>not </em>returned in the <code>Info </code>sequence. </p>
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="User" class="membertitle">User</a>
<table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>string <b>User</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>determines a users login name.
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="Password" class="membertitle">Password</a>
<table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>string <b>Password</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>determines a users password. The password is not persistent.
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="IsPasswordRequired" class="membertitle">IsPasswordRequired</a>
<table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>boolean <b>IsPasswordRequired</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>indicates that a password is always necessary.
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="SuppressVersionColumns" class="membertitle">SuppressVersionColumns</a>
<table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>boolean <b>SuppressVersionColumns</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>indicates that components displaying data obtained from this
data source should suppress columns used for versioning.
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="IsReadOnly" class="membertitle">IsReadOnly</a>
<table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>[ readonly ] boolean <b>IsReadOnly</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>determines whether modifications on the data source are allowed or not.
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="NumberFormatsSupplier" class="membertitle">NumberFormatsSupplier</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="../util/module-ix.html">util</a>::<a href="../util/XNumberFormatsSupplier.html">XNumberFormatsSupplier</a> <b>NumberFormatsSupplier</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>provides an object for formatting numbers.
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="TableFilter" class="membertitle">TableFilter</a>
<table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>sequence&lt; string &gt; <b>TableFilter</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>defines a list of tables, on which the DataSource should have it's focus.
If empty, all tables are rejected.
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="TableTypeFilter" class="membertitle">TableTypeFilter</a>
<table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>sequence&lt; string &gt; <b>TableTypeFilter</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>defines a list of table types, on which the DataSource should have it's focus.
If empty, all table types are rejected.
</dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>&nbsp;<a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2003 Sun Microsystems, Inc.</p>
</div> <!-- id="adc-idlref" -->
</body>
</html>