1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XCopyTableWizard.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_sdb_application_XCopyTableWizard_idl__
32 #define __com_sun_star_sdb_application_XCopyTableWizard_idl__
34 #ifndef __com_sun_star_ui_dialogs_XExecutableDialog_idl__
35 #include
<com
/sun
/star
/ui
/dialogs
/XExecutableDialog.idl
>
37 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
38 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
40 #ifndef __com_sun_star_beans_Optional_idl__
41 #include
<com
/sun
/star
/beans
/Optional.idl
>
44 //=============================================================================
46 module com
{ module sun
{ module star
{ module sdb
{ module application
{
48 interface XCopyTableListener
;
50 //=============================================================================
52 /** describes a wizard which can be used to copy table like data from one
55 <p>Copying table data between databases can be a complex task. Especially when
56 it comes to matching field types in the source and in the target database,
57 some heuristics, and sometimes support from the user doing the operation,
60 <p>The <code>copy table wizard</code> described by this interfaces cares for those,
61 and other, settings.</p>
65 interface XCopyTableWizard
: ::com
::sun
::star
::ui
::dialogs
::XExecutableDialog
67 /** specifies the basic operation for the wizard to execute.
69 <p>This must be one of the <type>CopyTableOperation</type> constants.</p>
71 <p>At initialization time, you can use this attribute to control the
72 initial operation in the wizard.</p>
74 <p>After the wizard has finished, you can use this attribute to determine
75 what operation was actually executed.</p>
77 <p>Changing this attribute while the dialog is running is not supported, the
78 result of such an attempt is undefined.</p>
80 @throws IllegalArgumentException
81 if you attempt to set an invalid operation, or if the given operation is
82 not supported by the target database type, e.g. if you specified
83 <member>CopyTableOperation::CreateAsView</member> where the database
84 does not support views.
86 [attribute
] short Operation
88 set raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
);
91 /** specfies the name of the table in the destination database.
93 <p>At initialization time, you can use this attribute to control the
94 initial table name as suggested to the user.</p>
96 <p>After the wizard has finished, you can use this attribute to determine
97 what table was actually created resp. to which existing table the source
98 table's data was appended.</p>
100 <p>Changing this attribute while the dialog is running is not supported, the
101 result of such an attempt is undefined.</p>
103 [attribute
] string DestinationTableName
;
105 /** specifies that a new primary key is to be created in the target database
107 <p>At initialization time, you can specify the initial settings for the primary
110 <p>You cannot use this attribute to determine the primary key, possibly created
111 by the wizard, after it finished. The reason is that during the wizard run, the
112 user can define an arbitrarily complex primary key, e.g. including multiple columns,
113 which cannot be represented in this simple attribute anymore.</p>
115 <p>This attribute is ignored if <member>Operation</member> is
116 <member>CopyTableOperation::AppendData</member>.</p>
118 <p>Changing this attribute while the dialog is running is not supported, the
119 result of such an attempt is undefined.</p>
121 <p>When a primary key is to be created by the wizard, it will be be an auto-increment
122 column, if possible.</p>
124 @throws ::com::sun::star::lang::IllegalArgumentException
125 if the target database does not support primary keys
127 [attribute
] ::com
::sun
::star
::beans
::Optional< string >
130 set raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
);
133 /** specifies that the first row should be used to identify column names.
135 <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
136 e.g. in the RTF format or in the HTML format.
139 [attribute
] boolean UseHeaderLineAsColumnNames
;
141 /** adds a listener which is to be notified of progress in the copy operation
143 void addCopyTableListener
( [in] XCopyTableListener Listener
);
145 /** removes a listener
147 void removeCopyTableListener
( [in] XCopyTableListener Listener
);
150 //=============================================================================
154 //=============================================================================