/************************************************************** * * 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 #endif //============================================================================= module com { module sun { module star { module sdb { //============================================================================= /** simplifies the accessing of data sources and their corresponding database document.

The interface can be used to access the data source of the database document.

@see OfficeDatabaseDocument */ published interface XDocumentDataSource { /** provides access to the one and only OfficeDatabaseDocument which the data source is based on.

The component returned by this attribute is an OfficeDatabaseDocument.

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 XCloseable::close on the document as soon as it's not needed anymore.

Additionally, if the caller does long-lasting processing on the document, it's advised to add itself as XCloseListener to the document, to prevent closing as long as the processing lasts.

*/ [readonly, attribute] XOfficeDatabaseDocument DatabaseDocument; }; //============================================================================= }; }; }; }; /*============================================================================= =============================================================================*/ #endif