sourceDescriptor.setPropertyValue("ActiveConnection", sourceConnection);
final XPropertySet destDescriptor = DataAccessDescriptorFactory.get(context).createDataAccessDescriptor();
destDescriptor.setPropertyValue("ActiveConnection", destConnection);
final XCopyTableWizard copyWizard = com.sun.star.sdb.application.CopyTableWizard.createWithInteractionHandler(
context, sourceDescriptor, destDescriptor, interAction);
copyWizard.setOperation((short) 0); // com.sun.star.sdb.application.CopyDefinitionAndData
Optional<String> auto = new Optional<String>();
auto.IsPresent = destConnection.getMetaData().supportsCoreSQLGrammar();
if (auto.IsPresent)
{
auto.Value = "ID_test";
}
copyWizard.setCreatePrimaryKey(auto);
Thread thread = new Thread(new CopyThread(copyWizard));
thread.start();
sleep();
try