Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2008-10-29 23:36:18 +0000
committerkmoore2008-10-29 23:36:18 +0000
commit38f2a017a02ace00cc72640548772c7fdba8cfd7 (patch)
tree2b94cecec5efa7e69fa5632843eb7444564a33a1
parentab78c8a3cd325b42fbce1fde856f8c287ed69e0c (diff)
downloadwebtools.dali-38f2a017a02ace00cc72640548772c7fdba8cfd7.tar.gz
webtools.dali-38f2a017a02ace00cc72640548772c7fdba8cfd7.tar.xz
webtools.dali-38f2a017a02ace00cc72640548772c7fdba8cfd7.zip
removed Conversion section from eclipselink orm version, id, and basic mappings
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkJpaUiFactory.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkBasicMappingComposite.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkIdMappingComposite.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkVersionMappingComposite.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmBasicMappingComposite.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmBasicMappingUiProvider.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmIdMappingComposite.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmIdMappingUiProvider.java68
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmVersionMappingComposite.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmVersionMappingUiProvider.java69
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUI.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/JpaUiFactory.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/BaseJpaUiFactory.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/BasicMappingUiProvider.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/IdMappingUiProvider.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/VersionMappingUiProvider.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/DefaultBasicMappingUiProvider.java2
17 files changed, 461 insertions, 21 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkJpaUiFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkJpaUiFactory.java
index 8fc513831f..33d37ac179 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkJpaUiFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/EclipseLinkJpaUiFactory.java
@@ -11,7 +11,6 @@ package org.eclipse.jpt.eclipselink.ui.internal;
import java.util.ArrayList;
import java.util.ListIterator;
-
import org.eclipse.jpt.core.context.BasicMapping;
import org.eclipse.jpt.core.context.IdMapping;
import org.eclipse.jpt.core.context.ManyToManyMapping;
@@ -50,9 +49,12 @@ import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.EclipseLinkVersi
import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.EclipselinkOneToManyMappingComposite;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.EclipselinkOneToOneMappingComposite;
import org.eclipse.jpt.eclipselink.ui.internal.options.PersistenceXmlOptionsTab;
+import org.eclipse.jpt.eclipselink.ui.internal.orm.details.EclipseLinkOrmBasicMappingComposite;
import org.eclipse.jpt.eclipselink.ui.internal.orm.details.EclipseLinkOrmEmbeddableComposite;
import org.eclipse.jpt.eclipselink.ui.internal.orm.details.EclipseLinkOrmEntityComposite;
+import org.eclipse.jpt.eclipselink.ui.internal.orm.details.EclipseLinkOrmIdMappingComposite;
import org.eclipse.jpt.eclipselink.ui.internal.orm.details.EclipseLinkOrmMappedSuperclassComposite;
+import org.eclipse.jpt.eclipselink.ui.internal.orm.details.EclipseLinkOrmVersionMappingComposite;
import org.eclipse.jpt.eclipselink.ui.internal.schema.generation.PersistenceXmlSchemaGenerationTab;
import org.eclipse.jpt.ui.WidgetFactory;
import org.eclipse.jpt.ui.details.JpaComposite;
@@ -200,7 +202,7 @@ public class EclipseLinkJpaUiFactory extends BaseJpaUiFactory
// **************** mapping UI *********************************************
@Override
- public JpaComposite createBasicMappingComposite(
+ public JpaComposite createJavaBasicMappingComposite(
PropertyValueModel<BasicMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory) {
@@ -209,7 +211,7 @@ public class EclipseLinkJpaUiFactory extends BaseJpaUiFactory
}
@Override
- public JpaComposite createIdMappingComposite(
+ public JpaComposite createJavaIdMappingComposite(
PropertyValueModel<IdMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory) {
@@ -218,13 +220,39 @@ public class EclipseLinkJpaUiFactory extends BaseJpaUiFactory
}
@Override
- public JpaComposite createVersionMappingComposite(
+ public JpaComposite createJavaVersionMappingComposite(
PropertyValueModel<VersionMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory) {
return new EclipseLinkVersionMappingComposite(subjectHolder, parent, widgetFactory);
}
+ @Override
+ public JpaComposite createOrmBasicMappingComposite(
+ PropertyValueModel<BasicMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ return new EclipseLinkOrmBasicMappingComposite(subjectHolder, parent, widgetFactory);
+ }
+
+ @Override
+ public JpaComposite createOrmIdMappingComposite(
+ PropertyValueModel<IdMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ return new EclipseLinkOrmIdMappingComposite(subjectHolder, parent, widgetFactory);
+ }
+
+ @Override
+ public JpaComposite createOrmVersionMappingComposite(
+ PropertyValueModel<VersionMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ return new EclipseLinkOrmVersionMappingComposite(subjectHolder, parent, widgetFactory);
+ }
@Override
public JpaComposite createOneToOneMappingComposite(
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkBasicMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkBasicMappingComposite.java
index 9c9702c1b4..1f8cf337f1 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkBasicMappingComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkBasicMappingComposite.java
@@ -21,7 +21,6 @@ import org.eclipse.jpt.eclipselink.core.context.Mutable;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages;
import org.eclipse.jpt.ui.WidgetFactory;
import org.eclipse.jpt.ui.details.JpaComposite;
-import org.eclipse.jpt.ui.internal.BaseJpaUiFactory;
import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages;
import org.eclipse.jpt.ui.internal.mappings.details.ColumnComposite;
import org.eclipse.jpt.ui.internal.mappings.details.EnumTypeComposite;
@@ -101,7 +100,7 @@ public class EclipseLinkBasicMappingComposite extends FormPane<BasicMapping>
* @param parent The parent container
* @param widgetFactory The factory used to create various common widgets
*/
- public EclipseLinkBasicMappingComposite(PropertyValueModel<BasicMapping> subjectHolder,
+ public EclipseLinkBasicMappingComposite(PropertyValueModel<? extends BasicMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory) {
@@ -114,7 +113,7 @@ public class EclipseLinkBasicMappingComposite extends FormPane<BasicMapping>
initializeConversionPane(container);
}
- private void initializeGeneralPane(Composite container) {
+ protected void initializeGeneralPane(Composite container) {
int groupBoxMargin = getGroupBoxMargin();
new ColumnComposite(this, buildColumnHolder(), container);
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkIdMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkIdMappingComposite.java
index 3dc95ad4f1..32ca4ea272 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkIdMappingComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkIdMappingComposite.java
@@ -20,7 +20,6 @@ import org.eclipse.jpt.eclipselink.core.context.Mutable;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages;
import org.eclipse.jpt.ui.WidgetFactory;
import org.eclipse.jpt.ui.details.JpaComposite;
-import org.eclipse.jpt.ui.internal.BaseJpaUiFactory;
import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages;
import org.eclipse.jpt.ui.internal.mappings.details.ColumnComposite;
import org.eclipse.jpt.ui.internal.mappings.details.GenerationComposite;
@@ -100,7 +99,7 @@ public class EclipseLinkIdMappingComposite extends FormPane<IdMapping>
new GenerationComposite(this, container);
}
- private void initializeGeneralPane(Composite container) {
+ protected void initializeGeneralPane(Composite container) {
int groupBoxMargin = getGroupBoxMargin();
// Column widgets
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkVersionMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkVersionMappingComposite.java
index d1c9f64272..c300a6d0e1 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkVersionMappingComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/mappings/details/EclipseLinkVersionMappingComposite.java
@@ -20,7 +20,6 @@ import org.eclipse.jpt.eclipselink.core.context.Mutable;
import org.eclipse.jpt.eclipselink.ui.internal.mappings.EclipseLinkUiMappingsMessages;
import org.eclipse.jpt.ui.WidgetFactory;
import org.eclipse.jpt.ui.details.JpaComposite;
-import org.eclipse.jpt.ui.internal.BaseJpaUiFactory;
import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages;
import org.eclipse.jpt.ui.internal.mappings.details.ColumnComposite;
import org.eclipse.jpt.ui.internal.mappings.details.TemporalTypeComposite;
@@ -95,7 +94,7 @@ public class EclipseLinkVersionMappingComposite extends FormPane<VersionMapping>
initializeConversionPane(container);
}
- private void initializeGeneralPane(Composite container) {
+ protected void initializeGeneralPane(Composite container) {
int groupBoxMargin = getGroupBoxMargin();
// Column widgets
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmBasicMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmBasicMappingComposite.java
new file mode 100644
index 0000000000..c95a7b9434
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmBasicMappingComposite.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. 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:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.eclipselink.ui.internal.orm.details;
+
+import org.eclipse.jpt.core.context.BasicMapping;
+import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.EclipseLinkBasicMappingComposite;
+import org.eclipse.jpt.ui.WidgetFactory;
+import org.eclipse.jpt.utility.model.value.PropertyValueModel;
+import org.eclipse.swt.widgets.Composite;
+
+//Temporary to remove the Converters section from orm basic mapping.
+//This is supported in EclipseLink in version 1.1, but not 1.0
+public class EclipseLinkOrmBasicMappingComposite extends EclipseLinkBasicMappingComposite
+{
+ /**
+ * Creates a new <code>EclipseLinkOrmBasicMappingComposite</code>.
+ *
+ * @param subjectHolder The holder of the subject <code>BasicMapping</code>
+ * @param parent The parent container
+ * @param widgetFactory The factory used to create various common widgets
+ */
+ public EclipseLinkOrmBasicMappingComposite(PropertyValueModel<? extends BasicMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ super(subjectHolder, parent, widgetFactory);
+ }
+
+ @Override
+ protected void initializeLayout(Composite container) {
+ initializeGeneralPane(container);
+ }
+} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmBasicMappingUiProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmBasicMappingUiProvider.java
new file mode 100644
index 0000000000..6a2aaebc23
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmBasicMappingUiProvider.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. 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:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.eclipselink.ui.internal.orm.details;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.BasicMapping;
+import org.eclipse.jpt.ui.JpaUiFactory;
+import org.eclipse.jpt.ui.WidgetFactory;
+import org.eclipse.jpt.ui.details.AttributeMappingUiProvider;
+import org.eclipse.jpt.ui.details.JpaComposite;
+import org.eclipse.jpt.ui.internal.JpaMappingImageHelper;
+import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages;
+import org.eclipse.jpt.utility.model.value.PropertyValueModel;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+
+public class EclipseLinkOrmBasicMappingUiProvider
+ implements AttributeMappingUiProvider<BasicMapping>
+{
+ // singleton
+ private static final EclipseLinkOrmBasicMappingUiProvider INSTANCE = new EclipseLinkOrmBasicMappingUiProvider();
+
+ /**
+ * Ensure single instance.
+ */
+ private EclipseLinkOrmBasicMappingUiProvider() {
+ super();
+ }
+
+ /**
+ * Return the singleton.
+ */
+ public static AttributeMappingUiProvider<BasicMapping> instance() {
+ return INSTANCE;
+ }
+
+ public JpaComposite buildAttributeMappingComposite(
+ JpaUiFactory factory,
+ PropertyValueModel<BasicMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ return factory.createOrmBasicMappingComposite(subjectHolder, parent, widgetFactory);
+ }
+
+ public Image getImage() {
+ return JpaMappingImageHelper.imageForAttributeMapping(getMappingKey());
+ }
+
+ public String getLabel() {
+ return JptUiMappingsMessages.BasicMappingUiProvider_label;
+ }
+
+ public String getLinkLabel() {
+ return JptUiMappingsMessages.BasicMappingUiProvider_linkLabel;
+ }
+
+ public String getMappingKey() {
+ return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
+ }
+} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmIdMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmIdMappingComposite.java
new file mode 100644
index 0000000000..080d235958
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmIdMappingComposite.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. 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:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.eclipselink.ui.internal.orm.details;
+
+import org.eclipse.jpt.core.context.IdMapping;
+import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.EclipseLinkIdMappingComposite;
+import org.eclipse.jpt.ui.WidgetFactory;
+import org.eclipse.jpt.ui.details.JpaComposite;
+import org.eclipse.jpt.utility.model.value.PropertyValueModel;
+import org.eclipse.swt.widgets.Composite;
+
+//Temporary to remove the Converters section from orm basic mapping.
+//This is supported in EclipseLink in version 1.1, but not 1.0
+public class EclipseLinkOrmIdMappingComposite extends EclipseLinkIdMappingComposite implements JpaComposite
+{
+ /**
+ * Creates a new <code>EclipseLinkOrmIdMappingComposite</code>.
+ *
+ * @param subjectHolder The holder of the subject <code>IdMapping</code>
+ * @param parent The parent container
+ * @param widgetFactory The factory used to create various common widgets
+ */
+ public EclipseLinkOrmIdMappingComposite(PropertyValueModel<? extends IdMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ super(subjectHolder, parent, widgetFactory);
+ }
+
+ @Override
+ protected void initializeLayout(Composite container) {
+ initializeGeneralPane(container);
+ }
+} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmIdMappingUiProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmIdMappingUiProvider.java
new file mode 100644
index 0000000000..de6382ce6d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmIdMappingUiProvider.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. 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:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.eclipselink.ui.internal.orm.details;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.IdMapping;
+import org.eclipse.jpt.ui.JpaUiFactory;
+import org.eclipse.jpt.ui.WidgetFactory;
+import org.eclipse.jpt.ui.details.AttributeMappingUiProvider;
+import org.eclipse.jpt.ui.details.JpaComposite;
+import org.eclipse.jpt.ui.internal.JpaMappingImageHelper;
+import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages;
+import org.eclipse.jpt.utility.model.value.PropertyValueModel;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+
+public class EclipseLinkOrmIdMappingUiProvider
+ implements AttributeMappingUiProvider<IdMapping>
+{
+ // singleton
+ private static final EclipseLinkOrmIdMappingUiProvider INSTANCE = new EclipseLinkOrmIdMappingUiProvider();
+
+ /**
+ * Return the singleton.
+ */
+ public static AttributeMappingUiProvider<IdMapping> instance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Ensure single instance.
+ */
+ private EclipseLinkOrmIdMappingUiProvider() {
+ super();
+ }
+
+ public String getMappingKey() {
+ return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
+ }
+
+ public String getLabel() {
+ return JptUiMappingsMessages.IdMappingUiProvider_label;
+ }
+
+ public String getLinkLabel() {
+ return JptUiMappingsMessages.IdMappingUiProvider_linkLabel;
+ }
+
+ public Image getImage() {
+ return JpaMappingImageHelper.imageForAttributeMapping(getMappingKey());
+ }
+
+ public JpaComposite buildAttributeMappingComposite(
+ JpaUiFactory factory,
+ PropertyValueModel<IdMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ return factory.createOrmIdMappingComposite(subjectHolder, parent, widgetFactory);
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmVersionMappingComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmVersionMappingComposite.java
new file mode 100644
index 0000000000..cc481eaefe
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmVersionMappingComposite.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. 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:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.eclipselink.ui.internal.orm.details;
+
+import org.eclipse.jpt.core.context.VersionMapping;
+import org.eclipse.jpt.eclipselink.ui.internal.mappings.details.EclipseLinkVersionMappingComposite;
+import org.eclipse.jpt.ui.WidgetFactory;
+import org.eclipse.jpt.ui.details.JpaComposite;
+import org.eclipse.jpt.utility.model.value.PropertyValueModel;
+import org.eclipse.swt.widgets.Composite;
+
+//Temporary to remove the Converters section from orm basic mapping.
+//This is supported in EclipseLink in version 1.1, but not 1.0
+public class EclipseLinkOrmVersionMappingComposite extends EclipseLinkVersionMappingComposite implements JpaComposite
+{
+ /**
+ * Creates a new <code>EclipseLinkOrmVersionMappingComposite</code>.
+ *
+ * @param subjectHolder The holder of the subject <code>VersionMapping</code>
+ * @param parent The parent container
+ * @param widgetFactory The factory used to create various common widgets
+ */
+ public EclipseLinkOrmVersionMappingComposite(PropertyValueModel<? extends VersionMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ super(subjectHolder, parent, widgetFactory);
+ }
+
+ @Override
+ protected void initializeLayout(Composite container) {
+ initializeGeneralPane(container);
+ }
+} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmVersionMappingUiProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmVersionMappingUiProvider.java
new file mode 100644
index 0000000000..83600e8b0f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/orm/details/EclipseLinkOrmVersionMappingUiProvider.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. 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:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.eclipselink.ui.internal.orm.details;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.VersionMapping;
+import org.eclipse.jpt.ui.JpaUiFactory;
+import org.eclipse.jpt.ui.WidgetFactory;
+import org.eclipse.jpt.ui.details.AttributeMappingUiProvider;
+import org.eclipse.jpt.ui.details.JpaComposite;
+import org.eclipse.jpt.ui.internal.JpaMappingImageHelper;
+import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages;
+import org.eclipse.jpt.utility.model.value.PropertyValueModel;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+
+public class EclipseLinkOrmVersionMappingUiProvider
+ implements AttributeMappingUiProvider<VersionMapping>
+{
+
+ // singleton
+ private static final EclipseLinkOrmVersionMappingUiProvider INSTANCE = new EclipseLinkOrmVersionMappingUiProvider();
+
+ /**
+ * Return the singleton.
+ */
+ public static AttributeMappingUiProvider<VersionMapping> instance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Ensure single instance.
+ */
+ private EclipseLinkOrmVersionMappingUiProvider() {
+ super();
+ }
+
+ public String getMappingKey() {
+ return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
+ }
+
+ public String getLabel() {
+ return JptUiMappingsMessages.VersionMappingUiProvider_label;
+ }
+
+ public String getLinkLabel() {
+ return JptUiMappingsMessages.VersionMappingUiProvider_linkLabel;
+ }
+
+ public Image getImage() {
+ return JpaMappingImageHelper.imageForAttributeMapping(getMappingKey());
+ }
+
+ public JpaComposite buildAttributeMappingComposite(
+ JpaUiFactory factory,
+ PropertyValueModel<VersionMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ return factory.createOrmVersionMappingComposite(subjectHolder, parent, widgetFactory);
+ }
+} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUI.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUI.java
index f2ed1b5fe8..66639e342c 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUI.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/platform/EclipseLinkJpaPlatformUI.java
@@ -23,11 +23,21 @@ import org.eclipse.jpt.eclipselink.ui.internal.EclipseLinkJpaUiFactory;
import org.eclipse.jpt.eclipselink.ui.internal.ddlgen.EclipseLinkDDLGeneratorUi;
import org.eclipse.jpt.eclipselink.ui.internal.java.details.DefaultOneToManyMappingUiProvider;
import org.eclipse.jpt.eclipselink.ui.internal.java.details.DefaultOneToOneMappingUiProvider;
+import org.eclipse.jpt.eclipselink.ui.internal.orm.details.EclipseLinkOrmBasicMappingUiProvider;
+import org.eclipse.jpt.eclipselink.ui.internal.orm.details.EclipseLinkOrmIdMappingUiProvider;
import org.eclipse.jpt.eclipselink.ui.internal.orm.details.OrmDetailsProvider;
+import org.eclipse.jpt.eclipselink.ui.internal.orm.details.EclipseLinkOrmVersionMappingUiProvider;
import org.eclipse.jpt.eclipselink.ui.internal.persistencexml.details.PersistenceDetailsProvider;
import org.eclipse.jpt.ui.details.AttributeMappingUiProvider;
import org.eclipse.jpt.ui.details.JpaDetailsProvider;
import org.eclipse.jpt.ui.details.TypeMappingUiProvider;
+import org.eclipse.jpt.ui.internal.details.EmbeddedIdMappingUiProvider;
+import org.eclipse.jpt.ui.internal.details.EmbeddedMappingUiProvider;
+import org.eclipse.jpt.ui.internal.details.ManyToManyMappingUiProvider;
+import org.eclipse.jpt.ui.internal.details.ManyToOneMappingUiProvider;
+import org.eclipse.jpt.ui.internal.details.OneToManyMappingUiProvider;
+import org.eclipse.jpt.ui.internal.details.OneToOneMappingUiProvider;
+import org.eclipse.jpt.ui.internal.details.TransientMappingUiProvider;
import org.eclipse.jpt.ui.internal.java.details.JavaDetailsProvider;
import org.eclipse.jpt.ui.internal.platform.base.BaseJpaPlatformUi;
import org.eclipse.jpt.ui.internal.structure.OrmResourceModelStructureProvider;
@@ -101,4 +111,19 @@ public class EclipseLinkJpaPlatformUI extends BaseJpaPlatformUi
List<TypeMappingUiProvider<? extends TypeMapping>> providers) {
super.addJavaTypeMappingUiProvidersTo(providers);
}
+
+ @Override
+ protected void addOrmAttributeMappingUiProvidersTo(List<AttributeMappingUiProvider<? extends AttributeMapping>> providers) {
+ providers.add(EclipseLinkOrmBasicMappingUiProvider.instance());
+ providers.add(EmbeddedMappingUiProvider.instance());
+ providers.add(EmbeddedIdMappingUiProvider.instance());
+ providers.add(EclipseLinkOrmIdMappingUiProvider.instance());
+ providers.add(ManyToManyMappingUiProvider.instance());
+ providers.add(ManyToOneMappingUiProvider.instance());
+ providers.add(OneToManyMappingUiProvider.instance());
+ providers.add(OneToOneMappingUiProvider.instance());
+ providers.add(TransientMappingUiProvider.instance());
+ providers.add(EclipseLinkOrmVersionMappingUiProvider.instance());
+ }
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/JpaUiFactory.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/JpaUiFactory.java
index 0015eed07f..5a442e5b5a 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/JpaUiFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/JpaUiFactory.java
@@ -62,7 +62,20 @@ public interface JpaUiFactory
* @param widgetFactory The factory used to create the widgets
* @return A new <code>JpaComposite</code>
*/
- JpaComposite createBasicMappingComposite(
+ JpaComposite createJavaBasicMappingComposite(
+ PropertyValueModel<BasicMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory);
+
+ /**
+ * Creates a new <code>JpaComposite</code> used to edit a <code>BasicMapping</code>.
+ *
+ * @param subjectHolder The holder of the basic mapping
+ * @param parent The parent container
+ * @param widgetFactory The factory used to create the widgets
+ * @return A new <code>JpaComposite</code>
+ */
+ JpaComposite createOrmBasicMappingComposite(
PropertyValueModel<BasicMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory);
@@ -153,7 +166,20 @@ public interface JpaUiFactory
* @param widgetFactory The factory used to create the widgets
* @return A new <code>JpaComposite</code>
*/
- JpaComposite createIdMappingComposite(
+ JpaComposite createJavaIdMappingComposite(
+ PropertyValueModel<IdMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory);
+
+ /**
+ * Creates a new <code>JpaComposite</code> used to edit an <code>IdMapping</code>.
+ *
+ * @param subjectHolder The holder of the ID mapping
+ * @param parent The parent container
+ * @param widgetFactory The factory used to create the widgets
+ * @return A new <code>JpaComposite</code>
+ */
+ JpaComposite createOrmIdMappingComposite(
PropertyValueModel<IdMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory);
@@ -272,7 +298,20 @@ public interface JpaUiFactory
* @param widgetFactory The factory used to create the widgets
* @return A new <code>JpaComposite</code>
*/
- JpaComposite createVersionMappingComposite(
+ JpaComposite createJavaVersionMappingComposite(
+ PropertyValueModel<VersionMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory);
+
+ /**
+ * Creates a new <code>JpaComposite</code> used to edit a <code>VersionMapping</code>.
+ *
+ * @param subjectHolder The holder of the version mapping
+ * @param parent The parent container
+ * @param widgetFactory The factory used to create the widgets
+ * @return A new <code>JpaComposite</code>
+ */
+ JpaComposite createOrmVersionMappingComposite(
PropertyValueModel<VersionMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory);
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/BaseJpaUiFactory.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/BaseJpaUiFactory.java
index 19e75c96c2..e82c2734d6 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/BaseJpaUiFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/BaseJpaUiFactory.java
@@ -63,7 +63,15 @@ import org.eclipse.swt.widgets.Composite;
*/
public abstract class BaseJpaUiFactory implements JpaUiFactory
{
- public JpaComposite createBasicMappingComposite(
+ public JpaComposite createJavaBasicMappingComposite(
+ PropertyValueModel<BasicMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ return new BasicMappingComposite(subjectHolder, parent, widgetFactory);
+ }
+
+ public JpaComposite createOrmBasicMappingComposite(
PropertyValueModel<BasicMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory) {
@@ -119,7 +127,15 @@ public abstract class BaseJpaUiFactory implements JpaUiFactory
return new OrmEntityComposite(subjectHolder, parent, widgetFactory);
}
- public JpaComposite createIdMappingComposite(
+ public JpaComposite createJavaIdMappingComposite(
+ PropertyValueModel<IdMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ return new IdMappingComposite(subjectHolder, parent, widgetFactory);
+ }
+
+ public JpaComposite createOrmIdMappingComposite(
PropertyValueModel<IdMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory) {
@@ -198,7 +214,15 @@ public abstract class BaseJpaUiFactory implements JpaUiFactory
return new TransientMappingComposite(subjectHolder, parent, widgetFactory);
}
- public JpaComposite createVersionMappingComposite(
+ public JpaComposite createJavaVersionMappingComposite(
+ PropertyValueModel<VersionMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+
+ return new VersionMappingComposite(subjectHolder, parent, widgetFactory);
+ }
+
+ public JpaComposite createOrmVersionMappingComposite(
PropertyValueModel<VersionMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory) {
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/BasicMappingUiProvider.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/BasicMappingUiProvider.java
index c270d70d03..4dccfc99ea 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/BasicMappingUiProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/BasicMappingUiProvider.java
@@ -47,7 +47,7 @@ public class BasicMappingUiProvider
Composite parent,
WidgetFactory widgetFactory) {
- return factory.createBasicMappingComposite(subjectHolder, parent, widgetFactory);
+ return factory.createJavaBasicMappingComposite(subjectHolder, parent, widgetFactory);
}
public Image getImage() {
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/IdMappingUiProvider.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/IdMappingUiProvider.java
index 41dadc4e41..40291e16db 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/IdMappingUiProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/IdMappingUiProvider.java
@@ -63,6 +63,6 @@ public class IdMappingUiProvider
Composite parent,
WidgetFactory widgetFactory) {
- return factory.createIdMappingComposite(subjectHolder, parent, widgetFactory);
+ return factory.createJavaIdMappingComposite(subjectHolder, parent, widgetFactory);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/VersionMappingUiProvider.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/VersionMappingUiProvider.java
index c0463f2cb6..941536315d 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/VersionMappingUiProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/VersionMappingUiProvider.java
@@ -64,6 +64,6 @@ public class VersionMappingUiProvider
Composite parent,
WidgetFactory widgetFactory) {
- return factory.createVersionMappingComposite(subjectHolder, parent, widgetFactory);
+ return factory.createJavaVersionMappingComposite(subjectHolder, parent, widgetFactory);
}
} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/DefaultBasicMappingUiProvider.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/DefaultBasicMappingUiProvider.java
index aaf46572dd..43439adafb 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/DefaultBasicMappingUiProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/java/details/DefaultBasicMappingUiProvider.java
@@ -62,6 +62,6 @@ public class DefaultBasicMappingUiProvider
Composite parent,
WidgetFactory widgetFactory) {
- return factory.createBasicMappingComposite(subjectHolder, parent, widgetFactory);
+ return factory.createJavaBasicMappingComposite(subjectHolder, parent, widgetFactory);
}
}

Back to the top