Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2008-08-27 19:16:41 +0000
committerkmoore2008-08-27 19:16:41 +0000
commitdefff68a0979ac031b2296508541d16dac4ecfed (patch)
treefdeb1c8278a8526821c7a126078e0c60bc475698 /jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org
parent5786ce147ab2096243f26c878d5ac95b242a9bcb (diff)
downloadwebtools.dali-defff68a0979ac031b2296508541d16dac4ecfed.tar.gz
webtools.dali-defff68a0979ac031b2296508541d16dac4ecfed.tar.xz
webtools.dali-defff68a0979ac031b2296508541d16dac4ecfed.zip
bug 239137 - adding caching support to EclispeLinkMappedSuperclass
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org')
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/EclipseLinkJpaFactory.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/EclipseLinkMappedSuperclass.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/java/EclipseLinkJavaMappedSuperclass.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/EclipseLinkJpaFactoryImpl.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/java/EclipseLinkJavaMappedSuperclassImpl.java61
5 files changed, 144 insertions, 3 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/EclipseLinkJpaFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/EclipseLinkJpaFactory.java
index 575ed1acad..ee231b56d8 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/EclipseLinkJpaFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/EclipseLinkJpaFactory.java
@@ -14,6 +14,7 @@ import org.eclipse.jpt.core.context.java.JavaPersistentType;
import org.eclipse.jpt.core.context.java.JavaTypeMapping;
import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaCaching;
import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaEntity;
+import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaMappedSuperclass;
/**
* Use EclipseLinkJpaFactory to create any EclispeLink specific
@@ -29,9 +30,14 @@ import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaEntity;
* @since 2.1
*/
public interface EclipseLinkJpaFactory extends JpaFactory
-{
-
+{
+ EclipseLinkJavaCaching buildEclipseLinkJavaCaching(JavaTypeMapping parent);
+
+
+ //********* covariant overrides ***********
+
EclipseLinkJavaEntity buildJavaEntity(JavaPersistentType parent);
- EclipseLinkJavaCaching buildEclipseLinkJavaCaching(JavaTypeMapping parent);
+ EclipseLinkJavaMappedSuperclass buildJavaMappedSuperclass(JavaPersistentType parent);
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/EclipseLinkMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/EclipseLinkMappedSuperclass.java
new file mode 100644
index 0000000000..13987e8d1e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/EclipseLinkMappedSuperclass.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.eclipselink.core.context;
+
+import org.eclipse.jpt.core.context.MappedSuperclass;
+
+/**
+ *
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.1
+ * @since 2.1
+ */
+public interface EclipseLinkMappedSuperclass extends MappedSuperclass
+{
+ EclipseLinkCaching getCaching();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/java/EclipseLinkJavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/java/EclipseLinkJavaMappedSuperclass.java
new file mode 100644
index 0000000000..6445310e7f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/java/EclipseLinkJavaMappedSuperclass.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.eclipselink.core.context.java;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.context.java.JavaMappedSuperclass;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.eclipselink.core.context.EclipseLinkMappedSuperclass;
+
+/**
+ *
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.1
+ * @since 2.1
+ */
+public interface EclipseLinkJavaMappedSuperclass extends EclipseLinkMappedSuperclass, JavaMappedSuperclass
+{
+ EclipseLinkJavaCaching getCaching();
+
+
+ //********* covariant overrides ***********
+
+ Iterator<JavaPersistentAttribute> overridableAttributes();
+ Iterator<JavaPersistentAttribute> overridableAssociations();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/EclipseLinkJpaFactoryImpl.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/EclipseLinkJpaFactoryImpl.java
index 8212e2b8cb..d9d26075c9 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/EclipseLinkJpaFactoryImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/EclipseLinkJpaFactoryImpl.java
@@ -21,9 +21,11 @@ import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
import org.eclipse.jpt.eclipselink.core.EclipseLinkJpaFactory;
import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaCaching;
import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaEntity;
+import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaMappedSuperclass;
import org.eclipse.jpt.eclipselink.core.internal.context.EclipseLinkPersistenceUnit;
import org.eclipse.jpt.eclipselink.core.internal.context.java.EclipseLinkJavaCachingImpl;
import org.eclipse.jpt.eclipselink.core.internal.context.java.EclipseLinkJavaEntityImpl;
+import org.eclipse.jpt.eclipselink.core.internal.context.java.EclipseLinkJavaMappedSuperclassImpl;
import org.eclipse.jpt.eclipselink.core.resource.elorm.EclipseLinkOrmResourceModel;
public class EclipseLinkJpaFactoryImpl extends GenericJpaFactory implements EclipseLinkJpaFactory
@@ -42,6 +44,11 @@ public class EclipseLinkJpaFactoryImpl extends GenericJpaFactory implements Ecli
return new EclipseLinkJavaEntityImpl(parent);
}
+ @Override
+ public EclipseLinkJavaMappedSuperclass buildJavaMappedSuperclass(JavaPersistentType parent) {
+ return new EclipseLinkJavaMappedSuperclassImpl(parent);
+ }
+
public EclipseLinkJavaCaching buildEclipseLinkJavaCaching(JavaTypeMapping parent) {
return new EclipseLinkJavaCachingImpl(parent);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/java/EclipseLinkJavaMappedSuperclassImpl.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/java/EclipseLinkJavaMappedSuperclassImpl.java
new file mode 100644
index 0000000000..f745d99f86
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/java/EclipseLinkJavaMappedSuperclassImpl.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.eclipselink.core.internal.context.java;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.internal.context.java.GenericJavaMappedSuperclass;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.eclipselink.core.EclipseLinkJpaFactory;
+import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaCaching;
+import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaMappedSuperclass;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public class EclipseLinkJavaMappedSuperclassImpl extends GenericJavaMappedSuperclass implements EclipseLinkJavaMappedSuperclass
+{
+ protected EclipseLinkJavaCaching eclipseLinkCaching;
+
+ public EclipseLinkJavaMappedSuperclassImpl(JavaPersistentType parent) {
+ super(parent);
+ this.eclipseLinkCaching = getJpaFactory().buildEclipseLinkJavaCaching(this);
+ }
+
+
+ public EclipseLinkJavaCaching getCaching() {
+ return this.eclipseLinkCaching;
+ }
+
+ @Override
+ protected EclipseLinkJpaFactory getJpaFactory() {
+ return (EclipseLinkJpaFactory) super.getJpaFactory();
+ }
+
+
+ @Override
+ public void update(JavaResourcePersistentType resourcePersistentType) {
+ super.update(resourcePersistentType);
+ this.eclipseLinkCaching.update(resourcePersistentType);
+ }
+
+ @Override
+ public void initialize(JavaResourcePersistentType resourcePersistentType) {
+ super.initialize(resourcePersistentType);
+ this.eclipseLinkCaching.initialize(resourcePersistentType);
+ }
+
+ //********** Validation ********************************************
+
+ @Override
+ public void addToMessages(List<IMessage> messages, CompilationUnit astRoot) {
+ super.addToMessages(messages, astRoot);
+ getCaching().addToMessages(messages, astRoot);
+ }
+}

Back to the top