/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * 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 . */ 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 mechanisms, i.e. you
cannot explicitly dispose it (com::sun::star::lang::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 com::sun::star::lang::DisposedException
will be thrown.
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.
Retrieving this attribute is equivalent to obtaining the tables container from the connection (via com::sun::star::sdbcx::XTablesSupplier), and calling its com::sun::star::container::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 ); }; }; }; }; }; }; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */