/*************************************************************************
*
* 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
* There are various cases where the wizard needs to interact with the user (except of
course the obvious case to display and operate the wizard dialog itself). For those cases,
an interaction handler is needed, which is used for
SQLException
, usually) that happened.
When you do not specify an interaction handler by using the
ConnectionResource
, or a connection
not obtained from a data source), or if the copy target's database document cannot provide
an interaction handler, a newly-created instance of an interaction handler is used.
There's one exception to the above, however: Upon creating the copy table wizard,
the copy source and the copy target descriptors are used to create a Connection. For any
interaction during this phase - including, for instance, necessary authentication -, the
interaction handler of the respective data source is used, no matter what you specified
in
At creation time, an attempt will be made to obtain the connections described
by
If the connection has been newly created by the wizard (e.g. because the
data access descriptor specified a DataSource
instead of an ActiveConnection
),
then this connection will be disposed upon disposal of the wizard.
The following members of the DataAccessDescriptor
are supported, and evaluated
in the given order:
ActiveConnection
DataSourceName
DatabaseLocation
ConnectionResource
ConnectionInfo
Command
CommandType
Command
and CommandType
are required.
Additionally to the obvious restrictions (such as that creating a view is not possible if the copy source and the copy destination denote different databases), the following restrictions apply to the settings, and possible combinations:
ConnectionResource
, or an
ActiveConnection
which implements an QUERY
will be rejected.Filter
, Order
, HavingClause
and GroupBy
are unsupported at the moment.Only DataSourceName
, DatabaseLocation
, ActiveConnection
are supported, effectively describing the target connection to copy the data to. They're evaluated
in the order mentioned here, so if multiple of the are present, only the first one is evaluated.
Also, at the moment the connection which is implied by either of the settings above
must support the
Note that creating a view (see
Source
or Destination
is Source
or Destination
are not sufficient
to describe a database connection.Source
is not sufficient to describe the to-be-copied dataSource
or Destination
contain unsupported settings.DataSourceName
member.
@see ::com::sun::star::sdb::DataAccessDescriptor
*/
create(
[in] ::com::sun::star::beans::XPropertySet Source,
[in] ::com::sun::star::beans::XPropertySet Destination
)
raises ( ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::sdbc::SQLException
, ::com::sun::star::lang::WrappedTargetException
);
/** creates an executable wizard dialog, which is to guide the user through copying
a table from one database to another.
The only difference to the createWithInteractionHandler
takes an additional argument, which
can be used to intercept interactions (such as error messages) during the wizard
run.
When specifying this parameter, you should use an implementation
supporting the