From 428e02dbd240ee8dbbd14d80301614161cfdcc7a Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Mon, 10 Jul 2006 13:52:01 +0000 Subject: INTEGRATION: CWS qiq (1.1.2); FILE ADDED 2006/05/24 06:41:59 fs 1.1.2.1: initial checkin --- offapi/com/sun/star/sdb/tools/XTableName.idl | 162 +++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 offapi/com/sun/star/sdb/tools/XTableName.idl (limited to 'offapi') diff --git a/offapi/com/sun/star/sdb/tools/XTableName.idl b/offapi/com/sun/star/sdb/tools/XTableName.idl new file mode 100644 index 000000000000..4ed3d95778d6 --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XTableName.idl @@ -0,0 +1,162 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XTableName.idl,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: obo $ $Date: 2006-07-10 14:52:01 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef __com_sun_star_sdb_tools_XTableName_idl__ +#define __com_sun_star_sdb_tools_XTableName_idl__ + +#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ +#include +#endif + +#ifndef __com_sun_star_container_NoSuchElementException_idl__ +#include +#endif + +#ifndef __com_sun_star_beans_XPropertySet_idl__ +#include +#endif + +//============================================================================= +module com { module sun { module star { module sdb { module tools { +//============================================================================= + +//----------------------------------------------------------------------------- +/** allows to manipulate table names. + +

When, in a database application, dealing with table names, there's many degrees + of freedom to deal with. For instance, suppose you want to have the full name of a + table object, as it should be used in a SELECT statement's FROM + part. This requires you to evaluate whether or not the table has a catalog and/or schema + name, to combine the catalog, the schema, and the basic table name into one name, respecting + the database's quoting character, and the order in which all those parts should be combined. + Additionally, you have to respect the client-side settings which tell OpenOffice.org + to use or not use catalogs and schemas in SELECT at all.

+ +

The XTableName interface eases this and other, similar tasks around table + names.

+ +

The component itself does not have life-time control mechanimns, i.e. you + cannot explicitly dispose it (XComponent::dispose), + and you cannot be notified when it dies.
+ However, if your try to access any of its methods or attributes, after the + connection which was used to create it was closed, a DisposedException + will be thrown.

+ + @see XConnectionTools + @see com::sun::star::sdbc::XDatabaseMetaData + @see com::sun::star::sdb::DataSource::Settings + + @since OOo 2.0.4 +*/ +interface XTableName +{ + /** denotes the name of the catalog which the table is a part of + */ + [attribute] string CatalogName; + + /** denotes the name of the schema which the table is a part of + */ + [attribute] string SchemaName; + + /** denotes the mere, unqualified table name, excluding any catalog and + schema. + */ + [attribute] string TableName; + + /** returns the composed table name, including the catalog and schema name, + respecting the databases's quoting requirements, plus + + @param Type + the type of name composition to be used. + + @param Quote + specifies whether the single parts of the table name should be quoted + + @see CompositionType + + @throws com::sun::star::IllegalArgumentException + if the given Type does not denote a valid CompositionType + */ + string getComposedName( [in] long Type, [in] boolean Quote ) + raises ( com::sun::star::lang::IllegalArgumentException ); + + + /** sets a new composed table name + @param ComposedName + specifies the composed table name + @param Type + specifies the composition type which was used to create the composed table name + */ + void setComposedName( [in] string ComposedName, [in] long Type ); + + /** represents the table name in a form to be used in a SELECT statement. + +

On a per-data-source basis, OpenOffice.org allows to override database meta + data information in that you can specify to not use catalog and or schema names + in SELECT statements. Using this attribute, you can generate a table + name which respects those settings.

+ + @see com::sun::star::sdb::DataSource::Settings + */ + [attribute, readonly] string NameForSelect; + + /** is the Table object specified + by the current name. + +

Retrieving this attribute is equivalent to obtaining the tables + container from the connection (via XTablesSupplier), + and calling its XNameAccess::getByName + method with the ComposedName.

+ + @throws com::sun::star::container::NoSuchElementException + if, upon getting the attribute value, the current composed table name + represented by this instance does not denote an existing table in the database. + @throws com::sun::star::lang::IllegalArgumentException + if you try to set an object which does not denote a table from the underlying + database. + */ + [attribute] ::com::sun::star::beans::XPropertySet Table + { + get raises ( com::sun::star::container::NoSuchElementException ); + set raises ( com::sun::star::lang::IllegalArgumentException ); + }; +}; + +//============================================================================= +}; }; }; }; }; +//============================================================================= + +#endif + -- cgit