Browse files

This commit was manufactured by cvs2svn to create tag 'v200901090814'.

Sprout from master 2009-01-09 00:05:14 UTC Hemant Kolwalkar <hskolwal@us.ibm.com> '[260163] Check Option for View is not supported in DatabaseDefinition model'
Delete:
    plugins/org.eclipse.datatools.enablement.mysql.ui/.classpath
    plugins/org.eclipse.datatools.enablement.mysql.ui/.cvsignore
    plugins/org.eclipse.datatools.enablement.mysql.ui/.project
    plugins/org.eclipse.datatools.enablement.mysql.ui/META-INF/MANIFEST.MF
    plugins/org.eclipse.datatools.enablement.mysql.ui/about.html
    plugins/org.eclipse.datatools.enablement.mysql.ui/build.properties
    plugins/org.eclipse.datatools.enablement.mysql.ui/icons/new_db_element.gif
    plugins/org.eclipse.datatools.enablement.mysql.ui/plugin.properties
    plugins/org.eclipse.datatools.enablement.mysql.ui/plugin.xml
    plugins/org.eclipse.datatools.enablement.mysql.ui/src/org/eclipse/datatools/enablement/mysql/internal/ui/connection/MySQLDBProfilePropertyPage.java
    plugins/org.eclipse.datatools.enablement.mysql.ui/src/org/eclipse/datatools/enablement/mysql/internal/ui/connection/MySQLProfileDetailsWizardPage.java
    plugins/org.eclipse.datatools.enablement.mysql.ui/src/org/eclipse/datatools/enablement/mysql/internal/ui/connection/NewMySQLConnectionProfileWizard.java
    plugins/org.eclipse.datatools.enablement.mysql.ui/src/org/eclipse/datatools/enablement/mysql/internal/ui/connection/drivers/MySQLOtherDriverUIContributor.java
    plugins/org.eclipse.datatools.enablement.mysql.ui/src/org/eclipse/datatools/enablement/mysql/ui/Activator.java
    plugins/org.eclipse.datatools.enablement.mysql/.classpath
    plugins/org.eclipse.datatools.enablement.mysql/.cvsignore
    plugins/org.eclipse.datatools.enablement.mysql/.project
    plugins/org.eclipse.datatools.enablement.mysql/.settings/org.eclipse.jdt.core.prefs
    plugins/org.eclipse.datatools.enablement.mysql/META-INF/MANIFEST.MF
    plugins/org.eclipse.datatools.enablement.mysql/about.html
    plugins/org.eclipse.datatools.enablement.mysql/build.properties
    plugins/org.eclipse.datatools.enablement.mysql/icons/jdbc_16.gif
    plugins/org.eclipse.datatools.enablement.mysql/plugin.properties
    plugins/org.eclipse.datatools.enablement.mysql/plugin.xml
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/internal/mysql/connection/IMySQLConnectionProfileConstants.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/internal/mysql/connection/JDBCMySQLConnectionFactory.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/internal/mysql/connection/JDBCMySQLJDBCConnection.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/internal/mysql/connection/MySQLPasswordPropertiesPersistenceHook.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/MysqlPlugin.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogColumn.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogDatabase.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogForeignKey.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogIndex.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogPrimaryKey.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogProvider.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogSchema.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogTable.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/ddl/MySqlDdlBuilder.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/ddl/MySqlDdlGenerator.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/ddl/MySqlDdlScript.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/ddl/shared/MySqlDdlBuilderHelper.java
    plugins/org.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/ddl/shared/MySqlDdlGeneratorHelper.java
  • Loading branch information...
1 parent 860c531 commit 4345e67669434e79a0b91fd0360b329184ef3ef6 cvs2svn committed Jan 9, 2009
Showing with 0 additions and 3,915 deletions.
  1. +0 −7 plugins/org.eclipse.datatools.enablement.mysql.ui/.classpath
  2. +0 −1 plugins/org.eclipse.datatools.enablement.mysql.ui/.cvsignore
  3. +0 −28 plugins/org.eclipse.datatools.enablement.mysql.ui/.project
  4. +0 −19 plugins/org.eclipse.datatools.enablement.mysql.ui/META-INF/MANIFEST.MF
  5. +0 −28 plugins/org.eclipse.datatools.enablement.mysql.ui/about.html
  6. +0 −27 plugins/org.eclipse.datatools.enablement.mysql.ui/build.properties
  7. BIN plugins/org.eclipse.datatools.enablement.mysql.ui/icons/new_db_element.gif
  8. +0 −17 plugins/org.eclipse.datatools.enablement.mysql.ui/plugin.properties
  9. +0 −86 plugins/org.eclipse.datatools.enablement.mysql.ui/plugin.xml
  10. +0 −22 ...src/org/eclipse/datatools/enablement/mysql/internal/ui/connection/MySQLDBProfilePropertyPage.java
  11. +0 −23 .../org/eclipse/datatools/enablement/mysql/internal/ui/connection/MySQLProfileDetailsWizardPage.java
  12. +0 −23 ...rg/eclipse/datatools/enablement/mysql/internal/ui/connection/NewMySQLConnectionProfileWizard.java
  13. +0 −15 ...ipse/datatools/enablement/mysql/internal/ui/connection/drivers/MySQLOtherDriverUIContributor.java
  14. +0 −50 ...clipse.datatools.enablement.mysql.ui/src/org/eclipse/datatools/enablement/mysql/ui/Activator.java
  15. +0 −7 plugins/org.eclipse.datatools.enablement.mysql/.classpath
  16. +0 −1 plugins/org.eclipse.datatools.enablement.mysql/.cvsignore
  17. +0 −28 plugins/org.eclipse.datatools.enablement.mysql/.project
  18. +0 −12 plugins/org.eclipse.datatools.enablement.mysql/.settings/org.eclipse.jdt.core.prefs
  19. +0 −23 plugins/org.eclipse.datatools.enablement.mysql/META-INF/MANIFEST.MF
  20. +0 −28 plugins/org.eclipse.datatools.enablement.mysql/about.html
  21. +0 −24 plugins/org.eclipse.datatools.enablement.mysql/build.properties
  22. BIN plugins/org.eclipse.datatools.enablement.mysql/icons/jdbc_16.gif
  23. +0 −34 plugins/org.eclipse.datatools.enablement.mysql/plugin.properties
  24. +0 −349 plugins/org.eclipse.datatools.enablement.mysql/plugin.xml
  25. +0 −18 .../org/eclipse/datatools/enablement/internal/mysql/connection/IMySQLConnectionProfileConstants.java
  26. +0 −36 ...ql/src/org/eclipse/datatools/enablement/internal/mysql/connection/JDBCMySQLConnectionFactory.java
  27. +0 −21 ...mysql/src/org/eclipse/datatools/enablement/internal/mysql/connection/JDBCMySQLJDBCConnection.java
  28. +0 −21 ...clipse/datatools/enablement/internal/mysql/connection/MySQLPasswordPropertiesPersistenceHook.java
  29. +0 −89 ...rg.eclipse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/MysqlPlugin.java
  30. +0 −49 ...tools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogColumn.java
  31. +0 −68 ...ols.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogDatabase.java
  32. +0 −115 ...s.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogForeignKey.java
  33. +0 −42 ...atools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogIndex.java
  34. +0 −43 ...s.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogPrimaryKey.java
  35. +0 −41 ...ols.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogProvider.java
  36. +0 −132 ...tools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogSchema.java
  37. +0 −629 ...atools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogTable.java
  38. +0 −244 ...se.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/ddl/MySqlDdlBuilder.java
  39. +0 −24 ....datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/ddl/MySqlDdlGenerator.java
  40. +0 −107 ...pse.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/ddl/MySqlDdlScript.java
  41. +0 −739 ...enablement.mysql/src/org/eclipse/datatools/enablement/mysql/ddl/shared/MySqlDdlBuilderHelper.java
  42. +0 −645 ...ablement.mysql/src/org/eclipse/datatools/enablement/mysql/ddl/shared/MySqlDdlGeneratorHelper.java
