1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10*d1766043SAndrew Rist * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*d1766043SAndrew Rist * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19*d1766043SAndrew Rist * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir#ifndef __com_sun_star_sdb_application_XCopyTableWizard_idl__ 25cdf0e10cSrcweir#define __com_sun_star_sdb_application_XCopyTableWizard_idl__ 26cdf0e10cSrcweir 27cdf0e10cSrcweir#ifndef __com_sun_star_ui_dialogs_XExecutableDialog_idl__ 28cdf0e10cSrcweir#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> 29cdf0e10cSrcweir#endif 30cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 31cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir#ifndef __com_sun_star_beans_Optional_idl__ 34cdf0e10cSrcweir#include <com/sun/star/beans/Optional.idl> 35cdf0e10cSrcweir#endif 36cdf0e10cSrcweir 37cdf0e10cSrcweir//============================================================================= 38cdf0e10cSrcweir 39cdf0e10cSrcweirmodule com { module sun { module star { module sdb { module application { 40cdf0e10cSrcweir 41cdf0e10cSrcweirinterface XCopyTableListener; 42cdf0e10cSrcweir 43cdf0e10cSrcweir//============================================================================= 44cdf0e10cSrcweir 45cdf0e10cSrcweir/** describes a wizard which can be used to copy table like data from one 46cdf0e10cSrcweir database to another. 47cdf0e10cSrcweir 48cdf0e10cSrcweir <p>Copying table data between databases can be a complex task. Especially when 49cdf0e10cSrcweir it comes to matching field types in the source and in the target database, 50cdf0e10cSrcweir some heuristics, and sometimes support from the user doing the operation, 51cdf0e10cSrcweir are required.</p> 52cdf0e10cSrcweir 53cdf0e10cSrcweir <p>The <code>copy table wizard</code> described by this interfaces cares for those, 54cdf0e10cSrcweir and other, settings.</p> 55cdf0e10cSrcweir 56cdf0e10cSrcweir @since OOo 2.4 57cdf0e10cSrcweir */ 58cdf0e10cSrcweirinterface XCopyTableWizard : ::com::sun::star::ui::dialogs::XExecutableDialog 59cdf0e10cSrcweir{ 60cdf0e10cSrcweir /** specifies the basic operation for the wizard to execute. 61cdf0e10cSrcweir 62cdf0e10cSrcweir <p>This must be one of the <type>CopyTableOperation</type> constants.</p> 63cdf0e10cSrcweir 64cdf0e10cSrcweir <p>At initialization time, you can use this attribute to control the 65cdf0e10cSrcweir initial operation in the wizard.</p> 66cdf0e10cSrcweir 67cdf0e10cSrcweir <p>After the wizard has finished, you can use this attribute to determine 68cdf0e10cSrcweir what operation was actually executed.</p> 69cdf0e10cSrcweir 70cdf0e10cSrcweir <p>Changing this attribute while the dialog is running is not supported, the 71cdf0e10cSrcweir result of such an attempt is undefined.</p> 72cdf0e10cSrcweir 73cdf0e10cSrcweir @throws IllegalArgumentException 74cdf0e10cSrcweir if you attempt to set an invalid operation, or if the given operation is 75cdf0e10cSrcweir not supported by the target database type, e.g. if you specified 76cdf0e10cSrcweir <member>CopyTableOperation::CreateAsView</member> where the database 77cdf0e10cSrcweir does not support views. 78cdf0e10cSrcweir */ 79cdf0e10cSrcweir [attribute] short Operation 80cdf0e10cSrcweir { 81cdf0e10cSrcweir set raises ( ::com::sun::star::lang::IllegalArgumentException ); 82cdf0e10cSrcweir }; 83cdf0e10cSrcweir 84cdf0e10cSrcweir /** specfies the name of the table in the destination database. 85cdf0e10cSrcweir 86cdf0e10cSrcweir <p>At initialization time, you can use this attribute to control the 87cdf0e10cSrcweir initial table name as suggested to the user.</p> 88cdf0e10cSrcweir 89cdf0e10cSrcweir <p>After the wizard has finished, you can use this attribute to determine 90cdf0e10cSrcweir what table was actually created resp. to which existing table the source 91cdf0e10cSrcweir table's data was appended.</p> 92cdf0e10cSrcweir 93cdf0e10cSrcweir <p>Changing this attribute while the dialog is running is not supported, the 94cdf0e10cSrcweir result of such an attempt is undefined.</p> 95cdf0e10cSrcweir */ 96cdf0e10cSrcweir [attribute] string DestinationTableName; 97cdf0e10cSrcweir 98cdf0e10cSrcweir /** specifies that a new primary key is to be created in the target database 99cdf0e10cSrcweir 100cdf0e10cSrcweir <p>At initialization time, you can specify the initial settings for the primary 101cdf0e10cSrcweir key in the UI.</p> 102cdf0e10cSrcweir 103cdf0e10cSrcweir <p>You cannot use this attribute to determine the primary key, possibly created 104cdf0e10cSrcweir by the wizard, after it finished. The reason is that during the wizard run, the 105cdf0e10cSrcweir user can define an arbitrarily complex primary key, e.g. including multiple columns, 106cdf0e10cSrcweir which cannot be represented in this simple attribute anymore.</p> 107cdf0e10cSrcweir 108cdf0e10cSrcweir <p>This attribute is ignored if <member>Operation</member> is 109cdf0e10cSrcweir <member>CopyTableOperation::AppendData</member>.</p> 110cdf0e10cSrcweir 111cdf0e10cSrcweir <p>Changing this attribute while the dialog is running is not supported, the 112cdf0e10cSrcweir result of such an attempt is undefined.</p> 113cdf0e10cSrcweir 114cdf0e10cSrcweir <p>When a primary key is to be created by the wizard, it will be be an auto-increment 115cdf0e10cSrcweir column, if possible.</p> 116cdf0e10cSrcweir 117cdf0e10cSrcweir @throws ::com::sun::star::lang::IllegalArgumentException 118cdf0e10cSrcweir if the target database does not support primary keys 119cdf0e10cSrcweir */ 120cdf0e10cSrcweir [attribute] ::com::sun::star::beans::Optional< string > 121cdf0e10cSrcweir CreatePrimaryKey 122cdf0e10cSrcweir { 123cdf0e10cSrcweir set raises ( ::com::sun::star::lang::IllegalArgumentException ); 124cdf0e10cSrcweir }; 125cdf0e10cSrcweir 126cdf0e10cSrcweir /** specifies that the first row should be used to identify column names. 127cdf0e10cSrcweir 128cdf0e10cSrcweir <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 129cdf0e10cSrcweir e.g. in the RTF format or in the HTML format. 130cdf0e10cSrcweir </p> 131cdf0e10cSrcweir */ 132cdf0e10cSrcweir [attribute] boolean UseHeaderLineAsColumnNames; 133cdf0e10cSrcweir 134cdf0e10cSrcweir /** adds a listener which is to be notified of progress in the copy operation 135cdf0e10cSrcweir */ 136cdf0e10cSrcweir void addCopyTableListener( [in] XCopyTableListener Listener ); 137cdf0e10cSrcweir 138cdf0e10cSrcweir /** removes a listener 139cdf0e10cSrcweir */ 140cdf0e10cSrcweir void removeCopyTableListener( [in] XCopyTableListener Listener ); 141cdf0e10cSrcweir}; 142cdf0e10cSrcweir 143cdf0e10cSrcweir//============================================================================= 144cdf0e10cSrcweir 145cdf0e10cSrcweir}; }; }; }; }; 146cdf0e10cSrcweir 147cdf0e10cSrcweir//============================================================================= 148cdf0e10cSrcweir 149cdf0e10cSrcweir#endif 150