Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-11-12 17:37:52 +0000
committerEike Stepper2010-11-12 17:37:52 +0000
commit7251cc0e0a009444373763794da5e698b6b48f5b (patch)
tree1b5298597f23b333ae1d206b341385323fc21b94
parent8dfd5bce28e3fb13dfd8bafeef03faad3c436f7a (diff)
downloadcdo-7251cc0e0a009444373763794da5e698b6b48f5b.tar.gz
cdo-7251cc0e0a009444373763794da5e698b6b48f5b.tar.xz
cdo-7251cc0e0a009444373763794da5e698b6b48f5b.zip
[330072] Provide a DB Adapter for DB2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=330072
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/.project17
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/about.html70
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/build.properties23
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/copyright.txt8
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/eclipse.gifbin0 -> 1058 bytes
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/eclipse_update_120.jpgbin0 -> 21695 bytes
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/epl-v10.html258
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/feature.properties165
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/feature.xml43
-rw-r--r--features/org.eclipse.net4j.db.db2-feature/license.html107
-rw-r--r--plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractDBAccessor.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractQueryStatement.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/cache/DBRevisionCache.java44
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java19
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java35
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/CoreTypeMappings.java556
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMappingRegistry.java117
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/messages/messages.properties7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (DB2 non-audit).launch16
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/build.properties13
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBDB2NonAudit.java213
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/Net4jDBTest.java103
-rw-r--r--plugins/org.eclipse.emf.cdo/model/eresource.ecore7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFolderImpl.java1
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java48
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesFactory.java10
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java39
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java19
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java30
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOAuthenticatorImpl.java2
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.classpath7
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.cvsignore1
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.options4
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.project44
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.jdt.core.prefs360
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.jdt.ui.prefs120
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.api.tools.prefs94
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.prefs31
-rw-r--r--plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF17
-rw-r--r--plugins/org.eclipse.net4j.db.db2/about.html28
-rw-r--r--plugins/org.eclipse.net4j.db.db2/about.ini15
-rw-r--r--plugins/org.eclipse.net4j.db.db2/about.mappings6
-rw-r--r--plugins/org.eclipse.net4j.db.db2/about.properties31
-rw-r--r--plugins/org.eclipse.net4j.db.db2/build.properties27
-rw-r--r--plugins/org.eclipse.net4j.db.db2/copyright.txt8
-rw-r--r--plugins/org.eclipse.net4j.db.db2/modeling32.pngbin0 -> 2414 bytes
-rw-r--r--plugins/org.eclipse.net4j.db.db2/plugin.properties11
-rw-r--r--plugins/org.eclipse.net4j.db.db2/plugin.xml25
-rw-r--r--plugins/org.eclipse.net4j.db.db2/reserved_words.txt493
-rw-r--r--plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2Adapter.java170
-rw-r--r--plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2SchemaDatasource.java66
-rw-r--r--plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/internal/db2/bundle/OM.java46
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBException.java40
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java4
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java11
69 files changed, 3227 insertions, 474 deletions
diff --git a/features/org.eclipse.net4j.db.db2-feature/.project b/features/org.eclipse.net4j.db.db2-feature/.project
new file mode 100644
index 0000000000..75bcae5ff1
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.net4j.db.db2-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.ltk.core.refactoring.prefs b/features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..0779a3c947
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 10:06:10 CET 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000000..d573634502
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 10:06:10 CET 2010
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.mylyn.team.ui.prefs b/features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000000..4d86eb45ba
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 10:06:10 CET 2010
+commit.comment.template=[${task.id}] ${task.description} \r\n${task.url}
+eclipse.preferences.version=1
diff --git a/features/org.eclipse.net4j.db.db2-feature/about.html b/features/org.eclipse.net4j.db.db2-feature/about.html
new file mode 100644
index 0000000000..f2decc3a0d
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/about.html
@@ -0,0 +1,70 @@
+<!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 5, 2007</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>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+
+ <head>
+
+ <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="Content-Type"/>
+
+ <title>About</title>
+
+ </head>
+
+ <body lang="EN-US">
+
+ <h2>About This Content</h2>
+
+ <p>May 17, 2007</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&apos;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.</p>
+
+ </body>
+
+</html>
+
diff --git a/features/org.eclipse.net4j.db.db2-feature/build.properties b/features/org.eclipse.net4j.db.db2-feature/build.properties
new file mode 100644
index 0000000000..a78395fe16
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/build.properties
@@ -0,0 +1,23 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+# Eike Stepper - initial API and implementation
+
+# NLS_MESSAGEFORMAT_VAR
+
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties,\
+ epl-v10.html,\
+ about.html,\
+ copyright.txt,\
+ eclipse.gif,\
+ eclipse_update_120.jpg
+src.includes = about.html,\
+ copyright.txt,\
+ epl-v10.html,\
+ license.html
diff --git a/features/org.eclipse.net4j.db.db2-feature/copyright.txt b/features/org.eclipse.net4j.db.db2-feature/copyright.txt
new file mode 100644
index 0000000000..77d945dca6
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/copyright.txt
@@ -0,0 +1,8 @@
+Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+ Eike Stepper - initial API and implementation \ No newline at end of file
diff --git a/features/org.eclipse.net4j.db.db2-feature/eclipse.gif b/features/org.eclipse.net4j.db.db2-feature/eclipse.gif
new file mode 100644
index 0000000000..bdc2912bfd
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/eclipse.gif
Binary files differ
diff --git a/features/org.eclipse.net4j.db.db2-feature/eclipse_update_120.jpg b/features/org.eclipse.net4j.db.db2-feature/eclipse_update_120.jpg
new file mode 100644
index 0000000000..bfdf708ad6
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.net4j.db.db2-feature/epl-v10.html b/features/org.eclipse.net4j.db.db2-feature/epl-v10.html
new file mode 100644
index 0000000000..832a9d448e
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/epl-v10.html
@@ -0,0 +1,258 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head><body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+</body></html> \ No newline at end of file
diff --git a/features/org.eclipse.net4j.db.db2-feature/feature.properties b/features/org.eclipse.net4j.db.db2-feature/feature.properties
new file mode 100644
index 0000000000..13c336c500
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/feature.properties
@@ -0,0 +1,165 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+# Eike Stepper - initial API and implementation
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+providerName = Eclipse Modeling Project
+featureName = Net4j DB Framework DB2 Adapter
+description = Net4j DB Framework DB2 Adapter contains the DB2 Adapter matching the Net4j DB Framework BUT NOT the database driver bundle for DB2. This needs to be installed separately, for example from http://net4j.sourceforge.net/update
+
+copyrightURL = copyright.txt
+copyright = Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ Eike Stepper - initial API and implementation
+
+licenseURL = license.html
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+
+# Label for the update site (on download1.eclipse.org)
+updateSiteName=Eclipse Modeling Project Updates
+
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.net4j.db.db2-feature/feature.xml b/features/org.eclipse.net4j.db.db2-feature/feature.xml
new file mode 100644
index 0000000000..fbbb60669e
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/feature.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+ Eike Stepper - initial API and implementation
+-->
+<feature
+ id="org.eclipse.net4j.db.db2"
+ label="%featureName"
+ version="4.0.0.qualifier"
+ provider-name="%providerName"
+ image="eclipse_update_120.jpg">
+
+ <description>
+ %description
+ </description>
+
+ <copyright url="%copyrightURL">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://www.eclipse.org/modeling/updates/"/>
+ <discovery label="%updateSiteName" url="http://www.eclipse.org/modeling/updates/"/>
+ </url>
+
+ <plugin
+ id="org.eclipse.net4j.db.mysql"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.net4j.db.db2-feature/license.html b/features/org.eclipse.net4j.db.db2-feature/license.html
new file mode 100644
index 0000000000..c184ca36a9
--- /dev/null
+++ b/features/org.eclipse.net4j.db.db2-feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation 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 provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractDBAccessor.java b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractDBAccessor.java
index a54d137b91..e4d7a8116d 100644
--- a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractDBAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractDBAccessor.java
@@ -34,7 +34,7 @@ public abstract class AbstractDBAccessor
return preparedStatement;
}
- protected abstract String getSQL();
+ public abstract String getSQL();
protected abstract void setParameters(PreparedStatement statement) throws SQLException, Exception;
}
diff --git a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractQueryStatement.java b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractQueryStatement.java
index 1644886d91..12dfb8b382 100644
--- a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractQueryStatement.java
+++ b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractQueryStatement.java
@@ -29,6 +29,7 @@ public abstract class AbstractQueryStatement<Result> extends AbstractDBAccessor
public Result query(Connection connection) throws Exception
{
PreparedStatement preparedStatement = null;
+
try
{
preparedStatement = getPreparedStatement(connection);
diff --git a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/cache/DBRevisionCache.java b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/cache/DBRevisionCache.java
index 2e6ccfe60e..4943769aff 100644
--- a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/cache/DBRevisionCache.java
+++ b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/cache/DBRevisionCache.java
@@ -162,16 +162,18 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
public InternalCDORevision getRevision(final CDOID id)
{
Connection connection = null;
+ String sql = null;
try
{
connection = getConnection();
AbstractQueryStatement<InternalCDORevision> query = createGetRevisionByIDStatement(id);
+ sql = query.getSQL();
return query.query(connection);
}
catch (Exception e)
{
- throw new DBException("Error while retrieving the revision from the database", e); //$NON-NLS-1$
+ throw new DBException("Error while retrieving the revision from the database", e, sql); //$NON-NLS-1$
}
finally
{
@@ -184,7 +186,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
return new AbstractQueryStatement<InternalCDORevision>()
{
@Override
- protected String getSQL()
+ public String getSQL()
{
StringBuilder builder = new StringBuilder();
builder.append("SELECT "); //$NON-NLS-1$
@@ -229,6 +231,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
public InternalCDORevision getRevision(final CDOID id, final CDOBranchPoint branchPoint)
{
Connection connection = null;
+ String sql = null;
try
{
@@ -236,7 +239,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
AbstractQueryStatement<InternalCDORevision> statement = new AbstractQueryStatement<InternalCDORevision>()
{
@Override
- protected String getSQL()
+ public String getSQL()
{
StringBuilder builder = new StringBuilder();
builder.append("SELECT "); //$NON-NLS-1$
@@ -270,11 +273,12 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
}
};
+ sql = statement.getSQL();
return statement.query(connection);
}
catch (Exception e)
{
- throw new DBException("Error while retrieving a revision by timestamp from the database", e); //$NON-NLS-1$
+ throw new DBException("Error while retrieving a revision by timestamp from the database", e, sql); //$NON-NLS-1$
}
finally
{
@@ -292,6 +296,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
public InternalCDORevision getRevisionByVersion(final CDOID id, final CDOBranchVersion branchVersion)
{
Connection connection = null;
+ String sql = null;
try
{
@@ -299,7 +304,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
AbstractQueryStatement<InternalCDORevision> statement = new AbstractQueryStatement<InternalCDORevision>()
{
@Override
- protected String getSQL()
+ public String getSQL()
{
StringBuilder builder = new StringBuilder();
builder.append("SELECT "); //$NON-NLS-1$
@@ -332,11 +337,12 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
}
};
+ sql = statement.getSQL();
return statement.query(connection);
}
catch (Exception e)
{
- throw new DBException("Error while retrieving a revision by version from the database", e); //$NON-NLS-1$
+ throw new DBException("Error while retrieving a revision by version from the database", e, sql); //$NON-NLS-1$
}
finally
{
@@ -352,6 +358,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
public List<CDORevision> getCurrentRevisions()
{
Connection connection = null;
+ String sql = null;
try
{
@@ -359,7 +366,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
AbstractQueryStatement<List<CDORevision>> query = new AbstractQueryStatement<List<CDORevision>>()
{
@Override
- protected String getSQL()
+ public String getSQL()
{
StringBuilder builder = new StringBuilder();
builder.append("SELECT "); //$NON-NLS-1$
@@ -396,11 +403,12 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
}
};
+ sql = query.getSQL();
return query.query(connection);
}
catch (Exception e)
{
- throw new DBException("Error while retrieving a revision by version from the database", e); //$NON-NLS-1$
+ throw new DBException("Error while retrieving a revision by version from the database", e, sql); //$NON-NLS-1$
}
finally
{
@@ -419,11 +427,13 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
{
CheckUtil.checkArg(revision, "revision");
Connection connection = null;
+ String sql = null;
try
{
connection = getConnection();
AbstractUpdateStatement update = createAddRevisionStatement((InternalCDORevision)revision);
+ sql = update.getSQL();
update.update(connection);
if (revision.getVersion() > CDORevision.FIRST_VERSION)
@@ -439,7 +449,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
}
catch (Exception e)
{
- throw new DBException("Error while retrieving the revision from the database", e); //$NON-NLS-1$
+ throw new DBException("Error while retrieving the revision from the database", e, sql); //$NON-NLS-1$
}
finally
{
@@ -452,7 +462,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
return new AbstractUpdateStatement()
{
@Override
- protected String getSQL()
+ public String getSQL()
{
StringBuilder builder = new StringBuilder();
builder.append("UPDATE "); //$NON-NLS-1$
@@ -482,7 +492,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
return new AbstractUpdateStatement()
{
@Override
- protected String getSQL()
+ public String getSQL()
{
StringBuilder builder = new StringBuilder();
builder.append("INSERT INTO "); //$NON-NLS-1$
@@ -557,6 +567,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
public InternalCDORevision removeRevision(CDOID id, CDOBranchVersion branchVersion)
{
Connection connection = null;
+ String sql = null;
try
{
@@ -567,7 +578,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
AbstractUpdateStatement statement = new AbstractUpdateStatement()
{
@Override
- protected String getSQL()
+ public String getSQL()
{
StringBuilder builder = new StringBuilder();
builder.append("DELETE FROM "); //$NON-NLS-1$
@@ -584,6 +595,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
}
};
+ sql = statement.getSQL();
statement.update(connection);
}
@@ -591,7 +603,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
}
catch (Exception e)
{
- throw new DBException("Error while removing a revision from the database", e); //$NON-NLS-1$
+ throw new DBException("Error while removing a revision from the database", e, sql); //$NON-NLS-1$
}
finally
{
@@ -605,6 +617,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
public void clear()
{
Connection connection = null;
+ String sql = null;
try
{
@@ -612,7 +625,7 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
AbstractUpdateStatement update = new AbstractUpdateStatement()
{
@Override
- protected String getSQL()
+ public String getSQL()
{
StringBuilder builder = new StringBuilder();
builder.append("DELETE FROM "); //$NON-NLS-1$
@@ -621,11 +634,12 @@ public class DBRevisionCache extends Lifecycle implements InternalCDORevisionCac
}
};
+ sql = update.getSQL();
update.update(connection);
}
catch (Exception e)
{
- throw new DBException("Error while clearing the database", e);
+ throw new DBException("Error while clearing the database", e, sql);
}
finally
{
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java
index cc0e07c694..fd64ba7344 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java
@@ -18,10 +18,15 @@ import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ViewerNotification;
@@ -36,7 +41,8 @@ import java.util.List;
* @since 2.0
*/
public class CDOResourceFolderItemProvider extends CDOResourceNodeItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
{
/**
* This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java
index 4f2ef3f119..4c38dead38 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java
@@ -19,10 +19,15 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
@@ -37,7 +42,8 @@ import java.util.List;
* @generated
*/
public class CDOResourceItemProvider extends CDOResourceNodeItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
{
/**
* This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java
index 7358f42079..3022db4239 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java
@@ -19,10 +19,15 @@ import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IChildCreationExtender;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
@@ -39,7 +44,8 @@ import java.util.List;
* @since 2.0
*/
public class CDOResourceNodeItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
{
/**
* This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -106,6 +112,17 @@ public class CDOResourceNodeItemProvider extends ItemProviderAdapter implements
}
/**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
* This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java
index 1206d07748..082d4bac68 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java
@@ -26,10 +26,15 @@ import org.eclipse.emf.edit.provider.IChangeNotifier;
import org.eclipse.emf.edit.provider.IChildCreationExtender;
import org.eclipse.emf.edit.provider.IDisposable;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.INotifyChangedListener;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import java.util.ArrayList;
@@ -91,6 +96,11 @@ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory
supportedTypes.add(ITreeItemContentProvider.class);
supportedTypes.add(IItemLabelProvider.class);
supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
index 63b6e6af6c..246df0fcfb 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
@@ -172,7 +172,7 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
}
catch (SQLException ex)
{
- throw new DBException(ex);
+ throw new DBException(ex, "SET AUTO COMMIT = false");
}
return connection;
@@ -228,6 +228,7 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
{
Connection connection = null;
PreparedStatement selectStmt = null;
+ String sql = null;
try
{
@@ -236,7 +237,8 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
boolean allProperties = names == null || names.isEmpty();
if (allProperties)
{
- selectStmt = connection.prepareStatement(CDODBSchema.SQL_SELECT_ALL_PROPERTIES);
+ sql = CDODBSchema.SQL_SELECT_ALL_PROPERTIES;
+ selectStmt = connection.prepareStatement(sql);
ResultSet resultSet = null;
try
@@ -256,7 +258,8 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
}
else
{
- selectStmt = connection.prepareStatement(CDODBSchema.SQL_SELECT_PROPERTIES);
+ sql = CDODBSchema.SQL_SELECT_PROPERTIES;
+ selectStmt = connection.prepareStatement(sql);
for (String name : names)
{
selectStmt.setString(1, name);
@@ -282,7 +285,7 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
}
catch (SQLException ex)
{
- throw new DBException(ex);
+ throw new DBException(ex, sql);
}
finally
{
@@ -296,6 +299,7 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
Connection connection = null;
PreparedStatement deleteStmt = null;
PreparedStatement insertStmt = null;
+ String sql = null;
try
{
@@ -308,19 +312,22 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
String name = entry.getKey();
String value = entry.getValue();
+ sql = CDODBSchema.SQL_DELETE_PROPERTIES;
deleteStmt.setString(1, name);
deleteStmt.executeUpdate();
+ sql = CDODBSchema.SQL_INSERT_PROPERTIES;
insertStmt.setString(1, name);
insertStmt.setString(2, value);
insertStmt.executeUpdate();
}
+ sql = null;
connection.commit();
}
catch (SQLException ex)
{
- throw new DBException(ex);
+ throw new DBException(ex, sql);
}
finally
{
@@ -350,7 +357,7 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
}
catch (SQLException ex)
{
- throw new DBException(ex);
+ throw new DBException(ex, CDODBSchema.SQL_DELETE_PROPERTIES);
}
finally
{
@@ -477,7 +484,7 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
DBUtil.close(connection);
}
- if (createdTables.contains(CDODBSchema.PROPERTIES))
+ if (isFirstStart(createdTables))
{
firstStart();
}
@@ -524,6 +531,20 @@ public class DBStore extends LongIDStore implements IDBStore, CDOAllRevisionsPro
super.doDeactivate();
}
+ protected boolean isFirstStart(Set<IDBTable> createdTables)
+ {
+ if (createdTables.contains(CDODBSchema.PROPERTIES))
+ {
+ return true;
+ }
+
+ Set<String> names = new HashSet<String>();
+ names.add(PROP_REPOSITORY_CREATED);
+
+ Map<String, String> map = getPropertyValues(names);
+ return map.get(PROP_REPOSITORY_CREATED) == null;
+ }
+
protected void firstStart()
{
creationTime = getRepository().getTimeStamp();
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java
index 59f6d29d0c..495f202adb 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java
@@ -87,6 +87,8 @@ public abstract class AbstractMappingStrategy extends Lifecycle implements IMapp
protected static final String GENERAL_PREFIX = "X"; //$NON-NLS-1$
+ protected static final String GENERAL_SUFFIX = "0"; //$NON-NLS-1$
+
/**
* Prefix for unsettable feature helper columns
*/
@@ -345,16 +347,15 @@ public abstract class AbstractMappingStrategy extends Lifecycle implements IMapp
private String getName(String name, String suffix, int maxLength)
{
- boolean forceNamesWithID = isForceNamesWithID();
-
if (!store.getDBAdapter().isValidFirstChar(name.charAt(0)))
{
name = GENERAL_PREFIX + name;
}
- if (store.getDBAdapter().isReservedWord(name))
+ boolean forceNamesWithID = isForceNamesWithID();
+ if (!forceNamesWithID && store.getDBAdapter().isReservedWord(name))
{
- forceNamesWithID = true;
+ name = name + GENERAL_SUFFIX;
}
if (name.length() > maxLength || forceNamesWithID)
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/CoreTypeMappings.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/CoreTypeMappings.java
index 1fa5457e25..d5c7f36d86 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/CoreTypeMappings.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/CoreTypeMappings.java
@@ -69,25 +69,9 @@ public class CoreTypeMappings
*/
public static class TMEnum extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Enum";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Enum",
EcorePackage.eINSTANCE.getEEnum(), DBType.INTEGER));
- public static class Factory extends AbstractTypeMappingFactory
- {
- public Factory(Descriptor descriptor)
- {
- super(descriptor);
- }
-
- @Override
- public ITypeMapping create(String description) throws ProductCreationException
- {
- return new TMEnum();
- }
- }
-
@Override
public Object getResultSetValue(ResultSet resultSet) throws SQLException
{
@@ -113,23 +97,10 @@ public class CoreTypeMappings
Enumerator enumerator = (Enumerator)eenum.getDefaultValue();
return enumerator.getValue();
}
- }
-
- /**
- * @author Eike Stepper
- */
- public static class TMString extends AbstractTypeMapping
- {
- public static final String ID_VARCHAR = ID_PREFIX + ".StringVarchar";
-
- public static final Factory FACTORY_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_VARCHAR,
- EcorePackage.eINSTANCE.getEString(), DBType.VARCHAR));
-
- public static final String ID_CLOB = ID_PREFIX + ".StringClob";
-
- public static final Factory FACTORY_CLOB = new Factory(TypeMappingUtil.createDescriptor(ID_CLOB,
- EcorePackage.eINSTANCE.getEString(), DBType.CLOB));
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -140,27 +111,34 @@ public class CoreTypeMappings
@Override
public ITypeMapping create(String description) throws ProductCreationException
{
- return new TMString();
+ return new TMEnum();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getString(getField().getName());
- }
}
/**
* @author Eike Stepper
*/
- public static class TMBlob extends AbstractTypeMapping
+ public static class TMString extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".BlobStream";
+ public static final Factory FACTORY_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".StringVarchar", EcorePackage.eINSTANCE.getEString(), DBType.VARCHAR));
+
+ public static final Factory FACTORY_LONG_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".StringLongVarchar", EcorePackage.eINSTANCE.getEString(), DBType.LONGVARCHAR));
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
- EtypesPackage.eINSTANCE.getBlob(), DBType.VARCHAR));
+ public static final Factory FACTORY_CLOB = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".StringClob",
+ EcorePackage.eINSTANCE.getEString(), DBType.CLOB));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getString(getField().getName());
+ }
+
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -171,9 +149,21 @@ public class CoreTypeMappings
@Override
public ITypeMapping create(String description) throws ProductCreationException
{
- return new TMBlob();
+ return new TMString();
}
}
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class TMBlob extends AbstractTypeMapping
+ {
+ public static final Factory FACTORY_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".BlobStream", EtypesPackage.eINSTANCE.getBlob(), DBType.VARCHAR));
+
+ public static final Factory FACTORY_LONG_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".BlobStreamLongVarchar", EtypesPackage.eINSTANCE.getBlob(), DBType.LONGVARCHAR));
@Override
protected void doSetValue(PreparedStatement stmt, int index, Object value) throws SQLException
@@ -192,18 +182,10 @@ public class CoreTypeMappings
long size = Long.parseLong(str.substring(pos + 1));
return CDOLobUtil.createBlob(id, size);
}
- }
-
- /**
- * @author Eike Stepper
- */
- public static class TMClob extends AbstractTypeMapping
- {
- public static final String ID = ID_PREFIX + ".ClobStream";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
- EtypesPackage.eINSTANCE.getClob(), DBType.VARCHAR));
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -214,9 +196,21 @@ public class CoreTypeMappings
@Override
public ITypeMapping create(String description) throws ProductCreationException
{
- return new TMClob();
+ return new TMBlob();
}
}
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class TMClob extends AbstractTypeMapping
+ {
+ public static final Factory FACTORY_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".ClobStream", EtypesPackage.eINSTANCE.getClob(), DBType.VARCHAR));
+
+ public static final Factory FACTORY_LONG_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".ClobStreamLongVarchar", EtypesPackage.eINSTANCE.getClob(), DBType.LONGVARCHAR));
@Override
protected void doSetValue(PreparedStatement stmt, int index, Object value) throws SQLException
@@ -235,23 +229,10 @@ public class CoreTypeMappings
long size = Long.parseLong(str.substring(pos + 1));
return CDOLobUtil.createClob(id, size);
}
- }
-
- /**
- * @author Eike Stepper
- */
- public static class TMShort extends AbstractTypeMapping
- {
- public static final String ID = ID_PREFIX + ".Short";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
- EcorePackage.eINSTANCE.getEShort(), DBType.SMALLINT));
-
- public static final String ID_OBJECT = ID_PREFIX + ".ShortObject";
-
- public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_OBJECT,
- EcorePackage.eINSTANCE.getEShortObject(), DBType.SMALLINT));
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -262,27 +243,31 @@ public class CoreTypeMappings
@Override
public ITypeMapping create(String description) throws ProductCreationException
{
- return new TMShort();
+ return new TMClob();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getShort(getField().getName());
- }
}
/**
- * @author Eike Stepper <br>
+ * @author Eike Stepper
*/
- public static class TMObject extends AbstractTypeMapping
+ public static class TMShort extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Object";
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Short",
+ EcorePackage.eINSTANCE.getEShort(), DBType.SMALLINT));
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
- EcorePackage.eINSTANCE.getEClass(), DBType.BIGINT));
+ public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".ShortObject", EcorePackage.eINSTANCE.getEShortObject(), DBType.SMALLINT));
+
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getShort(getField().getName());
+ }
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -293,9 +278,18 @@ public class CoreTypeMappings
@Override
public ITypeMapping create(String description) throws ProductCreationException
{
- return new TMObject();
+ return new TMShort();
}
}
+ }
+
+ /**
+ * @author Eike Stepper <br>
+ */
+ public static class TMObject extends AbstractTypeMapping
+ {
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Object",
+ EcorePackage.eINSTANCE.getEClass(), DBType.BIGINT));
@Override
public Object getResultSetValue(ResultSet resultSet) throws SQLException
@@ -332,6 +326,23 @@ public class CoreTypeMappings
return (IDBStoreAccessor)accessor;
}
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class Factory extends AbstractTypeMappingFactory
+ {
+ public Factory(Descriptor descriptor)
+ {
+ super(descriptor);
+ }
+
+ @Override
+ public ITypeMapping create(String description) throws ProductCreationException
+ {
+ return new TMObject();
+ }
+ }
}
/**
@@ -339,16 +350,21 @@ public class CoreTypeMappings
*/
public static class TMLong extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Long";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Long",
EcorePackage.eINSTANCE.getELong(), DBType.BIGINT));
- public static final String ID_OBJECT = ID_PREFIX + ".LongObject";
+ public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(
+ ID_PREFIX + ".LongObject", EcorePackage.eINSTANCE.getELongObject(), DBType.BIGINT));
- public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_OBJECT,
- EcorePackage.eINSTANCE.getELongObject(), DBType.BIGINT));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getLong(getField().getName());
+ }
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -362,12 +378,6 @@ public class CoreTypeMappings
return new TMLong();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getLong(getField().getName());
- }
}
/**
@@ -375,16 +385,21 @@ public class CoreTypeMappings
*/
public static class TMInteger extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Integer";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Integer",
EcorePackage.eINSTANCE.getEInt(), DBType.INTEGER));
- public static final String ID_OBJECT = ID_PREFIX + ".IntegerObject";
+ public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".IntegerObject", EcorePackage.eINSTANCE.getEIntegerObject(), DBType.INTEGER));
- public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_OBJECT,
- EcorePackage.eINSTANCE.getEIntegerObject(), DBType.INTEGER));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getInt(getField().getName());
+ }
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -398,12 +413,6 @@ public class CoreTypeMappings
return new TMInteger();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getInt(getField().getName());
- }
}
/**
@@ -411,16 +420,21 @@ public class CoreTypeMappings
*/
public static class TMFloat extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Float";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Float",
EcorePackage.eINSTANCE.getEFloat(), DBType.FLOAT));
- public static final String ID_OBJECT = ID_PREFIX + ".FloatObject";
+ public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".FloatObject", EcorePackage.eINSTANCE.getEFloatObject(), DBType.FLOAT));
- public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_OBJECT,
- EcorePackage.eINSTANCE.getEFloatObject(), DBType.FLOAT));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getFloat(getField().getName());
+ }
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -434,12 +448,6 @@ public class CoreTypeMappings
return new TMFloat();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getFloat(getField().getName());
- }
}
/**
@@ -447,16 +455,21 @@ public class CoreTypeMappings
*/
public static class TMDouble extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Double";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Double",
EcorePackage.eINSTANCE.getEDouble(), DBType.DOUBLE));
- public static final String ID_OBJECT = ID_PREFIX + ".DoubleObject";
+ public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".DoubleObject", EcorePackage.eINSTANCE.getEDoubleObject(), DBType.DOUBLE));
- public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_OBJECT,
- EcorePackage.eINSTANCE.getEDoubleObject(), DBType.DOUBLE));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getDouble(getField().getName());
+ }
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -470,12 +483,6 @@ public class CoreTypeMappings
return new TMDouble();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getDouble(getField().getName());
- }
}
/**
@@ -483,11 +490,24 @@ public class CoreTypeMappings
*/
public static class TMDate2Timestamp extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Timestamp";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Timestamp",
EcorePackage.eINSTANCE.getEDate(), DBType.TIMESTAMP));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getTimestamp(getField().getName());
+ }
+
+ @Override
+ protected void doSetValue(PreparedStatement stmt, int index, Object value) throws SQLException
+ {
+ stmt.setTimestamp(index, new Timestamp(((Date)value).getTime()));
+ }
+
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -501,18 +521,6 @@ public class CoreTypeMappings
return new TMDate2Timestamp();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getTimestamp(getField().getName());
- }
-
- @Override
- protected void doSetValue(PreparedStatement stmt, int index, Object value) throws SQLException
- {
- stmt.setTimestamp(index, new Timestamp(((Date)value).getTime()));
- }
}
/**
@@ -520,11 +528,18 @@ public class CoreTypeMappings
*/
public static class TMDate2Date extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Date";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Date",
EcorePackage.eINSTANCE.getEDate(), DBType.DATE));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getDate(getField().getName(), Calendar.getInstance());
+ }
+
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -538,12 +553,6 @@ public class CoreTypeMappings
return new TMDate2Date();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getDate(getField().getName(), Calendar.getInstance());
- }
}
/**
@@ -551,11 +560,18 @@ public class CoreTypeMappings
*/
public static class TMDate2Time extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Time";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Time",
EcorePackage.eINSTANCE.getEDate(), DBType.TIME));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getTime(getField().getName(), Calendar.getInstance());
+ }
+
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -569,12 +585,6 @@ public class CoreTypeMappings
return new TMDate2Time();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getTime(getField().getName(), Calendar.getInstance());
- }
}
/**
@@ -582,29 +592,11 @@ public class CoreTypeMappings
*/
public static class TMCharacter extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Character";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Character",
EcorePackage.eINSTANCE.getEChar(), DBType.CHAR));
- public static final String ID_OBJECT = ID_PREFIX + ".CharacterObject";
-
- public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_OBJECT,
- EcorePackage.eINSTANCE.getECharacterObject(), DBType.CHAR));
-
- public static class Factory extends AbstractTypeMappingFactory
- {
- public Factory(Descriptor descriptor)
- {
- super(descriptor);
- }
-
- @Override
- public ITypeMapping create(String description) throws ProductCreationException
- {
- return new TMCharacter();
- }
- }
+ public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".CharacterObject", EcorePackage.eINSTANCE.getECharacterObject(), DBType.CHAR));
@Override
public Object getResultSetValue(ResultSet resultSet) throws SQLException
@@ -623,6 +615,23 @@ public class CoreTypeMappings
{
stmt.setString(index, ((Character)value).toString());
}
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class Factory extends AbstractTypeMappingFactory
+ {
+ public Factory(Descriptor descriptor)
+ {
+ super(descriptor);
+ }
+
+ @Override
+ public ITypeMapping create(String description) throws ProductCreationException
+ {
+ return new TMCharacter();
+ }
+ }
}
/**
@@ -630,16 +639,21 @@ public class CoreTypeMappings
*/
public static class TMByte extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Byte";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Byte",
EcorePackage.eINSTANCE.getEByte(), DBType.SMALLINT));
- public static final String ID_OBJECT = ID_PREFIX + ".ByteObject";
+ public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(
+ ID_PREFIX + ".ByteObject", EcorePackage.eINSTANCE.getEByteObject(), DBType.SMALLINT));
- public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_OBJECT,
- EcorePackage.eINSTANCE.getEByteObject(), DBType.SMALLINT));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getByte(getField().getName());
+ }
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -653,12 +667,6 @@ public class CoreTypeMappings
return new TMByte();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getByte(getField().getName());
- }
}
/**
@@ -666,11 +674,18 @@ public class CoreTypeMappings
*/
public static class TMBytes extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".ByteArray";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".ByteArray",
EcorePackage.eINSTANCE.getEByteArray(), DBType.BLOB));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getBytes(getField().getName());
+ }
+
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -684,12 +699,6 @@ public class CoreTypeMappings
return new TMBytes();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getBytes(getField().getName());
- }
}
/**
@@ -697,16 +706,27 @@ public class CoreTypeMappings
*/
public static class TMBoolean extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".Boolean";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".Boolean",
EcorePackage.eINSTANCE.getEBoolean(), DBType.BOOLEAN));
- public static final String ID_OBJECT = ID_PREFIX + ".BooleanObject";
+ public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".BooleanObject", EcorePackage.eINSTANCE.getEBooleanObject(), DBType.BOOLEAN));
+
+ public static final Factory FACTORY_SMALLINT = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".Boolean_SMALLINT", EcorePackage.eINSTANCE.getEBoolean(), DBType.SMALLINT));
- public static final Factory FACTORY_OBJECT = new Factory(TypeMappingUtil.createDescriptor(ID_OBJECT,
- EcorePackage.eINSTANCE.getEBooleanObject(), DBType.BOOLEAN));
+ public static final Factory FACTORY_OBJECT_SMALLINT = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".BooleanObject_SMALLINT", EcorePackage.eINSTANCE.getEBooleanObject(), DBType.SMALLINT));
+ @Override
+ public Object getResultSetValue(ResultSet resultSet) throws SQLException
+ {
+ return resultSet.getBoolean(getField().getName());
+ }
+
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -720,12 +740,6 @@ public class CoreTypeMappings
return new TMBoolean();
}
}
-
- @Override
- public Object getResultSetValue(ResultSet resultSet) throws SQLException
- {
- return resultSet.getBoolean(getField().getName());
- }
}
/**
@@ -733,24 +747,11 @@ public class CoreTypeMappings
*/
public static class TMBigInteger extends AbstractTypeMapping
{
- public static final String ID = ID_PREFIX + ".BigInteger";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".BigInteger",
EcorePackage.eINSTANCE.getEBigInteger(), DBType.VARCHAR));
- public static class Factory extends AbstractTypeMappingFactory
- {
- public Factory(Descriptor descriptor)
- {
- super(descriptor);
- }
-
- @Override
- public ITypeMapping create(String description) throws ProductCreationException
- {
- return new TMBigInteger();
- }
- }
+ public static final Factory FACTORY_LONG_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".BigIntegerLongVarChar", EcorePackage.eINSTANCE.getEBigInteger(), DBType.LONGVARCHAR));
@Override
protected Object getResultSetValue(ResultSet resultSet) throws SQLException
@@ -770,18 +771,10 @@ public class CoreTypeMappings
{
stmt.setString(index, ((BigInteger)value).toString());
}
- }
-
- /**
- * @author Stefan Winkler
- */
- public static class TMBigDecimal extends AbstractTypeMapping
- {
- public static final String ID = ID_PREFIX + ".BigDecimal";
-
- public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID,
- EcorePackage.eINSTANCE.getEBigDecimal(), DBType.VARCHAR));
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -792,9 +785,21 @@ public class CoreTypeMappings
@Override
public ITypeMapping create(String description) throws ProductCreationException
{
- return new TMBigDecimal();
+ return new TMBigInteger();
}
}
+ }
+
+ /**
+ * @author Stefan Winkler
+ */
+ public static class TMBigDecimal extends AbstractTypeMapping
+ {
+ public static final Factory FACTORY = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".BigDecimal",
+ EcorePackage.eINSTANCE.getEBigDecimal(), DBType.VARCHAR));
+
+ public static final Factory FACTORY_LONG_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".BigDecimalLongVarchar", EcorePackage.eINSTANCE.getEBigDecimal(), DBType.LONGVARCHAR));
@Override
protected Object getResultSetValue(ResultSet resultSet) throws SQLException
@@ -814,23 +819,10 @@ public class CoreTypeMappings
{
stmt.setString(index, ((BigDecimal)value).toPlainString());
}
- }
-
- /**
- * @author Stefan Winkler
- */
- public static class TMCustom extends AbstractTypeMapping
- {
- public static final String ID_VARCHAR = ID_PREFIX + ".CustomVarchar";
-
- public static final Factory FACTORY_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_VARCHAR,
- EcorePackage.eINSTANCE.getEDataType(), DBType.VARCHAR));
-
- public static final String ID_CLOB = ID_PREFIX + ".CustomClob";
-
- public static final Factory FACTORY_CLOB = new Factory(TypeMappingUtil.createDescriptor(ID_CLOB,
- EcorePackage.eINSTANCE.getEDataType(), DBType.CLOB));
+ /**
+ * @author Eike Stepper
+ */
public static class Factory extends AbstractTypeMappingFactory
{
public Factory(Descriptor descriptor)
@@ -841,9 +833,24 @@ public class CoreTypeMappings
@Override
public ITypeMapping create(String description) throws ProductCreationException
{
- return new TMCustom();
+ return new TMBigDecimal();
}
}
+ }
+
+ /**
+ * @author Stefan Winkler
+ */
+ public static class TMCustom extends AbstractTypeMapping
+ {
+ public static final Factory FACTORY_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".CustomVarchar", EcorePackage.eINSTANCE.getEDataType(), DBType.VARCHAR));
+
+ public static final Factory FACTORY_LONG_VARCHAR = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX
+ + ".CustomLongVarchar", EcorePackage.eINSTANCE.getEDataType(), DBType.LONGVARCHAR));
+
+ public static final Factory FACTORY_CLOB = new Factory(TypeMappingUtil.createDescriptor(ID_PREFIX + ".CustomClob",
+ EcorePackage.eINSTANCE.getEDataType(), DBType.CLOB));
@Override
protected Object getResultSetValue(ResultSet resultSet) throws SQLException
@@ -864,5 +871,22 @@ public class CoreTypeMappings
EFactory factory = getFeature().getEType().getEPackage().getEFactoryInstance();
return factory.convertToString((EDataType)getFeature().getEType(), defaultValue);
}
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class Factory extends AbstractTypeMappingFactory
+ {
+ public Factory(Descriptor descriptor)
+ {
+ super(descriptor);
+ }
+
+ @Override
+ public ITypeMapping create(String description) throws ProductCreationException
+ {
+ return new TMCustom();
+ }
+ }
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMappingRegistry.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMappingRegistry.java
index c992c3fb50..d7307e4608 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMappingRegistry.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMappingRegistry.java
@@ -109,90 +109,79 @@ public class TypeMappingRegistry implements ITypeMapping.Registry, ITypeMapping.
*/
private void registerCoreTypeMappings()
{
- // initialize default source and target type pairs
- IManagedContainer container = IPluginContainer.INSTANCE;
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEBigDecimal(), DBType.VARCHAR);
+ IManagedContainer container = getContainer();
container.registerFactory(CoreTypeMappings.TMBigDecimal.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEBigInteger(), DBType.VARCHAR);
+ container.registerFactory(CoreTypeMappings.TMBigDecimal.FACTORY_LONG_VARCHAR);
container.registerFactory(CoreTypeMappings.TMBigInteger.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEBoolean(), DBType.BOOLEAN);
+ container.registerFactory(CoreTypeMappings.TMBigInteger.FACTORY_LONG_VARCHAR);
container.registerFactory(CoreTypeMappings.TMBoolean.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEBooleanObject(), DBType.BOOLEAN);
+ container.registerFactory(CoreTypeMappings.TMBoolean.FACTORY_SMALLINT);
container.registerFactory(CoreTypeMappings.TMBoolean.FACTORY_OBJECT);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEByte(), DBType.SMALLINT);
+ container.registerFactory(CoreTypeMappings.TMBoolean.FACTORY_OBJECT_SMALLINT);
container.registerFactory(CoreTypeMappings.TMByte.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEByteObject(), DBType.SMALLINT);
container.registerFactory(CoreTypeMappings.TMByte.FACTORY_OBJECT);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEByteArray(), DBType.BLOB);
container.registerFactory(CoreTypeMappings.TMBytes.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEChar(), DBType.CHAR);
container.registerFactory(CoreTypeMappings.TMCharacter.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getECharacterObject(), DBType.CHAR);
container.registerFactory(CoreTypeMappings.TMCharacter.FACTORY_OBJECT);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEDataType(), DBType.VARCHAR);
container.registerFactory(CoreTypeMappings.TMCustom.FACTORY_VARCHAR);
container.registerFactory(CoreTypeMappings.TMCustom.FACTORY_CLOB);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEDate(), DBType.TIMESTAMP);
+ container.registerFactory(CoreTypeMappings.TMCustom.FACTORY_LONG_VARCHAR);
container.registerFactory(CoreTypeMappings.TMDate2Date.FACTORY);
container.registerFactory(CoreTypeMappings.TMDate2Time.FACTORY);
container.registerFactory(CoreTypeMappings.TMDate2Timestamp.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEDouble(), DBType.DOUBLE);
container.registerFactory(CoreTypeMappings.TMDouble.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEDoubleObject(), DBType.DOUBLE);
container.registerFactory(CoreTypeMappings.TMDouble.FACTORY_OBJECT);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEEnum(), DBType.INTEGER);
container.registerFactory(CoreTypeMappings.TMEnum.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEFloat(), DBType.FLOAT);
container.registerFactory(CoreTypeMappings.TMFloat.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEFloatObject(), DBType.FLOAT);
container.registerFactory(CoreTypeMappings.TMFloat.FACTORY_OBJECT);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEInt(), DBType.INTEGER);
container.registerFactory(CoreTypeMappings.TMInteger.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEIntegerObject(), DBType.INTEGER);
container.registerFactory(CoreTypeMappings.TMInteger.FACTORY_OBJECT);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getELong(), DBType.BIGINT);
container.registerFactory(CoreTypeMappings.TMLong.FACTORY);
-
- classifierDefaultMapping.put(EcorePackage.eINSTANCE.getELongObject(), DBType.BIGINT);
container.registerFactory(CoreTypeMappings.TMLong.FACTORY_OBJECT);
+ container.registerFactory(CoreTypeMappings.TMObject.FACTORY);
+ container.registerFactory(CoreTypeMappings.TMShort.FACTORY);
+ container.registerFactory(CoreTypeMappings.TMShort.FACTORY_OBJECT);
+ container.registerFactory(CoreTypeMappings.TMString.FACTORY_VARCHAR);
+ container.registerFactory(CoreTypeMappings.TMString.FACTORY_CLOB);
+ container.registerFactory(CoreTypeMappings.TMString.FACTORY_LONG_VARCHAR);
+ container.registerFactory(CoreTypeMappings.TMBlob.FACTORY_VARCHAR);
+ container.registerFactory(CoreTypeMappings.TMBlob.FACTORY_LONG_VARCHAR);
+ container.registerFactory(CoreTypeMappings.TMClob.FACTORY_VARCHAR);
+ container.registerFactory(CoreTypeMappings.TMClob.FACTORY_LONG_VARCHAR);
classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEClass(), DBType.BIGINT);
- container.registerFactory(CoreTypeMappings.TMObject.FACTORY);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEDataType(), DBType.VARCHAR);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEBigDecimal(), DBType.VARCHAR);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEBigInteger(), DBType.VARCHAR);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEBoolean(), DBType.BOOLEAN);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEBooleanObject(), DBType.BOOLEAN);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEByte(), DBType.SMALLINT);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEByteObject(), DBType.SMALLINT);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEByteArray(), DBType.BLOB);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEChar(), DBType.CHAR);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getECharacterObject(), DBType.CHAR);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEDate(), DBType.TIMESTAMP);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEDouble(), DBType.DOUBLE);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEDoubleObject(), DBType.DOUBLE);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEEnum(), DBType.INTEGER);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEFloat(), DBType.FLOAT);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEFloatObject(), DBType.FLOAT);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEInt(), DBType.INTEGER);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEIntegerObject(), DBType.INTEGER);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getELong(), DBType.BIGINT);
+ classifierDefaultMapping.put(EcorePackage.eINSTANCE.getELongObject(), DBType.BIGINT);
classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEShort(), DBType.SMALLINT);
- container.registerFactory(CoreTypeMappings.TMShort.FACTORY);
-
classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEShortObject(), DBType.SMALLINT);
- container.registerFactory(CoreTypeMappings.TMShort.FACTORY_OBJECT);
-
classifierDefaultMapping.put(EcorePackage.eINSTANCE.getEString(), DBType.VARCHAR);
- container.registerFactory(CoreTypeMappings.TMString.FACTORY_VARCHAR);
- container.registerFactory(CoreTypeMappings.TMString.FACTORY_CLOB);
- classifierDefaultMapping.put(EtypesPackage.eINSTANCE.getBlob(), DBType.VARCHAR);
- container.registerFactory(CoreTypeMappings.TMBlob.FACTORY);
+ classifierDefaultMapping.put(EtypesPackage.eINSTANCE.getBlob(), DBType.VARCHAR); // TODO Should be DBType.BLOB?
+ classifierDefaultMapping.put(EtypesPackage.eINSTANCE.getClob(), DBType.VARCHAR); // TODO Should be DBType.CLOB?
+ }
- classifierDefaultMapping.put(EtypesPackage.eINSTANCE.getClob(), DBType.VARCHAR);
- container.registerFactory(CoreTypeMappings.TMClob.FACTORY);
+ protected IPluginContainer getContainer()
+ {
+ return IPluginContainer.INSTANCE;
}
public void registerTypeMapping(ITypeMapping.Descriptor descriptor)
@@ -234,13 +223,12 @@ public class TypeMappingRegistry implements ITypeMapping.Registry, ITypeMapping.
public ITypeMapping createTypeMapping(IMappingStrategy mappingStrategy, EStructuralFeature feature)
{
- EClassifier classifier = getEClassifier(feature);
- DBType dbType = getDBType(feature, mappingStrategy.getStore().getDBAdapter());
-
- String typeMappingID = DBAnnotation.TYPE_MAPPING.getValue(feature);
+ IDBAdapter dbAdapter = mappingStrategy.getStore().getDBAdapter();
+ DBType dbType = getDBType(feature, dbAdapter);
ITypeMapping.Descriptor descriptor = null;
+ String typeMappingID = DBAnnotation.TYPE_MAPPING.getValue(feature);
if (typeMappingID != null)
{
// lookup annotated mapping
@@ -261,12 +249,15 @@ public class TypeMappingRegistry implements ITypeMapping.Registry, ITypeMapping.
if (descriptor == null)
{
- throw new IllegalStateException(MessageFormat.format(Messages.getString("TypeMappingRegistry.1"),
- feature.getName(), classifier.getName(), dbType.getKeyword()));
+ EClassifier type = getEType(feature);
+ throw new IllegalStateException(MessageFormat.format(Messages.getString("TypeMappingRegistry.1"), feature
+ .getEContainingClass().getName() + "." + feature.getName(),
+ type.getEPackage().getName() + "." + type.getName(), dbType.getKeyword()));
}
IFactory factory = getManagedContainer()
.getFactory(ITypeMapping.Factory.PRODUCT_GROUP, descriptor.getFactoryType());
+
ITypeMapping typeMapping = (ITypeMapping)factory.create(null);
typeMapping.setMappingStrategy(mappingStrategy);
typeMapping.setFeature(feature);
@@ -276,10 +267,10 @@ public class TypeMappingRegistry implements ITypeMapping.Registry, ITypeMapping.
private IManagedContainer getManagedContainer()
{
- return IPluginContainer.INSTANCE;
+ return getContainer();
}
- private EClassifier getEClassifier(EStructuralFeature feature)
+ private EClassifier getEType(EStructuralFeature feature)
{
EClassifier classifier = feature.getEType();
if (classifier instanceof EEnum)
@@ -322,7 +313,7 @@ public class TypeMappingRegistry implements ITypeMapping.Registry, ITypeMapping.
}
// No annotation present - lookup default DB type.
- return getDefaultDBType(getEClassifier(feature), dbAdapter);
+ return getDefaultDBType(getEType(feature), dbAdapter);
}
private DBType getDefaultDBType(EClassifier type, IDBAdapter dbAdapter)
@@ -347,7 +338,7 @@ public class TypeMappingRegistry implements ITypeMapping.Registry, ITypeMapping.
if (descriptor == null)
{
// Second try: lookup general mapping
- descriptor = typeMappingByTypes.get(new Pair<EClassifier, DBType>(getEClassifier(feature), dbType));
+ descriptor = typeMappingByTypes.get(new Pair<EClassifier, DBType>(getEType(feature), dbType));
if (descriptor == null)
{
// Lookup failed. Give up
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/messages/messages.properties b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/messages/messages.properties
index c6768b4838..e551313dbc 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/messages/messages.properties
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/messages/messages.properties
@@ -3,7 +3,7 @@
# 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:
# Victor Roldan Betancort - initial API and implementation
# Eike Stepper - maintenance
@@ -18,10 +18,10 @@ DBStore.8=First start: {0,date} {0,time}
DBStore.9=Detected crash
DBStore.11=BranchingSupport of MappingStrategy and Store do not match. Please check configuration.
DBStore.12=Repairing after crash failed.
-DBStore.13=Invalid EENum default literal {0} for model element {1}. Falling back to EENum default value.
+DBStore.13=Invalid EENum default literal {0} for model element {1}. Falling back to EENum default value.
-TypeMappingRegistry.1=No type mapping factory found for feature {0} (type {1}, DB type {2})
+TypeMappingRegistry.1=No type mapping factory found for {0}: {1} --> DBType.{2}
TypeMappingRegistry.2=TypeMapping {0} annotated at feature {1} could not be found in registry.
TypeMappingRegistry.3=Runtime removal of ITypeMapping.Factory extensions is currently not supported.
TypeMappingRegistry.4=Duplicate source:target typeMapping pairs are currently not supported!
@@ -31,4 +31,3 @@ FactoryTypeParserException.1=Invalid format for typeMapping factoryType {0}
FactoryTypeParserException.2=EPackage {0} could not be resolved while registering typeMapping factoryType {1}
FactoryTypeParserException.3=EClassifier {0} could not be resolved while registering typeMapping factoryType {1}
FactoryTypeParserException.4=DBType {0} could not be resolved while registering typeMapping factoryType {1}
- \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (DB2 non-audit).launch b/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (DB2 non-audit).launch
new file mode 100644
index 0000000000..ce9886b07a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (DB2 non-audit).launch
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBDB2NonAudit.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_22"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.db.AllTestsDBDB2NonAudit"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests.db"/>
+</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.db/META-INF/MANIFEST.MF
index 9e22dcb152..87eb6a4c7a 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.tests.db/META-INF/MANIFEST.MF
@@ -15,9 +15,11 @@ Require-Bundle: org.eclipse.emf.cdo.tests;bundle-version="[4.0.0,5.0.0)";visibil
org.eclipse.net4j.db.derby;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.net4j.db.mysql;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.net4j.db.h2;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
- org.eclipse.net4j.db.postgresql;bundle-version="[4.0.0,5.0.0)"
+ org.eclipse.net4j.db.postgresql;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.net4j.db.db2;bundle-version="[4.0.0,5.0.0)";resolution:=optional
Eclipse-BuddyPolicy: dependent
-Import-Package: com.mysql.jdbc.jdbc2.optional;version="[5.0.0,6.0.0)",
+Import-Package: com.ibm.db2.jcc;version="[9.0.0,10.0.0)";resolution:=optional,
+ com.mysql.jdbc.jdbc2.optional;version="[5.0.0,6.0.0)",
org.apache.derby.jdbc;version="[10.0.0,11.0.0)",
org.h2.jdbcx;version="[1.1.0,1.2.0)",
org.hsqldb.jdbc;version="[1.8.0,2.0.0)",
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/build.properties b/plugins/org.eclipse.emf.cdo.tests.db/build.properties
index 2a2032a625..6efa408aab 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/build.properties
+++ b/plugins/org.eclipse.emf.cdo.tests.db/build.properties
@@ -17,4 +17,15 @@ jars.compile.order = .
source.. = src/
output.. = bin/
src.includes = about.html,\
- copyright.txt
+ copyright.txt,\
+ CDO AllTests (DB2 non-audit).launch,\
+ CDO AllTests (Derby).launch,\
+ CDO AllTests (H2 audit).launch,\
+ CDO AllTests (H2 branching).launch,\
+ CDO AllTests (H2 non-audit).launch,\
+ CDO AllTests (H2 offline).launch,\
+ CDO AllTests (Hsqldb audit).launch,\
+ CDO AllTests (Hsqldb non-audit).launch,\
+ CDO AllTests (Mysql).launch,\
+ CDO AllTests (PostgreSQL non-audit).launch,\
+ CDO AutomatedTests (DBStore).launch
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBDB2NonAudit.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBDB2NonAudit.java
new file mode 100644
index 0000000000..287abb4504
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBDB2NonAudit.java
@@ -0,0 +1,213 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.db;
+
+import org.eclipse.emf.cdo.server.IRepository;
+import org.eclipse.emf.cdo.server.db.CDODBUtil;
+import org.eclipse.emf.cdo.server.db.mapping.IMappingStrategy;
+import org.eclipse.emf.cdo.tests.AuditTest;
+import org.eclipse.emf.cdo.tests.AuditTestSameSession;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_252214_Test;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest;
+
+import org.eclipse.net4j.db.DBException;
+import org.eclipse.net4j.db.DBUtil;
+import org.eclipse.net4j.db.IDBAdapter;
+import org.eclipse.net4j.db.db2.DB2Adapter;
+import org.eclipse.net4j.db.db2.DB2SchemaDatasource;
+
+import javax.sql.DataSource;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Eike Stepper
+ */
+public class AllTestsDBDB2NonAudit extends DBConfigs
+{
+ public static Test suite()
+ {
+ return new AllTestsDBDB2NonAudit().getTestSuite("CDO Tests (DBStore H2 Horizontal - non-audit mode)"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void initConfigSuites(TestSuite parent)
+ {
+ addScenario(parent, COMBINED, AllTestsDBDB2NonAudit.DB2NonAudit.INSTANCE, JVM, NATIVE);
+ }
+
+ @Override
+ protected boolean hasAuditSupport()
+ {
+ return false;
+ }
+
+ @Override
+ protected boolean hasBranchingSupport()
+ {
+ return false;
+ }
+
+ @Override
+ protected void initTestClasses(List<Class<? extends ConfigTest>> testClasses)
+ {
+ super.initTestClasses(testClasses);
+
+ // non-audit mode - remove audit tests
+ testClasses.remove(AuditTest.class);
+ testClasses.remove(AuditTestSameSession.class);
+ testClasses.remove(Bugzilla_252214_Test.class);
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class DB2NonAudit extends DBStoreRepositoryConfig
+ {
+ private static final String DB_NAME = "SAMPLE"; //$NON-NLS-1$
+
+ private static final String DB_USER = "DB2ADMIN"; //$NON-NLS-1$
+
+ private static final String DB_PASSWORD = "12345"; //$NON-NLS-1$
+
+ static final String DB_SCHEMA = "CDOTEST"; //$NON-NLS-1$
+
+ private static final long serialVersionUID = 1L;
+
+ public static final AllTestsDBDB2NonAudit.DB2NonAudit INSTANCE = new DB2NonAudit("DBStore: DB2 (non-audit)"); //$NON-NLS-1$
+
+ private transient String currentRepoName;
+
+ private static int tableCounter;
+
+ private static int dropCounter;
+
+ public DB2NonAudit(String name)
+ {
+ super(name);
+ }
+
+ @Override
+ protected void initRepositoryProperties(Map<String, String> props)
+ {
+ super.initRepositoryProperties(props);
+ props.put(IRepository.Props.SUPPORTING_AUDITS, "false"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected IMappingStrategy createMappingStrategy()
+ {
+ Map<String, String> properties = new HashMap<String, String>();
+ properties.put("qualifiedNames", "false");
+ properties.put("forceNamesWithID", "false");
+
+ IMappingStrategy mappingStrategy = CDODBUtil.createHorizontalMappingStrategy(false);
+ mappingStrategy.setProperties(properties);
+
+ return mappingStrategy;
+ }
+
+ @Override
+ protected IDBAdapter createDBAdapter()
+ {
+ return new DB2Adapter();
+ }
+
+ @Override
+ protected DataSource createDataSource(final String repoName)
+ {
+ if (currentRepoName != null && !repoName.equals(currentRepoName))
+ {
+ throw new IllegalStateException("This test config only supports a single repository"); //$NON-NLS-1$
+ }
+
+ currentRepoName = repoName;
+
+ DB2SchemaDatasource dataSource = new DB2SchemaDatasource(DB_SCHEMA);
+ dataSource.setDatabaseName(DB_NAME);
+ dataSource.setUser(DB_USER);
+ dataSource.setPassword(DB_PASSWORD);
+
+ if (!isRestarting())
+ {
+ initAllTables(dataSource);
+ }
+
+ return dataSource;
+ }
+
+ @Override
+ public void tearDown() throws Exception
+ {
+ currentRepoName = null;
+ super.tearDown();
+ }
+
+ private static void initAllTables(DataSource dataSource)
+ {
+ Connection conn = null;
+ Statement statement = null;
+ String sql = null;
+
+ try
+ {
+ conn = dataSource.getConnection();
+ List<String> tableNames = DBUtil.getAllTableNames(conn, DB_SCHEMA);
+ if (tableCounter != 0)
+ {
+ if (tableCounter < tableNames.size())
+ {
+ dropCounter = 20;
+ }
+ }
+
+ tableCounter = tableNames.size();
+
+ boolean drop = false;
+ if (dropCounter > 0)
+ {
+ --dropCounter;
+ }
+ else if (dropCounter == 0)
+ {
+ tableCounter = 0;
+ dropCounter = -1;
+ drop = true;
+ }
+
+ statement = conn.createStatement();
+ for (String tableName : tableNames)
+ {
+ sql = (drop ? "DROP TABLE " : "DELETE FROM ") + tableName; //$NON-NLS-1$ //$NON-NLS-2$
+ DBUtil.trace(sql);
+ statement.execute(sql);
+ }
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex, sql);
+ }
+ finally
+ {
+ DBUtil.close(statement);
+ DBUtil.close(conn);
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/Net4jDBTest.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/Net4jDBTest.java
index b1e74e9b26..399155c04a 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/Net4jDBTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/Net4jDBTest.java
@@ -43,8 +43,6 @@ import java.util.concurrent.TimeUnit;
*/
public class Net4jDBTest extends AbstractCDOTest
{
- private static final String TABLE_NAME = "testTable";
-
private static final String FIELD_NAME = "testField";
private DBStore store;
@@ -59,7 +57,7 @@ public class Net4jDBTest extends AbstractCDOTest
registerColumn(DBType.BIGINT, Long.MIN_VALUE);
registerColumn(DBType.BIGINT, 0L);
registerColumn(DBType.BIGINT, 42L);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testBinary() throws Exception
@@ -73,7 +71,7 @@ public class Net4jDBTest extends AbstractCDOTest
}
registerColumn(DBType.BINARY, data);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testVarBinary() throws Exception
@@ -87,7 +85,7 @@ public class Net4jDBTest extends AbstractCDOTest
}
registerColumn(DBType.VARBINARY, data);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testLongVarBinary() throws Exception
@@ -101,20 +99,18 @@ public class Net4jDBTest extends AbstractCDOTest
}
registerColumn(DBType.LONGVARBINARY, data);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testBit() throws Exception
{
registerColumn(DBType.BIT, true);
registerColumn(DBType.BIT, false);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testBlob() throws Exception
{
- registerColumn(DBType.BLOB, new byte[0]);
-
byte[] data = new byte[1000000];
for (int i = 0; i < data.length; i++)
{
@@ -122,28 +118,33 @@ public class Net4jDBTest extends AbstractCDOTest
}
registerColumn(DBType.BLOB, data);
- doTest(TABLE_NAME);
+ doTest(getName());
+ }
+
+ public void testBlobLength0() throws Exception
+ {
+ registerColumn(DBType.BLOB, new byte[0]);
+ doTest(getName());
}
public void testBoolean() throws Exception
{
registerColumn(DBType.BOOLEAN, true);
registerColumn(DBType.BOOLEAN, false);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testChar() throws Exception
{
registerColumn(DBType.CHAR, "0");
registerColumn(DBType.CHAR, "a");
- registerColumn(DBType.CHAR, "\255");
- registerColumn(DBType.CHAR, "\u1234");
- doTest(TABLE_NAME);
+ registerColumn(DBType.CHAR, "\255"); // Fails for DB2
+ registerColumn(DBType.CHAR, "\u1234"); // Fails for DB2
+ doTest(getName());
}
public void testClob() throws Exception
{
- registerColumn(DBType.CLOB, "");
registerColumn(DBType.CLOB, "Test");
StringBuffer b = new StringBuffer();
@@ -153,7 +154,13 @@ public class Net4jDBTest extends AbstractCDOTest
}
registerColumn(DBType.CLOB, b.toString());
- doTest(TABLE_NAME);
+ doTest(getName());
+ }
+
+ public void testClobLength0() throws Exception
+ {
+ registerColumn(DBType.CLOB, "");
+ doTest(getName());
}
public void testTinyInt() throws Exception
@@ -162,7 +169,7 @@ public class Net4jDBTest extends AbstractCDOTest
registerColumn(DBType.TINYINT, Byte.MIN_VALUE);
registerColumn(DBType.TINYINT, new Byte("0"));
registerColumn(DBType.TINYINT, new Integer(42).byteValue());
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testSmallInt() throws Exception
@@ -171,7 +178,7 @@ public class Net4jDBTest extends AbstractCDOTest
registerColumn(DBType.SMALLINT, Short.MIN_VALUE);
registerColumn(DBType.SMALLINT, (short)-1);
registerColumn(DBType.SMALLINT, (short)5);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testInteger() throws Exception
@@ -180,34 +187,34 @@ public class Net4jDBTest extends AbstractCDOTest
registerColumn(DBType.INTEGER, Integer.MIN_VALUE);
registerColumn(DBType.INTEGER, -1);
registerColumn(DBType.INTEGER, 5);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testFloat() throws Exception
{
registerColumn(DBType.FLOAT, Float.MAX_VALUE);
- registerColumn(DBType.FLOAT, Float.MIN_VALUE);
+ registerColumn(DBType.FLOAT, Float.MIN_VALUE); // Fails for DB2
registerColumn(DBType.FLOAT, -.1f);
registerColumn(DBType.FLOAT, 3.33333f);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testReal() throws Exception
{
registerColumn(DBType.REAL, Float.MAX_VALUE);
- registerColumn(DBType.REAL, Float.MIN_VALUE);
+ registerColumn(DBType.REAL, Float.MIN_VALUE); // Fails for DB2
registerColumn(DBType.REAL, -.1f);
registerColumn(DBType.REAL, 3.33333f);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testDouble() throws Exception
{
registerColumn(DBType.DOUBLE, new Double(Double.MAX_VALUE));
- registerColumn(DBType.DOUBLE, new Double(Double.MIN_VALUE));
+ // registerColumn(DBType.DOUBLE, new Double(Double.MIN_VALUE));
registerColumn(DBType.DOUBLE, -.1d);
registerColumn(DBType.DOUBLE, 3.33333d);
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void _testNumeric() throws Exception
@@ -228,7 +235,7 @@ public class Net4jDBTest extends AbstractCDOTest
registerColumn(DBType.NUMERIC, numberDecimal1);
registerColumn(DBType.NUMERIC, numberDecimal2);
- doTest(TABLE_NAME + precision + "_" + scale);
+ doTest(getName() + precision + "_" + scale);
columns.clear();
}
}
@@ -252,7 +259,7 @@ public class Net4jDBTest extends AbstractCDOTest
registerColumn(DBType.DECIMAL, numberDecimal1);
registerColumn(DBType.DECIMAL, numberDecimal2);
- doTest(TABLE_NAME + precision + "_" + scale);
+ doTest(getName() + precision + "_" + scale);
columns.clear();
}
}
@@ -268,7 +275,7 @@ public class Net4jDBTest extends AbstractCDOTest
registerColumn(DBType.VARCHAR, "The quick brown fox jumps over the lazy dog.");
registerColumn(DBType.VARCHAR, "\\,:\",\'");
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testLongVarChar() throws Exception
@@ -281,7 +288,7 @@ public class Net4jDBTest extends AbstractCDOTest
registerColumn(DBType.LONGVARCHAR, "The quick brown fox jumps over the lazy dog.");
registerColumn(DBType.LONGVARCHAR, "\\,:\",\'");
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testDate() throws Exception
@@ -289,9 +296,9 @@ public class Net4jDBTest extends AbstractCDOTest
registerColumn(DBType.DATE, new GregorianCalendar(2010, 04, 21).getTimeInMillis());
registerColumn(DBType.DATE, new GregorianCalendar(1950, 04, 21).getTimeInMillis());
registerColumn(DBType.DATE, new GregorianCalendar(2030, 12, 31).getTimeInMillis());
- registerColumn(DBType.DATE, new GregorianCalendar(0, 0, 0).getTimeInMillis());
+ registerColumn(DBType.DATE, new GregorianCalendar(0, 0, 0).getTimeInMillis()); // Fails for DB2
- doTest(TABLE_NAME);
+ doTest(getName());
}
public void testTime() throws Exception
@@ -304,17 +311,7 @@ public class Net4jDBTest extends AbstractCDOTest
//
// registerColumn(DBType.TIME, HOURS_toMillis(24));
- doTest(TABLE_NAME);
- }
-
- private long HOURS_toMillis(int hours)
- {
- return 1000L * 60L * 60L * hours;
- }
-
- private long MINUTES_toMillis(int minutes)
- {
- return 1000L * 60L * minutes;
+ doTest(getName());
}
public void testTimestamp() throws Exception
@@ -327,7 +324,7 @@ public class Net4jDBTest extends AbstractCDOTest
//
// registerColumn(DBType.TIME, HOURS_toMillis(24));
- doTest(TABLE_NAME);
+ doTest(getName());
}
private void registerColumn(DBType type, Object value)
@@ -434,6 +431,7 @@ public class Net4jDBTest extends AbstractCDOTest
ByteArrayInputStream input = new ByteArrayInputStream(buffer);
ExtendedDataInputStream ins = new ExtendedDataInputStream(input);
+ c = 1;
for (Pair<DBType, Object> column : columns)
{
Object actual = readTypeValue(ins, column.getElement1());
@@ -443,12 +441,12 @@ public class Net4jDBTest extends AbstractCDOTest
Class<?> componentType = type.getComponentType();
if (componentType == byte.class)
{
- assertEquals("Error with type " + column.getElement1(), true,
+ assertEquals("Error in column " + c + " of type " + column.getElement1(), true,
Arrays.equals((byte[])column.getElement2(), (byte[])actual));
}
else if (componentType == char.class)
{
- assertEquals("Error with type " + column.getElement1(), true,
+ assertEquals("Error in column " + c + " with type " + column.getElement1(), true,
Arrays.equals((char[])column.getElement2(), (char[])actual));
}
else
@@ -458,8 +456,10 @@ public class Net4jDBTest extends AbstractCDOTest
}
else
{
- assertEquals("Error with type " + column.getElement1(), column.getElement2(), actual);
+ assertEquals("Error in column " + c + " with type " + column.getElement1(), column.getElement2(), actual);
}
+
+ ++c;
}
}
@@ -473,7 +473,6 @@ public class Net4jDBTest extends AbstractCDOTest
prepareTable(tableName);
writeValues(tableName);
checkValues(tableName);
-
}
finally
{
@@ -701,4 +700,14 @@ public class Net4jDBTest extends AbstractCDOTest
throw new UnsupportedOperationException("not implemented");
}
}
+
+ private long HOURS_toMillis(int hours)
+ {
+ return 1000L * 60L * 60L * hours;
+ }
+
+ private long MINUTES_toMillis(int minutes)
+ {
+ return 1000L * 60L * minutes;
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo/model/eresource.ecore b/plugins/org.eclipse.emf.cdo/model/eresource.ecore
index acb44c9380..7a5b8cb39b 100644
--- a/plugins/org.eclipse.emf.cdo/model/eresource.ecore
+++ b/plugins/org.eclipse.emf.cdo/model/eresource.ecore
@@ -6,7 +6,12 @@
<eClassifiers xsi:type="ecore:EClass" name="CDOResourceNode" abstract="true">
<eStructuralFeatures xsi:type="ecore:EReference" name="folder" eType="#//CDOResourceFolder"
eOpposite="#//CDOResourceFolder/nodes"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/CDO/DBStore">
+ <details key="columnType" value="VARCHAR"/>
+ <details key="columnLength" value="255"/>
+ </eAnnotations>
+ </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="path" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
volatile="true" transient="true" derived="true"/>
</eClassifiers>
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java
index 4da323bef4..ae0c36d86c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java
@@ -93,7 +93,7 @@ public interface CDOResourceNode extends CDOObject
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode_Name()
- * @model
+ * @model annotation="http://www.eclipse.org/CDO/DBStore columnType='VARCHAR' columnLength='255'"
* @generated
*/
String getName();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFolderImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFolderImpl.java
index d72936eb1f..36f52c0e4c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFolderImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFolderImpl.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.eresource.CDOResourceNode;
import org.eclipse.emf.cdo.eresource.EresourcePackage;
import org.eclipse.emf.cdo.util.CDOURIUtil;
-
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.spi.cdo.FSMUtil;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
index b1420c4816..5ddeb6cc9c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
@@ -116,7 +116,9 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
public static EresourcePackage init()
{
if (isInited)
+ {
return (EresourcePackage)EPackage.Registry.INSTANCE.getEPackage(EresourcePackage.eNS_URI);
+ }
// Obtain or create and register package
EresourcePackageImpl theEresourcePackage = (EresourcePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EresourcePackageImpl ? EPackage.Registry.INSTANCE
@@ -363,7 +365,9 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
public void createPackageContents()
{
if (isCreated)
+ {
return;
+ }
isCreated = true;
// Create classes and their features
@@ -408,7 +412,9 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
public void initializePackageContents()
{
if (isInitialized)
+ {
return;
+ }
isInitialized = true;
// Initialize package
@@ -424,16 +430,16 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
// Set bounds for type parameters
// Add supertypes to classes
- cdoResourceFolderEClass.getESuperTypes().add(this.getCDOResourceNode());
- cdoResourceEClass.getESuperTypes().add(this.getCDOResourceNode());
+ cdoResourceFolderEClass.getESuperTypes().add(getCDOResourceNode());
+ cdoResourceEClass.getESuperTypes().add(getCDOResourceNode());
// Initialize classes and features; add operations and parameters
initEClass(cdoResourceNodeEClass, CDOResourceNode.class,
"CDOResourceNode", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(
getCDOResourceNode_Folder(),
- this.getCDOResourceFolder(),
- this.getCDOResourceFolder_Nodes(),
+ getCDOResourceFolder(),
+ getCDOResourceFolder_Nodes(),
"folder", null, 0, 1, CDOResourceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getCDOResourceNode_Name(),
@@ -448,26 +454,26 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
"CDOResourceFolder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(
getCDOResourceFolder_Nodes(),
- this.getCDOResourceNode(),
- this.getCDOResourceNode_Folder(),
+ getCDOResourceNode(),
+ getCDOResourceNode_Folder(),
"nodes", null, 0, -1, CDOResourceFolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- EOperation op = addEOperation(cdoResourceFolderEClass, this.getCDOResourceFolder(),
+ EOperation op = addEOperation(cdoResourceFolderEClass, getCDOResourceFolder(),
"addResourceFolder", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
- op = addEOperation(cdoResourceFolderEClass, this.getCDOResource(), "addResource", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ op = addEOperation(cdoResourceFolderEClass, getCDOResource(), "addResource", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
initEClass(cdoResourceEClass, CDOResource.class,
"CDOResource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEAttribute(
getCDOResource_ResourceSet(),
- this.getResourceSet(),
+ getResourceSet(),
"resourceSet", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getCDOResource_URI(),
- this.getURI(),
+ getURI(),
"uRI", null, 0, 1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(
getCDOResource_Contents(),
@@ -488,11 +494,11 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
"trackingModification", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getCDOResource_Errors(),
- this.getDiagnostic(),
+ getDiagnostic(),
"errors", null, 0, -1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getCDOResource_Warnings(),
- this.getDiagnostic(),
+ getDiagnostic(),
"warnings", null, 0, -1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getCDOResource_TimeStamp(),
@@ -508,6 +514,24 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
// Create resource
createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/CDO/DBStore
+ createDBStoreAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/CDO/DBStore</b>. <!-- begin-user-doc -->
+ *
+ * @since 4.0 <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createDBStoreAnnotations()
+ {
+ String source = "http://www.eclipse.org/CDO/DBStore"; //$NON-NLS-1$
+ addAnnotation(getCDOResourceNode_Name(), source, new String[] { "columnType", "VARCHAR", //$NON-NLS-1$ //$NON-NLS-2$
+ "columnLength", "255" //$NON-NLS-1$ //$NON-NLS-2$
+ });
}
} // EresourcePackageImpl
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesFactory.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesFactory.java
index f413a48d46..e27f28f43d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesFactory.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesFactory.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: EtypesFactory.java,v 1.2 2010-10-03 17:43:22 estepper Exp $
+ * $Id: EtypesFactory.java,v 1.3 2010-11-12 17:37:25 estepper Exp $
*/
package org.eclipse.emf.cdo.etypes;
@@ -19,15 +19,15 @@ import org.eclipse.emf.ecore.EFactory;
public interface EtypesFactory extends EFactory
{
/**
- * The singleton instance of the factory.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EtypesFactory eINSTANCE = org.eclipse.emf.cdo.etypes.impl.EtypesFactoryImpl.init();
/**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the package supported by this factory.
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java
index 944e434e18..beb92d8ecf 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: EtypesPackage.java,v 1.2 2010-10-03 17:43:22 estepper Exp $
+ * $Id: EtypesPackage.java,v 1.3 2010-11-12 17:37:25 estepper Exp $
*/
package org.eclipse.emf.cdo.etypes;
@@ -26,36 +26,36 @@ import org.eclipse.emf.ecore.EPackage;
public interface EtypesPackage extends EPackage
{
/**
- * The package name.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
String eNAME = "etypes"; //$NON-NLS-1$
/**
- * The package namespace URI.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
String eNS_URI = "http://www.eclipse.org/emf/CDO/Etypes/4.0.0"; //$NON-NLS-1$
/**
- * The package namespace name.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
String eNS_PREFIX = "etypes"; //$NON-NLS-1$
/**
- * The singleton instance of the package.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EtypesPackage eINSTANCE = org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl.init();
/**
- * The meta object id for the '<em>Blob</em>' data type.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The meta object id for the '<em>Blob</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.emf.cdo.common.model.lob.CDOBlob
* @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getBlob()
* @generated
@@ -63,8 +63,8 @@ public interface EtypesPackage extends EPackage
int BLOB = 0;
/**
- * The meta object id for the '<em>Clob</em>' data type.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The meta object id for the '<em>Clob</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.emf.cdo.common.model.lob.CDOClob
* @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getClob()
* @generated
@@ -94,8 +94,8 @@ public interface EtypesPackage extends EPackage
EDataType getClob();
/**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the factory that creates the instances of the model.
* @generated
*/
@@ -110,13 +110,14 @@ public interface EtypesPackage extends EPackage
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
+ *
* @generated
*/
interface Literals
{
/**
- * The meta object literal for the '<em>Blob</em>' data type.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The meta object literal for the '<em>Blob</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.emf.cdo.common.model.lob.CDOBlob
* @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getBlob()
* @generated
@@ -124,8 +125,8 @@ public interface EtypesPackage extends EPackage
EDataType BLOB = eINSTANCE.getBlob();
/**
- * The meta object literal for the '<em>Clob</em>' data type.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The meta object literal for the '<em>Clob</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.emf.cdo.common.model.lob.CDOClob
* @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getClob()
* @generated
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java
index 92020268b0..6673d485d3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: EtypesFactoryImpl.java,v 1.2 2010-10-03 17:43:22 estepper Exp $
+ * $Id: EtypesFactoryImpl.java,v 1.3 2010-11-12 17:37:25 estepper Exp $
*/
package org.eclipse.emf.cdo.etypes.impl;
@@ -27,8 +27,8 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin;
public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
{
/**
- * Creates the default factory implementation.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static EtypesFactory init()
@@ -50,8 +50,8 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
}
/**
- * Creates an instance of the factory.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EtypesFactoryImpl()
@@ -61,6 +61,7 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -75,6 +76,7 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -93,6 +95,7 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -111,6 +114,7 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public CDOBlob createBlobFromString(EDataType eDataType, String initialValue)
@@ -120,6 +124,7 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public String convertBlobToString(EDataType eDataType, Object instanceValue)
@@ -129,6 +134,7 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public CDOClob createClobFromString(EDataType eDataType, String initialValue)
@@ -138,6 +144,7 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public String convertClobToString(EDataType eDataType, Object instanceValue)
@@ -147,6 +154,7 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EtypesPackage getEtypesPackage()
@@ -156,6 +164,7 @@ public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @deprecated
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java
index 9486c1b024..5f53727e42 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: EtypesPackageImpl.java,v 1.2 2010-10-03 17:43:22 estepper Exp $
+ * $Id: EtypesPackageImpl.java,v 1.3 2010-11-12 17:37:25 estepper Exp $
*/
package org.eclipse.emf.cdo.etypes.impl;
@@ -25,12 +25,14 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EDataType blobEDataType = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EDataType clobEDataType = null;
@@ -55,17 +57,18 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link EtypesPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
+ * <p>
+ * This method is used to initialize {@link EtypesPackage#eINSTANCE} when that field is accessed. Clients should not
+ * invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
@@ -98,6 +101,7 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EDataType getBlob()
@@ -107,6 +111,7 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EDataType getClob()
@@ -116,6 +121,7 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EtypesFactory getEtypesFactory()
@@ -125,14 +131,15 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private boolean isCreated = false;
/**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its
+ * first. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public void createPackageContents()
@@ -148,14 +155,15 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private boolean isInitialized = false;
/**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any
+ * invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public void initializePackageContents()
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOAuthenticatorImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOAuthenticatorImpl.java
index a6edeed8a8..f1cf2582c9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOAuthenticatorImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOAuthenticatorImpl.java
@@ -93,4 +93,4 @@ public class CDOAuthenticatorImpl implements CDOAuthenticator
throw new SecurityException(ex);
}
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.net4j.db.db2/.classpath b/plugins/org.eclipse.net4j.db.db2/.classpath
new file mode 100644
index 0000000000..64c5e31b7a
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.net4j.db.db2/.cvsignore b/plugins/org.eclipse.net4j.db.db2/.cvsignore
new file mode 100644
index 0000000000..ba077a4031
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/plugins/org.eclipse.net4j.db.db2/.options b/plugins/org.eclipse.net4j.db.db2/.options
new file mode 100644
index 0000000000..994997cb43
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.options
@@ -0,0 +1,4 @@
+# Debugging and tracing options
+
+org.eclipse.net4j.db.db2/debug = true
+org.eclipse.net4j.db.db2/debug.sql = true
diff --git a/plugins/org.eclipse.net4j.db.db2/.project b/plugins/org.eclipse.net4j.db.db2/.project
new file mode 100644
index 0000000000..ca5095c653
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.project
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.net4j.db.db2</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>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.emf.cdo.releng.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.emf.cdo.releng/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.emf.cdo.releng.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..a1cef9a448
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Thu Dec 18 13:30:26 CET 2008
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..f6c5987344
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,360 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+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.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..51145884f6
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,120 @@
+#Thu Feb 04 09:44:24 CET 2010
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=false
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_EMFT
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMFT
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=org.eclipse.emf.cdo;org.eclipse.emf.internal.cdo;org.eclipse.net4j;org.eclipse.internal.net4j;org.eclipse.emf;org.eclipse;com;org;javax;java;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..864e30fe5d
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.mylyn.tasks.ui.prefs b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000000..b050639a54
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.mylyn.team.ui.prefs b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000000..2f50f36c0c
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+commit.comment.template=[${task.id}] ${task.description} \r\n${task.url}
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000000..4fc4ff0069
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Thu Feb 04 09:44:24 CET 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Disabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.core.prefs b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000000..2b980e00bf
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+#Thu May 21 12:09:48 CEST 2009
+eclipse.preferences.version=1
+resolve.requirebundle=false
diff --git a/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..c6b96bb45e
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,31 @@
+#Thu Feb 04 09:44:24 CET 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..8f081738df
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.net4j.db.db2;singleton:=true
+Bundle-Version: 4.0.0.qualifier
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ClassPath: .
+Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.eclipse.net4j.db.internal.db2.bundle.OM$Activator
+Require-Bundle: org.eclipse.net4j.db;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
+Import-Package: com.ibm.db2.jcc;version="[9.0.0,10.0.0)",
+ org.osgi.framework;version="[1.0.0,2.0.0)"
+Export-Package: org.eclipse.net4j.db.db2;version="4.0.0",
+ org.eclipse.net4j.db.internal.db2.bundle;version="4.0.0";x-internal:=true
+Eclipse-RegisterBuddy: org.eclipse.net4j.db
diff --git a/plugins/org.eclipse.net4j.db.db2/about.html b/plugins/org.eclipse.net4j.db.db2/about.html
new file mode 100644
index 0000000000..d35d5aed64
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/about.html
@@ -0,0 +1,28 @@
+<!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 5, 2007</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>
diff --git a/plugins/org.eclipse.net4j.db.db2/about.ini b/plugins/org.eclipse.net4j.db.db2/about.ini
new file mode 100644
index 0000000000..b7e87ca285
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/about.ini
@@ -0,0 +1,15 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=modeling32.png
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
+
diff --git a/plugins/org.eclipse.net4j.db.db2/about.mappings b/plugins/org.eclipse.net4j.db.db2/about.mappings
new file mode 100644
index 0000000000..bddaab4310
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@ \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.db.db2/about.properties b/plugins/org.eclipse.net4j.db.db2/about.properties
new file mode 100644
index 0000000000..d479f7dced
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/about.properties
@@ -0,0 +1,31 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+# Eike Stepper - initial API and implementation
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+featureName = Net4j DB Framework DB2 Adapter
+featureText = Net4j DB Framework DB2 Adapter\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others. All rights reserved.\n\
+\n\
+Visit http://wiki.eclipse.org/Net4j
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/plugins/org.eclipse.net4j.db.db2/build.properties b/plugins/org.eclipse.net4j.db.db2/build.properties
new file mode 100644
index 0000000000..ce0e3b6f60
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/build.properties
@@ -0,0 +1,27 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+# Eike Stepper - initial API and implementation
+
+# NLS_MESSAGEFORMAT_VAR
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ .options,\
+ copyright.txt,\
+ plugin.properties,\
+ plugin.xml,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ modeling32.png
+src.includes = about.html,\
+ copyright.txt,\
+ reserved_words.txt
diff --git a/plugins/org.eclipse.net4j.db.db2/copyright.txt b/plugins/org.eclipse.net4j.db.db2/copyright.txt
new file mode 100644
index 0000000000..77d945dca6
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/copyright.txt
@@ -0,0 +1,8 @@
+Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+ Eike Stepper - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.db.db2/modeling32.png b/plugins/org.eclipse.net4j.db.db2/modeling32.png
new file mode 100644
index 0000000000..6b08de2ada
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/modeling32.png
Binary files differ
diff --git a/plugins/org.eclipse.net4j.db.db2/plugin.properties b/plugins/org.eclipse.net4j.db.db2/plugin.properties
new file mode 100644
index 0000000000..9cecf7f3dc
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/plugin.properties
@@ -0,0 +1,11 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+# Eike Stepper - initial API and implementation
+
+pluginName = Net4j DB Framework DB2 Adapter
+providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.net4j.db.db2/plugin.xml b/plugins/org.eclipse.net4j.db.db2/plugin.xml
new file mode 100644
index 0000000000..e990891c4b
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.3"?>
+<!--
+ Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+ Eike Stepper - initial API and implementation
+-->
+
+<plugin>
+
+ <extension
+ point="org.eclipse.net4j.db.dbAdapters">
+ <dbAdapter
+ class="org.eclipse.net4j.db.db2.DB2Adapter"
+ name="db2"
+ version="3.59.81">
+ </dbAdapter>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.net4j.db.db2/reserved_words.txt b/plugins/org.eclipse.net4j.db.db2/reserved_words.txt
new file mode 100644
index 0000000000..216095a608
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/reserved_words.txt
@@ -0,0 +1,493 @@
+ACTIVATE
+ABS
+ADD
+AFTER
+ALIAS
+ALL
+ALLOCATE
+ALLOW
+ALTER
+AND
+ANY
+ARE
+ARRAY
+AS
+ASENSITIVE
+ASSOCIATE
+ASUTIME
+ASYMMETRIC
+AT
+ATOMIC
+ATTRIBUTES
+AUDIT
+AUTHORIZATION
+AUX
+AUXILIARY
+AVG
+BEFORE
+BEGIN
+BETWEEN
+BIGINT
+BINARY
+BLOB
+BOOLEAN
+BOTH
+BUFFERPOOL
+BY
+CACHE
+CALL
+CALLED
+CAPTURE
+CARDINALITY
+CASCADED
+CASE
+CAST
+CCSID
+CEIL
+CEILING
+CHAR
+CHAR_LENGTH
+CHARACTER
+CHARACTER_LENGTH
+CHECK
+CLOB
+CLOSE
+CLUSTER
+COALESCE
+COLLATE
+COLLECT
+COLLECTION
+COLLID
+COLUMN
+COMMENT
+COMMIT
+CONCAT
+CONDITION
+CONNECT
+CONNECTION
+CONSTRAINT
+CONTAINS
+CONTINUE
+CONVERT
+CORR
+CORRESPONDING
+COUNT
+COUNT_BIG
+COVAR_POP
+COVAR_SAMP
+CREATE
+CROSS
+CUBE
+CUME_DIST
+CURRENT
+CURRENT_DATE
+CURRENT_DEFAULT_TRANSFORM_GROUP
+CURRENT_LC_CTYPE
+CURRENT_PATH
+CURRENT_ROLE
+CURRENT_SCHEMA
+CURRENT_SERVER
+CURRENT_TIME
+CURRENT_TIMESTAMP
+CURRENT_TIMEZONE
+CURRENT_TRANSFORM_GROUP_FOR_TYPE
+CURRENT_USER
+CURSOR
+CYCLE
+DATA
+DATABASE
+DATAPARTITIONNAME
+DATAPARTITIONNUM
+DATE
+DAY
+DAYS
+DB2GENERAL
+DB2GENRL
+DB2SQL
+DBINFO
+DBPARTITIONNAME
+DBPARTITIONNUM
+DEALLOCATE
+DEC
+DECIMAL
+DECLARE
+DEFAULT
+DEFAULTS
+DEFINITION
+DELETE
+DENSE_RANK
+DENSERANK
+DEREF
+DESCRIBE
+DESCRIPTOR
+DETERMINISTIC
+DIAGNOSTICS
+DISABLE
+DISALLOW
+DISCONNECT
+DISTINCT
+DO
+DOUBLE
+DROP
+DSSIZE
+DYNAMIC
+EACH
+EDITPROC
+ELEMENT
+ELSE
+ELSEIF
+ENABLE
+ENCODING
+ENCRYPTION
+END
+END-EXEC
+ENDING
+ERASE
+ESCAPE
+EVERY
+EXCEPT
+EXCEPTION
+EXCLUDING
+EXCLUSIVE
+EXEC
+EXECUTE
+EXISTS
+EXIT
+EXP
+EXPLAIN
+EXTERNAL
+EXTRACT
+FALSE
+FENCED
+FETCH
+FIELDPROC
+FILE
+FILTER
+FINAL
+FLOAT
+FLOOR
+FOR
+FOREIGN
+FREE
+FROM
+FULL
+FUNCTION
+FUSION
+GENERAL
+GENERATED
+GET
+GLOBAL
+GO
+GOTO
+GRANT
+GRAPHIC
+GROUP
+GROUPING
+HANDLER
+HASH
+HASHED_VALUE
+HAVING
+HINT
+HOLD
+HOUR
+HOURS
+IDENTITY
+IF
+IMMEDIATE
+IN
+INCLUDING
+INCLUSIVE
+INCREMENT
+INDEX
+INDICATOR
+INHERIT
+INNER
+INOUT
+INSENSITIVE
+INSERT
+INT
+INTEGER
+INTEGRITY
+INTERSECT
+INTERSECTION
+INTERVAL
+INTO
+IS
+ISOBID
+ISOLATION
+ITERATE
+JAR
+JAVA
+JOIN
+KEY
+LABEL
+LANGUAGE
+LARGE
+LATERAL
+LC_CTYPE
+LEADING
+LEAVE
+LEFT
+LIKE
+LINKTYPE
+LN
+LOCAL
+LOCALDATE
+LOCALE
+LOCALTIME
+LOCALTIMESTAMP
+LOCATOR
+LOCATORS
+LOCK
+LOCKMAX
+LOCKSIZE
+LONG
+LOOP
+LOWER
+MAINTAINED
+MATCH
+MATERIALIZED
+MAX
+MAXVALUE
+MEMBER
+MERGE
+METHOD
+MICROSECOND
+MICROSECONDS
+MIN
+MINUTE
+MINUTES
+MINVALUE
+MOD
+MODE
+MODIFIES
+MODULE
+MONTH
+MONTHS
+MULTISET
+NATIONAL
+NATURAL
+NCHAR
+NCLOB
+NEW
+NEW_TABLE
+NEXTVAL
+NO
+NOCACHE
+NOCYCLE
+NODENAME
+NODENUMBER
+NOMAXVALUE
+NOMINVALUE
+NONE
+NOORDER
+NORMALIZE
+NORMALIZED
+NOT
+NULL
+NULLIF
+NULLS
+NUMERIC
+NUMPARTS
+OBID
+OCTET_LENGTH
+OF
+OLD
+OLD_TABLE
+ON
+ONLY
+OPEN
+OPTIMIZATION
+OPTIMIZE
+OPTION
+OR
+ORDER
+OUT
+OUTER
+OVER
+OVERLAPS
+OVERLAY
+OVERRIDING
+PACKAGE
+PADDED
+PAGESIZE
+PARAMETER
+PART
+PARTITION
+PARTITIONED
+PARTITIONING
+PARTITIONS
+PASSWORD
+PATH
+PERCENT_RANK
+PERCENTILE_CONT
+PERCENTILE_DISC
+PIECESIZE
+PLAN
+POSITION
+POWER
+PRECISION
+PREPARE
+PREVVAL
+PRIMARY
+PRIQTY
+PRIVILEGES
+PROCEDURE
+PROGRAM
+PSID
+QUERY
+QUERYNO
+RANGE
+RANK
+READ
+READS
+REAL
+RECOVERY
+RECURSIVE
+REF
+REFERENCES
+REFERENCING
+REFRESH
+REGR_AVGX
+REGR_AVGY
+REGR_COUNT
+REGR_INTERCEPT
+REGR_R2
+REGR_SLOPE
+REGR_SXX
+REGR_SXY
+REGR_SYY
+RELEASE
+RENAME
+REPEAT
+RESET
+RESIGNAL
+RESTART
+RESTRICT
+RESULT
+RESULT_SET_LOCATOR
+RETURN
+RETURNS
+REVOKE
+RIGHT
+ROLLBACK
+ROLLUP
+ROUTINE
+ROW
+ROW_NUMBER
+ROWNUMBER
+ROWS
+ROWSET
+RRN
+RUN
+SAVEPOINT
+SCHEMA
+SCOPE
+SCRATCHPAD
+SCROLL
+SEARCH
+SECOND
+SECONDS
+SECQTY
+SECURITY
+SELECT
+SENSITIVE
+SEQUENCE
+SESSION
+SESSION_USER
+SET
+SIGNAL
+SIMILAR
+SIMPLE
+SMALLINT
+SOME
+SOURCE
+SPECIFIC
+SPECIFICTYPE
+SQL
+SQLEXCEPTION
+SQLID
+SQLSTATE
+SQLWARNING
+SQRT
+STACKED
+STANDARD
+START
+STARTING
+STATEMENT
+STATIC
+STAY
+STDDEV_POP
+STDDEV_SAMP
+STOGROUP
+STORES
+STYLE
+SUBMULTISET
+SUBSTRING
+SUM
+SUMMARY
+SYMMETRIC
+SYNONYM
+SYSFUN
+SYSIBM
+SYSPROC
+SYSTEM
+SYSTEM_USER
+TABLE
+TABLESAMPLE
+TABLESPACE
+THEN
+TIME
+TIMESTAMP
+TIMEZONE_HOUR
+TIMEZONE_MINUTE
+TO
+TRAILING
+TRANSACTION
+TRANSLATE
+TRANSLATION
+TREAT
+TRIGGER
+TRIM
+TRUE
+TYPE
+UESCAPE
+UNDO
+UNION
+UNIQUE
+UNKNOWN
+UNNEST
+UNTIL
+UPDATE
+UPPER
+USAGE
+USER
+USING
+VALIDPROC
+VALUE
+VALUES
+VAR_POP
+VAR_SAMP
+VARCHAR
+VARIABLE
+VARIANT
+VARYING
+VCAT
+VERSION
+VIEW
+VOLATILE
+VOLUMES
+WHEN
+WHENEVER
+WHERE
+WHILE
+WIDTH_BUCKET
+WINDOW
+WITH
+WITHIN
+WITHOUT
+WLM
+WRITE
+XMLELEMENT
+YEAR
+YEARS
diff --git a/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2Adapter.java b/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2Adapter.java
new file mode 100644
index 0000000000..94cbdbd37d
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2Adapter.java
@@ -0,0 +1,170 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.db.db2;
+
+import org.eclipse.net4j.db.DBType;
+import org.eclipse.net4j.db.ddl.IDBField;
+import org.eclipse.net4j.spi.db.DBAdapter;
+
+/**
+ * @author Eike Stepper
+ * @since 4.0
+ */
+public class DB2Adapter extends DBAdapter
+{
+ public static final String NAME = "db2"; //$NON-NLS-1$
+
+ public static final String VERSION = "3.59.81"; //$NON-NLS-1$
+
+ private static final String[] RESERVED_WORDS = { "ACTIVATE", "ABS", "ADD", "AFTER", "ALIAS", "ALL", "ALLOCATE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+ "ALLOW", "ALTER", "AND", "ANY", "ARE", "ARRAY", "AS", "ASENSITIVE", "ASSOCIATE", "ASUTIME", "ASYMMETRIC", "AT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "ATOMIC", "ATTRIBUTES", "AUDIT", "AUTHORIZATION", "AUX", "AUXILIARY", "AVG", "BEFORE", "BEGIN", "BETWEEN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "BIGINT", "BINARY", "BLOB", "BOOLEAN", "BOTH", "BUFFERPOOL", "BY", "CACHE", "CALL", "CALLED", "CAPTURE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "CARDINALITY", "CASCADED", "CASE", "CAST", "CCSID", "CEIL", "CEILING", "CHAR", "CHAR_LENGTH", "CHARACTER", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "CHARACTER_LENGTH", "CHECK", "CLOB", "CLOSE", "CLUSTER", "COALESCE", "COLLATE", "COLLECT", "COLLECTION", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "COLLID", "COLUMN", "COMMENT", "COMMIT", "CONCAT", "CONDITION", "CONNECT", "CONNECTION", "CONSTRAINT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "CONTAINS", "CONTINUE", "CONVERT", "CORR", "CORRESPONDING", "COUNT", "COUNT_BIG", "COVAR_POP", "COVAR_SAMP", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "CREATE", "CROSS", "CUBE", "CUME_DIST", "CURRENT", "CURRENT_DATE", "CURRENT_DEFAULT_TRANSFORM_GROUP", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+ "CURRENT_LC_CTYPE", "CURRENT_PATH", "CURRENT_ROLE", "CURRENT_SCHEMA", "CURRENT_SERVER", "CURRENT_TIME", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "CURRENT_TIMESTAMP", "CURRENT_TIMEZONE", "CURRENT_TRANSFORM_GROUP_FOR_TYPE", "CURRENT_USER", "CURSOR", "CYCLE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "DATA", "DATABASE", "DATAPARTITIONNAME", "DATAPARTITIONNUM", "DATE", "DAY", "DAYS", "DB2GENERAL", "DB2GENRL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "DB2SQL", "DBINFO", "DBPARTITIONNAME", "DBPARTITIONNUM", "DEALLOCATE", "DEC", "DECIMAL", "DECLARE", "DEFAULT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "DEFAULTS", "DEFINITION", "DELETE", "DENSE_RANK", "DENSERANK", "DEREF", "DESCRIBE", "DESCRIPTOR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "DETERMINISTIC", "DIAGNOSTICS", "DISABLE", "DISALLOW", "DISCONNECT", "DISTINCT", "DO", "DOUBLE", "DROP", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "DSSIZE", "DYNAMIC", "EACH", "EDITPROC", "ELEMENT", "ELSE", "ELSEIF", "ENABLE", "ENCODING", "ENCRYPTION", "END", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "END-EXEC", "ENDING", "ERASE", "ESCAPE", "EVERY", "EXCEPT", "EXCEPTION", "EXCLUDING", "EXCLUSIVE", "EXEC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "EXECUTE", "EXISTS", "EXIT", "EXP", "EXPLAIN", "EXTERNAL", "EXTRACT", "FALSE", "FENCED", "FETCH", "FIELDPROC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "FILE", "FILTER", "FINAL", "FLOAT", "FLOOR", "FOR", "FOREIGN", "FREE", "FROM", "FULL", "FUNCTION", "FUSION", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "GENERAL", "GENERATED", "GET", "GLOBAL", "GO", "GOTO", "GRANT", "GRAPHIC", "GROUP", "GROUPING", "HANDLER", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "HASH", "HASHED_VALUE", "HAVING", "HINT", "HOLD", "HOUR", "HOURS", "IDENTITY", "IF", "IMMEDIATE", "IN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "INCLUDING", "INCLUSIVE", "INCREMENT", "INDEX", "INDICATOR", "INHERIT", "INNER", "INOUT", "INSENSITIVE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "INSERT", "INT", "INTEGER", "INTEGRITY", "INTERSECT", "INTERSECTION", "INTERVAL", "INTO", "IS", "ISOBID", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "ISOLATION", "ITERATE", "JAR", "JAVA", "JOIN", "KEY", "LABEL", "LANGUAGE", "LARGE", "LATERAL", "LC_CTYPE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "LEADING", "LEAVE", "LEFT", "LIKE", "LINKTYPE", "LN", "LOCAL", "LOCALDATE", "LOCALE", "LOCALTIME", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "LOCALTIMESTAMP", "LOCATOR", "LOCATORS", "LOCK", "LOCKMAX", "LOCKSIZE", "LONG", "LOOP", "LOWER", "MAINTAINED", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "MATCH", "MATERIALIZED", "MAX", "MAXVALUE", "MEMBER", "MERGE", "METHOD", "MICROSECOND", "MICROSECONDS", "MIN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "MINUTE", "MINUTES", "MINVALUE", "MOD", "MODE", "MODIFIES", "MODULE", "MONTH", "MONTHS", "MULTISET", "NATIONAL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "NATURAL", "NCHAR", "NCLOB", "NEW", "NEW_TABLE", "NEXTVAL", "NO", "NOCACHE", "NOCYCLE", "NODENAME", "NODENUMBER", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "NOMAXVALUE", "NOMINVALUE", "NONE", "NOORDER", "NORMALIZE", "NORMALIZED", "NOT", "NULL", "NULLIF", "NULLS", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "NUMERIC", "NUMPARTS", "OBID", "OCTET_LENGTH", "OF", "OLD", "OLD_TABLE", "ON", "ONLY", "OPEN", "OPTIMIZATION", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "OPTIMIZE", "OPTION", "OR", "ORDER", "OUT", "OUTER", "OVER", "OVERLAPS", "OVERLAY", "OVERRIDING", "PACKAGE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "PADDED", "PAGESIZE", "PARAMETER", "PART", "PARTITION", "PARTITIONED", "PARTITIONING", "PARTITIONS", "PASSWORD", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "PATH", "PERCENT_RANK", "PERCENTILE_CONT", "PERCENTILE_DISC", "PIECESIZE", "PLAN", "POSITION", "POWER", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "PRECISION", "PREPARE", "PREVVAL", "PRIMARY", "PRIQTY", "PRIVILEGES", "PROCEDURE", "PROGRAM", "PSID", "QUERY", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "QUERYNO", "RANGE", "RANK", "READ", "READS", "REAL", "RECOVERY", "RECURSIVE", "REF", "REFERENCES", "REFERENCING", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "REFRESH", "REGR_AVGX", "REGR_AVGY", "REGR_COUNT", "REGR_INTERCEPT", "REGR_R2", "REGR_SLOPE", "REGR_SXX", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "REGR_SXY", "REGR_SYY", "RELEASE", "RENAME", "REPEAT", "RESET", "RESIGNAL", "RESTART", "RESTRICT", "RESULT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "RESULT_SET_LOCATOR", "RETURN", "RETURNS", "REVOKE", "RIGHT", "ROLLBACK", "ROLLUP", "ROUTINE", "ROW", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "ROW_NUMBER", "ROWNUMBER", "ROWS", "ROWSET", "RRN", "RUN", "SAVEPOINT", "SCHEMA", "SCOPE", "SCRATCHPAD", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "SCROLL", "SEARCH", "SECOND", "SECONDS", "SECQTY", "SECURITY", "SELECT", "SENSITIVE", "SEQUENCE", "SESSION", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "SESSION_USER", "SET", "SIGNAL", "SIMILAR", "SIMPLE", "SMALLINT", "SOME", "SOURCE", "SPECIFIC", "SPECIFICTYPE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "SQL", "SQLEXCEPTION", "SQLID", "SQLSTATE", "SQLWARNING", "SQRT", "STACKED", "STANDARD", "START", "STARTING", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "STATEMENT", "STATIC", "STAY", "STDDEV_POP", "STDDEV_SAMP", "STOGROUP", "STORES", "STYLE", "SUBMULTISET", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "SUBSTRING", "SUM", "SUMMARY", "SYMMETRIC", "SYNONYM", "SYSFUN", "SYSIBM", "SYSPROC", "SYSTEM", "SYSTEM_USER", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "TABLE", "TABLESAMPLE", "TABLESPACE", "THEN", "TIME", "TIMESTAMP", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "TRAILING", "TRANSACTION", "TRANSLATE", "TRANSLATION", "TREAT", "TRIGGER", "TRIM", "TRUE", "TYPE", "UESCAPE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "UNDO", "UNION", "UNIQUE", "UNKNOWN", "UNNEST", "UNTIL", "UPDATE", "UPPER", "USAGE", "USER", "USING", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "VALIDPROC", "VALUE", "VALUES", "VAR_POP", "VAR_SAMP", "VARCHAR", "VARIABLE", "VARIANT", "VARYING", "VCAT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "VERSION", "VIEW", "VOLATILE", "VOLUMES", "WHEN", "WHENEVER", "WHERE", "WHILE", "WIDTH_BUCKET", "WINDOW", "WITH", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "WITHIN", "WITHOUT", "WLM", "WRITE", "XMLELEMENT", "YEAR", "YEARS" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+
+ public DB2Adapter()
+ {
+ super(NAME, VERSION);
+ }
+
+ public com.ibm.db2.jcc.DB2Driver getJDBCDriver()
+ {
+ return new com.ibm.db2.jcc.DB2Driver();
+ }
+
+ public com.ibm.db2.jcc.DB2SimpleDataSource createJDBCDataSource()
+ {
+ return new com.ibm.db2.jcc.DB2SimpleDataSource();
+ }
+
+ @Override
+ public int getMaxTableNameLength()
+ {
+ return 128;
+ }
+
+ @Override
+ public int getMaxFieldNameLength()
+ {
+ return 128; // 30 for SQLDA, see
+ // http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0001029.html
+ }
+
+ @Override
+ public DBType adaptType(DBType type)
+ {
+ switch (type)
+ {
+ // Required in order to not add to the total length of a record.
+ // See http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp
+ //
+ // The actual data for BLOB, CLOB, LONG VARCHAR, DBCLOB, and LONG VARGRAPHIC columns
+ // is not included in this count. However, information about the location of that data
+ // does take up some space in the row."
+ case VARCHAR:
+ return DBType.LONGVARCHAR;
+
+ case BOOLEAN:
+ return DBType.SMALLINT;
+ }
+
+ return super.adaptType(type);
+ }
+
+ @Override
+ protected String getTypeName(IDBField field)
+ {
+ DBType type = field.getType();
+ switch (type)
+ {
+ case BINARY:
+ case VARBINARY:
+ case LONGVARBINARY:
+ return "BLOB"; //$NON-NLS-1$
+
+ case TINYINT:
+ return "SMALLINT"; //$NON-NLS-1$
+
+ case FLOAT:
+ return "REAL"; //$NON-NLS-1$
+
+ case BOOLEAN:
+ case BIT:
+ return "SMALLINT"; //$NON-NLS-1$
+ }
+
+ return super.getTypeName(field);
+ }
+
+ @Override
+ public boolean isValidFirstChar(char ch)
+ {
+ switch (ch)
+ {
+ case '_':
+ return false;
+
+ default:
+ return super.isValidFirstChar(ch);
+ }
+ }
+
+ public String[] getReservedWords()
+ {
+ return RESERVED_WORDS;
+ }
+}
diff --git a/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2SchemaDatasource.java b/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2SchemaDatasource.java
new file mode 100644
index 0000000000..50070a46a8
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2SchemaDatasource.java
@@ -0,0 +1,66 @@
+package org.eclipse.net4j.db.db2;
+
+import org.eclipse.net4j.db.DBUtil;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+/**
+ * @author Eike Stepper
+ */
+public final class DB2SchemaDatasource extends com.ibm.db2.jcc.DB2SimpleDataSource
+{
+ private static final long serialVersionUID = 1L;
+
+ private String schemaName;
+
+ public DB2SchemaDatasource(String schemaName)
+ {
+ this.schemaName = schemaName;
+ }
+
+ public String getSchemaName()
+ {
+ return schemaName;
+ }
+
+ @Override
+ public Connection getConnection() throws SQLException
+ {
+ Connection connection = super.getConnection();
+ setSchema(connection);
+ return connection;
+ }
+
+ @Override
+ public Connection getConnection(Object arg0) throws SQLException
+ {
+ Connection connection = super.getConnection(arg0);
+ setSchema(connection);
+ return connection;
+ }
+
+ @Override
+ public Connection getConnection(String arg0, String arg1) throws SQLException
+ {
+ Connection connection = super.getConnection(arg0, arg1);
+ setSchema(connection);
+ return connection;
+ }
+
+ private void setSchema(Connection connection) throws SQLException
+ {
+ Statement stmt = null;
+
+ try
+ {
+ stmt = connection.createStatement();
+ stmt.execute("SET CURRENT SCHEMA " + schemaName); //$NON-NLS-1$
+ }
+ finally
+ {
+ DBUtil.close(stmt);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/internal/db2/bundle/OM.java b/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/internal/db2/bundle/OM.java
new file mode 100644
index 0000000000..6c4419c9e7
--- /dev/null
+++ b/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/internal/db2/bundle/OM.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.db.internal.db2.bundle;
+
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.OSGiActivator;
+import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.trace.OMTracer;
+
+/**
+ * The <em>Operations & Maintenance</em> class of this bundle.
+ *
+ * @author Eike Stepper
+ */
+public abstract class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.net4j.db.db2"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMTracer DEBUG_SQL = DEBUG.tracer("sql"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class Activator extends OSGiActivator
+ {
+ public Activator()
+ {
+ super(BUNDLE);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBException.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBException.java
index 0a7754ceef..103206264d 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBException.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBException.java
@@ -4,12 +4,14 @@
* 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:
* Eike Stepper - initial API and implementation
*/
package org.eclipse.net4j.db;
+import org.eclipse.net4j.util.StringUtil;
+
/**
* TODO Provide consistent exception hierarchy
*
@@ -37,4 +39,40 @@ public class DBException extends RuntimeException
{
super(message, cause);
}
+
+ /**
+ * @since 4.0
+ */
+ public DBException(Throwable cause, String sql)
+ {
+ super(format(null, sql), cause);
+ }
+
+ /**
+ * @since 4.0
+ */
+ public DBException(String message, Throwable cause, String sql)
+ {
+ super(format(message, sql), cause);
+ }
+
+ private static String format(String message, String sql)
+ {
+ if (StringUtil.isEmpty(message))
+ {
+ if (StringUtil.isEmpty(sql))
+ {
+ return "";
+ }
+
+ return sql;
+ }
+
+ if (StringUtil.isEmpty(sql))
+ {
+ return message;
+ }
+
+ return message + ": " + sql;
+ }
}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
index 62703b55ab..748078a557 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
@@ -216,14 +216,14 @@ public final class DBUtil
try
{
Statement statement = resultSet.getStatement();
- if (statement != null)
+ if (statement != null && statement.getMaxRows() != 0)
{
statement.setMaxRows(0);
}
}
catch (Exception ex)
{
- OM.LOG.error(ex);
+ // OM.LOG.error(ex);
}
try
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
index d8e1a47536..1af7c36ebd 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
@@ -400,6 +400,8 @@ public abstract class DBAdapter implements IDBAdapter
*/
protected void validateTable(IDBTable table, Statement statement) throws DBException
{
+ String sql = null;
+
try
{
StringBuilder builder = new StringBuilder();
@@ -407,7 +409,12 @@ public abstract class DBAdapter implements IDBAdapter
appendFieldNames(builder, table);
builder.append(" FROM "); //$NON-NLS-1$
builder.append(table);
- String sql = builder.toString();
+ sql = builder.toString();
+
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("{0}", sql); //$NON-NLS-1$
+ }
ResultSet resultSet = statement.executeQuery(sql);
ResultSetMetaData metaData = resultSet.getMetaData();
@@ -420,7 +427,7 @@ public abstract class DBAdapter implements IDBAdapter
}
catch (SQLException ex)
{
- throw new DBException(ex.getMessage());
+ throw new DBException("Problem with table " + table, ex, sql);
}
}

Back to the top