merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / sdb / application / XCopyTableWizard.idl
blob216c9fb450233f81dda6a45d5761065c0a5cc3c6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_sdb_application_XCopyTableWizard_idl__
29 #define __com_sun_star_sdb_application_XCopyTableWizard_idl__
31 #ifndef __com_sun_star_ui_dialogs_XExecutableDialog_idl__
32 #include <com/sun/star/ui/dialogs/XExecutableDialog.idl>
33 #endif
34 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
35 #include <com/sun/star/lang/IllegalArgumentException.idl>
36 #endif
37 #ifndef __com_sun_star_beans_Optional_idl__
38 #include <com/sun/star/beans/Optional.idl>
39 #endif
41 //=============================================================================
43 module com { module sun { module star { module sdb { module application {
45 interface XCopyTableListener;
47 //=============================================================================
49 /** describes a wizard which can be used to copy table like data from one
50 database to another.
52 <p>Copying table data between databases can be a complex task. Especially when
53 it comes to matching field types in the source and in the target database,
54 some heuristics, and sometimes support from the user doing the operation,
55 are required.</p>
57 <p>The <code>copy table wizard</code> described by this interfaces cares for those,
58 and other, settings.</p>
60 @since OOo 2.4
62 interface XCopyTableWizard : ::com::sun::star::ui::dialogs::XExecutableDialog
64 /** specifies the basic operation for the wizard to execute.
66 <p>This must be one of the <type>CopyTableOperation</type> constants.</p>
68 <p>At initialization time, you can use this attribute to control the
69 initial operation in the wizard.</p>
71 <p>After the wizard has finished, you can use this attribute to determine
72 what operation was actually executed.</p>
74 <p>Changing this attribute while the dialog is running is not supported, the
75 result of such an attempt is undefined.</p>
77 @throws IllegalArgumentException
78 if you attempt to set an invalid operation, or if the given operation is
79 not supported by the target database type, e.g. if you specified
80 <member>CopyTableOperation::CreateAsView</member> where the database
81 does not support views.
83 [attribute] short Operation
85 set raises ( ::com::sun::star::lang::IllegalArgumentException );
88 /** specfies the name of the table in the destination database.
90 <p>At initialization time, you can use this attribute to control the
91 initial table name as suggested to the user.</p>
93 <p>After the wizard has finished, you can use this attribute to determine
94 what table was actually created resp. to which existing table the source
95 table's data was appended.</p>
97 <p>Changing this attribute while the dialog is running is not supported, the
98 result of such an attempt is undefined.</p>
100 [attribute] string DestinationTableName;
102 /** specifies that a new primary key is to be created in the target database
104 <p>At initialization time, you can specify the initial settings for the primary
105 key in the UI.</p>
107 <p>You cannot use this attribute to determine the primary key, possibly created
108 by the wizard, after it finished. The reason is that during the wizard run, the
109 user can define an arbitrarily complex primary key, e.g. including multiple columns,
110 which cannot be represented in this simple attribute anymore.</p>
112 <p>This attribute is ignored if <member>Operation</member> is
113 <member>CopyTableOperation::AppendData</member>.</p>
115 <p>Changing this attribute while the dialog is running is not supported, the
116 result of such an attempt is undefined.</p>
118 <p>When a primary key is to be created by the wizard, it will be be an auto-increment
119 column, if possible.</p>
121 @throws ::com::sun::star::lang::IllegalArgumentException
122 if the target database does not support primary keys
124 [attribute] ::com::sun::star::beans::Optional< string >
125 CreatePrimaryKey
127 set raises ( ::com::sun::star::lang::IllegalArgumentException );
130 /** specifies that the first row should be used to identify column names.
132 <p>This attribute is ignored when the source defines the column names which isn't the case when only a part of a table should be copied
133 e.g. in the RTF format or in the HTML format.
134 </p>
136 [attribute] boolean UseHeaderLineAsColumnNames;
138 /** adds a listener which is to be notified of progress in the copy operation
140 void addCopyTableListener( [in] XCopyTableListener Listener );
142 /** removes a listener
144 void removeCopyTableListener( [in] XCopyTableListener Listener );
147 //=============================================================================
149 }; }; }; }; };
151 //=============================================================================
153 #endif