Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornhauge2011-10-19 17:44:04 +0000
committernhauge2011-10-19 17:44:04 +0000
commitc59fbcfab6a1542bafa6521dfa15fa5bc647abfa (patch)
tree5002c3ee122234884a9f470b26bbe79641781ee0 /jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal
parent2bcab6712a665d9d0d0e2dce0fcb5f4a8c83b6e4 (diff)
downloadwebtools.dali-c59fbcfab6a1542bafa6521dfa15fa5bc647abfa.tar.gz
webtools.dali-c59fbcfab6a1542bafa6521dfa15fa5bc647abfa.tar.xz
webtools.dali-c59fbcfab6a1542bafa6521dfa15fa5bc647abfa.zip
[335596] named query support on mapped superclasses (where applicable). Patch from Nan.
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal')
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java
index 1aeed2eb1b..c13b63e159 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java
@@ -17,7 +17,9 @@ import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
import org.eclipse.jpt.jpa.core.context.AttributeMapping;
+import org.eclipse.jpt.jpa.core.context.Query;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmMappedSuperclass;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheable2_0;
@@ -59,6 +61,7 @@ public class OrmEclipseLinkMappedSuperclassImpl
protected final OrmEclipseLinkMultitenancy2_3 multitenancy;
+ protected final OrmQueryContainer queryContainer;
public OrmEclipseLinkMappedSuperclassImpl(OrmPersistentType parent, XmlMappedSuperclass xmlMappedSuperclass) {
super(parent, xmlMappedSuperclass);
@@ -68,6 +71,7 @@ public class OrmEclipseLinkMappedSuperclassImpl
this.changeTracking = this.buildChangeTracking();
this.customizer = this.buildCustomizer();
this.multitenancy = this.buildMultitenancy();
+ this.queryContainer = this.buildQueryContainer();
}
@@ -82,6 +86,7 @@ public class OrmEclipseLinkMappedSuperclassImpl
this.changeTracking.synchronizeWithResourceModel();
this.customizer.synchronizeWithResourceModel();
this.multitenancy.synchronizeWithResourceModel();
+ this.queryContainer.synchronizeWithResourceModel();
}
@Override
@@ -93,6 +98,7 @@ public class OrmEclipseLinkMappedSuperclassImpl
this.changeTracking.update();
this.customizer.update();
this.multitenancy.update();
+ this.queryContainer.update();
}
@@ -184,6 +190,21 @@ public class OrmEclipseLinkMappedSuperclassImpl
return JptJpaEclipseLinkCorePlugin.nodeIsEclipseLink2_3Compatible(this);
}
+ // ********** query container **********
+
+ public OrmQueryContainer getQueryContainer() {
+ return this.queryContainer;
+ }
+
+ protected OrmQueryContainer buildQueryContainer() {
+ return this.getContextNodeFactory().buildOrmQueryContainer(this, this.xmlTypeMapping);
+ }
+
+ @Override
+ public Iterable<Query> getQueries() {
+ return this.queryContainer.getQueries();
+ }
+
public boolean isMultitenantMetadataAllowed() {
return true;
}

Back to the top