/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef __com_sun_star_sdb_XDocumentDataSource_idl__ #define __com_sun_star_sdb_XDocumentDataSource_idl__ #include //============================================================================= 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