View
7 plugins/org.eclipse.datatools.enablement.mysql.ui/.classpath
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
View
1 plugins/org.eclipse.datatools.enablement.mysql.ui/.cvsignore
@@ -1 +0,0 @@
-bin
View
28 plugins/org.eclipse.datatools.enablement.mysql.ui/.project
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.datatools.enablement.mysql.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
View
19 plugins/org.eclipse.datatools.enablement.mysql.ui/META-INF/MANIFEST.MF
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.datatools.enablement.mysql.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.datatools.enablement.mysql.ui.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.datatools.connectivity;bundle-version="[1.0.1,2.0.0)",
- org.eclipse.datatools.connectivity.ui;bundle-version="[1.0.1,2.0.0)",
- org.eclipse.datatools.enablement.mysql;bundle-version="[1.0.0,2.0.0)"
-Eclipse-LazyStart: true
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.datatools.enablement.mysql.ui,
- org.eclipse.datatools.enablement.mysql.internal.ui.connection,
- org.eclipse.datatools.enablement.mysql.internal.ui.connection.drivers
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
View
28 plugins/org.eclipse.datatools.enablement.mysql.ui/about.html
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 15, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
View
27 plugins/org.eclipse.datatools.enablement.mysql.ui/build.properties
@@ -1,27 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 Versant Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Versant Corporation - initial API and implementation
-# IBM Corporation - migrated to new wizard framework
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml
-src.dir = src/
-plugin.version = 1.0.0.200711021
-javadoc.dir = doc/api/
-download.dir = ./download/
-javac.source = 1.4
-javac.target = 1.4
-src.includes = about.html
-
View
BIN plugins/org.eclipse.datatools.enablement.mysql.ui/icons/new_db_element.gif
Deleted file not rendered
View
17 plugins/org.eclipse.datatools.enablement.mysql.ui/plugin.properties
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=Eclipse Data Tools Platform MySQL UI Plug-in
-providerName=Eclipse.org
-
-profile.mysql.wizard.title = MySQL
-profile.mysql.wizard.description = Create a MySQL connection profile.
-profile.mysql.properties = Driver Properties
-
View
86 plugins/org.eclipse.datatools.enablement.mysql.ui/plugin.xml
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.datatools.connectivity.ui.driverPropertyEditor">
- <propertyEditor
- customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
- driverPropertyID="org.eclipse.datatools.connectivity.db.password"
- driverTemplateID="org.eclipse.datatools.enablement.mysql.4_0.driverTemplate"
- id="org.eclipse.datatools.enablement.mysql.4_0.driverTemplate.password">
- </propertyEditor>
- <propertyEditor
- customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
- driverPropertyID="org.eclipse.datatools.connectivity.db.password"
- driverTemplateID="org.eclipse.datatools.enablement.mysql.4_1.driverTemplate"
- id="org.eclipse.datatools.enablement.mysql.4_1.driverTemplate.password">
- </propertyEditor>
- <propertyEditor
- customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
- driverPropertyID="org.eclipse.datatools.connectivity.db.password"
- driverTemplateID="org.eclipse.datatools.enablement.mysql.5_0.driverTemplate"
- id="org.eclipse.datatools.enablement.mysql.5_0.driverTemplate.password">
- </propertyEditor>
- <propertyEditor
- customPropertyDescriptor="org.eclipse.datatools.connectivity.ui.PasswordTextPropertyDescriptor"
- driverPropertyID="org.eclipse.datatools.connectivity.db.password"
- driverTemplateID="org.eclipse.datatools.enablement.mysql.5_1.driverTemplate"
- id="org.eclipse.datatools.enablement.mysql.5_1.driverTemplate.password">
- </propertyEditor>
- </extension>
-
- <extension
- point="org.eclipse.datatools.connectivity.connectionProfile">
- <newWizard
- class="org.eclipse.datatools.enablement.mysql.internal.ui.connection.NewMySQLConnectionProfileWizard"
- icon="icons/new_db_element.gif"
- id="org.eclipse.datatools.enablement.mysql.NewMySQLConnectionProfileWizard"
- name="%profile.mysql.wizard.title"
- description = "%profile.mysql.wizard.description"
- profile="org.eclipse.datatools.enablement.mysql.connectionProfile"/>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- class="org.eclipse.datatools.enablement.mysql.internal.ui.connection.MySQLDBProfilePropertyPage"
- id="org.eclipse.datatools.enablement.mysql.profileProperties"
- name="%profile.mysql.properties"
- objectClass="org.eclipse.datatools.connectivity.IConnectionProfile">
- <filter
- name="org.eclipse.datatools.profile.property.id"
- value="org.eclipse.datatools.enablement.mysql.connectionProfile"/>
- </page>
- </extension>
-
- <extension point="org.eclipse.datatools.connectivity.ui.driverUIContributor">
- <driverUIContributor
- class="org.eclipse.datatools.enablement.mysql.internal.ui.connection.drivers.MySQLOtherDriverUIContributor"
- driverTemplateID="org.eclipse.datatools.enablement.mysql.4_0.driverTemplate"
- id="org.eclipse.datatools.enablement.mysql.internal.ui.connection.drivers.4_0.MySQLOtherDriverUIContributor">
- </driverUIContributor>
- </extension>
-
- <extension point="org.eclipse.datatools.connectivity.ui.driverUIContributor">
- <driverUIContributor
- class="org.eclipse.datatools.enablement.mysql.internal.ui.connection.drivers.MySQLOtherDriverUIContributor"
- driverTemplateID="org.eclipse.datatools.enablement.mysql.4_1.driverTemplate"
- id="org.eclipse.datatools.enablement.mysql.internal.ui.connection.drivers.4_1.MySQLOtherDriverUIContributor">
- </driverUIContributor>
- </extension>
-
- <extension point="org.eclipse.datatools.connectivity.ui.driverUIContributor">
- <driverUIContributor
- class="org.eclipse.datatools.enablement.mysql.internal.ui.connection.drivers.MySQLOtherDriverUIContributor"
- driverTemplateID="org.eclipse.datatools.enablement.mysql.5_0.driverTemplate"
- id="org.eclipse.datatools.enablement.mysql.internal.ui.connection.drivers.5_0.MySQLOtherDriverUIContributor">
- </driverUIContributor>
- </extension>
-
- <extension point="org.eclipse.datatools.connectivity.ui.driverUIContributor">
- <driverUIContributor
- class="org.eclipse.datatools.enablement.mysql.internal.ui.connection.drivers.MySQLOtherDriverUIContributor"
- driverTemplateID="org.eclipse.datatools.enablement.mysql.5_1.driverTemplate"
- id="org.eclipse.datatools.enablement.mysql.internal.ui.connection.drivers.5_1.MySQLOtherDriverUIContributor">
- </driverUIContributor>
- </extension>
-</plugin>
View
22 ...eclipse/datatools/enablement/mysql/internal/ui/connection/MySQLDBProfilePropertyPage.java
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.datatools.enablement.mysql.internal.ui.connection;
-
-import org.eclipse.datatools.connectivity.ui.wizards.ExtensibleProfileDetailsPropertyPage;
-import org.eclipse.datatools.enablement.internal.mysql.connection.IMySQLConnectionProfileConstants;
-
-public class MySQLDBProfilePropertyPage extends
- ExtensibleProfileDetailsPropertyPage {
-
- public MySQLDBProfilePropertyPage() {
- super(IMySQLConnectionProfileConstants.MYSQL_CATEGORY_ID);
- }
-}
View
23 ...ipse/datatools/enablement/mysql/internal/ui/connection/MySQLProfileDetailsWizardPage.java
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.datatools.enablement.mysql.internal.ui.connection;
-
-import org.eclipse.datatools.connectivity.ui.wizards.ExtensibleProfileDetailsWizardPage;
-import org.eclipse.datatools.enablement.internal.mysql.connection.IMySQLConnectionProfileConstants;
-
-public class MySQLProfileDetailsWizardPage extends
- ExtensibleProfileDetailsWizardPage {
-
- public MySQLProfileDetailsWizardPage(String pageName) {
- super(pageName,
- IMySQLConnectionProfileConstants.MYSQL_CATEGORY_ID);
- }
-}
View
23 ...se/datatools/enablement/mysql/internal/ui/connection/NewMySQLConnectionProfileWizard.java
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.datatools.enablement.mysql.internal.ui.connection;
-
-import org.eclipse.datatools.connectivity.ui.wizards.ExtensibleNewConnectionProfileWizard;
-
-public class NewMySQLConnectionProfileWizard extends
- ExtensibleNewConnectionProfileWizard {
-
- public NewMySQLConnectionProfileWizard() {
- super(
- new MySQLProfileDetailsWizardPage(
- "org.eclipse.datatools.enablement.mysql.internal.ui.connection.MySQLProfileDetailsWizardPage"));
- }
-}
View
15 ...atools/enablement/mysql/internal/ui/connection/drivers/MySQLOtherDriverUIContributor.java
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.datatools.enablement.mysql.internal.ui.connection.drivers;
-
-import org.eclipse.datatools.connectivity.ui.wizards.OtherDriverUIContributor;
-
-public class MySQLOtherDriverUIContributor extends OtherDriverUIContributor {
-
-}
View
50 ...atatools.enablement.mysql.ui/src/org/eclipse/datatools/enablement/mysql/ui/Activator.java
@@ -1,50 +0,0 @@
-package org.eclipse.datatools.enablement.mysql.ui;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.datatools.enablement.mysql.ui";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
View
7 plugins/org.eclipse.datatools.enablement.mysql/.classpath
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
View
1 plugins/org.eclipse.datatools.enablement.mysql/.cvsignore
@@ -1 +0,0 @@
-bin
View
28 plugins/org.eclipse.datatools.enablement.mysql/.project
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.datatools.enablement.mysql</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
View
12 plugins/org.eclipse.datatools.enablement.mysql/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +0,0 @@
-#Fri Apr 13 14:14:14 PDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.4
View
23 plugins/org.eclipse.datatools.enablement.mysql/META-INF/MANIFEST.MF
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.datatools.enablement.mysql; singleton:=true
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.datatools.enablement.mysql.MysqlPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- com.ibm.icu;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.datatools.modelbase.dbdefinition;bundle-version="[0.9.0,1.5.0)",
- org.eclipse.datatools.modelbase.sql;bundle-version="[0.9.0,1.5.0)",
- org.eclipse.datatools.connectivity.sqm.core;bundle-version="[0.9.0,1.5.0)",
- org.eclipse.datatools.connectivity;bundle-version="[1.0.1,2.0.0)"
-Export-Package: org.eclipse.datatools.enablement.internal.mysql.connection,
- org.eclipse.datatools.enablement.mysql;x-internal:=true,
- org.eclipse.datatools.enablement.mysql.catalog;x-internal:=true,
- org.eclipse.datatools.enablement.mysql.ddl;x-internal:=true,
- org.eclipse.datatools.enablement.mysql.ddl.shared
-Eclipse-LazyStart: true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
View
28 plugins/org.eclipse.datatools.enablement.mysql/about.html
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 15, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
View
24 plugins/org.eclipse.datatools.enablement.mysql/build.properties
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 Versant Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Versant Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- .,\
- plugin.properties,\
- about.html,\
- META-INF/,\
- icons/
-jars.compile.order = .
-source.. = src/
-plugin.version = 1.0.0.200706071
-javadoc.dir = doc/api/
-download.dir = ./download/
-javac.source = 1.4
-javac.target = 1.4
-src.includes = about.html
View
BIN plugins/org.eclipse.datatools.enablement.mysql/icons/jdbc_16.gif
Deleted file not rendered
View
34 plugins/org.eclipse.datatools.enablement.mysql/plugin.properties
@@ -1,34 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 Versant Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Versant Corporation - initial API and implementation
-###############################################################################
-pluginName=Eclipse Data Tools Platform MySQL Enablement Plug-in
-providerName=Eclipse.org
-
-driverClass = Driver Class
-driverVendor = Vendor
-driverVersion = Version
-driverDBName = Database Name
-driverConnectionURL = Connection URL
-driverUID = User ID
-driverPWD = Password
-
-MYSQL_CATEGORY_NAME = MySQL
-4_0_VERSION_CATEGORY_NAME = 4.0
-4_1_VERSION_CATEGORY_NAME = 4.1
-5_0_VERSION_CATEGORY_NAME = 5.0
-5_1_VERSION_CATEGORY_NAME = 5.1
-
-org.eclipse.datatools.enablement.mysql.4_0.driverTemplate = MySQL JDBC Driver
-org.eclipse.datatools.enablement.mysql.4_1.driverTemplate = MySQL JDBC Driver
-org.eclipse.datatools.enablement.mysql.5_0.driverTemplate = MySQL JDBC Driver
-org.eclipse.datatools.enablement.mysql.5_1.driverTemplate = MySQL JDBC Driver
-
-jdbc.connection.name = JDBC Connection
-profile.mysql.title = MySQL
View
349 plugins/org.eclipse.datatools.enablement.mysql/plugin.xml
@@ -1,349 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension
- point="org.eclipse.datatools.connectivity.sqm.core.catalog">
- <catalog
- version="4.0"
- product="MySql"
- provider="org.eclipse.datatools.enablement.mysql.catalog.MySqlCatalogProvider">
- </catalog>
- </extension>
- <extension
- point="org.eclipse.datatools.connectivity.sqm.core.ddlGeneration">
- <generator
- version="4.0"
- product="MySql"
- class="org.eclipse.datatools.enablement.mysql.ddl.MySqlDdlGenerator">
- </generator>
- </extension>
-
- <extension
- point="org.eclipse.datatools.connectivity.sqm.core.catalog">
- <catalog
- version="4.1"
- product="MySql"
- provider="org.eclipse.datatools.enablement.mysql.catalog.MySqlCatalogProvider">
- </catalog>
- </extension>
- <extension
- point="org.eclipse.datatools.connectivity.sqm.core.ddlGeneration">
- <generator
- version="4.1"
- product="MySql"
- class="org.eclipse.datatools.enablement.mysql.ddl.MySqlDdlGenerator">
- </generator>
- </extension>
-
- <extension
- point="org.eclipse.datatools.connectivity.sqm.core.catalog">
- <catalog
- version="5.0"
- product="MySql"
- provider="org.eclipse.datatools.enablement.mysql.catalog.MySqlCatalogProvider">
- </catalog>
- </extension>
- <extension
- point="org.eclipse.datatools.connectivity.sqm.core.ddlGeneration">
- <generator
- version="5.0"
- product="MySql"
- class="org.eclipse.datatools.enablement.mysql.ddl.MySqlDdlGenerator">
- </generator>
- </extension>
-
- <extension
- point="org.eclipse.datatools.connectivity.sqm.core.catalog">
- <catalog
- version="5.1"
- product="MySql"
- provider="org.eclipse.datatools.enablement.mysql.catalog.MySqlCatalogProvider">
- </catalog>
- </extension>
- <extension
- point="org.eclipse.datatools.connectivity.sqm.core.ddlGeneration">
- <generator
- version="5.1"
- product="MySql"
- class="org.eclipse.datatools.enablement.mysql.ddl.MySqlDdlGenerator">
- </generator>
- </extension>
-
- <extension
- point="org.eclipse.datatools.connectivity.connectionProfile">
- <connectionProfile
- category="org.eclipse.datatools.connectivity.db.category"
- configurationType="org.eclipse.datatools.connectivity.db.generic.configurationType"
- icon="icons/jdbc_16.gif"
- id="org.eclipse.datatools.enablement.mysql.connectionProfile"
- name="%profile.mysql.title"
- pingFactory="org.eclipse.datatools.enablement.internal.mysql.connection.JDBCMySQLConnectionFactory"
- propertiesPersistenceHook="org.eclipse.datatools.enablement.internal.mysql.connection.MySQLPasswordPropertiesPersistenceHook"/>
- <connectionFactory
- class="org.eclipse.datatools.enablement.internal.mysql.connection.JDBCMySQLConnectionFactory"
- id="java.sql.Connection"
- name="%jdbc.connection.name"
- profile="org.eclipse.datatools.enablement.mysql.connectionProfile"/>
- </extension>
-
- <extension
- point="org.eclipse.datatools.connectivity.driverExtension">
- <category
- parentCategory="org.eclipse.datatools.connectivity.db.driverCategory"
- id="org.eclipse.datatools.enablement.mysql.driverCategory"
- name="%MYSQL_CATEGORY_NAME"/>
- <category
- parentCategory="org.eclipse.datatools.enablement.mysql.driverCategory"
- id="org.eclipse.datatools.enablement.mysql.4_0.driverCategory"
- name="%4_0_VERSION_CATEGORY_NAME"/>
- <category
- parentCategory="org.eclipse.datatools.enablement.mysql.driverCategory"
- id="org.eclipse.datatools.enablement.mysql.4_1.driverCategory"
- name="%4_1_VERSION_CATEGORY_NAME"/>
- <category
- parentCategory="org.eclipse.datatools.enablement.mysql.driverCategory"
- id="org.eclipse.datatools.enablement.mysql.5_0.driverCategory"
- name="%5_0_VERSION_CATEGORY_NAME"/>
- <category
- parentCategory="org.eclipse.datatools.enablement.mysql.driverCategory"
- id="org.eclipse.datatools.enablement.mysql.5_1.driverCategory"
- name="%5_1_VERSION_CATEGORY_NAME"/>
-
- <driverTemplate
- createDefault="false"
- emptyJarListIsOK="false"
- id="org.eclipse.datatools.enablement.mysql.4_0.driverTemplate"
- jarList="mysql-connector-java-4.0.0-bin.jar"
- name="%org.eclipse.datatools.enablement.mysql.4_0.driverTemplate"
- parentCategory="org.eclipse.datatools.enablement.mysql.4_0.driverCategory">
- <properties>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.driverClass"
- name="%driverClass"
- value="com.mysql.jdbc.Driver"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.vendor"
- name="%driverVendor"
- value="MySql"
- required="true"
- visible="false"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.version"
- name="%driverVersion"
- value="4.0"
- required="true"
- visible="false"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.databaseName"
- name="%driverDBName"
- value="database"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.URL"
- name="%driverConnectionURL"
- value="jdbc:mysql://localhost:3306/database"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.username"
- name="%driverUID"
- value="root"
- required="false"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.password"
- name="%driverPWD"
- required="false"
- visible="true"/>
- </properties>
- </driverTemplate>
-
- <driverTemplate
- createDefault="false"
- emptyJarListIsOK="false"
- id="org.eclipse.datatools.enablement.mysql.4_1.driverTemplate"
- jarList="mysql-connector-java-4.1.0-bin.jar"
- name="%org.eclipse.datatools.enablement.mysql.4_1.driverTemplate"
- parentCategory="org.eclipse.datatools.enablement.mysql.4_1.driverCategory">
- <properties>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.driverClass"
- name="%driverClass"
- value="com.mysql.jdbc.Driver"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.vendor"
- name="%driverVendor"
- value="MySql"
- required="true"
- visible="false"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.version"
- name="%driverVersion"
- value="4.1"
- required="true"
- visible="false"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.databaseName"
- name="%driverDBName"
- value="database"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.URL"
- name="%driverConnectionURL"
- value="jdbc:mysql://localhost:3306/database"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.username"
- name="%driverUID"
- value="root"
- required="false"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.password"
- name="%driverPWD"
- required="false"
- visible="true"/>
- </properties>
- </driverTemplate>
-
- <driverTemplate
- createDefault="false"
- emptyJarListIsOK="false"
- id="org.eclipse.datatools.enablement.mysql.5_0.driverTemplate"
- jarList="mysql-connector-java-5.0.0-bin.jar"
- name="%org.eclipse.datatools.enablement.mysql.5_0.driverTemplate"
- parentCategory="org.eclipse.datatools.enablement.mysql.5_0.driverCategory">
- <properties>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.driverClass"
- name="%driverClass"
- value="com.mysql.jdbc.Driver"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.vendor"
- name="%driverVendor"
- value="MySql"
- required="true"
- visible="false"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.version"
- name="%driverVersion"
- value="5.0"
- required="true"
- visible="false"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.databaseName"
- name="%driverDBName"
- value="database"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.URL"
- name="%driverConnectionURL"
- value="jdbc:mysql://localhost:3306/database"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.username"
- name="%driverUID"
- value="root"
- required="false"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.password"
- name="%driverPWD"
- required="false"
- visible="true"/>
- </properties>
- </driverTemplate>
-
- <driverTemplate
- createDefault="false"
- emptyJarListIsOK="false"
- id="org.eclipse.datatools.enablement.mysql.5_1.driverTemplate"
- jarList="mysql-connector-java-5.1.0-bin.jar"
- name="%org.eclipse.datatools.enablement.mysql.5_1.driverTemplate"
- parentCategory="org.eclipse.datatools.enablement.mysql.5_1.driverCategory">
- <properties>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.driverClass"
- name="%driverClass"
- value="com.mysql.jdbc.Driver"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.vendor"
- name="%driverVendor"
- value="MySql"
- required="true"
- visible="false"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.version"
- name="%driverVersion"
- value="5.1"
- required="true"
- visible="false"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.databaseName"
- name="%driverDBName"
- value="database"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.URL"
- name="%driverConnectionURL"
- value="jdbc:mysql://localhost:3306/database"
- required="true"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.username"
- name="%driverUID"
- value="root"
- required="false"
- visible="true"/>
- <property
- generated="false"
- id="org.eclipse.datatools.connectivity.db.password"
- name="%driverPWD"
- required="false"
- visible="true"/>
- </properties>
- </driverTemplate>
- </extension>
-</plugin>
View
18 ...ipse/datatools/enablement/internal/mysql/connection/IMySQLConnectionProfileConstants.java
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.datatools.enablement.internal.mysql.connection;
-
-
-public interface IMySQLConnectionProfileConstants {
-
- public static final String MYSQL_CATEGORY_ID = "org.eclipse.datatools.enablement.mysql.driverCategory"; //$NON-NLS-1$
-
-}
View
36 ...rg/eclipse/datatools/enablement/internal/mysql/connection/JDBCMySQLConnectionFactory.java
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.datatools.enablement.internal.mysql.connection;
-
-import org.eclipse.datatools.connectivity.IConnection;
-import org.eclipse.datatools.connectivity.IConnectionFactory;
-import org.eclipse.datatools.connectivity.IConnectionProfile;
-
-
-public class JDBCMySQLConnectionFactory implements IConnectionFactory {
-
- public JDBCMySQLConnectionFactory() {
- super();
- }
-
- public IConnection createConnection(IConnectionProfile profile) {
- JDBCMySQLJDBCConnection connection = new JDBCMySQLJDBCConnection(profile,
- getClass());
- connection.open();
- return connection;
- }
-
- public IConnection createConnection(IConnectionProfile profile, String uid,
- String pwd) {
- return createConnection(profile);
- }
-}
View
21 ...c/org/eclipse/datatools/enablement/internal/mysql/connection/JDBCMySQLJDBCConnection.java
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.datatools.enablement.internal.mysql.connection;
-
-import org.eclipse.datatools.connectivity.IConnectionProfile;
-import org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection;
-
-public class JDBCMySQLJDBCConnection extends JDBCConnection {
-
- public JDBCMySQLJDBCConnection(IConnectionProfile profile, Class factoryClass) {
- super(profile, factoryClass);
- }
-}
View
21 ...atatools/enablement/internal/mysql/connection/MySQLPasswordPropertiesPersistenceHook.java
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.datatools.enablement.internal.mysql.connection;
-
-import org.eclipse.datatools.connectivity.drivers.jdbc.JDBCPasswordPropertyPersistenceHook;
-
-public class MySQLPasswordPropertiesPersistenceHook extends
- JDBCPasswordPropertyPersistenceHook {
-
- public String getConnectionPropertiesPageID() {
- return "org.eclipse.datatools.enablement.mysql.profileProperties"; //$NON-NLS-1$
- }
-}
View
89 ...se.datatools.enablement.mysql/src/org/eclipse/datatools/enablement/mysql/MysqlPlugin.java
@@ -1,89 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2005 Versant Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Versant Corporation - initial API and implementation
- *******************************************************************************/
- package org.eclipse.datatools.enablement.mysql;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class MysqlPlugin extends Plugin {
- // The shared instance.
- private static MysqlPlugin plugin;
-
- // Resource bundle.
- private ResourceBundle resourceBundle;
-
- public static final String ID = "org.eclipse.wst.rdb.mysql"; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public MysqlPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static MysqlPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle, or 'key' if not
- * found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = MysqlPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle
- .getBundle("org.eclipse.wst.rdb.mysql.MysqlPluginResources"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-
-}
View
49 ...ablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogColumn.java
@@ -1,49 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2005 Versant Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Versant Corporation - initial API and implementation
- *******************************************************************************/
- package org.eclipse.datatools.enablement.mysql.catalog;
-
-import java.sql.Connection;
-
-import org.eclipse.datatools.connectivity.sqm.core.rte.ICatalogObject;
-import org.eclipse.datatools.connectivity.sqm.core.rte.RefreshManager;
-import org.eclipse.datatools.modelbase.sql.schema.Database;
-import org.eclipse.datatools.modelbase.sql.schema.IdentitySpecifier;
-import org.eclipse.datatools.modelbase.sql.tables.impl.ColumnImpl;
-
-/**
- * This class holds the column information
- */
-public class MySqlCatalogColumn extends ColumnImpl implements ICatalogObject {
-
- private static final long serialVersionUID = 3257008765202151480L;
-
- public void refresh() {
- RefreshManager.getInstance().referesh(this);
- }
-
- public boolean isSystemObject() {
- return false;
- }
-
- public Connection getConnection() {
- Database database = this.getCatalogDatabase();
- return ((MySqlCatalogDatabase) database).getConnection();
- }
-
- public Database getCatalogDatabase() {
- return this.getTable().getSchema().getDatabase();
- }
-
- public IdentitySpecifier getIdentitySpecifier() {
- return this.identitySpecifier;
- }
-
-}
View
68 ...lement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogDatabase.java
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 Versant Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Versant Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.datatools.enablement.mysql.catalog;
-
-import java.sql.Connection;
-
-import org.eclipse.datatools.connectivity.sqm.core.rte.ICatalogObject;
-import org.eclipse.datatools.connectivity.sqm.core.rte.RefreshManager;
-import org.eclipse.datatools.modelbase.sql.schema.Database;
-import org.eclipse.datatools.modelbase.sql.schema.SQLSchemaPackage;
-import org.eclipse.datatools.modelbase.sql.schema.Schema;
-import org.eclipse.datatools.modelbase.sql.schema.impl.DatabaseImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-
-/**
- * This is the Database implementation, and contains schemas (MySql does not
- * have schemas)
- */
-public class MySqlCatalogDatabase extends DatabaseImpl implements ICatalogObject {
-
- private static final long serialVersionUID = 3906091161042301493L;
-
- private Connection connection;
-
- public MySqlCatalogDatabase(Connection connection) {
- super();
- if (connection == null) {
- System.err.println("null connection"); //$NON-NLS-1$
- throw new RuntimeException();
- }
- this.connection = connection;
- }
-
- public void refresh() {
- if (schemas != null) {
- schemas.clear();
- schemas = null;
- }
- RefreshManager.getInstance().referesh(this);
- }
-
- public Connection getConnection() {
- return connection;
- }
-
- public Database getCatalogDatabase() {
- return this;
- }
-
- public EList getSchemas() {
- if (schemas == null) {
- schemas = new EObjectWithInverseResolvingEList(Schema.class, this,
- SQLSchemaPackage.DATABASE__SCHEMAS,
- SQLSchemaPackage.SCHEMA__DATABASE);
- Schema schema = new MySqlCatalogSchema();
- schema.setName(getName());
- schemas.add(schema);
- }
- return this.schemas;
- }
-}
View
115 ...ment.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogForeignKey.java
@@ -1,115 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2005 Versant Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Versant Corporation - initial API and implementation
- *******************************************************************************/
- package org.eclipse.datatools.enablement.mysql.catalog;
-
-import java.sql.Connection;
-import java.util.Iterator;
-
-import org.eclipse.datatools.connectivity.sqm.core.rte.ICatalogObject;
-import org.eclipse.datatools.connectivity.sqm.internal.core.RDBCorePlugin;
-import org.eclipse.datatools.modelbase.sql.constraints.ForeignKey;
-import org.eclipse.datatools.modelbase.sql.constraints.SQLConstraintsPackage;
-import org.eclipse.datatools.modelbase.sql.constraints.impl.ForeignKeyImpl;
-import org.eclipse.datatools.modelbase.sql.schema.Database;
-import org.eclipse.datatools.modelbase.sql.tables.Column;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * This class is the ForeignKey implementation
- */
-public class MySqlCatalogForeignKey extends ForeignKeyImpl implements
- ICatalogObject {
-
- private static final long serialVersionUID = 3833460717268643894L;
-
- private boolean eAnnotationLoaded = false;
-
- public void refresh() {
- }
-
- public boolean isSystemObject() {
- return false;
- }
-
- public EList getEAnnotations() {
- if (!this.eAnnotationLoaded)
- this.loadEAnnotations();
- return this.eAnnotations;
- }
-
- public Connection getConnection() {
- Database database = this.getCatalogDatabase();
- return ((MySqlCatalogDatabase) database).getConnection();
- }
-
- public Database getCatalogDatabase() {
- return this.getBaseTable().getSchema().getDatabase();
- }
-
- public boolean eIsSet(EStructuralFeature eFeature) {
- int id = eDerivedStructuralFeatureID(eFeature);
- if (id == SQLConstraintsPackage.FOREIGN_KEY__EANNOTATIONS) {
- this.getEAnnotations();
- }
-
- return super.eIsSet(eFeature);
- }
-
- private synchronized void loadEAnnotations() {
- if (this.eAnnotationLoaded)
- return;
- this.eAnnotationLoaded = true;
- super.getEAnnotations();
-
- boolean deliver = this.eDeliver();
- this.eSetDeliver(false);
-
- MySqlCatalogForeignKey.setAsIdentifyingRelatinship(this, this
- .isIdentifyingRelationship(super.getMembers()));
-
- this.eSetDeliver(deliver);
- }
-
- public static void setAsIdentifyingRelatinship(ForeignKey fk,
- boolean identifying) {
- EAnnotation eAnnotation = fk
- .addEAnnotation(RDBCorePlugin.FK_MODELING_RELATIONSHIP);
- fk.addEAnnotationDetail(eAnnotation,
- RDBCorePlugin.FK_IS_IDENTIFYING_RELATIONSHIP, new Boolean(
- identifying).toString());
- fk.addEAnnotationDetail(eAnnotation,
- RDBCorePlugin.FK_CHILD_MULTIPLICITY, RDBCorePlugin.MANY);
- fk.addEAnnotationDetail(eAnnotation, RDBCorePlugin.FK_CHILD_ROLE_NAME,
- new String());
- fk.addEAnnotationDetail(eAnnotation,
- RDBCorePlugin.FK_PARENT_MULTIPLICITY,
- (fk.getMembers().size() > 0) ? RDBCorePlugin.ZERO_TO_ONE
- : RDBCorePlugin.ONE);
- fk.addEAnnotationDetail(eAnnotation, RDBCorePlugin.FK_PARENT_ROLE_NAME,
- new String());
- }
-
- private boolean isIdentifyingRelationship(EList columns) {
- boolean isIdentifying = true;
- Iterator it = columns.iterator();
- while (it.hasNext()) {
- Column column = (Column) it.next();
- if (!column.isPartOfPrimaryKey()) {
- isIdentifying = false;
- break;
- }
- }
- return isIdentifying;
- }
-
-}
View
42 ...nablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogIndex.java
@@ -1,42 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2005 Versant Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Versant Corporation - initial API and implementation
- *******************************************************************************/
- package org.eclipse.datatools.enablement.mysql.catalog;
-
-import java.sql.Connection;
-
-import org.eclipse.datatools.connectivity.sqm.core.rte.ICatalogObject;
-import org.eclipse.datatools.modelbase.sql.constraints.impl.IndexImpl;
-import org.eclipse.datatools.modelbase.sql.schema.Database;
-
-/**
- * This class is the Index implementation
- */
-public class MySqlCatalogIndex extends IndexImpl implements ICatalogObject {
-
- private static final long serialVersionUID = 4121975841161754672L;
-
- public void refresh() {
- }
-
- public boolean isSystemObject() {
- return false;
- }
-
- public Connection getConnection() {
- Database database = this.getCatalogDatabase();
- return ((MySqlCatalogDatabase) database).getConnection();
- }
-
- public Database getCatalogDatabase() {
- return this.getSchema().getDatabase();
- }
-
-}
View
43 ...ment.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogPrimaryKey.java
@@ -1,43 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2005 Versant Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Versant Corporation - initial API and implementation
- *******************************************************************************/
- package org.eclipse.datatools.enablement.mysql.catalog;
-
-import java.sql.Connection;
-
-import org.eclipse.datatools.connectivity.sqm.core.rte.ICatalogObject;
-import org.eclipse.datatools.modelbase.sql.constraints.impl.PrimaryKeyImpl;
-import org.eclipse.datatools.modelbase.sql.schema.Database;
-
-/**
- * This class is the PrimaryKey implementation
- */
-public class MySqlCatalogPrimaryKey extends PrimaryKeyImpl implements
- ICatalogObject {
-
- private static final long serialVersionUID = 3256441425942951474L;
-
- public void refresh() {
- }
-
- public boolean isSystemObject() {
- return false;
- }
-
- public Connection getConnection() {
- Database database = this.getCatalogDatabase();
- return ((MySqlCatalogDatabase) database).getConnection();
- }
-
- public Database getCatalogDatabase() {
- return this.getBaseTable().getSchema().getDatabase();
- }
-
-}
View
41 ...lement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogProvider.java
@@ -1,41 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2005 Versant Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Versant Corporation - initial API and implementation
- *******************************************************************************/
- package org.eclipse.datatools.enablement.mysql.catalog;
-
-import java.sql.Connection;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.datatools.connectivity.sqm.core.rte.ICatalogProvider;
-import org.eclipse.datatools.modelbase.sql.schema.Database;
-
-public class MySqlCatalogProvider implements ICatalogProvider,
- IExecutableExtension {
-
- private String product;
- private String version;
-
- public void setInitializationData(IConfigurationElement config,
- String propertyName, Object data) throws CoreException {
- this.product = config.getAttribute("product"); //$NON-NLS-1$
- this.version = config.getAttribute("version"); //$NON-NLS-1$
- }
-
- public Database getCatalogDatabase(Connection connection) {
- Database database = new MySqlCatalogDatabase(connection);
- database.setVendor(this.product);
- database.setVersion(this.version);
- return database;
- }
-
-
-}
View
132 ...ablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogSchema.java
@@ -1,132 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2005 Versant Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Versant Corporation - initial API and implementation
- *******************************************************************************/
- package org.eclipse.datatools.enablement.mysql.catalog;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.Statement;
-import java.util.Arrays;
-import java.util.HashSet;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.datatools.connectivity.sqm.core.rte.ICatalogObject;
-import org.eclipse.datatools.connectivity.sqm.core.rte.RefreshManager;
-import org.eclipse.datatools.enablement.mysql.MysqlPlugin;
-import org.eclipse.datatools.modelbase.sql.schema.Database;
-import org.eclipse.datatools.modelbase.sql.schema.SQLSchemaPackage;
-import org.eclipse.datatools.modelbase.sql.schema.impl.SchemaImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * This class is the Schema implementation, its purpose is to load tables
- */
-public class MySqlCatalogSchema extends SchemaImpl implements ICatalogObject {
-
- private static final long serialVersionUID = 3257567317125903160L;
-
- private static final String[] POSSIBLE_TABLE_TYPE_COL_NAMES =
- new String[] {"Types", "Type", "Engine"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- private boolean tablesLoaded = false;
-
- public synchronized void refresh() {
- this.tablesLoaded = false;
- RefreshManager.getInstance().referesh(this);
- }
-
- public boolean isSystemObject() {
- return false;
- }
-
- public Connection getConnection() {
- Database database = this.getDatabase();
- return ((MySqlCatalogDatabase) database).getConnection();
- }
-
- public Database getCatalogDatabase() {
- return this.getDatabase();
- }
-
- public EList getTables() {
- if (!this.tablesLoaded)
- this.loadTables();
- return this.tables;
- }
-
- public boolean eIsSet(EStructuralFeature eFeature) {
- int id = eDerivedStructuralFeatureID(eFeature);
- if (id == SQLSchemaPackage.SCHEMA__TABLES) {
- this.getTables();
- } else if (id == SQLSchemaPackage.SCHEMA__ROUTINES) {
- this.getRoutines();
- }
- return super.eIsSet(eFeature);
- }
-
- /**
- * Load the table names, we also get the engin type ie. InnoDB ect. of the
- * table, we can do a chech here to see if there is a identyty column here,
- * if there is we know to load it later.
- */
- private synchronized void loadTables() {
- if (this.tablesLoaded)
- return;
- EList tableList = super.getTables();
- tableList.clear();
- Connection connection = this.getConnection();
-
- boolean deliver = this.eDeliver();
- this.eSetDeliver(false);
- try {
- String catalogName = connection.getCatalog();
- if(catalogName == null || catalogName.trim().length() == 0){
- connection.setCatalog(getName());
- }
- String query = "SHOW TABLE STATUS FROM `"+connection.getCatalog()+"`"; //$NON-NLS-1$ //$NON-NLS-2$
- Statement s = connection.createStatement();
- ResultSet r = s.executeQuery(query);
- ResultSetMetaData rmd = r.getMetaData();
- String typeStr = null;
- int columnCount = rmd.getColumnCount();
- HashSet possibleTableTypeColNames = new HashSet(Arrays.asList(POSSIBLE_TABLE_TYPE_COL_NAMES));
- for(int x = 1; x <= columnCount; x++){
- String colName = rmd.getColumnName(x).trim();
- if(possibleTableTypeColNames.contains(colName)){
- typeStr = colName;
- break;
- }
- }
-// String typeStr = version != null && version.startsWith("4.0") ? "Types" : "Engine";
- while (r.next()) {
- MySqlCatalogTable table = new MySqlCatalogTable();
- table.setName(r.getString("Name")); //$NON-NLS-1$
- if(typeStr != null){
- table.setTableType(r.getString(typeStr));
- }
- table.setAutoInc(r.getBoolean("Auto_increment")); //$NON-NLS-1$
- tableList.add(table);
- }
- this.tablesLoaded = true;
- r.close();
- s.close();
- } catch (Exception e) {
- MysqlPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, MysqlPlugin.ID, 0,
- "Could not load the tables for database " //$NON-NLS-1$
- + this.getDatabase().getName(), e));
- }
-
- this.eSetDeliver(deliver);
- }
-}
View
629 ...nablement.mysql/src/org/eclipse/datatools/enablement/mysql/catalog/MySqlCatalogTable.java
@@ -1,629 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2005 Versant Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Versant Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.datatools.enablement.mysql.catalog;
-
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.sql.Statement;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.datatools.connectivity.sqm.core.definition.DataModelElementFactory;
-import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinition;
-import org.eclipse.datatools.connectivity.sqm.core.rte.ICatalogObject;
-import org.eclipse.datatools.connectivity.sqm.core.rte.RefreshManager;
-import org.eclipse.datatools.connectivity.sqm.internal.core.RDBCorePlugin;
-import org.eclipse.datatools.enablement.mysql.MysqlPlugin;
-import org.eclipse.datatools.modelbase.dbdefinition.PredefinedDataTypeDefinition;
-import org.eclipse.datatools.modelbase.sql.constraints.*;
-import org.eclipse.datatools.modelbase.sql.datatypes.PredefinedDataType;
-import org.eclipse.datatools.modelbase.sql.schema.*;
-import org.eclipse.datatools.modelbase.sql.tables.BaseTable;
-import org.eclipse.datatools.modelbase.sql.tables.Column;
-import org.eclipse.datatools.modelbase.sql.tables.SQLTablesPackage;
-import org.eclipse.datatools.modelbase.sql.tables.Table;
-import org.eclipse.datatools.modelbase.sql.tables.impl.PersistentTableImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * This class is the Schema implementation, its purpose is to load columns,
- * constraint, index and primaryKeys
- */
-public class MySqlCatalogTable extends PersistentTableImpl implements
- ICatalogObject {
-
- private static final long serialVersionUID = 3761127145711088689L;
-
- private boolean columnsLoaded = false;
- private boolean constraintLoaded = false;
- private String tableType;
- private boolean isAutoInc;
- private boolean indexLoaded;
- private boolean pkLoaded;
-
- public void refresh() {
- this.columnsLoaded = false;
- this.constraintLoaded = false;
- this.pkLoaded = false;
- this.indexLoaded = false;
- super.getColumns().clear();
- super.getConstraints().clear();
- super.getIndex().clear();
- RefreshManager.getInstance().referesh(this);
- }
-
- public boolean isSystemObject() {
- return false;
- }
-
- public Connection getConnection() {
- Database database = this.getCatalogDatabase();
- return ((MySqlCatalogDatabase) database).getConnection();
- }
-
- public Database getCatalogDatabase() {
- return this.getSchema().getDatabase();
- }
-
- public PrimaryKey getPrimaryKey() {
- if (!this.pkLoaded)
- this.loadPrimaryKey();
- return doGetPrimaryKey();
- }
-
- private PrimaryKey doGetPrimaryKey() {
- Iterator allConstraints = super.getConstraints().iterator();
- while( allConstraints.hasNext() ) {
- Constraint currentConstraint = (Constraint)allConstraints.next();
- if (currentConstraint instanceof PrimaryKey) {
- return (PrimaryKey)currentConstraint;
- }
- }
- return null;
- }
-
-
- public EList getColumns() {
- if (!this.columnsLoaded)
- this.loadColumns();
- return this.columns;
- }
-
- public EList getConstraints() {
- if (!this.constraintLoaded)
- this.loadConstraints();
- return this.constraints;
- }
-
- public EList getIndex() {
- if (!this.indexLoaded)
- this.loadIndexes();
- return this.index;
- }
-
- public boolean eIsSet(EStructuralFeature eFeature) {
- int id = eDerivedStructuralFeatureID(eFeature);
- if (id == SQLTablesPackage.PERSISTENT_TABLE__COLUMNS) {
- this.getColumns();
- } else if (id == SQLTablesPackage.PERSISTENT_TABLE__CONSTRAINTS) {
- this.getConstraints();
- } else if (id == SQLTablesPackage.PERSISTENT_TABLE__INDEX) {
- this.getIndex();
- } else if (id == SQLTablesPackage.PERSISTENT_TABLE__TRIGGERS) {
- this.getTriggers();
- }
-
- return super.eIsSet(eFeature);
- }
-
- private synchronized void loadColumns() {
- if (this.columnsLoaded)
- return;
- EList columnList = super.getColumns();
-
- boolean deliver = this.eDeliver();
- this.eSetDeliver(false);
-
- try {
- DatabaseMetaData metaData = this.getConnection().getMetaData();
- ResultSet r = metaData.getColumns(null, null, this.getName(), null);
- while (r.next()) {
- Column column = new MySqlCatalogColumn();
-
- final String columnName = r.getString(4);
- column.setName(columnName);
-
- final String remarks = r.getString(12);
- column.setDescription(remarks);
-
- String defaultValue = r.getString(13);
- column.setDefaultValue(defaultValue);
-
- String typeName = r.getString(6);
-
- final DatabaseDefinition databaseDefinition = this
- .getDatabaseDefinition();
- PredefinedDataTypeDefinition typeDefinition = databaseDefinition
- .getPredefinedDataTypeDefinition(typeName);
- if (typeDefinition != null) {
- PredefinedDataType type = databaseDefinition
- .getPredefinedDataType(typeDefinition);
- if (typeDefinition.isLengthSupported()) {
- EStructuralFeature feature = type.eClass()
- .getEStructuralFeature("length"); //$NON-NLS-1$
- type.eSet(feature, new Integer(r.getInt(7)));
- } else if (typeDefinition.isPrecisionSupported()) {
- EStructuralFeature feature = type.eClass()
- .getEStructuralFeature("precision"); //$NON-NLS-1$
- type.eSet(feature, new Integer(r.getInt(10)));
- }
-
- if (typeDefinition.isScaleSupported()) {
- EStructuralFeature feature = type.eClass()
- .getEStructuralFeature("scale"); //$NON-NLS-1$
- type.eSet(feature, new Integer(r.getInt(9)));
- }
- column.setContainedType(type);
- }
-
- final String nulls = r.getString(18);
- if (nulls.equals("YES")) { //$NON-NLS-1$
- column.setNullable(true);
- } else {
- column.setNullable(false);
- }
-
- columnList.add(column);
- }
- if (isAutoInc) {
- loadIdentity(this.getConnection());
- }
- this.columnsLoaded = true;
- r.close();
- } catch (Exception e) {
- MysqlPlugin.getDefault().getLog().log(new Status(
- IStatus.ERROR, MysqlPlugin.ID, 0,
- "Could not load the Columns for table " //$NON-NLS-1$
- + this.getName(), e));
- }
-
- this.eSetDeliver(deliver);
- }
-
- private synchronized void loadIdentity(Connection connection) {
- try {
- Statement s = connection.createStatement();
- final String query = "SHOW COLUMNS FROM " + this.getName(); //$NON-NLS-1$
- ResultSet r = s.executeQuery(query);
- while (r.next()) {
- String extra = r.getString("Extra"); //$NON-NLS-1$
- if (extra != null && extra.equalsIgnoreCase("auto_increment")) { //$NON-NLS-1$
- Column column = getColumn(r.getString("Field")); //$NON-NLS-1$
- final Database database = this.getSchema().getDatabase();
- final DatabaseDefinition databaseDefinition = RDBCorePlugin
- .getDefault().getDatabaseDefinitionRegistry()
- .getDefinition(database);
- final DataModelElementFactory factory = databaseDefinition
- .getDataModelElementFactory();
- IdentitySpecifier identitySpecifier = (IdentitySpecifier) factory
- .create(SQLSchemaPackage.eINSTANCE
- .getIdentitySpecifier());
- column.setIdentitySpecifier(identitySpecifier);
- }
- }
- r.close();
- s.close();
- } catch (Exception e) {
- MysqlPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,
- MysqlPlugin.ID, 0,
- "Could not load the identity type of coulumns for table " //$NON-NLS-1$
- + this.getName(), e));
- }
-
- }
-
- private synchronized void loadPrimaryKey() {
- if (this.pkLoaded)
- return;
- Connection connection = this.getConnection();
- if (connection == null)
- return;
-
- this.pkLoaded = true;
- boolean deliver = this.eDeliver();
- this.eSetDeliver(false);
-
- try {
- DatabaseMetaData metaData = connection.getMetaData();
- this.loadPrimaryKey(metaData);
- } catch (Exception e) {
- MysqlPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,
- MysqlPlugin.ID, 0,
- "Could not get the DatabaseMetaData from connection", e)); //$NON-NLS-1$
- }
- this.eSetDeliver(deliver);
- }
-
- private synchronized void loadConstraints() {
- if (this.constraintLoaded)
- return;
- Connection connection = this.getConnection();
- if (connection == null)
- return;
-
- this.constraintLoaded = true;
- boolean deliver = this.eDeliver();
- this.eSetDeliver(false);
-
- try {
- DatabaseMetaData metaData = connection.getMetaData();
-
- if (!this.pkLoaded) {
- this.loadPrimaryKey(metaData);
- this.pkLoaded = true;
- }
-
- this.loadForeignKey(metaData);
-
- } catch (Exception e) {
- MysqlPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,
- MysqlPlugin.ID, 0,
- "Could not get the DatabaseMetaData from connection", e)); //$NON-NLS-1$
- }
- this.eSetDeliver(deliver);
- }
-
- private synchronized MySqlCatalogPrimaryKey loadPrimaryKey(
- DatabaseMetaData metaData) {
- super.getConstraints();
- MySqlCatalogPrimaryKey key = null;
- try {
- ResultSet r = metaData.getPrimaryKeys(null, null, this.getName());
-
- // DataModelElementFactory factory =
- // RDBCorePlugin.getDefault().getDatabaseDefinitionRegistry().getDefinition(this.getCatalogDatabase()).getDataModelElementFactory();
-
- MySqlCatalogTable.KeyColumnCollection columns =
- new MySqlCatalogTable.KeyColumnCollection(this);
- while (r.next()) {
-
- if (key == null) {
- String name = r.getString(6);
- key = new MySqlCatalogPrimaryKey();
- key.setName(name);
- super.getConstraints().add(key);
- }
- String columnName = r.getString(4);
- int seq = r.getInt(5);
- columns.add(seq, columnName);
- }
-
- Iterator it = columns.iterator();
- while (it.hasNext()) {
- Column column = (Column) it.next();
- key.getMembers().add(column);
- }
- r.close();
- } catch (Exception e) {
- MysqlPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,
- MysqlPlugin.ID, 0,
- "Could not load the primary keys for table " //$NON-NLS-1$
- + this.getName(), e));
- }
-
- return key;
- }
-
- /**
- * Load the ForeignKey for this table.
- */
- private synchronized void loadForeignKey(DatabaseMetaData metaData) {
- try {
- ResultSet r = metaData.getImportedKeys(null, null, this.getName());
-
- // DataModelElementFactory factory =
- // RDBCorePlugin.getDefault().getDatabaseDefinitionRegistry().getDefinition(this.getCatalogDatabase()).getDataModelElementFactory();
-
- MySqlCatalogForeignKey fk = null;
- MySqlCatalogTable fkTable = null;
- String fkTableName = ""; //$NON-NLS-1$
- String fkName = ""; //$NON-NLS-1$
- while (r.next()) {
-
- final String fkTable_Name = r.getString("PKTABLE_NAME"); //$NON-NLS-1$
- final String fk_Name = r.getString("FK_NAME"); //$NON-NLS-1$
- if (!fkTableName.equals(fkTable_Name) || !fkName.equals(fk_Name)) {
- // build a new FK on a break in either the table name or the foreign key name
- fkTable = this.getTable(fkTable_Name);
-
- if (fkTable == null || fk_Name == null)
- continue;
- fkTableName = fkTable_Name;
- fkName = fk_Name;
- fk = new MySqlCatalogForeignKey();
- fk.setName(fk_Name);
- if (fkTable.getPrimaryKey() != null) {
- fk.setUniqueConstraint(fkTable.getPrimaryKey());
- } else {
- Index index = fkTable.findIndexWithColumnName(r
- .getString("PKCOLUMN_NAME")); //$NON-NLS-1$
- if (index != null) {
- fk.setUniqueIndex(index);
- }
- }
- short updateRule = r.getShort("UPDATE_RULE"); //$NON-NLS-1$
- switch (updateRule) {
- case DatabaseMetaData.importedKeyCascade:
- fk.setOnUpdate(ReferentialActionType.CASCADE_LITERAL);
- break;
- case DatabaseMetaData.importedKeyRestrict:
- fk.setOnUpdate(ReferentialActionType.RESTRICT_LITERAL);
- break;
- case DatabaseMetaData.importedKeySetDefault:
- fk.setOnUpdate(ReferentialActionType.SET_DEFAULT_LITERAL);
- break;
- case DatabaseMetaData.importedKeySetNull:
- fk.setOnUpdate(ReferentialActionType.SET_NULL_LITERAL);
- break;
- case DatabaseMetaData.importedKeyNoAction:
- fk.setOnUpdate(ReferentialActionType.NO_ACTION_LITERAL);
- break;
- default:
- fk.setOnUpdate(ReferentialActionType.CASCADE_LITERAL);
- break;
- }
- short deleteRule = r.getShort("DELETE_RULE"); //$NON-NLS-1$
- switch (deleteRule) {
- case DatabaseMetaData.importedKeyCascade:
- fk.setOnDelete(ReferentialActionType.CASCADE_LITERAL);
- break;
- case DatabaseMetaData.importedKeyRestrict:
- fk.setOnDelete(ReferentialActionType.RESTRICT_LITERAL);
- break;
- case DatabaseMetaData.importedKeySetDefault:
- fk.setOnDelete(ReferentialActionType.SET_DEFAULT_LITERAL);
- break;
- case DatabaseMetaData.importedKeySetNull:
- fk.setOnDelete(ReferentialActionType.SET_NULL_LITERAL);
- break;
- case DatabaseMetaData.importedKeyNoAction:
- fk.setOnDelete(ReferentialActionType.NO_ACTION_LITERAL);
- break;
- default:
- fk.setOnDelete(ReferentialActionType.CASCADE_LITERAL);
- break;
- }
- short deferrability = r.getShort("DEFERRABILITY"); //$NON-NLS-1$
- switch (deferrability) {
- case DatabaseMetaData.importedKeyInitiallyDeferred:
- fk.setDeferrable(true);
- fk.setInitiallyDeferred(true);
- break;
- case DatabaseMetaData.importedKeyInitiallyImmediate:
- fk.setDeferrable(true);
- fk.setInitiallyDeferred(false);
- break;
- case DatabaseMetaData.importedKeyNotDeferrable:
- default:
- fk.setDeferrable(false);
- break;
- }
- super.getConstraints().add(fk);
- }
-
- String columnName = r.getString("FKCOLUMN_NAME"); //$NON-NLS-1$
- Column column = getColumn(columnName);
- fk.getMembers().add(column);
- }
- r.close();
- } catch (Exception e) {
- MysqlPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,
- MysqlPlugin.ID, 0,
- "Could not load the foreign keys for table " //$NON-NLS-1$
- + this.getName(), e));
- }
- }
-
- private Index findIndexWithColumnName(String colName) {
- EList eList = this.getIndex();
- for (Iterator it = eList.iterator(); it.hasNext();) {
- MySqlCatalogIndex index = (MySqlCatalogIndex) it.next();
- EList list = index.getMembers();
- for (Iterator iter = list.iterator(); iter.hasNext();) {
- IndexMember member = (IndexMember) iter.next();
- if (member.getColumn().getName().equals(colName)) {
- return index;
- }
- }
- }
- return null;
- }
-
- /**
- * load the index's for MySql.
- * MySql show Primary Key as index's, so we make check that
- * it does not pick up the the Primary Key.
- */
- private synchronized void loadIndexes() {
- if (this.indexLoaded)
- return;
- Connection connection = this.getConnection();
- if (connection == null)
- return;
-
- boolean deliver = this.eDeliver();
- this.eSetDeliver(false);
- EList indexList = super.getIndex();
- try {
- DatabaseMetaData metaData = connection.getMetaData();
- DataModelElementFactory factory = this.getDatabaseDefinition()
- .getDataModelElementFactory();
- ResultSet r = metaData.getIndexInfo(null, null, this.getName(),
- false, false);
- Index index = null;
- String indexName = ""; //$NON-NLS-1$
- PrimaryKey pk = this.getPrimaryKey();
- while (r.next()) {
- final String indName = r.getString(6);
- if (pk == null || !indName.equalsIgnoreCase(pk.getName())) {
- if (!indName.equals(indexName)) {
- indexName = indName;
- index = new MySqlCatalogIndex();
- index.setName(indName);
- index.setSchema(this.getSchema());
-
- final boolean isUnqiue = !r.getBoolean(4);
- index.setUnique(isUnqiue);
-
- final short type = r.getShort(7);
- if (type == DatabaseMetaData.tableIndexClustered) {
- index.setClustered(true);
- }
-
- indexList.add(index);
- }
-
- final String column_name = r.getString(9);
- if (column_name != null) {
- IndexMember member = (IndexMember) factory
- .create(SQLConstraintsPackage.eINSTANCE
- .getIndexMember());
- member.setColumn(MySqlCatalogTable.getColumn(this,
- column_name));
- final String order = r.getString(10);
- if (order.equals("A")) //$NON-NLS-1$
- member.setIncrementType(IncrementType.ASC_LITERAL);
- else if (order.equals("D")) //$NON-NLS-1$
- member.setIncrementType(IncrementType.DESC_LITERAL);
-
- index.getMembers().add(member);
- }
- }
-
- }
- this.indexLoaded = true;
- r.close();
- } catch (Exception e) {
- MysqlPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,
- MysqlPlugin.ID, 0,
- "Could not load the indexes for table " //$NON-NLS-1$
- + this.getName(), e));
- }
-
- this.eSetDeliver(deliver);
- }
-
-// private UniqueConstraint getRefrencedUniqueConstraint(String pkSchema,
-// String pkTable, String pkName) {
-// BaseTable table = (BaseTable) this.getTable(pkTable);
-// Iterator it = table.getConstraints().iterator();
-// while (it.hasNext()) {
-// Constraint constraint = (Constraint) it.next();
-// if (constraint instanceof UniqueConstraint
-// && constraint.getName().equals(pkName)) {
-// return (UniqueConstraint) constraint;
-// }
-// }
-// return null;
-// }
-
- private DatabaseDefinition getDatabaseDefinition() {
- Database d = this.getSchema().getDatabase();
- return RDBCorePlugin.getDefault().getDatabaseDefinitionRegistry()
- .getDefinition(d);
- }
-
- static Column getColumn(Table table, String columnName) {
- Iterator it = table.getColumns().iterator();
- while (it.hasNext()) {
- Column c = (Column) it.next();
- if (c.getName().equals(columnName))
- return c;
- }
- return null;
- }
-
- private Column getColumn(String columnName) {
- Iterator it = super.getColumns().iterator();
- while (it.hasNext()) {
- Column c = (Column) it.next();
- if (c.getName().equals(columnName))
- return c;
- }
- return null;
- }
-
- private MySqlCatalogTable getTable(String tableName) {
- Schema schema = this.getSchema();
- Iterator it = schema.getTables().iterator();
-
- while (it.hasNext()) {
- MySqlCatalogTable table = (MySqlCatalogTable) it.next();
- if (table.getName().equals(tableName))
- return table;
- }
- return null;
- }
-
- private static class KeyColumnCollection {
-
- private Map keyMap = new TreeMap();
-
- private BaseTable table;
-
- public KeyColumnCollection(BaseTable table) {
- this.table = table;
- }
-
- public void add(int seq, String name) {
- Column column = this.getColumn(name);
- String key = "k" + seq; //$NON-NLS-1$
- this.keyMap.put(key, column);
- }
-
- public Iterator iterator() {
- return keyMap.values().iterator();
- }
-
- private Column getColumn(String name) {
- Iterator it = this.table.getColumns().iterator();
- while (it.hasNext()) {
- Column column = (Column) it.next();