summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNan Li2013-02-28 15:18:39 (EST)
committerKaren Butzke2013-02-28 15:18:39 (EST)
commitd16fe215e947ede078c71760cbfff2106f0ae64f (patch)
tree19ef4ae6bdc21a394166ea361d39e4dd265a4408
parent84157cedac25dff40da97155edc3decb71332703 (diff)
downloadwebtools.dali-d16fe215e947ede078c71760cbfff2106f0ae64f.zip
webtools.dali-d16fe215e947ede078c71760cbfff2106f0ae64f.tar.gz
webtools.dali-d16fe215e947ede078c71760cbfff2106f0ae64f.tar.bz2
Bug 392701 - [JPA 2.1] Named Stored Procedure Query support - tolerance for these in the UI, you can pick this type when adding a query and will see them in the queries list.v201303060040
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/META-INF/MANIFEST.MF1
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTable.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaStoredProcedureParameter2_1.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/JavaNamedStoredProcedureQuery2_1.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/JavaStoredProcedureParameter2_1.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmNamedStoredProcedureQuery2_1.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmStoredProcedureParameter2_1.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/OrmNamedStoredProcedureQuery2_1.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/OrmStoredProcedureParameter2_1.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/NamedStoredProcedureQuery2_1.java (renamed from jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/NamedStoredProcedureQuery2_1.java)2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/QueryContainer2_1.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/StoredProcedureParameter2_1.java (renamed from jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/StoredProcedureParameter2_1.java)2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/EclipseLink2_5JavaResourceUiDefinition.java98
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/EclipseLink2_5JavaUiFactory.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/JavaEclipseLinkEntity2_5Composite.java87
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/JavaEclipseLinkMappedSuperclass2_5Composite.java109
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappings2_5DetailsProvider.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsPageManager2_5.java82
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkOrmXml2_5UiDefinition.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkOrmXml2_5UiFactory.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/OrmEclipseLinkEntity2_5Composite.java87
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/OrmEclipseLinkMappedSuperclass2_5Composite.java116
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiProvider.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/META-INF/MANIFEST.MF4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/property_files/jpt_jpa_ui_details2_1.properties13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AddQueryDialog.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AddQueryDialog2_1.java83
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/QueriesComposite.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/orm/OrmXml2_1UiDefinition.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/Generic2_1JpaPlatformUiProvider.java (renamed from jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/Generic2_1JpaPlatformUiProvider.java)8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/Queries2_1Composite.java205
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/Generic2_1JavaResourceUiDefinition.java80
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/Generic2_1JavaUiFactory.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/JavaEntity2_1Composite.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/JavaMappedSuperclass2_1Composite.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/EntityMappings2_1DetailsProvider.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/EntityMappingsDetailsPageManager2_1.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/GenericOrmXml2_1UiFactory.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/OrmEntity2_1Composite.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/platform/generic/Generic2_1JpaPlatformUiFactory.java (renamed from jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/platform/generic/Generic2_1JpaPlatformUiFactory.java)8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/jpa2_1/details/JpaUiFactory2_1.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/jpa2_1/details/JptJpaUiDetailsMessages2_1.java32
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1Tests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2_1/context/java/GenericJavaStoredProcedureParameter2_1Tests.java2
48 files changed, 1510 insertions, 54 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.jpa.core/META-INF/MANIFEST.MF
index 29bcb03..fbc36db 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/META-INF/MANIFEST.MF
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/META-INF/MANIFEST.MF
@@ -65,7 +65,6 @@ Export-Package: org.eclipse.jpt.jpa.core,
org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.binary;x-internal:=true,
org.eclipse.jpt.jpa.core.internal.jpa2.resource.java.source;x-internal:=true,
org.eclipse.jpt.jpa.core.internal.jpa2_1;x-internal:=true,
- org.eclipse.jpt.jpa.core.internal.jpa2_1.context;x-internal:=true,
org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java;x-internal:=true,
org.eclipse.jpt.jpa.core.internal.jpa2_1.context.orm;x-internal:=true,
org.eclipse.jpt.jpa.core.internal.jpa2_1.context.persistence;x-internal:=true,
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
index 8dcb0bd..6bb3182 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
@@ -21,9 +21,9 @@ import org.eclipse.jpt.jpa.core.context.Query;
import org.eclipse.jpt.jpa.core.context.java.JavaNamedNativeQuery;
import org.eclipse.jpt.jpa.core.context.java.JavaNamedQuery;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.NamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java.JavaNamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java.JavaQueryContainer2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.NamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.NamedStoredProcedureQuery2_1Annotation;
import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java
index facfe26..28062c9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java
@@ -10,6 +10,7 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context.orm;
import java.util.List;
+import org.eclipse.jpt.common.core.resource.xml.EmfTools;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterable.IterableTools;
import org.eclipse.jpt.common.utility.iterable.ListIterable;
@@ -20,10 +21,11 @@ import org.eclipse.jpt.jpa.core.context.Query;
import org.eclipse.jpt.jpa.core.context.orm.OrmNamedNativeQuery;
import org.eclipse.jpt.jpa.core.context.orm.OrmNamedQuery;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.NamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.orm.OrmNamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.orm.OrmQueryContainer2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.NamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery;
import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery;
import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedStoredProcedureQuery;
@@ -271,7 +273,10 @@ public class GenericOrmQueryContainer
}
protected XmlNamedStoredProcedureQuery buildXmlNamedStoredProcedureQuery() {
- return OrmFactory.eINSTANCE.createXmlNamedStoredProcedureQuery();
+ return EmfTools.create(
+ this.getResourceNodeFactory(),
+ OrmPackage.eINSTANCE.getXmlNamedStoredProcedureQuery(),
+ XmlNamedStoredProcedureQuery.class);
}
public void removeNamedStoredProcedureQuery(NamedStoredProcedureQuery2_1 namedQuery) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTable.java
index 0832952..1d816c8 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTable.java
@@ -9,9 +9,10 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa1.context.orm;
+import org.eclipse.jpt.common.core.resource.xml.EmfTools;
import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmTable;
-import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.jpa.core.resource.orm.OrmPackage;
import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity;
import org.eclipse.jpt.jpa.core.resource.orm.XmlTable;
@@ -35,7 +36,10 @@ public class GenericOrmTable
@Override
protected XmlTable buildXmlTable() {
- XmlTable xmlTable = OrmFactory.eINSTANCE.createXmlTable();
+ XmlTable xmlTable = EmfTools.create(
+ this.getResourceNodeFactory(),
+ OrmPackage.eINSTANCE.getXmlTable(),
+ XmlTable.class);
this.getXmlEntity().setTable(xmlTable);
return xmlTable;
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1.java
index bd8f9f2..215e420 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1.java
@@ -18,9 +18,9 @@ import org.eclipse.jpt.common.utility.iterable.ListIterable;
import org.eclipse.jpt.jpa.core.context.Query;
import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaQuery;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.NamedStoredProcedureQuery2_1;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.orm.OrmQueryContainer2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.NamedStoredProcedureQuery2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.NamedStoredProcedureQuery2_1Annotation;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.StoredProcedureParameter2_1Annotation;
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaStoredProcedureParameter2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaStoredProcedureParameter2_1.java
index ac49b38..e111a1f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaStoredProcedureParameter2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaStoredProcedureParameter2_1.java
@@ -12,8 +12,8 @@ package org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.ParameterMode2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.StoredProcedureParameter2_1Annotation;
/**
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/JavaNamedStoredProcedureQuery2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/JavaNamedStoredProcedureQuery2_1.java
index ed0d6ce..1f30e6a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/JavaNamedStoredProcedureQuery2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/JavaNamedStoredProcedureQuery2_1.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java;
import org.eclipse.jpt.common.utility.iterable.ListIterable;
import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.NamedStoredProcedureQuery2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.NamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.NamedStoredProcedureQuery2_1Annotation;
/**
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/JavaStoredProcedureParameter2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/JavaStoredProcedureParameter2_1.java
index fc99d52..91ef5fb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/JavaStoredProcedureParameter2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/JavaStoredProcedureParameter2_1.java
@@ -9,7 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.StoredProcedureParameter2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.StoredProcedureParameter2_1Annotation;
/**
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmNamedStoredProcedureQuery2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmNamedStoredProcedureQuery2_1.java
index e08b504..0565e71 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmNamedStoredProcedureQuery2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmNamedStoredProcedureQuery2_1.java
@@ -18,10 +18,10 @@ import org.eclipse.jpt.common.utility.iterable.ListIterable;
import org.eclipse.jpt.jpa.core.context.JpaContextNode;
import org.eclipse.jpt.jpa.core.context.Query;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmQuery;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.NamedStoredProcedureQuery2_1;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java.JavaNamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java.JavaStoredProcedureParameter2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.NamedStoredProcedureQuery2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedStoredProcedureQuery;
import org.eclipse.jpt.jpa.core.resource.orm.XmlStoredProcedureParameter;
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmStoredProcedureParameter2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmStoredProcedureParameter2_1.java
index e2d2024..ddcf0d6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmStoredProcedureParameter2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmStoredProcedureParameter2_1.java
@@ -13,9 +13,9 @@ import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
import org.eclipse.jpt.jpa.core.context.orm.OrmQuery;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java.JavaStoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.ParameterMode2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.resource.orm.XmlStoredProcedureParameter;
public class GenericOrmStoredProcedureParameter2_1
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/OrmNamedStoredProcedureQuery2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/OrmNamedStoredProcedureQuery2_1.java
index 6324233..85dfde9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/OrmNamedStoredProcedureQuery2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/OrmNamedStoredProcedureQuery2_1.java
@@ -11,8 +11,8 @@ package org.eclipse.jpt.jpa.core.internal.jpa2_1.context.orm;
import org.eclipse.jpt.common.utility.iterable.ListIterable;
import org.eclipse.jpt.jpa.core.context.orm.OrmQuery;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.NamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java.JavaNamedStoredProcedureQuery2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.NamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedStoredProcedureQuery;
public interface OrmNamedStoredProcedureQuery2_1
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/OrmStoredProcedureParameter2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/OrmStoredProcedureParameter2_1.java
index febe7a7..00d973f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/OrmStoredProcedureParameter2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/OrmStoredProcedureParameter2_1.java
@@ -9,8 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2_1.context.orm;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.java.JavaStoredProcedureParameter2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.resource.orm.XmlStoredProcedureParameter;
public interface OrmStoredProcedureParameter2_1
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/NamedStoredProcedureQuery2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/NamedStoredProcedureQuery2_1.java
index 60b532f..ae5d0ff 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/NamedStoredProcedureQuery2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/NamedStoredProcedureQuery2_1.java
@@ -7,7 +7,7 @@
* Contributors:
* Oracle - initial API and implementation
******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.jpa2_1.context;
+package org.eclipse.jpt.jpa.core.jpa2_1.context;
import org.eclipse.jpt.common.utility.iterable.ListIterable;
import org.eclipse.jpt.jpa.core.context.Query;
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/QueryContainer2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/QueryContainer2_1.java
index 907cf49..22cb969 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/QueryContainer2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/QueryContainer2_1.java
@@ -11,7 +11,6 @@ package org.eclipse.jpt.jpa.core.jpa2_1.context;
import org.eclipse.jpt.common.utility.iterable.ListIterable;
import org.eclipse.jpt.jpa.core.context.QueryContainer;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.NamedStoredProcedureQuery2_1;
/**
* Container for named stored procedure queries.
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/StoredProcedureParameter2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/StoredProcedureParameter2_1.java
index 2c6aa98..0e8ea84 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/StoredProcedureParameter2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2_1/context/StoredProcedureParameter2_1.java
@@ -7,7 +7,7 @@
* Contributors:
* Oracle - initial API and implementation
******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.jpa2_1.context;
+package org.eclipse.jpt.jpa.core.jpa2_1.context;
import org.eclipse.jpt.jpa.core.context.JpaContextNode;
import org.eclipse.jpt.jpa.core.jpa2_1.ParameterMode2_1;
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/EclipseLink2_5JavaResourceUiDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/EclipseLink2_5JavaResourceUiDefinition.java
new file mode 100644
index 0000000..e6b610b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/EclipseLink2_5JavaResourceUiDefinition.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.eclipselink.ui.internal.details.java;
+
+import java.util.List;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.EclipseLinkArrayMapping2_3UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.EclipseLinkBasicCollectionMappingUiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.EclipseLinkBasicMapMappingUiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.EclipseLinkStructureMapping2_3UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.EclipseLinkTransformationMappingUiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.EclipseLinkVariableOneToOneMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.ResourceUiDefinition;
+import org.eclipse.jpt.jpa.ui.details.DefaultMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.details.JpaUiFactory;
+import org.eclipse.jpt.jpa.ui.details.MappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.BasicMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.EmbeddedIdMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.EmbeddedMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.ManyToManyMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.ManyToOneMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.OneToManyMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.OneToOneMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.TransientMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.VersionMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.java.AbstractJavaResourceUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.java.DefaultBasicMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.java.DefaultEmbeddedMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.java.NullJavaAttributeMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.details.ElementCollectionMapping2_0UiDefinition;
+
+public class EclipseLink2_5JavaResourceUiDefinition
+ extends AbstractJavaResourceUiDefinition
+{
+ // singleton
+ private static final ResourceUiDefinition INSTANCE = new EclipseLink2_5JavaResourceUiDefinition();
+
+
+ /**
+ * Return the singleton.
+ */
+ public static ResourceUiDefinition instance() {
+ return INSTANCE;
+ }
+
+
+ /**
+ * zero-argument constructor
+ */
+ protected EclipseLink2_5JavaResourceUiDefinition() {
+ super();
+ }
+
+
+ @Override
+ protected JpaUiFactory buildUiFactory() {
+ return new EclipseLink2_5JavaUiFactory();
+ }
+
+ @Override
+ protected void addSpecifiedAttributeMappingUiDefinitionsTo(List<MappingUiDefinition> definitions) {
+ definitions.add(JavaEclipseLinkIdMapping2_0UiDefinition.instance());
+ definitions.add(EmbeddedIdMappingUiDefinition.instance());
+ definitions.add(BasicMappingUiDefinition.instance());
+ definitions.add(VersionMappingUiDefinition.instance());
+ definitions.add(ManyToOneMappingUiDefinition.instance());
+ definitions.add(OneToManyMappingUiDefinition.instance());
+ definitions.add(OneToOneMappingUiDefinition.instance());
+ definitions.add(ManyToManyMappingUiDefinition.instance());
+ definitions.add(EmbeddedMappingUiDefinition.instance());
+ definitions.add(TransientMappingUiDefinition.instance());
+
+ definitions.add(EclipseLinkBasicCollectionMappingUiDefinition.instance());
+ definitions.add(EclipseLinkBasicMapMappingUiDefinition.instance());
+ definitions.add(EclipseLinkVariableOneToOneMappingUiDefinition.instance());
+ definitions.add(EclipseLinkTransformationMappingUiDefinition.instance());
+ definitions.add(EclipseLinkArrayMapping2_3UiDefinition.instance());
+ definitions.add(EclipseLinkStructureMapping2_3UiDefinition.instance());
+
+ definitions.add(ElementCollectionMapping2_0UiDefinition.instance());
+ }
+
+ @Override
+ protected void addDefaultAttributeMappingUiDefinitionsTo(List<DefaultMappingUiDefinition> definitions) {
+ definitions.add(DefaultBasicMappingUiDefinition.instance());
+ definitions.add(DefaultEmbeddedMappingUiDefinition.instance());
+ definitions.add(NullJavaAttributeMappingUiDefinition.instance());
+ definitions.add(DefaultJavaEclipseLinkOneToOneMappingUiDefinition.instance());
+ definitions.add(DefaultJavaEclipseLinkOneToManyMappingUiDefinition.instance());
+ definitions.add(DefaultJavaEclipseLinkVariableOneToOneMappingUiDefinition.instance());
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/EclipseLink2_5JavaUiFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/EclipseLink2_5JavaUiFactory.java
new file mode 100644
index 0000000..9a437e3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/EclipseLink2_5JavaUiFactory.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.eclipselink.ui.internal.details.java;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.core.context.Entity;
+import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
+import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkEntity;
+import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkMappedSuperclass;
+import org.eclipse.jpt.jpa.ui.details.JpaComposite;
+import org.eclipse.jpt.jpa.ui.jpa2_1.details.JpaUiFactory2_1;
+import org.eclipse.swt.widgets.Composite;
+
+public class EclipseLink2_5JavaUiFactory
+ extends EclipseLink2_0JavaUiFactory
+ implements JpaUiFactory2_1
+{
+
+ // ********** type mappings **********
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JpaComposite createEntityComposite(
+ PropertyValueModel<? extends Entity> entityModel,
+ Composite parentComposite,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ return new JavaEclipseLinkEntity2_5Composite((PropertyValueModel<? extends JavaEclipseLinkEntity>) entityModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JpaComposite createMappedSuperclassComposite(
+ PropertyValueModel<? extends MappedSuperclass> mappedSuperclassModel,
+ Composite parentComposite,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ return new JavaEclipseLinkMappedSuperclass2_5Composite((PropertyValueModel<? extends JavaEclipseLinkMappedSuperclass>) mappedSuperclassModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/JavaEclipseLinkEntity2_5Composite.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/JavaEclipseLinkEntity2_5Composite.java
new file mode 100644
index 0000000..986662e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/JavaEclipseLinkEntity2_5Composite.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.eclipselink.ui.internal.details.java;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkEntity;
+import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkMultitenancy2_3;
+import org.eclipse.jpt.jpa.eclipselink.ui.details.JptJpaEclipseLinkUiDetailsMessages;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.EclipseLinkMultitenancyComposite;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.Queries2_1Composite;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class JavaEclipseLinkEntity2_5Composite
+ extends AbstractJavaEclipseLinkEntity2_xComposite<JavaEclipseLinkEntity>
+{
+
+ public JavaEclipseLinkEntity2_5Composite(
+ PropertyValueModel<? extends JavaEclipseLinkEntity> entityModel,
+ Composite parentComposite,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ super(entityModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+ @Override
+ protected void initializeLayout(Composite container) {
+ this.initializeEntityCollapsibleSection(container);
+ this.initializeCachingCollapsibleSection(container);
+ this.initializeQueriesCollapsibleSection(container);
+ this.initializeInheritanceCollapsibleSection(container);
+ this.initializeAttributeOverridesCollapsibleSection(container);
+ this.initializeMultitenancyCollapsibleSection(container);
+ this.initializeGeneratorsCollapsibleSection(container);
+ this.initializeConvertersCollapsibleSection(container);
+ this.initializeSecondaryTablesCollapsibleSection(container);
+ this.initializeAdvancedCollapsibleSection(container);
+ }
+
+ protected void initializeMultitenancyCollapsibleSection(Composite container) {
+ final Section section = this.getWidgetFactory().createSection(container, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
+ section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ section.setText(JptJpaEclipseLinkUiDetailsMessages.ECLIPSELINK_TYPE_MAPPING_COMPOSITE_MULTITENANCY);
+
+ section.addExpansionListener(new ExpansionAdapter() {
+ @Override
+ public void expansionStateChanging(ExpansionEvent e) {
+ if (e.getState() && section.getClient() == null) {
+ section.setClient(initializeMultitenancySection(section));
+ }
+ }
+ });
+ }
+
+ protected Control initializeMultitenancySection(Composite container) {
+ return new EclipseLinkMultitenancyComposite(this, this.buildMultitenancyModel(), container).getControl();
+ }
+
+ private PropertyAspectAdapter<JavaEclipseLinkEntity, JavaEclipseLinkMultitenancy2_3> buildMultitenancyModel() {
+ return new PropertyAspectAdapter<JavaEclipseLinkEntity, JavaEclipseLinkMultitenancy2_3>(getSubjectHolder()) {
+ @Override
+ protected JavaEclipseLinkMultitenancy2_3 buildValue_() {
+ return this.subject.getMultitenancy();
+ }
+ };
+ }
+
+ @Override
+ protected Control initializeQueriesSection(Composite container) {
+ return new Queries2_1Composite(this, this.buildQueryContainerModel(), container).getControl();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/JavaEclipseLinkMappedSuperclass2_5Composite.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/JavaEclipseLinkMappedSuperclass2_5Composite.java
new file mode 100644
index 0000000..8bc9a63
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/java/JavaEclipseLinkMappedSuperclass2_5Composite.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.eclipselink.ui.internal.details.java;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkMappedSuperclass;
+import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkMultitenancy2_3;
+import org.eclipse.jpt.jpa.eclipselink.ui.details.JptJpaEclipseLinkUiDetailsMessages;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.EclipseLinkMultitenancyComposite;
+import org.eclipse.jpt.jpa.ui.JptJpaUiMessages;
+import org.eclipse.jpt.jpa.ui.details.JptJpaUiDetailsMessages;
+import org.eclipse.jpt.jpa.ui.internal.details.AccessTypeComboViewer;
+import org.eclipse.jpt.jpa.ui.internal.details.IdClassChooser;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.Queries2_1Composite;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Hyperlink;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class JavaEclipseLinkMappedSuperclass2_5Composite
+ extends AbstractJavaEclipseLinkMappedSuperclassComposite<JavaEclipseLinkMappedSuperclass>
+{
+
+ protected JavaEclipseLinkMappedSuperclass2_5Composite(
+ PropertyValueModel<? extends JavaEclipseLinkMappedSuperclass> mappedSuperclassModel,
+ Composite parentComposite, WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ super(mappedSuperclassModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+ @Override
+ protected void initializeLayout(Composite container) {
+ this.initializeMappedSuperclassCollapsibleSection(container);
+ this.initializeCachingCollapsibleSection(container);
+ this.initializeQueriesCollapsibleSection(container);
+ this.initializeMultitenancyCollapsibleSection(container);
+ this.initializeGeneratorsCollapsibleSection(container);
+ this.initializeConvertersCollapsibleSection(container);
+ this.initializeAdvancedCollapsibleSection(container);
+ }
+
+ @Override
+ protected Control initializeMappedSuperclassSection(Composite container) {
+ container = this.addSubPane(container, 2, 0, 0, 0, 0);
+
+ // Access type widgets
+ this.addLabel(container, JptJpaUiMessages.AccessTypeComposite_access);
+ new AccessTypeComboViewer(this, this.buildAccessReferenceModel(), container);
+
+ // Id class widgets
+ Hyperlink hyperlink = this.addHyperlink(container,JptJpaUiDetailsMessages.IdClassComposite_label);
+ new IdClassChooser(this, this.buildIdClassReferenceModel(), container, hyperlink);
+
+ return container;
+ }
+
+ @Override
+ protected Control initializeQueriesSection(Composite container) {
+ return new Queries2_1Composite(this, this.buildQueryContainerModel(), container).getControl();
+ }
+
+ @Override
+ protected Control initializeCachingSection(Composite container) {
+ return new JavaEclipseLinkCaching2_0Composite(this, this.buildCachingModel(), container).getControl();
+ }
+
+ protected void initializeMultitenancyCollapsibleSection(Composite container) {
+ final Section section = this.getWidgetFactory().createSection(container, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
+ section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ section.setText(JptJpaEclipseLinkUiDetailsMessages.ECLIPSELINK_TYPE_MAPPING_COMPOSITE_MULTITENANCY);
+
+ section.addExpansionListener(new ExpansionAdapter() {
+ @Override
+ public void expansionStateChanging(ExpansionEvent e) {
+ if (e.getState() && section.getClient() == null) {
+ section.setClient(initializeMultitenancySection(section));
+ }
+ }
+ });
+ }
+
+ protected Control initializeMultitenancySection(Composite container) {
+ return new EclipseLinkMultitenancyComposite(this, this.buildMultitenancyModel(), container).getControl();
+ }
+
+ private PropertyAspectAdapter<JavaEclipseLinkMappedSuperclass, JavaEclipseLinkMultitenancy2_3> buildMultitenancyModel() {
+ return new PropertyAspectAdapter<JavaEclipseLinkMappedSuperclass, JavaEclipseLinkMultitenancy2_3>(getSubjectHolder()) {
+ @Override
+ protected JavaEclipseLinkMultitenancy2_3 buildValue_() {
+ return this.subject.getMultitenancy();
+ }
+ };
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappings2_5DetailsProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappings2_5DetailsProvider.java
new file mode 100644
index 0000000..5a042c8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappings2_5DetailsProvider.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.eclipselink.ui.internal.details.orm;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.jpa.ui.details.JpaDetailsPageManager;
+import org.eclipse.jpt.jpa.ui.details.JpaDetailsProvider;
+import org.eclipse.jpt.jpa.ui.internal.details.AbstractEntityMappingsDetailsProvider;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * This provider is responsible for creating the {@link JpaDetailsPageManager}
+ * when the information comes from the XML file (either from the persistence
+ * configuration or from the Mappings Descriptor).
+ *
+ * @version 3.3
+ * @since 3.1
+ */
+public class EclipseLinkEntityMappings2_5DetailsProvider
+ extends AbstractEntityMappingsDetailsProvider
+{
+ // singleton
+ private static final JpaDetailsProvider INSTANCE = new EclipseLinkEntityMappings2_5DetailsProvider();
+
+
+ /**
+ * Return the singleton
+ */
+ public static JpaDetailsProvider instance() {
+ return INSTANCE;
+ }
+
+
+ /**
+ * Enforce singleton usage
+ */
+ private EclipseLinkEntityMappings2_5DetailsProvider() {
+ super();
+ }
+
+
+ public JpaDetailsPageManager buildDetailsPageManager(Composite parent, WidgetFactory widgetFactory, ResourceManager resourceManager) {
+ return new EclipseLinkEntityMappingsDetailsPageManager2_5(parent, widgetFactory, resourceManager);
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsPageManager2_5.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsPageManager2_5.java
new file mode 100644
index 0000000..15e2a81
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkEntityMappingsDetailsPageManager2_5.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.eclipselink.ui.internal.details.orm;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.jpa.eclipselink.ui.details.JptJpaEclipseLinkUiDetailsMessages;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.details.orm.EntityMappingsGenerators2_0Composite;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.Queries2_1Composite;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class EclipseLinkEntityMappingsDetailsPageManager2_5
+ extends AbstractEclipseLinkEntityMappingsDetailsPageManager
+{
+ public EclipseLinkEntityMappingsDetailsPageManager2_5(
+ Composite parent,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ super(parent, widgetFactory, resourceManager);
+ }
+
+ @Override
+ protected void initializeLayout(Composite container) {
+ this.initializeEntityMappingsCollapsibleSection(container);
+ this.initializePersistenceUnitMetadataCollapsibleSection(container);
+ this.initializeGeneratorsCollapsibleSection(container);
+ this.initializeQueriesCollapsibleSection(container);
+ this.initializeConvertersCollapsibleSection(container);
+ this.initializeMultitenancyCollapsibleSection(container);
+ }
+
+ @Override
+ protected Control initializeGeneratorsSection(Composite container) {
+ return new EntityMappingsGenerators2_0Composite(this, container).getControl();
+ }
+
+ @Override
+ protected Control initializeQueriesSection(Composite container) {
+ return new Queries2_1Composite(this, this.buildQueryContainerHolder(), container).getControl();
+ }
+
+ @Override
+ protected Control initializePersistenceUnitMetadataSection(Composite container) {
+ return new EclipseLink2_3PersistenceUnitMetadataComposite(
+ this,
+ buildPersistentUnitMetadataHolder(),
+ container
+ ).getControl();
+ }
+
+ protected void initializeMultitenancyCollapsibleSection(Composite container) {
+ final Section section = this.getWidgetFactory().createSection(container, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
+ section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ section.setText(JptJpaEclipseLinkUiDetailsMessages.ECLIPSELINK_TYPE_MAPPING_COMPOSITE_MULTITENANCY);
+
+ section.addExpansionListener(new ExpansionAdapter() {
+ @Override
+ public void expansionStateChanging(ExpansionEvent e) {
+ if (e.getState() && section.getClient() == null) {
+ section.setClient(initializeMultitenancySection(section));
+ }
+ }
+ });
+ }
+
+ protected Control initializeMultitenancySection(Composite container) {
+ return new EclipseLinkEntityMappingsTenantDiscriminatorColumnsComposite(this, container).getControl();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkOrmXml2_5UiDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkOrmXml2_5UiDefinition.java
index 9d2bc25..6e0afd6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkOrmXml2_5UiDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkOrmXml2_5UiDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Oracle. All rights reserved.
+ * Copyright (c) 2013 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.
@@ -61,7 +61,7 @@ public class EclipseLinkOrmXml2_5UiDefinition
@Override
protected JpaUiFactory buildUiFactory() {
- return new EclipseLinkOrmXml2_3UiFactory();
+ return new EclipseLinkOrmXml2_5UiFactory();
}
@Override
@@ -76,7 +76,7 @@ public class EclipseLinkOrmXml2_5UiDefinition
protected void addDetailsProvidersTo(List<JpaDetailsProvider> providers) {
providers.add(OrmPersistentTypeDetailsProvider.instance());
providers.add(OrmPersistentAttributeDetailsProvider.instance());
- providers.add(EclipseLinkEntityMappings2_3DetailsProvider.instance());
+ providers.add(EclipseLinkEntityMappings2_5DetailsProvider.instance());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkOrmXml2_5UiFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkOrmXml2_5UiFactory.java
new file mode 100644
index 0000000..95d9f27
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/EclipseLinkOrmXml2_5UiFactory.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.eclipselink.ui.internal.details.orm;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.core.context.Entity;
+import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
+import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkEntity;
+import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkMappedSuperclass;
+import org.eclipse.jpt.jpa.ui.details.JpaComposite;
+import org.eclipse.jpt.jpa.ui.jpa2_1.details.JpaUiFactory2_1;
+import org.eclipse.swt.widgets.Composite;
+
+public class EclipseLinkOrmXml2_5UiFactory
+ extends EclipseLinkOrmXml2_0UiFactory
+ implements JpaUiFactory2_1
+{
+
+ // ********** type mappings **********
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JpaComposite createMappedSuperclassComposite(
+ PropertyValueModel<? extends MappedSuperclass> mappedSuperclassModel,
+ Composite parentComposite,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ return new OrmEclipseLinkMappedSuperclass2_5Composite((PropertyValueModel<OrmEclipseLinkMappedSuperclass>) mappedSuperclassModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JpaComposite createEntityComposite(
+ PropertyValueModel<? extends Entity> entityModel,
+ Composite parentComposite,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ return new OrmEclipseLinkEntity2_5Composite((PropertyValueModel<OrmEclipseLinkEntity>) entityModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/OrmEclipseLinkEntity2_5Composite.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/OrmEclipseLinkEntity2_5Composite.java
new file mode 100644
index 0000000..0038883
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/OrmEclipseLinkEntity2_5Composite.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.eclipselink.ui.internal.details.orm;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkEntity;
+import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkMultitenancy2_3;
+import org.eclipse.jpt.jpa.eclipselink.ui.details.JptJpaEclipseLinkUiDetailsMessages;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.EclipseLinkMultitenancyComposite;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.Queries2_1Composite;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class OrmEclipseLinkEntity2_5Composite
+ extends AbstractOrmEclipseLinkEntity2_xComposite<OrmEclipseLinkEntity>
+{
+
+ public OrmEclipseLinkEntity2_5Composite(
+ PropertyValueModel<? extends OrmEclipseLinkEntity> entityModel,
+ Composite parentComposite,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ super(entityModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+ @Override
+ protected void initializeLayout(Composite container) {
+ this.initializeEntityCollapsibleSection(container);
+ this.initializeCachingCollapsibleSection(container);
+ this.initializeQueriesCollapsibleSection(container);
+ this.initializeInheritanceCollapsibleSection(container);
+ this.initializeAttributeOverridesCollapsibleSection(container);
+ this.initializeMultitenancyCollapsibleSection(container);
+ this.initializeGeneratorsCollapsibleSection(container);
+ this.initializeConvertersCollapsibleSection(container);
+ this.initializeSecondaryTablesCollapsibleSection(container);
+ this.initializeAdvancedCollapsibleSection(container);
+ }
+
+ protected void initializeMultitenancyCollapsibleSection(Composite container) {
+ final Section section = this.getWidgetFactory().createSection(container, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
+ section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ section.setText(JptJpaEclipseLinkUiDetailsMessages.ECLIPSELINK_TYPE_MAPPING_COMPOSITE_MULTITENANCY);
+
+ section.addExpansionListener(new ExpansionAdapter() {
+ @Override
+ public void expansionStateChanging(ExpansionEvent e) {
+ if (e.getState() && section.getClient() == null) {
+ section.setClient(initializeMultitenancySection(section));
+ }
+ }
+ });
+ }
+
+ protected Control initializeMultitenancySection(Composite container) {
+ return new EclipseLinkMultitenancyComposite(this, this.buildMultitenancyModel(), container).getControl();
+ }
+
+ private PropertyAspectAdapter<OrmEclipseLinkEntity, OrmEclipseLinkMultitenancy2_3> buildMultitenancyModel() {
+ return new PropertyAspectAdapter<OrmEclipseLinkEntity, OrmEclipseLinkMultitenancy2_3>(getSubjectHolder()) {
+ @Override
+ protected OrmEclipseLinkMultitenancy2_3 buildValue_() {
+ return this.subject.getMultitenancy();
+ }
+ };
+ }
+
+ @Override
+ protected Control initializeQueriesSection(Composite container) {
+ return new Queries2_1Composite(this, this.buildQueryContainerModel(), container).getControl();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/OrmEclipseLinkMappedSuperclass2_5Composite.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/OrmEclipseLinkMappedSuperclass2_5Composite.java
new file mode 100644
index 0000000..fb6c846
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/orm/OrmEclipseLinkMappedSuperclass2_5Composite.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.eclipselink.ui.internal.details.orm;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.core.context.QueryContainer;
+import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkMappedSuperclass;
+import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkMultitenancy2_3;
+import org.eclipse.jpt.jpa.eclipselink.ui.details.JptJpaEclipseLinkUiDetailsMessages;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.EclipseLinkMultitenancyComposite;
+import org.eclipse.jpt.jpa.ui.details.JptJpaUiDetailsMessages;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.Queries2_1Composite;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class OrmEclipseLinkMappedSuperclass2_5Composite
+ extends AbstractOrmEclipseLinkMappedSuperclassComposite<OrmEclipseLinkMappedSuperclass>
+{
+
+ public OrmEclipseLinkMappedSuperclass2_5Composite(
+ PropertyValueModel<? extends OrmEclipseLinkMappedSuperclass> mappedSuperclassModel,
+ Composite parentComposite,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ super(mappedSuperclassModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+ @Override
+ protected void initializeLayout(Composite container) {
+ this.initializeMappedSuperclassCollapsibleSection(container);
+ this.initializeCachingCollapsibleSection(container);
+ this.initializeQueriesCollapsibleSection(container);
+ this.initializeMultitenancyCollapsibleSection(container);
+ this.initializeGeneratorsCollapsibleSection(container);
+ this.initializeConvertersCollapsibleSection(container);
+ this.initializeAdvancedCollapsibleSection(container);
+ }
+
+ @Override
+ protected Control initializeCachingSection(Composite container) {
+ return new OrmEclipseLinkCaching2_0Composite(this, this.buildCachingModel(), container).getControl();
+ }
+
+ protected void initializeQueriesCollapsibleSection(Composite container) {
+ final Section section = this.getWidgetFactory().createSection(container, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
+ section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ section.setText(JptJpaUiDetailsMessages.EntityComposite_queries);
+
+ section.addExpansionListener(new ExpansionAdapter() {
+ @Override
+ public void expansionStateChanging(ExpansionEvent e) {
+ if (e.getState() && section.getClient() == null) {
+ section.setClient(initializeQueriesSection(section));
+ }
+ }
+ });
+ }
+
+ protected Control initializeQueriesSection(Composite container) {
+ return new Queries2_1Composite(this, this.buildQueryContainerModel(), container).getControl();
+ }
+
+ private PropertyValueModel<QueryContainer> buildQueryContainerModel() {
+ return new PropertyAspectAdapter<OrmEclipseLinkMappedSuperclass, QueryContainer>(
+ getSubjectHolder()) {
+ @Override
+ protected QueryContainer buildValue_() {
+ return this.subject.getQueryContainer();
+ }
+ };
+ }
+
+ protected void initializeMultitenancyCollapsibleSection(Composite container) {
+ final Section section = this.getWidgetFactory().createSection(container, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
+ section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ section.setText(JptJpaEclipseLinkUiDetailsMessages.ECLIPSELINK_TYPE_MAPPING_COMPOSITE_MULTITENANCY);
+
+ section.addExpansionListener(new ExpansionAdapter() {
+ @Override
+ public void expansionStateChanging(ExpansionEvent e) {
+ if (e.getState() && section.getClient() == null) {
+ section.setClient(initializeMultitenancySection(section));
+ }
+ }
+ });
+ }
+
+ protected Control initializeMultitenancySection(Composite container) {
+ return new EclipseLinkMultitenancyComposite(this, this.buildMultitenancyModel(), container).getControl();
+ }
+
+ private PropertyAspectAdapter<OrmEclipseLinkMappedSuperclass, OrmEclipseLinkMultitenancy2_3> buildMultitenancyModel() {
+ return new PropertyAspectAdapter<OrmEclipseLinkMappedSuperclass, OrmEclipseLinkMultitenancy2_3>(getSubjectHolder()) {
+ @Override
+ protected OrmEclipseLinkMultitenancy2_3 buildValue_() {
+ return this.subject.getMultitenancy();
+ }
+ };
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiProvider.java
index 1c95890..3a9e2aa 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Oracle. All rights reserved.
+ * Copyright (c) 2013 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
@@ -10,7 +10,7 @@
package org.eclipse.jpt.jpa.eclipselink.ui.internal.platform;
import java.util.List;
-import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.java.EclipseLink2_3JavaResourceUiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.java.EclipseLink2_5JavaResourceUiDefinition;
import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml1_1UiDefinition;
import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml1_2UiDefinition;
import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml2_0UiDefinition;
@@ -58,7 +58,7 @@ public class EclipseLink2_5JpaPlatformUiProvider
@Override
protected void addResourceUiDefinitionsTo(List<ResourceUiDefinition> definitions) {
- definitions.add(EclipseLink2_3JavaResourceUiDefinition.instance());
+ definitions.add(EclipseLink2_5JavaResourceUiDefinition.instance());
definitions.add(OrmXmlUiDefinition.instance());
definitions.add(OrmXml2_0UiDefinition.instance());
definitions.add(OrmXml2_1UiDefinition.instance());
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.jpa.ui/META-INF/MANIFEST.MF
index 1ccc968..119f0d6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/META-INF/MANIFEST.MF
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/META-INF/MANIFEST.MF
@@ -69,6 +69,9 @@ Export-Package: org.eclipse.jpt.jpa.ui,
org.eclipse.jpt.jpa.ui.internal.jpa2.persistence;x-internal:=true,
org.eclipse.jpt.jpa.ui.internal.jpa2.platform.generic;x-internal:=true,
org.eclipse.jpt.jpa.ui.internal.jpa2_1;x-internal:=true,
+ org.eclipse.jpt.jpa.ui.internal.jpa2_1.details;x-internal:=true,
+ org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.java;x-internal:=true,
+ org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.orm;x-internal:=true,
org.eclipse.jpt.jpa.ui.internal.jpa2_1.persistence;x-internal:=true,
org.eclipse.jpt.jpa.ui.internal.jpql;x-internal:=true,
org.eclipse.jpt.jpa.ui.internal.listeners;x-internal:=true,
@@ -95,6 +98,7 @@ Export-Package: org.eclipse.jpt.jpa.ui,
org.eclipse.jpt.jpa.ui.internal.wizards.proj.model;x-internal:=true,
org.eclipse.jpt.jpa.ui.jpa2.details,
org.eclipse.jpt.jpa.ui.jpa2.persistence,
+ org.eclipse.jpt.jpa.ui.jpa2_1.details,
org.eclipse.jpt.jpa.ui.persistence,
org.eclipse.jpt.jpa.ui.prefs.validation,
org.eclipse.jpt.jpa.ui.selection,
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml b/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml
index 0d1d633..a822f70 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/plugin.xml
@@ -226,7 +226,7 @@
<jpaPlatformUi
id="generic2_1.ui"
jpaPlatform="generic2_1"
- factoryClass="org.eclipse.jpt.jpa.ui.internal.jpa2.platform.generic.Generic2_1JpaPlatformUiFactory"/>
+ factoryClass="org.eclipse.jpt.jpa.ui.internal.jpa2_1.platform.generic.Generic2_1JpaPlatformUiFactory"/>
</extension>
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/property_files/jpt_jpa_ui_details2_1.properties b/jpa/plugins/org.eclipse.jpt.jpa.ui/property_files/jpt_jpa_ui_details2_1.properties
new file mode 100644
index 0000000..b7c8eb2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/property_files/jpt_jpa_ui_details2_1.properties
@@ -0,0 +1,13 @@
+################################################################################
+# Copyright (c) 2013 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
+################################################################################
+
+# JptJpaUiDetailsMessages2_1
+
+AddQueryDialog_namedStoredProcedureQuery= Named Stored Procedure Query
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AddQueryDialog.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AddQueryDialog.java
index a157dbf..1ca66da 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AddQueryDialog.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AddQueryDialog.java
@@ -36,7 +36,7 @@ public class AddQueryDialog
/**
* The associated persistence unit
*/
- private PersistenceUnit pUnit;
+ private final PersistenceUnit pUnit;
public AddQueryDialog(Shell parentShell, ResourceManager resourceManager, PersistenceUnit pUnit) {
@@ -123,7 +123,7 @@ public class AddQueryDialog
(String) null);
}
- protected ListValueModel<String> buildQueryTypeListHolder() {
+ public ListValueModel<String> buildQueryTypeListHolder() {
List<String> queryTypes = new ArrayList<String>();
queryTypes.add(NAMED_QUERY);
queryTypes.add(NAMED_NATIVE_QUERY);
@@ -131,7 +131,7 @@ public class AddQueryDialog
return new StaticListValueModel<String>(queryTypes);
}
- private Transformer<String, String> buildStringConverter() {
+ public Transformer<String, String> buildStringConverter() {
return new TransformerAdapter<String, String>() {
@Override
public String transform(String value) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AddQueryDialog2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AddQueryDialog2_1.java
new file mode 100644
index 0000000..ca6f127
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AddQueryDialog2_1.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.internal.details;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.internal.widgets.DialogPane;
+import org.eclipse.jpt.common.utility.internal.model.value.StaticListValueModel;
+import org.eclipse.jpt.common.utility.internal.transformer.TransformerAdapter;
+import org.eclipse.jpt.common.utility.model.value.ListValueModel;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.common.utility.transformer.Transformer;
+import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.jpa.ui.details.JptJpaUiDetailsMessages;
+import org.eclipse.jpt.jpa.ui.jpa2_1.details.JptJpaUiDetailsMessages2_1;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+
+public class AddQueryDialog2_1
+ extends AddQueryDialog
+{
+ public static final String NAMED_STORED_PROCEDURE_QUERY = "namedStoredProceduerQuery"; //$NON-NLS-1$
+
+ public AddQueryDialog2_1(
+ Shell parentShell,
+ ResourceManager resourceManager,
+ PersistenceUnit pUnit) {
+ super(parentShell, resourceManager, pUnit);
+ }
+
+ @Override
+ protected DialogPane<AddQueryStateObject> buildLayout(Composite container) {
+ return new QueryDialogPane2_1(this.getSubjectHolder(), container, this.resourceManager);
+ }
+
+ class QueryDialogPane2_1
+ extends QueryDialogPane
+ {
+ QueryDialogPane2_1(
+ PropertyValueModel<AddQueryStateObject> subjectModel,
+ Composite parentComposite,
+ ResourceManager resourceManager) {
+ super(subjectModel, parentComposite, resourceManager);
+ }
+
+ @Override
+ public ListValueModel<String> buildQueryTypeListHolder() {
+ List<String> queryTypes = new ArrayList<String>();
+ queryTypes.add(NAMED_QUERY);
+ queryTypes.add(NAMED_NATIVE_QUERY);
+ queryTypes.add(NAMED_STORED_PROCEDURE_QUERY);
+
+ return new StaticListValueModel<String>(queryTypes);
+ }
+
+ @Override
+ public Transformer<String, String> buildStringConverter() {
+ return new TransformerAdapter<String, String>() {
+ @Override
+ public String transform(String value) {
+ if (value == NAMED_QUERY) {
+ return JptJpaUiDetailsMessages.AddQueryDialog_namedQuery;
+ }
+ if (value == NAMED_NATIVE_QUERY) {
+ return JptJpaUiDetailsMessages.AddQueryDialog_namedNativeQuery;
+ }
+ if (value == NAMED_STORED_PROCEDURE_QUERY) {
+ return JptJpaUiDetailsMessages2_1.AddQueryDialog_namedStoredProcedureQuery;
+ }
+ return value;
+ }
+ };
+ }
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/QueriesComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/QueriesComposite.java
index ecd1175..4b2c867 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/QueriesComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/QueriesComposite.java
@@ -37,6 +37,7 @@ import org.eclipse.jpt.jpa.core.context.NamedNativeQuery;
import org.eclipse.jpt.jpa.core.context.NamedQuery;
import org.eclipse.jpt.jpa.core.context.Query;
import org.eclipse.jpt.jpa.core.context.QueryContainer;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.QueryContainer2_1;
import org.eclipse.jpt.jpa.ui.details.JptJpaUiDetailsMessages;
import org.eclipse.jpt.jpa.ui.internal.JpaHelpContextIds;
import org.eclipse.osgi.util.NLS;
@@ -72,7 +73,7 @@ import org.eclipse.ui.part.PageBook;
* @see NamedNativeQueryPropertyComposite
* @see NamedQueryPropertyComposite
*
- * @version 2.0
+ * @version 3.3
* @since 2.0
*/
public class QueriesComposite extends Pane<QueryContainer>
@@ -150,7 +151,7 @@ public class QueriesComposite extends Pane<QueryContainer>
new ControlSwitcher(this.getSelectedQueryModel(), this.buildPaneTransformer(pageBook), pageBook);
}
- Query addQuery() {
+ protected Query addQuery() {
return addQueryFromDialog(buildAddQueryDialog());
}
@@ -170,6 +171,9 @@ public class QueriesComposite extends Pane<QueryContainer>
else if (queryType == AddQueryDialog.NAMED_NATIVE_QUERY) {
query = this.getSubject().addNamedNativeQuery();
}
+ else if (queryType == AddQueryDialog.NAMED_NATIVE_QUERY) {
+ query = ((QueryContainer2_1) this.getSubject()).addNamedStoredProcedureQuery();
+ }
else {
throw new IllegalArgumentException();
}
@@ -184,7 +188,7 @@ public class QueriesComposite extends Pane<QueryContainer>
);
}
- private ListValueModel<NamedNativeQuery> buildNamedNativeQueriesListHolder() {
+ protected ListValueModel<NamedNativeQuery> buildNamedNativeQueriesListHolder() {
return new ListAspectAdapter<QueryContainer, NamedNativeQuery>(
getSubjectHolder(),
QueryContainer.NAMED_NATIVE_QUERIES_LIST)
@@ -210,7 +214,7 @@ public class QueriesComposite extends Pane<QueryContainer>
};
}
- private ListValueModel<NamedQuery> buildNamedQueriesListHolder() {
+ protected ListValueModel<NamedQuery> buildNamedQueriesListHolder() {
return new ListAspectAdapter<QueryContainer, NamedQuery>(
getSubjectHolder(),
QueryContainer.NAMED_QUERIES_LIST)
@@ -236,7 +240,7 @@ public class QueriesComposite extends Pane<QueryContainer>
};
}
- private Transformer<Query, Control> buildPaneTransformer(final PageBook pageBook) {
+ protected Transformer<Query, Control> buildPaneTransformer(final PageBook pageBook) {
return new Transformer<Query, Control>() {
public Control transform(Query query) {
@@ -253,7 +257,7 @@ public class QueriesComposite extends Pane<QueryContainer>
};
}
- private Adapter<Query> buildQueriesAdapter() {
+ protected Adapter<Query> buildQueriesAdapter() {
return new AddRemoveListPane.AbstractAdapter<Query>() {
@@ -280,14 +284,14 @@ public class QueriesComposite extends Pane<QueryContainer>
};
}
- private ListValueModel<Query> buildQueriesListHolder() {
+ protected ListValueModel<Query> buildQueriesListHolder() {
List<ListValueModel<? extends Query>> list = new ArrayList<ListValueModel<? extends Query>>();
list.add(buildNamedQueriesListHolder());
list.add(buildNamedNativeQueriesListHolder());
return CompositeListValueModel.forModels(list);
}
- private ILabelProvider buildQueriesListLabelProvider() {
+ protected ILabelProvider buildQueriesListLabelProvider() {
return new LabelProvider() {
@Override
public String getText(Object element) {
@@ -327,14 +331,14 @@ public class QueriesComposite extends Pane<QueryContainer>
);
}
- protected Pane<? extends NamedNativeQuery> getNamedNativeQueryPropertyComposite(PageBook pageBook) {
+ public Pane<? extends NamedNativeQuery> getNamedNativeQueryPropertyComposite(PageBook pageBook) {
if (this.namedNativeQueryPane == null) {
this.namedNativeQueryPane = this.buildNamedNativeQueryPropertyComposite(pageBook);
}
return this.namedNativeQueryPane;
}
- protected Pane<? extends NamedNativeQuery> buildNamedNativeQueryPropertyComposite(PageBook pageBook) {
+ public Pane<? extends NamedNativeQuery> buildNamedNativeQueryPropertyComposite(PageBook pageBook) {
return new NamedNativeQueryPropertyComposite(
this,
this.buildSelectedNamedNativeQueryModel(),
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/orm/OrmXml2_1UiDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/orm/OrmXml2_1UiDefinition.java
index 18a917c..ba7d655 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/orm/OrmXml2_1UiDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/orm/OrmXml2_1UiDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Oracle. All rights reserved.
+ * Copyright (c) 2013 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.
@@ -31,8 +31,9 @@ import org.eclipse.jpt.jpa.ui.internal.details.orm.AbstractOrmXmlResourceUiDefin
import org.eclipse.jpt.jpa.ui.internal.details.orm.OrmPersistentAttributeDetailsProvider;
import org.eclipse.jpt.jpa.ui.internal.details.orm.OrmPersistentTypeDetailsProvider;
import org.eclipse.jpt.jpa.ui.internal.details.orm.OrmXmlUiDefinition;
-import org.eclipse.jpt.jpa.ui.internal.jpa2.GenericOrmXml2_0UiFactory;
import org.eclipse.jpt.jpa.ui.internal.jpa2.details.ElementCollectionMapping2_0UiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.orm.EntityMappings2_1DetailsProvider;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.orm.GenericOrmXml2_1UiFactory;
public class OrmXml2_1UiDefinition
extends AbstractOrmXmlResourceUiDefinition
@@ -59,7 +60,7 @@ public class OrmXml2_1UiDefinition
@Override
protected JpaUiFactory buildUiFactory() {
- return new GenericOrmXml2_0UiFactory();
+ return new GenericOrmXml2_1UiFactory();
}
public boolean providesUi(JptResourceType resourceType) {
@@ -73,7 +74,7 @@ public class OrmXml2_1UiDefinition
protected void addDetailsProvidersTo(List<JpaDetailsProvider> providers) {
providers.add(OrmPersistentTypeDetailsProvider.instance());
providers.add(OrmPersistentAttributeDetailsProvider.instance());
- providers.add(EntityMappings2_0DetailsProvider.instance());
+ providers.add(EntityMappings2_1DetailsProvider.instance());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/Generic2_1JpaPlatformUiProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/Generic2_1JpaPlatformUiProvider.java
index 32c6a12..1f14e3c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/Generic2_1JpaPlatformUiProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/Generic2_1JpaPlatformUiProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Oracle. All rights reserved.
+ * Copyright (c) 2013 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.
@@ -7,17 +7,17 @@
* Contributors:
* Oracle - initial API and implementation
******************************************************************************/
-package org.eclipse.jpt.jpa.ui.internal.jpa2;
+package org.eclipse.jpt.jpa.ui.internal.jpa2_1;
import java.util.List;
import org.eclipse.jpt.jpa.ui.JpaPlatformUiProvider;
import org.eclipse.jpt.jpa.ui.ResourceUiDefinition;
import org.eclipse.jpt.jpa.ui.internal.AbstractJpaPlatformUiProvider;
import org.eclipse.jpt.jpa.ui.internal.details.orm.OrmXmlUiDefinition;
-import org.eclipse.jpt.jpa.ui.internal.jpa2.details.java.Generic2_0JavaResourceUiDefinition;
import org.eclipse.jpt.jpa.ui.internal.jpa2.details.orm.OrmXml2_0UiDefinition;
import org.eclipse.jpt.jpa.ui.internal.jpa2.details.orm.OrmXml2_1UiDefinition;
import org.eclipse.jpt.jpa.ui.internal.jpa2.persistence.PersistenceXml2_0UiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.java.Generic2_1JavaResourceUiDefinition;
import org.eclipse.jpt.jpa.ui.internal.jpa2_1.persistence.PersistenceXml2_1UiDefinition;
import org.eclipse.jpt.jpa.ui.internal.persistence.PersistenceXmlUiDefinition;
@@ -50,7 +50,7 @@ public class Generic2_1JpaPlatformUiProvider extends AbstractJpaPlatformUiProvid
@Override
protected void addResourceUiDefinitionsTo(List<ResourceUiDefinition> definitions) {
- definitions.add(Generic2_0JavaResourceUiDefinition.instance());
+ definitions.add(Generic2_1JavaResourceUiDefinition.instance());
definitions.add(OrmXmlUiDefinition.instance());
definitions.add(OrmXml2_0UiDefinition.instance());
definitions.add(OrmXml2_1UiDefinition.instance());
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/Queries2_1Composite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/Queries2_1Composite.java
new file mode 100644
index 0000000..1f9f2a4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/Queries2_1Composite.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.internal.jpa2_1.details;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jpt.common.ui.internal.widgets.AddRemoveListPane;
+import org.eclipse.jpt.common.ui.internal.widgets.AddRemovePane.Adapter;
+import org.eclipse.jpt.common.ui.internal.widgets.Pane;
+import org.eclipse.jpt.common.utility.internal.iterable.IterableTools;
+import org.eclipse.jpt.common.utility.internal.iterable.SuperListIterableWrapper;
+import org.eclipse.jpt.common.utility.internal.model.value.CompositeListValueModel;
+import org.eclipse.jpt.common.utility.internal.model.value.ListAspectAdapter;
+import org.eclipse.jpt.common.utility.internal.model.value.TransformationPropertyValueModel;
+import org.eclipse.jpt.common.utility.iterable.ListIterable;
+import org.eclipse.jpt.common.utility.model.value.CollectionValueModel;
+import org.eclipse.jpt.common.utility.model.value.ListValueModel;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.common.utility.transformer.Transformer;
+import org.eclipse.jpt.jpa.core.context.NamedNativeQuery;
+import org.eclipse.jpt.jpa.core.context.NamedQuery;
+import org.eclipse.jpt.jpa.core.context.Query;
+import org.eclipse.jpt.jpa.core.context.QueryContainer;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.NamedStoredProcedureQuery2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.QueryContainer2_1;
+import org.eclipse.jpt.jpa.ui.details.JptJpaUiDetailsMessages;
+import org.eclipse.jpt.jpa.ui.internal.details.AddQueryDialog;
+import org.eclipse.jpt.jpa.ui.internal.details.AddQueryDialog2_1;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.details.Queries2_0Composite;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.part.PageBook;
+
+
+public class Queries2_1Composite
+ extends Queries2_0Composite
+{
+ Pane<? extends NamedStoredProcedureQuery2_1> namedStoredProceduerQueryPane; //lazy initialized to avoid unnecessary handles
+
+ public Queries2_1Composite(
+ Pane<?> parentPane,
+ PropertyValueModel<? extends QueryContainer> subjectHolder,
+ Composite parent) {
+ super(parentPane, subjectHolder, parent);
+ }
+
+
+ @Override
+ protected Query addQueryFromDialog(AddQueryDialog dialog) {
+ if (dialog.open() != Window.OK) {
+ return null;
+ }
+ String queryType = dialog.getQueryType();
+ Query query;
+ if (queryType == AddQueryDialog2_1.NAMED_QUERY) {
+ query = this.getSubject().addNamedQuery();
+ }
+ else if (queryType == AddQueryDialog2_1.NAMED_NATIVE_QUERY) {
+ query = this.getSubject().addNamedNativeQuery();
+ }
+ else if (queryType == AddQueryDialog2_1.NAMED_STORED_PROCEDURE_QUERY) {
+ query = ((QueryContainer2_1) this.getSubject()).addNamedStoredProcedureQuery();
+ }
+ else {
+ throw new IllegalArgumentException();
+ }
+ query.setName(dialog.getName());
+ return query;
+ }
+
+ @Override
+ protected AddQueryDialog buildAddQueryDialog() {
+ return new AddQueryDialog2_1(getShell(), this.getResourceManager(), this.getSubject().getPersistenceUnit());
+ }
+
+ protected ListValueModel<NamedStoredProcedureQuery2_1> buildNamedStoredProcedureQueriesListHolder() {
+ return new ListAspectAdapter<QueryContainer, NamedStoredProcedureQuery2_1>(
+ getSubjectHolder(),
+ QueryContainer2_1.NAMED_STORED_PROCEDURE_QUERIES_LIST)
+ {
+ @Override
+ protected ListIterable<NamedStoredProcedureQuery2_1> getListIterable() {
+ return new SuperListIterableWrapper<NamedStoredProcedureQuery2_1>(((QueryContainer2_1) this.subject).getNamedStoredProcedureQueries());
+ }
+
+ @Override
+ protected int size_() {
+ return ((QueryContainer2_1) this.subject).getNamedStoredProcedureQueriesSize();
+ }
+ };
+ }
+
+ private PropertyValueModel<NamedStoredProcedureQuery2_1> buildSelectedNamedQueryModel() {
+ return new TransformationPropertyValueModel<Query, NamedStoredProcedureQuery2_1>(this.getSelectedQueryModel()) {
+ @Override
+ protected NamedStoredProcedureQuery2_1 transform_(Query value) {
+ return (value instanceof NamedStoredProcedureQuery2_1) ? (NamedStoredProcedureQuery2_1) value : null;
+ }
+ };
+ }
+
+ @Override
+ protected Transformer<Query, Control> buildPaneTransformer(final PageBook pageBook) {
+ return new Transformer<Query, Control>() {
+ public Control transform(Query query) {
+
+ if (query == null) {
+ return null;
+ }
+
+ if (query instanceof NamedNativeQuery) {
+ return Queries2_1Composite.this.getNamedNativeQueryPropertyComposite(pageBook).getControl();
+ }
+
+ if (query instanceof NamedQuery) {
+ return Queries2_1Composite.this.getNamedQueryPropertyComposite(pageBook).getControl();
+ }
+
+ return null; // This is for UI tolerance. Full UI support should be doing as below:
+// return Queries2_1Composite.this.getNamedStoredProcedureQueryPropertyComposite(pageBook).getControl();
+ }
+ };
+ }
+
+ @Override
+ protected Adapter<Query> buildQueriesAdapter() {
+
+ return new AddRemoveListPane.AbstractAdapter<Query>() {
+
+ public Query addNewItem() {
+ return addQuery();
+ }
+
+ @Override
+ public PropertyValueModel<Boolean> buildRemoveButtonEnabledModel(CollectionValueModel<Query> selectedItemsModel) {
+ //enable the remove button only when 1 item is selected, same as the optional button
+ return this.buildSingleSelectedItemEnabledModel(selectedItemsModel);
+ }
+
+ public void removeSelectedItems(CollectionValueModel<Query> selectedItemsModel) {
+ //assume only 1 item since remove button is disabled otherwise
+ Query item = selectedItemsModel.iterator().next();
+ if (item instanceof NamedQuery) {
+ getSubject().removeNamedQuery((NamedQuery) item);
+ }
+ else if (item instanceof NamedNativeQuery) {
+ getSubject().removeNamedNativeQuery((NamedNativeQuery) item);
+ }
+ else {
+ ((QueryContainer2_1) getSubject()).removeNamedStoredProcedureQuery((NamedStoredProcedureQuery2_1) item);
+ }
+ }
+ };
+ }
+
+ @Override
+ protected ListValueModel<Query> buildQueriesListHolder() {
+ List<ListValueModel<? extends Query>> list = new ArrayList<ListValueModel<? extends Query>>();
+ list.add(buildNamedQueriesListHolder());
+ list.add(buildNamedNativeQueriesListHolder());
+ list.add(buildNamedStoredProcedureQueriesListHolder());
+ return CompositeListValueModel.forModels(list);
+ }
+
+ @Override
+ protected ILabelProvider buildQueriesListLabelProvider() {
+ return new LabelProvider() {
+ @Override
+ public String getText(Object element) {
+ Query query = (Query) element;
+ String name = query.getName();
+
+ if (name == null) {
+ int index = -1;
+
+ if (query instanceof NamedQuery) {
+ index = IterableTools.indexOf(getSubject().getNamedQueries(), query);
+ }
+ else if (query instanceof NamedNativeQuery) {
+ index = IterableTools.indexOf(getSubject().getNamedNativeQueries(), query);
+ }
+ else {
+ index = IterableTools.indexOf(((QueryContainer2_1) getSubject()).getNamedStoredProcedureQueries(), query);
+ }
+
+ name = NLS.bind(JptJpaUiDetailsMessages.QueriesComposite_displayString, Integer.valueOf(index));
+ }
+
+ return name;
+ }
+ };
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/Generic2_1JavaResourceUiDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/Generic2_1JavaResourceUiDefinition.java
new file mode 100644
index 0000000..e999b41
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/Generic2_1JavaResourceUiDefinition.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.internal.jpa2_1.details.java;
+
+import java.util.List;
+import org.eclipse.jpt.jpa.ui.ResourceUiDefinition;
+import org.eclipse.jpt.jpa.ui.details.DefaultMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.details.JpaUiFactory;
+import org.eclipse.jpt.jpa.ui.details.MappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.BasicMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.EmbeddedIdMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.EmbeddedMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.IdMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.ManyToManyMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.ManyToOneMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.OneToManyMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.OneToOneMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.TransientMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.VersionMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.java.AbstractJavaResourceUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.java.DefaultBasicMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.java.DefaultEmbeddedMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.details.java.NullJavaAttributeMappingUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.details.ElementCollectionMapping2_0UiDefinition;
+
+public class Generic2_1JavaResourceUiDefinition
+ extends AbstractJavaResourceUiDefinition
+{
+ // singleton
+ private static final ResourceUiDefinition INSTANCE = new Generic2_1JavaResourceUiDefinition();
+
+ /**
+ * Return the singleton.
+ */
+ public static ResourceUiDefinition instance() {
+ return INSTANCE;
+ }
+
+
+ /**
+ * zero-argument constructor
+ */
+ protected Generic2_1JavaResourceUiDefinition() {
+ super();
+ }
+
+ @Override
+ protected JpaUiFactory buildUiFactory() {
+ return new Generic2_1JavaUiFactory();
+ }
+
+ @Override
+ protected void addSpecifiedAttributeMappingUiDefinitionsTo(List<MappingUiDefinition> definitions) {
+ definitions.add(ElementCollectionMapping2_0UiDefinition.instance());
+ definitions.add(IdMappingUiDefinition.instance());
+ definitions.add(EmbeddedIdMappingUiDefinition.instance());
+ definitions.add(BasicMappingUiDefinition.instance());
+ definitions.add(VersionMappingUiDefinition.instance());
+ definitions.add(ManyToOneMappingUiDefinition.instance());
+ definitions.add(OneToManyMappingUiDefinition.instance());
+ definitions.add(OneToOneMappingUiDefinition.instance());
+ definitions.add(ManyToManyMappingUiDefinition.instance());
+ definitions.add(EmbeddedMappingUiDefinition.instance());
+ definitions.add(TransientMappingUiDefinition.instance());
+ }
+
+ @Override
+ protected void addDefaultAttributeMappingUiDefinitionsTo(List<DefaultMappingUiDefinition> definitions) {
+ definitions.add(DefaultBasicMappingUiDefinition.instance());
+ definitions.add(DefaultEmbeddedMappingUiDefinition.instance());
+ definitions.add(NullJavaAttributeMappingUiDefinition.instance());
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/Generic2_1JavaUiFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/Generic2_1JavaUiFactory.java
new file mode 100644
index 0000000..075f09a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/Generic2_1JavaUiFactory.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.internal.jpa2_1.details.java;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.core.context.Entity;
+import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
+import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
+import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaEntity2_0;
+import org.eclipse.jpt.jpa.ui.details.JpaComposite;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.details.java.Generic2_0JavaUiFactory;
+import org.eclipse.jpt.jpa.ui.jpa2_1.details.JpaUiFactory2_1;
+import org.eclipse.swt.widgets.Composite;
+
+public class Generic2_1JavaUiFactory
+ extends Generic2_0JavaUiFactory
+ implements JpaUiFactory2_1
+{
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JpaComposite createMappedSuperclassComposite(
+ PropertyValueModel<? extends MappedSuperclass> mappedSuperclassModel,
+ Composite parentComposite,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ return new JavaMappedSuperclass2_1Composite((PropertyValueModel<? extends JavaMappedSuperclass>) mappedSuperclassModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JpaComposite createEntityComposite(
+ PropertyValueModel<? extends Entity> entityModel,
+ Composite parentComposite,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ return new JavaEntity2_1Composite((PropertyValueModel<? extends JavaEntity2_0>) entityModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/JavaEntity2_1Composite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/JavaEntity2_1Composite.java
new file mode 100644
index 0000000..dae2162
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/JavaEntity2_1Composite.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.internal.jpa2_1.details.java;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaEntity2_0;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.details.java.JavaEntity2_0Composite;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.Queries2_1Composite;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class JavaEntity2_1Composite
+ extends JavaEntity2_0Composite
+{
+
+ public JavaEntity2_1Composite(
+ PropertyValueModel<? extends JavaEntity2_0> entityModel,
+ Composite parentComposite, WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ super(entityModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+
+ @Override
+ protected Control initializeQueriesSection(Composite container) {
+ return new Queries2_1Composite(this, this.buildQueryContainerModel(), container).getControl();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/JavaMappedSuperclass2_1Composite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/JavaMappedSuperclass2_1Composite.java
new file mode 100644
index 0000000..7fa7fd1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/java/JavaMappedSuperclass2_1Composite.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.internal.jpa2_1.details.java;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.details.java.JavaMappedSuperclass2_0Composite;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.Queries2_1Composite;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class JavaMappedSuperclass2_1Composite
+ extends JavaMappedSuperclass2_0Composite
+{
+ public JavaMappedSuperclass2_1Composite(
+ PropertyValueModel<? extends JavaMappedSuperclass> mappedSuperclassModel,
+ Composite parentComposite, WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ super(mappedSuperclassModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+ @Override
+ protected Control initializeQueriesSection(Composite container) {
+ return new Queries2_1Composite(this, this.buildQueryContainerModel(), container).getControl();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/EntityMappings2_1DetailsProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/EntityMappings2_1DetailsProvider.java
new file mode 100644
index 0000000..68fb7dc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/EntityMappings2_1DetailsProvider.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.internal.jpa2_1.details.orm;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.jpa.ui.details.JpaDetailsPageManager;
+import org.eclipse.jpt.jpa.ui.details.JpaDetailsProvider;
+import org.eclipse.jpt.jpa.ui.internal.details.AbstractEntityMappingsDetailsProvider;
+import org.eclipse.swt.widgets.Composite;
+
+public class EntityMappings2_1DetailsProvider
+ extends AbstractEntityMappingsDetailsProvider
+{
+ // singleton
+ private static final JpaDetailsProvider INSTANCE = new EntityMappings2_1DetailsProvider();
+
+
+ /**
+ * Return the singleton
+ */
+ public static JpaDetailsProvider instance() {
+ return INSTANCE;
+ }
+
+
+ /**
+ * Enforce singleton usage
+ */
+ private EntityMappings2_1DetailsProvider() {
+ super();
+ }
+
+
+ public JpaDetailsPageManager buildDetailsPageManager(Composite parent, WidgetFactory widgetFactory, ResourceManager resourceManager) {
+ return new EntityMappingsDetailsPageManager2_1(parent, widgetFactory, resourceManager);
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/EntityMappingsDetailsPageManager2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/EntityMappingsDetailsPageManager2_1.java
new file mode 100644
index 0000000..fa6b8f8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/EntityMappingsDetailsPageManager2_1.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.internal.jpa2_1.details.orm;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.jpa.ui.internal.details.orm.AbstractEntityMappingsDetailsPageManager;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.details.orm.EntityMappingsGenerators2_0Composite;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.Queries2_1Composite;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class EntityMappingsDetailsPageManager2_1
+ extends AbstractEntityMappingsDetailsPageManager
+{
+
+ protected EntityMappingsDetailsPageManager2_1(Composite parent, WidgetFactory widgetFactory, ResourceManager resourceManager) {
+ super(parent, widgetFactory, resourceManager);
+ }
+
+ @Override
+ protected Control initializeGeneratorsSection(Composite container) {
+ return new EntityMappingsGenerators2_0Composite(this, container).getControl();
+ }
+
+ @Override
+ protected Control initializeQueriesSection(Composite container) {
+ return new Queries2_1Composite(this, this.buildQueryContainerHolder(), container).getControl();
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/GenericOrmXml2_1UiFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/GenericOrmXml2_1UiFactory.java
new file mode 100644
index 0000000..46e9691
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/GenericOrmXml2_1UiFactory.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.internal.jpa2_1.details.orm;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.core.context.Entity;
+import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmEntity2_0;
+import org.eclipse.jpt.jpa.ui.details.JpaComposite;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.GenericOrmXml2_0UiFactory;
+import org.eclipse.jpt.jpa.ui.jpa2_1.details.JpaUiFactory2_1;
+import org.eclipse.swt.widgets.Composite;
+
+public class GenericOrmXml2_1UiFactory
+ extends GenericOrmXml2_0UiFactory
+ implements JpaUiFactory2_1
+{
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JpaComposite createEntityComposite(
+ PropertyValueModel<? extends Entity> entityModel,
+ Composite parentComposite,
+ WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ return new OrmEntity2_1Composite((PropertyValueModel<? extends OrmEntity2_0>) entityModel, parentComposite, widgetFactory, resourceManager);
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/OrmEntity2_1Composite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/OrmEntity2_1Composite.java
new file mode 100644
index 0000000..172887c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/details/orm/OrmEntity2_1Composite.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.internal.jpa2_1.details.orm;
+
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jpt.common.ui.WidgetFactory;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmEntity2_0;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.details.orm.OrmEntity2_0Composite;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.details.Queries2_1Composite;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class OrmEntity2_1Composite
+ extends OrmEntity2_0Composite
+{
+
+ public OrmEntity2_1Composite(
+ PropertyValueModel<? extends OrmEntity2_0> entityModel,
+ Composite parentComposite, WidgetFactory widgetFactory,
+ ResourceManager resourceManager) {
+ super(entityModel, parentComposite, widgetFactory, resourceManager);
+ }
+
+ @Override
+ protected Control initializeQueriesSection(Composite container) {
+ return new Queries2_1Composite(this, this.buildQueryContainerModel(), container).getControl();
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/platform/generic/Generic2_1JpaPlatformUiFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/platform/generic/Generic2_1JpaPlatformUiFactory.java
index cbf19cc..36db08e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/platform/generic/Generic2_1JpaPlatformUiFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2_1/platform/generic/Generic2_1JpaPlatformUiFactory.java
@@ -1,17 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 Oracle. All rights reserved.
+ * Copyright (c) 2013 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.jpa.ui.internal.jpa2.platform.generic;
+package org.eclipse.jpt.jpa.ui.internal.jpa2_1.platform.generic;
import org.eclipse.jpt.jpa.ui.JpaPlatformUi;
import org.eclipse.jpt.jpa.ui.JpaPlatformUiFactory;
-import org.eclipse.jpt.jpa.ui.internal.jpa2.Generic2_1JpaPlatformUiProvider;
+import org.eclipse.jpt.jpa.ui.internal.jpa2_1.Generic2_1JpaPlatformUiProvider;
import org.eclipse.jpt.jpa.ui.internal.platform.generic.GenericJpaPlatformUi;
import org.eclipse.jpt.jpa.ui.internal.platform.generic.GenericJpaPlatformUiFactory;
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/jpa2_1/details/JpaUiFactory2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/jpa2_1/details/JpaUiFactory2_1.java
new file mode 100644
index 0000000..1aa356e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/jpa2_1/details/JpaUiFactory2_1.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.jpa2_1.details;
+
+import org.eclipse.jpt.jpa.ui.jpa2.details.JpaUiFactory2_0;
+
+public interface JpaUiFactory2_1
+ extends JpaUiFactory2_0
+{
+ // nothing
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/jpa2_1/details/JptJpaUiDetailsMessages2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/jpa2_1/details/JptJpaUiDetailsMessages2_1.java
new file mode 100644
index 0000000..96ddd90
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/jpa2_1/details/JptJpaUiDetailsMessages2_1.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.jpa.ui.jpa2_1.details;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Localized messages used by Dali JPA 2.1 UI details view.
+ */
+public class JptJpaUiDetailsMessages2_1
+{
+ private static final String BUNDLE_NAME = "jpt_jpa_ui_details2_1"; //$NON-NLS-1$
+ private static final Class<?> BUNDLE_CLASS = JptJpaUiDetailsMessages2_1.class;
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, BUNDLE_CLASS);
+ }
+
+ public static String AddQueryDialog_namedStoredProcedureQuery;
+
+
+ private JptJpaUiDetailsMessages2_1() {
+ throw new UnsupportedOperationException();
+ }
+
+} \ No newline at end of file
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1Tests.java
index 131db4c..0d20a1a 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1Tests.java
@@ -17,9 +17,9 @@ import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.utility.internal.iterator.IteratorTools;
import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.QueryHint;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.NamedStoredProcedureQuery2_1;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.StoredProcedureParameter2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.NamedStoredProcedureQuery2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.context.QueryContainer2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.JPA2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.NamedStoredProcedureQuery2_1Annotation;
import org.eclipse.jpt.jpa.core.resource.java.JPA;
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2_1/context/java/GenericJavaStoredProcedureParameter2_1Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2_1/context/java/GenericJavaStoredProcedureParameter2_1Tests.java
index 95ce490..e761737 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2_1/context/java/GenericJavaStoredProcedureParameter2_1Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2_1/context/java/GenericJavaStoredProcedureParameter2_1Tests.java
@@ -15,9 +15,9 @@ import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.As
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.utility.internal.iterator.IteratorTools;
import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.internal.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.ParameterMode2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.context.QueryContainer2_1;
+import org.eclipse.jpt.jpa.core.jpa2_1.context.StoredProcedureParameter2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.JPA2_1;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.NamedStoredProcedureQuery2_1Annotation;
import org.eclipse.jpt.jpa.core.jpa2_1.resource.java.ParameterMode_2_1;