blob: c8d48d65ffc96d224d7f53609bdb14291ea1286c [file] [log] [blame]
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#ifndef __com_sun_star_sdb_XDocumentDataSource_idl__
#define __com_sun_star_sdb_XDocumentDataSource_idl__
#ifndef __com_sun_star_sdb_XOfficeDatabaseDocument_idl__
#include <com/sun/star/sdb/XOfficeDatabaseDocument.idl>
#endif
//=============================================================================
module com { module sun { module star { module sdb {
//=============================================================================
/** simplifies the accessing of data sources and their corresponding database document.
<p>
The interface can be used to access the data source of the database document.
</p>
@see OfficeDatabaseDocument
*/
published interface XDocumentDataSource
{
/** provides access to the one and only <type>OfficeDatabaseDocument</type>
which the data source is based on.
<p>The component returned by this attribute is an <type>OfficeDatabaseDocument</type>.</p>
<p>Though there is a 1-to-1 relationship between database documents and data sources,
each of the two can exist without its counterpart, but create this counterpart on request
only. As a consequence, the document obtained via this attribute might be newly created,
which implies that the caller is now responsible for it. In particular, the caller is
responsible for calling <member scope="com::sun::star::util">XCloseable::close</member>
on the document as soon as it's not needed anymore.</p>
<p>Additionally, if the caller does long-lasting processing on the document, it's advised
to add itself as <type scope="com::sun::star::util">XCloseListener</type> to the document,
to prevent closing as long as the processing lasts.</p>
*/
[readonly, attribute] XOfficeDatabaseDocument DatabaseDocument;
};
//=============================================================================
}; }; }; };
/*=============================================================================
=============================================================================*/
#endif