From 13af6cc28bb36543d57f9970304d7c7e3545e478 Mon Sep 17 00:00:00 2001
From: pfullbright
Date: Wed, 30 May 2007 20:39:03 +0000
Subject: bug 186031 - fixed orderBy for xml
---
jpa/plugins/org.eclipse.jpt.core/model/core.ecore | 22 +-
.../org.eclipse.jpt.core/model/coreModels.genmodel | 20 +-
jpa/plugins/org.eclipse.jpt.core/model/java.ecore | 1 -
jpa/plugins/org.eclipse.jpt.core/model/orm.ecore | 3 -
.../internal/content/java/JavaPersistentType.java | 3 +-
.../mappings/JavaMultiRelationshipMapping.java | 291 ++++++++++----
.../content/java/mappings/JavaOrderBy.java | 437 ---------------------
.../java/mappings/JpaJavaMappingsFactory.java | 11 -
.../java/mappings/JpaJavaMappingsPackage.java | 118 ++----
.../util/JpaJavaMappingsAdapterFactory.java | 40 --
.../java/mappings/util/JpaJavaMappingsSwitch.java | 49 ---
.../jpt/core/internal/content/orm/OrmFactory.java | 12 -
.../jpt/core/internal/content/orm/OrmPackage.java | 205 ++--------
.../jpt/core/internal/content/orm/XmlEmbedded.java | 2 -
.../orm/XmlMultiRelationshipMappingForXml.java | 27 --
.../orm/XmlMultiRelationshipMappingInternal.java | 235 ++++++-----
.../jpt/core/internal/content/orm/XmlOrderBy.java | 327 ---------------
.../content/orm/resource/ManyToManyTranslator.java | 1 -
.../orm/resource/MultiRelationshipTranslator.java | 18 +-
.../content/orm/resource/OneToManyTranslator.java | 1 -
.../content/orm/resource/OrderByRefTranslator.java | 79 ----
.../content/orm/resource/OrderByTranslator.java | 20 +
.../content/orm/util/OrmAdapterFactory.java | 40 --
.../core/internal/content/orm/util/OrmSwitch.java | 51 ---
.../internal/mappings/IAbstractJoinColumn.java | 5 +-
.../jpt/core/internal/mappings/IJoinColumn.java | 1 -
.../mappings/IMultiRelationshipMapping.java | 83 +++-
.../jpt/core/internal/mappings/IOrderBy.java | 90 -----
.../core/internal/mappings/ISecondaryTable.java | 1 +
.../internal/mappings/JpaCoreMappingsFactory.java | 25 --
.../internal/mappings/JpaCoreMappingsPackage.java | 272 +++----------
.../util/JpaCoreMappingsAdapterFactory.java | 20 -
.../mappings/util/JpaCoreMappingsSwitch.java | 27 --
.../JavaMultiRelationshipMappingContext.java | 1 -
.../XmlMultiRelationshipMappingContext.java | 1 -
35 files changed, 583 insertions(+), 1956 deletions(-)
delete mode 100644 jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOrderBy.java
delete mode 100644 jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlOrderBy.java
delete mode 100644 jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrderByRefTranslator.java
create mode 100644 jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrderByTranslator.java
delete mode 100644 jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IOrderBy.java
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/core.ecore b/jpa/plugins/org.eclipse.jpt.core/model/core.ecore
index 0a9e3d5bae..3f2f839fea 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/core.ecore
+++ b/jpa/plugins/org.eclipse.jpt.core/model/core.ecore
@@ -304,11 +304,19 @@
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel b/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel
index 9c2f77885c..13b24dc6e9 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel
+++ b/jpa/plugins/org.eclipse.jpt.core/model/coreModels.genmodel
@@ -146,11 +146,6 @@
-
-
-
-
-
@@ -278,11 +273,15 @@
+
-
+
+
+
+
+
@@ -372,10 +371,6 @@
-
-
-
-
@@ -462,7 +457,6 @@
-
@@ -550,7 +544,6 @@
-
@@ -639,7 +632,6 @@
-
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/java.ecore b/jpa/plugins/org.eclipse.jpt.core/model/java.ecore
index 0f8e20fc21..7c3425fe7a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/java.ecore
+++ b/jpa/plugins/org.eclipse.jpt.core/model/java.ecore
@@ -77,7 +77,6 @@
-
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore b/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
index 113446be18..f6cafd0a04 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
+++ b/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
@@ -126,8 +126,6 @@
interface="true">
-
@@ -264,7 +262,6 @@
-
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JavaPersistentType.java
index c037a2f862..50b81df365 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JavaPersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JavaPersistentType.java
@@ -52,7 +52,6 @@ import org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationship
import org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMappingProvider;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator;
@@ -230,10 +229,10 @@ public class JavaPersistentType extends JavaEObject implements IPersistentType
adapters.add(JavaBasic.LOB_ADAPTER);
adapters.add(JavaManyToMany.DECLARATION_ANNOTATION_ADAPTER);
adapters.add(JavaManyToOne.DECLARATION_ANNOTATION_ADAPTER);
+ adapters.add(JavaMultiRelationshipMapping.ORDER_BY_ADAPTER);
adapters.add(JavaMultiRelationshipMapping.MAP_KEY_ADAPTER);
adapters.add(JavaOneToMany.DECLARATION_ANNOTATION_ADAPTER);
adapters.add(JavaOneToOne.DECLARATION_ANNOTATION_ADAPTER);
- adapters.add(JavaOrderBy.DECLARATION_ANNOTATION_ADAPTER);
adapters.add(JavaPrimaryKeyJoinColumn.MULTIPLE_DECLARATION_ANNOTATION_ADAPTER);
adapters.add(JavaPrimaryKeyJoinColumn.SINGLE_DECLARATION_ANNOTATION_ADAPTER); // PrimaryKeyJoinColumns
adapters.add(JavaSequenceGenerator.DECLARATION_ANNOTATION_ADAPTER);
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMultiRelationshipMapping.java
index 557f9e6d66..c843c474e6 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMultiRelationshipMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMultiRelationshipMapping.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.ITextRange;
import org.eclipse.jpt.core.internal.ITypeMapping;
@@ -29,12 +30,13 @@ import org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationAdapter;
import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType;
+import org.eclipse.jpt.core.internal.mappings.IEntity;
import org.eclipse.jpt.core.internal.mappings.IJoinTable;
import org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping;
import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
-import org.eclipse.jpt.core.internal.mappings.IOrderBy;
import org.eclipse.jpt.core.internal.mappings.ITable;
import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
+import org.eclipse.jpt.core.internal.platform.DefaultsContext;
import org.eclipse.jpt.utility.internal.Filter;
import org.eclipse.jpt.utility.internal.StringTools;
import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
@@ -72,7 +74,25 @@ public abstract class JavaMultiRelationshipMapping
*/
protected String mappedBy = MAPPED_BY_EDEFAULT;
- private final AnnotationElementAdapter mappedByAdapter;
+ /**
+ * The default value of the '{@link #getOrderBy() Order By}' attribute.
+ *
+ *
+ * @see #getOrderBy()
+ * @generated
+ * @ordered
+ */
+ protected static final String ORDER_BY_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getOrderBy() Order By}' attribute.
+ *
+ *
+ * @see #getOrderBy()
+ * @generated
+ * @ordered
+ */
+ protected String orderBy = ORDER_BY_EDEFAULT;
/**
* The default value of the '{@link #getFetch() Fetch}' attribute.
@@ -104,16 +124,6 @@ public abstract class JavaMultiRelationshipMapping
*/
protected IJoinTable joinTable;
- /**
- * The cached value of the '{@link #getOrderBy() Order By}' containment reference.
- *
- *
- * @see #getOrderBy()
- * @generated
- * @ordered
- */
- protected IOrderBy orderBy;
-
/**
* The default value of the '{@link #getMapKey() Map Key}' attribute.
*
@@ -134,6 +144,22 @@ public abstract class JavaMultiRelationshipMapping
*/
protected String mapKey = MAP_KEY_EDEFAULT;
+ private final AnnotationElementAdapter mappedByAdapter;
+
+ /*
+ * The @OrderBy annotation is a bit wack:
+ * - no annotation at all means "no ordering"
+ * - an annotation with no 'value' means "order by ascending primary key"
+ * - an annotation with a 'value' means "order by the settings in the 'value' string"
+ */
+ private final AnnotationAdapter orderByAnnotationAdapter;
+
+ private final AnnotationElementAdapter orderByValueAdapter;
+
+ public static final DeclarationAnnotationAdapter ORDER_BY_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ORDER_BY);
+
+ private static final DeclarationAnnotationElementAdapter ORDER_BY_VALUE_ADAPTER = buildOrderByValueAdapter();
+
private final AnnotationAdapter mapKeyAnnotationAdapter;
private final AnnotationElementAdapter mapKeyNameAdapter;
@@ -149,18 +175,51 @@ public abstract class JavaMultiRelationshipMapping
protected JavaMultiRelationshipMapping(Attribute attribute) {
super(attribute);
this.mappedByAdapter = this.buildAnnotationElementAdapter(this.mappedByAdapter());
+ this.orderByAnnotationAdapter = new MemberAnnotationAdapter(attribute, ORDER_BY_ADAPTER);
+ this.orderByValueAdapter = new ShortCircuitAnnotationElementAdapter(attribute, ORDER_BY_VALUE_ADAPTER);
this.mapKeyAnnotationAdapter = new MemberAnnotationAdapter(attribute, MAP_KEY_ADAPTER);
this.mapKeyNameAdapter = new ShortCircuitAnnotationElementAdapter(attribute, MAP_KEY_NAME_ADAPTER);
this.joinTable = JpaJavaMappingsFactory.eINSTANCE.createJavaJoinTable(buildOwner(), attribute);
((InternalEObject) this.joinTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, null, null);
- this.orderBy = JpaJavaMappingsFactory.eINSTANCE.createJavaOrderBy(attribute);
- ((InternalEObject) this.orderBy).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY, null, null);
}
+ /**
+ * return the Java adapter's 'mappedBy' element adapter config
+ */
+ protected abstract DeclarationAnnotationElementAdapter mappedByAdapter();
+
@Override
protected void notifyChanged(Notification notification) {
super.notifyChanged(notification);
+ switch (notification.getFeatureID(INonOwningMapping.class)) {
+ case JpaCoreMappingsPackage.INON_OWNING_MAPPING__MAPPED_BY :
+ this.mappedByAdapter.setValue((String) notification.getNewValue());
+ break;
+ default :
+ break;
+ }
switch (notification.getFeatureID(IMultiRelationshipMapping.class)) {
+ case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY :
+ String orderBy = (String) notification.getNewValue();
+ if (orderBy == null) {
+ this.orderByAnnotationAdapter.removeAnnotation();
+ }
+ else if ("".equals(orderBy)) {
+ Annotation orderByAnnotation = this.orderByAnnotationAdapter.getAnnotation();
+ if (orderByAnnotation != null) {
+ // if the value is already "", then leave it alone (short circuit java change cycle)
+ if (!"".equals(orderByValueAdapter.getValue())) {
+ this.orderByValueAdapter.setValue(null);
+ }
+ }
+ else {
+ this.orderByAnnotationAdapter.newMarkerAnnotation();
+ }
+ }
+ else {
+ this.orderByValueAdapter.setValue(orderBy);
+ }
+ break;
case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__MAP_KEY :
String mk = (String) notification.getNewValue();
if (mk == null) {
@@ -176,13 +235,6 @@ public abstract class JavaMultiRelationshipMapping
default :
break;
}
- switch (notification.getFeatureID(INonOwningMapping.class)) {
- case JpaCoreMappingsPackage.INON_OWNING_MAPPING__MAPPED_BY :
- this.mappedByAdapter.setValue((String) notification.getNewValue());
- break;
- default :
- break;
- }
}
private ITable.Owner buildOwner() {
@@ -197,11 +249,6 @@ public abstract class JavaMultiRelationshipMapping
};
}
- /**
- * return the Java adapter's 'mappedBy' element adapter config
- */
- protected abstract DeclarationAnnotationElementAdapter mappedByAdapter();
-
/**
*
*
@@ -245,6 +292,89 @@ public abstract class JavaMultiRelationshipMapping
eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY, oldMappedBy, mappedBy));
}
+ /**
+ * Returns the value of the 'Order By' attribute.
+ *
+ *
+ * If the meaning of the 'Order By' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Order By' attribute.
+ * @see #setOrderBy(String)
+ * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIMultiRelationshipMapping_OrderBy()
+ * @model unique="false" ordered="false"
+ * @generated
+ */
+ public String getOrderBy() {
+ return orderBy;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping#getOrderBy Order By}' attribute.
+ *
+ *
+ * @param value the new value of the 'Order By' attribute.
+ * @see #getOrderBy()
+ * @generated
+ */
+ public void setOrderBy(String newOrderBy) {
+ String oldOrderBy = orderBy;
+ orderBy = newOrderBy;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY, oldOrderBy, orderBy));
+ }
+
+ /**
+ *
+ *
+ * @model kind="operation" unique="false" required="true" ordered="false"
+ * @generated NOT
+ */
+ public boolean isNoOrdering() {
+ return getOrderBy() == null;
+ }
+
+ /**
+ *
+ *
+ * @model
+ * @generated NOT
+ */
+ public void setNoOrdering() {
+ setOrderBy(null);
+ }
+
+ /**
+ *
+ *
+ * @model kind="operation" unique="false" required="true" ordered="false"
+ * @generated NOT
+ */
+ public boolean isOrderByPk() {
+ return "".equals(getOrderBy());
+ }
+
+ /**
+ *
+ *
+ * @model
+ * @generated NOT
+ */
+ public void setOrderByPk() {
+ setOrderBy("");
+ }
+
+ /**
+ *
+ *
+ * @model kind="operation" unique="false" required="true" ordered="false"
+ * @generated NOT
+ */
+ public boolean isCustomOrdering() {
+ return ! StringTools.stringIsEmpty(getOrderBy());
+ }
+
public ITextRange mappedByTextRange() {
return this.elementTextRange(this.mappedByAdapter());
}
@@ -324,41 +454,6 @@ public abstract class JavaMultiRelationshipMapping
return getJavaJoinTable().isSpecified();
}
- /**
- * Returns the value of the 'Order By' containment reference.
- *
- *
- * If the meaning of the 'Order By' reference isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Order By' containment reference.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIMultiRelationshipMapping_OrderBy()
- * @model containment="true" required="true" changeable="false"
- * @generated
- */
- public IOrderBy getOrderBy() {
- return orderBy;
- }
-
- /**
- *
- *
- * @generated
- */
- public NotificationChain basicSetOrderBy(IOrderBy newOrderBy, NotificationChain msgs) {
- IOrderBy oldOrderBy = orderBy;
- orderBy = newOrderBy;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY, oldOrderBy, newOrderBy);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
/**
* Returns the value of the 'Map Key' attribute.
*
@@ -402,8 +497,6 @@ public abstract class JavaMultiRelationshipMapping
switch (featureID) {
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
return basicSetJoinTable(null, msgs);
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- return basicSetOrderBy(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -418,12 +511,12 @@ public abstract class JavaMultiRelationshipMapping
switch (featureID) {
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY :
return getMappedBy();
+ case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
+ return getOrderBy();
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH :
return getFetch();
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
return getJoinTable();
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- return getOrderBy();
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY :
return getMapKey();
}
@@ -441,6 +534,9 @@ public abstract class JavaMultiRelationshipMapping
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY :
setMappedBy((String) newValue);
return;
+ case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
+ setOrderBy((String) newValue);
+ return;
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH :
setFetch((DefaultLazyFetchType) newValue);
return;
@@ -462,6 +558,9 @@ public abstract class JavaMultiRelationshipMapping
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY :
setMappedBy(MAPPED_BY_EDEFAULT);
return;
+ case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
+ setOrderBy(ORDER_BY_EDEFAULT);
+ return;
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH :
setFetch(FETCH_EDEFAULT);
return;
@@ -482,12 +581,12 @@ public abstract class JavaMultiRelationshipMapping
switch (featureID) {
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY :
return MAPPED_BY_EDEFAULT == null ? mappedBy != null : !MAPPED_BY_EDEFAULT.equals(mappedBy);
+ case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
+ return ORDER_BY_EDEFAULT == null ? orderBy != null : !ORDER_BY_EDEFAULT.equals(orderBy);
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH :
return fetch != FETCH_EDEFAULT;
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
return joinTable != null;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- return orderBy != null;
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY :
return MAP_KEY_EDEFAULT == null ? mapKey != null : !MAP_KEY_EDEFAULT.equals(mapKey);
}
@@ -511,12 +610,12 @@ public abstract class JavaMultiRelationshipMapping
}
if (baseClass == IMultiRelationshipMapping.class) {
switch (derivedFeatureID) {
+ case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
+ return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH :
return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__FETCH;
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY :
return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__MAP_KEY;
default :
@@ -543,12 +642,12 @@ public abstract class JavaMultiRelationshipMapping
}
if (baseClass == IMultiRelationshipMapping.class) {
switch (baseFeatureID) {
+ case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY :
+ return JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__FETCH :
return JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH;
case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
return JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
- case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- return JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__MAP_KEY :
return JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY;
default :
@@ -570,6 +669,8 @@ public abstract class JavaMultiRelationshipMapping
StringBuffer result = new StringBuffer(super.toString());
result.append(" (mappedBy: ");
result.append(mappedBy);
+ result.append(", orderBy: ");
+ result.append(orderBy);
result.append(", fetch: ");
result.append(fetch);
result.append(", mapKey: ");
@@ -578,15 +679,53 @@ public abstract class JavaMultiRelationshipMapping
return result.toString();
}
+ public void refreshDefaults(DefaultsContext defaultsContext) {
+ super.refreshDefaults(defaultsContext);
+ // TODO
+ // if (isOrderByPk()) {
+ // refreshDefaultOrderBy(defaultsContext);
+ // }
+ }
+
+ //primary key ordering when just the @OrderBy annotation is present
+ protected void refreshDefaultOrderBy(DefaultsContext defaultsContext) {
+ IEntity targetEntity = getResolvedTargetEntity();
+ if (targetEntity != null) {
+ setOrderBy(targetEntity.primaryKeyAttributeName() + " ASC");
+ }
+ }
+
@Override
public void updateFromJava(CompilationUnit astRoot) {
super.updateFromJava(astRoot);
setMappedBy(this.mappedByAdapter.getValue(astRoot));
- this.getJavaOrderBy().updateFromJava(astRoot);
+ updateOrderByFromJava(astRoot);
this.getJavaJoinTable().updateFromJava(astRoot);
updateMapKeyFromJava(astRoot);
}
+ private void updateOrderByFromJava(CompilationUnit astRoot) {
+ String orderBy = this.orderByValueAdapter.getValue(astRoot);
+ if (orderBy == null) {
+ if (orderByAnnotation(astRoot) == null) {
+ this.setNoOrdering();
+ }
+ else {
+ this.setOrderByPk();
+ }
+ }
+ else if ("".equals(orderBy)) {
+ this.setOrderByPk();
+ }
+ else {
+ this.setOrderBy(orderBy);
+ }
+ }
+
+ private Annotation orderByAnnotation(CompilationUnit astRoot) {
+ return this.orderByAnnotationAdapter.getAnnotation(astRoot);
+ }
+
private void updateMapKeyFromJava(CompilationUnit astRoot) {
this.setMapKey(this.mapKeyNameAdapter.getValue(astRoot));
}
@@ -595,10 +734,6 @@ public abstract class JavaMultiRelationshipMapping
return (JavaJoinTable) this.joinTable;
}
- private JavaOrderBy getJavaOrderBy() {
- return (JavaOrderBy) this.orderBy;
- }
-
@Override
protected void updateFetchFromJava(CompilationUnit astRoot) {
setFetch(DefaultLazyFetchType.fromJavaAnnotationValue(this.getFetchAdapter().getValue(astRoot)));
@@ -666,6 +801,10 @@ public abstract class JavaMultiRelationshipMapping
}
// ********** static methods **********
+ private static DeclarationAnnotationElementAdapter buildOrderByValueAdapter() {
+ return ConversionDeclarationAnnotationElementAdapter.forStrings(ORDER_BY_ADAPTER, JPA.ORDER_BY__VALUE, false);
+ }
+
private static DeclarationAnnotationElementAdapter buildMapKeyNameAdapter() {
return ConversionDeclarationAnnotationElementAdapter.forStrings(MAP_KEY_ADAPTER, JPA.MAP_KEY__NAME, false);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOrderBy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOrderBy.java
deleted file mode 100644
index e26c8a72ef..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOrderBy.java
+++ /dev/null
@@ -1,437 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.NormalAnnotation;
-import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.content.java.JavaEObject;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IEntity;
-import org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.IOrderBy;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.mappings.OrderingType;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- * A representation of the model object 'Java Order By'.
- *
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOrderBy()
- * @model kind="class"
- * @generated
- */
-public class JavaOrderBy extends JavaEObject implements IOrderBy
-{
- /**
- * The default value of the '{@link #getValue() Value}' attribute.
- *
- *
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected static final String VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getValue() Value}' attribute.
- *
- *
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected String value = VALUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getType() Type}' attribute.
- *
- *
- * @see #getType()
- * @generated
- * @ordered
- */
- protected static final OrderingType TYPE_EDEFAULT = OrderingType.NONE;
-
- /**
- * The cached value of the '{@link #getType() Type}' attribute.
- *
- *
- * @see #getType()
- * @generated
- * @ordered
- */
- protected OrderingType type = TYPE_EDEFAULT;
-
- private final Member member;
-
- private final AnnotationAdapter annotationAdapter;
-
- private final AnnotationElementAdapter valueAdapter;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ORDER_BY);
-
- private static final DeclarationAnnotationElementAdapter VALUE_ADAPTER = buildValueAdapter();
-
- protected JavaOrderBy() {
- throw new UnsupportedOperationException("User JavaOrderBy(Member) instead");
- }
-
- protected JavaOrderBy(Member member) {
- super();
- this.member = member;
- this.annotationAdapter = this.buildOrderByAnnotationAdapter();
- this.valueAdapter = new ShortCircuitAnnotationElementAdapter(this.member, VALUE_ADAPTER);
- }
-
- private AnnotationAdapter buildOrderByAnnotationAdapter() {
- return new MemberAnnotationAdapter(this.member, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IOrderBy.class)) {
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__VALUE :
- if (getType() == OrderingType.CUSTOM) {
- this.valueAdapter.setValue((String) notification.getNewValue());
- }
- break;
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__TYPE :
- OrderingType newOrderingType = (OrderingType) notification.getNewValue();
- if (newOrderingType == OrderingType.NONE) {
- if (this.annotationAdapter.getAnnotation() != null) {
- this.annotationAdapter.removeAnnotation();
- }
- }
- else if (newOrderingType == OrderingType.PRIMARY_KEY) {
- Annotation annotation = this.annotationAdapter.getAnnotation();
- if (annotation == null) {
- this.annotationAdapter.newMarkerAnnotation();
- }
- else if (annotation.isNormalAnnotation()) {
- if (((NormalAnnotation) annotation).values().size() != 0) {
- this.annotationAdapter.removeAnnotation();
- this.annotationAdapter.newMarkerAnnotation();
- }
- }
- else if (!annotation.isMarkerAnnotation()) {
- this.annotationAdapter.removeAnnotation();
- this.annotationAdapter.newMarkerAnnotation();
- }
- }
- else if (newOrderingType == OrderingType.CUSTOM) {
- Annotation annotation = this.annotationAdapter.getAnnotation();
- if (annotation == null) {
- this.annotationAdapter.newSingleMemberAnnotation();
- this.valueAdapter.setValue(getValue());
- }
- else if (!annotation.isSingleMemberAnnotation()) {
- this.annotationAdapter.removeAnnotation();
- this.annotationAdapter.newSingleMemberAnnotation();
- this.valueAdapter.setValue(getValue());
- }
- }
- else {
- throw new IllegalStateException("unknown 'orderBy' type: " + newOrderingType);
- }
- break;
- default :
- break;
- }
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_ORDER_BY;
- }
-
- /**
- * Returns the value of the 'Value' attribute.
- *
- *
- * If the meaning of the 'Value' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Value' attribute.
- * @see #setValue(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIOrderBy_Value()
- * @model
- * @generated
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy#getValue Value}' attribute.
- *
- *
- * @param value the new value of the 'Value' attribute.
- * @see #getValue()
- * @generated
- */
- public void setValue(String newValue) {
- String oldValue = value;
- value = newValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ORDER_BY__VALUE, oldValue, value));
- }
-
- /**
- * Returns the value of the 'Type' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.OrderingType}.
- *
- *
- * If the meaning of the 'Type' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Type' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.OrderingType
- * @see #setType(OrderingType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIOrderBy_Type()
- * @model
- * @generated
- */
- public OrderingType getType() {
- return type;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy#getType Type}' attribute.
- *
- *
- * @param value the new value of the 'Type' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.OrderingType
- * @see #getType()
- * @generated
- */
- public void setType(OrderingType newType) {
- OrderingType oldType = type;
- type = newType == null ? TYPE_EDEFAULT : newType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ORDER_BY__TYPE, oldType, type));
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__VALUE :
- return getValue();
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__TYPE :
- return getType();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__VALUE :
- setValue((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__TYPE :
- setType((OrderingType) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__VALUE :
- setValue(VALUE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__TYPE :
- setType(TYPE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__VALUE :
- return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__TYPE :
- return type != TYPE_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
- if (baseClass == IOrderBy.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__VALUE :
- return JpaCoreMappingsPackage.IORDER_BY__VALUE;
- case JpaJavaMappingsPackage.JAVA_ORDER_BY__TYPE :
- return JpaCoreMappingsPackage.IORDER_BY__TYPE;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class> baseClass) {
- if (baseClass == IOrderBy.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IORDER_BY__VALUE :
- return JpaJavaMappingsPackage.JAVA_ORDER_BY__VALUE;
- case JpaCoreMappingsPackage.IORDER_BY__TYPE :
- return JpaJavaMappingsPackage.JAVA_ORDER_BY__TYPE;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (value: ");
- result.append(value);
- result.append(", type: ");
- result.append(type);
- result.append(')');
- return result.toString();
- }
-
- private IMultiRelationshipMapping multiRelationshipMapping() {
- return (IMultiRelationshipMapping) eContainer();
- }
-
- public void refreshDefaults(DefaultsContext defaultsContext) {
- if (getType() == OrderingType.PRIMARY_KEY) {
- refreshValue(defaultsContext);
- }
- }
-
- //primary key ordering when just the @OrderBy annotation is present
- protected void refreshValue(DefaultsContext defaultsContext) {
- IEntity targetEntity = multiRelationshipMapping().getResolvedTargetEntity();
- if (targetEntity != null) {
- setValue(targetEntity.primaryKeyAttributeName() + " ASC");
- }
- }
-
- /*
- * The @OrderBy annotation is a bit wack:
- * - no annotation at all means "no ordering"
- * - an annotation with no 'value' means "order by ascending primary key"
- * - an annotation with a 'value' means "order by the settings in the 'value' string"
- */
- public void updateFromJava(CompilationUnit astRoot) {
- Annotation annotation = annotation(astRoot);
- if (annotation == null) {
- setType(OrderingType.NONE);
- }
- else if (annotation.isMarkerAnnotation()) {
- setType(OrderingType.PRIMARY_KEY);
- }
- else if (annotation.isSingleMemberAnnotation()) {
- setType(OrderingType.CUSTOM);
- }
- else if (annotation.isNormalAnnotation()) {
- if (((NormalAnnotation) annotation).values().size() == 0) {
- // an empty normal annotation is treated the same as a marker annotation
- setType(OrderingType.PRIMARY_KEY);
- }
- else {
- setType(OrderingType.CUSTOM);
- }
- }
- else {
- throw new IllegalStateException("unknown annotation type: " + annotation);
- }
- setValue(this.valueAdapter.getValue(astRoot));
- }
-
- /**
- * allow owners to verify the annotation
- */
- public Annotation annotation(CompilationUnit astRoot) {
- return this.annotationAdapter.getAnnotation(astRoot);
- }
-
- //******** IJpaSourceObject implementation *********/
- public ITextRange validationTextRange() {
- return this.member.annotationTextRange(DECLARATION_ANNOTATION_ADAPTER);
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter buildValueAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.ORDER_BY__VALUE, false);
- }
-} // JavaOrderBy
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsFactory.java
index 6c7a045177..cd845074d4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsFactory.java
@@ -138,8 +138,6 @@ public class JpaJavaMappingsFactory extends EFactoryImpl
return createJavaTableGenerator();
case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR :
return createJavaSequenceGenerator();
- case JpaJavaMappingsPackage.JAVA_ORDER_BY :
- return createJavaOrderBy();
case JpaJavaMappingsPackage.JAVA_NAMED_QUERY :
return createJavaNamedQuery();
case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY :
@@ -373,10 +371,6 @@ public class JpaJavaMappingsFactory extends EFactoryImpl
throw new UnsupportedOperationException("Use createJavaSequenceGenerator(Member) instead");
}
- public JavaOrderBy createJavaOrderBy() {
- throw new UnsupportedOperationException("Use createJavaOrderBy(Member) instead");
- }
-
public JavaNamedQuery createJavaNamedQuery() {
throw new UnsupportedOperationException("Use createJavaNamedQuery(Member, IndexedDeclarationAnnotationAdapter) instead");
}
@@ -422,11 +416,6 @@ public class JpaJavaMappingsFactory extends EFactoryImpl
return javaQueryHint;
}
- public JavaOrderBy createJavaOrderBy(Member member) {
- JavaOrderBy javaOrderBy = new JavaOrderBy(member);
- return javaOrderBy;
- }
-
public JavaSequenceGenerator createJavaSequenceGenerator(Member member) {
JavaSequenceGenerator javaSequenceGenerator = new JavaSequenceGenerator(member);
return javaSequenceGenerator;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java
index 68d20ef27d..da4c6465bf 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java
@@ -1221,31 +1221,31 @@ public class JpaJavaMappingsPackage extends EPackageImpl
public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
/**
- * The feature id for the 'Fetch' attribute.
+ * The feature id for the 'Order By' attribute.
*
*
* @generated
* @ordered
*/
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
+ public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
/**
- * The feature id for the 'Join Table' containment reference.
+ * The feature id for the 'Fetch' attribute.
*
*
* @generated
* @ordered
*/
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
+ public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
/**
- * The feature id for the 'Order By' containment reference.
+ * The feature id for the 'Join Table' containment reference.
*
*
* @generated
* @ordered
*/
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
+ public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
/**
* The feature id for the 'Map Key' attribute.
@@ -1330,31 +1330,31 @@ public class JpaJavaMappingsPackage extends EPackageImpl
public static final int JAVA_ONE_TO_MANY__MAPPED_BY = JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
/**
- * The feature id for the 'Fetch' attribute.
+ * The feature id for the 'Order By' attribute.
*
*
* @generated
* @ordered
*/
- public static final int JAVA_ONE_TO_MANY__FETCH = JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH;
+ public static final int JAVA_ONE_TO_MANY__ORDER_BY = JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
/**
- * The feature id for the 'Join Table' containment reference.
+ * The feature id for the 'Fetch' attribute.
*
*
* @generated
* @ordered
*/
- public static final int JAVA_ONE_TO_MANY__JOIN_TABLE = JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
+ public static final int JAVA_ONE_TO_MANY__FETCH = JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH;
/**
- * The feature id for the 'Order By' containment reference.
+ * The feature id for the 'Join Table' containment reference.
*
*
* @generated
* @ordered
*/
- public static final int JAVA_ONE_TO_MANY__ORDER_BY = JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
+ public static final int JAVA_ONE_TO_MANY__JOIN_TABLE = JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
/**
* The feature id for the 'Map Key' attribute.
@@ -1439,31 +1439,31 @@ public class JpaJavaMappingsPackage extends EPackageImpl
public static final int JAVA_MANY_TO_MANY__MAPPED_BY = JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
/**
- * The feature id for the 'Fetch' attribute.
+ * The feature id for the 'Order By' attribute.
*
*
* @generated
* @ordered
*/
- public static final int JAVA_MANY_TO_MANY__FETCH = JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH;
+ public static final int JAVA_MANY_TO_MANY__ORDER_BY = JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
/**
- * The feature id for the 'Join Table' containment reference.
+ * The feature id for the 'Fetch' attribute.
*
*
* @generated
* @ordered
*/
- public static final int JAVA_MANY_TO_MANY__JOIN_TABLE = JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
+ public static final int JAVA_MANY_TO_MANY__FETCH = JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH;
/**
- * The feature id for the 'Order By' containment reference.
+ * The feature id for the 'Join Table' containment reference.
*
*
* @generated
* @ordered
*/
- public static final int JAVA_MANY_TO_MANY__ORDER_BY = JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
+ public static final int JAVA_MANY_TO_MANY__JOIN_TABLE = JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
/**
* The feature id for the 'Map Key' attribute.
@@ -3246,43 +3246,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
*/
public static final int JAVA_SEQUENCE_GENERATOR_FEATURE_COUNT = JAVA_GENERATOR_FEATURE_COUNT + 3;
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy Java Order By}' class.
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOrderBy()
- * @generated
- */
- public static final int JAVA_ORDER_BY = 37;
-
- /**
- * The feature id for the 'Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- public static final int JAVA_ORDER_BY__VALUE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the 'Type' attribute.
- *
- *
- * @generated
- * @ordered
- */
- public static final int JAVA_ORDER_BY__TYPE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the 'Java Order By' class.
- *
- *
- * @generated
- * @ordered
- */
- public static final int JAVA_ORDER_BY_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2;
-
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery Java Abstract Query}' class.
*
@@ -3291,7 +3254,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAbstractQuery()
* @generated
*/
- public static final int JAVA_ABSTRACT_QUERY = 38;
+ public static final int JAVA_ABSTRACT_QUERY = 37;
/**
* The feature id for the 'Name' attribute.
@@ -3337,7 +3300,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedQuery()
* @generated
*/
- public static final int JAVA_NAMED_QUERY = 39;
+ public static final int JAVA_NAMED_QUERY = 38;
/**
* The feature id for the 'Name' attribute.
@@ -3383,7 +3346,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedNativeQuery()
* @generated
*/
- public static final int JAVA_NAMED_NATIVE_QUERY = 40;
+ public static final int JAVA_NAMED_NATIVE_QUERY = 39;
/**
* The feature id for the 'Name' attribute.
@@ -3447,7 +3410,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaQueryHint()
* @generated
*/
- public static final int JAVA_QUERY_HINT = 41;
+ public static final int JAVA_QUERY_HINT = 40;
/**
* The feature id for the 'Name' attribute.
@@ -3484,7 +3447,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaUniqueConstraint()
* @generated
*/
- public static final int JAVA_UNIQUE_CONSTRAINT = 42;
+ public static final int JAVA_UNIQUE_CONSTRAINT = 41;
/**
* The feature id for the 'Column Names' attribute list.
@@ -3512,7 +3475,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaCascade()
* @generated
*/
- public static final int JAVA_CASCADE = 43;
+ public static final int JAVA_CASCADE = 42;
/**
* The feature id for the 'All' attribute.
@@ -3820,13 +3783,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
*/
private EClass javaSequenceGeneratorEClass = null;
- /**
- *
- *
- * @generated
- */
- private EClass javaOrderByEClass = null;
-
/**
*
*
@@ -4389,18 +4345,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
return javaSequenceGeneratorEClass;
}
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy Java Order By}'.
- *
- *
- * @return the meta object for class 'Java Order By'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy
- * @generated
- */
- public EClass getJavaOrderBy() {
- return javaOrderByEClass;
- }
-
/**
* Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery Java Abstract Query}'.
*
@@ -4552,7 +4496,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
javaGeneratorEClass = createEClass(JAVA_GENERATOR);
javaTableGeneratorEClass = createEClass(JAVA_TABLE_GENERATOR);
javaSequenceGeneratorEClass = createEClass(JAVA_SEQUENCE_GENERATOR);
- javaOrderByEClass = createEClass(JAVA_ORDER_BY);
javaAbstractQueryEClass = createEClass(JAVA_ABSTRACT_QUERY);
javaNamedQueryEClass = createEClass(JAVA_NAMED_QUERY);
javaNamedNativeQueryEClass = createEClass(JAVA_NAMED_NATIVE_QUERY);
@@ -4660,8 +4603,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
javaTableGeneratorEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getITableGenerator());
javaSequenceGeneratorEClass.getESuperTypes().add(this.getJavaGenerator());
javaSequenceGeneratorEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getISequenceGenerator());
- javaOrderByEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaOrderByEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIOrderBy());
javaAbstractQueryEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
javaAbstractQueryEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIQuery());
javaNamedQueryEClass.getESuperTypes().add(this.getJavaAbstractQuery());
@@ -4712,7 +4653,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
initEClass(javaGeneratorEClass, JavaGenerator.class, "JavaGenerator", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(javaTableGeneratorEClass, JavaTableGenerator.class, "JavaTableGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(javaSequenceGeneratorEClass, JavaSequenceGenerator.class, "JavaSequenceGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaOrderByEClass, JavaOrderBy.class, "JavaOrderBy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(javaAbstractQueryEClass, JavaAbstractQuery.class, "JavaAbstractQuery", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(javaNamedQueryEClass, JavaNamedQuery.class, "JavaNamedQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(javaNamedNativeQueryEClass, JavaNamedNativeQuery.class, "JavaNamedNativeQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -5096,16 +5036,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
*/
public static final EClass JAVA_SEQUENCE_GENERATOR = eINSTANCE.getJavaSequenceGenerator();
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy Java Order By}' class.
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOrderBy()
- * @generated
- */
- public static final EClass JAVA_ORDER_BY = eINSTANCE.getJavaOrderBy();
-
/**
* The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery Java Abstract Query}' class.
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsAdapterFactory.java
index 707bd54b73..e4df5bf85b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsAdapterFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsAdapterFactory.java
@@ -51,7 +51,6 @@ import org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapp
import org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint;
@@ -94,7 +93,6 @@ import org.eclipse.jpt.core.internal.mappings.INamedQuery;
import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
import org.eclipse.jpt.core.internal.mappings.IOneToMany;
import org.eclipse.jpt.core.internal.mappings.IOneToOne;
-import org.eclipse.jpt.core.internal.mappings.IOrderBy;
import org.eclipse.jpt.core.internal.mappings.IOverride;
import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.internal.mappings.IQuery;
@@ -350,11 +348,6 @@ public class JpaJavaMappingsAdapterFactory extends AdapterFactoryImpl
return createJavaSequenceGeneratorAdapter();
}
- @Override
- public Adapter caseJavaOrderBy(JavaOrderBy object) {
- return createJavaOrderByAdapter();
- }
-
@Override
public Adapter caseJavaAbstractQuery(JavaAbstractQuery object) {
return createJavaAbstractQueryAdapter();
@@ -600,11 +593,6 @@ public class JpaJavaMappingsAdapterFactory extends AdapterFactoryImpl
return createISequenceGeneratorAdapter();
}
- @Override
- public Adapter caseIOrderBy(IOrderBy object) {
- return createIOrderByAdapter();
- }
-
@Override
public Adapter caseIQuery(IQuery object) {
return createIQueryAdapter();
@@ -1116,20 +1104,6 @@ public class JpaJavaMappingsAdapterFactory extends AdapterFactoryImpl
return null;
}
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy Java Order By}'.
- *
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy
- * @generated
- */
- public Adapter createJavaOrderByAdapter() {
- return null;
- }
-
/**
* Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery Java Abstract Query}'.
*
@@ -1802,20 +1776,6 @@ public class JpaJavaMappingsAdapterFactory extends AdapterFactoryImpl
return null;
}
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IOrderBy IOrder By}'.
- *
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IOrderBy
- * @generated
- */
- public Adapter createIOrderByAdapter() {
- return null;
- }
-
/**
* Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IQuery IQuery}'.
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java
index bf202a455a..887ae78c16 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java
@@ -50,7 +50,6 @@ import org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapp
import org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaOrderBy;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint;
@@ -93,7 +92,6 @@ import org.eclipse.jpt.core.internal.mappings.INamedQuery;
import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
import org.eclipse.jpt.core.internal.mappings.IOneToMany;
import org.eclipse.jpt.core.internal.mappings.IOneToOne;
-import org.eclipse.jpt.core.internal.mappings.IOrderBy;
import org.eclipse.jpt.core.internal.mappings.IOverride;
import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.internal.mappings.IQuery;
@@ -1031,23 +1029,6 @@ public class JpaJavaMappingsSwitch
result = defaultCase(theEObject);
return result;
}
- case JpaJavaMappingsPackage.JAVA_ORDER_BY : {
- JavaOrderBy javaOrderBy = (JavaOrderBy) theEObject;
- T result = caseJavaOrderBy(javaOrderBy);
- if (result == null)
- result = caseJavaEObject(javaOrderBy);
- if (result == null)
- result = caseIOrderBy(javaOrderBy);
- if (result == null)
- result = caseJpaEObject(javaOrderBy);
- if (result == null)
- result = caseIJpaSourceObject(javaOrderBy);
- if (result == null)
- result = caseIJpaEObject(javaOrderBy);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY : {
JavaAbstractQuery javaAbstractQuery = (JavaAbstractQuery) theEObject;
T result = caseJavaAbstractQuery(javaAbstractQuery);
@@ -1658,21 +1639,6 @@ public class JpaJavaMappingsSwitch
return null;
}
- /**
- * Returns the result of interpretting the object as an instance of 'Java Order By'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of 'Java Order By'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaOrderBy(JavaOrderBy object) {
- return null;
- }
-
/**
* Returns the result of interpretting the object as an instance of 'Java Abstract Query'.
*
@@ -2393,21 +2359,6 @@ public class JpaJavaMappingsSwitch
return null;
}
- /**
- * Returns the result of interpretting the object as an instance of 'IOrder By'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of 'IOrder By'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIOrderBy(IOrderBy object) {
- return null;
- }
-
/**
* Returns the result of interpretting the object as an instance of 'IQuery'.
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmFactory.java
index e3231bbe6a..75b6486828 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmFactory.java
@@ -142,8 +142,6 @@ public class OrmFactory extends EFactoryImpl
return createXmlSequenceGenerator();
case OrmPackage.XML_TABLE_GENERATOR :
return createXmlTableGenerator();
- case OrmPackage.XML_ORDER_BY :
- return createXmlOrderBy();
case OrmPackage.XML_NAMED_QUERY :
return createXmlNamedQuery();
case OrmPackage.XML_NAMED_NATIVE_QUERY :
@@ -588,16 +586,6 @@ public class OrmFactory extends EFactoryImpl
return xmlTableGenerator;
}
- /**
- *
- *
- * @generated
- */
- public XmlOrderBy createXmlOrderBy() {
- XmlOrderBy xmlOrderBy = new XmlOrderBy();
- return xmlOrderBy;
- }
-
/**
*
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java
index 78dc86ccf0..5dd4524349 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java
@@ -1973,31 +1973,31 @@ public class OrmPackage extends EPackageImpl
public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAPPED_BY = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
/**
- * The feature id for the 'Fetch' attribute.
+ * The feature id for the 'Order By' attribute.
*
*
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
/**
- * The feature id for the 'Join Table' containment reference.
+ * The feature id for the 'Fetch' attribute.
*
*
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
/**
- * The feature id for the 'Order By' containment reference.
+ * The feature id for the 'Join Table' containment reference.
*
*
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
/**
* The feature id for the 'Map Key' attribute.
@@ -2017,15 +2017,6 @@ public class OrmPackage extends EPackageImpl
*/
public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE_FOR_XML = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 5;
- /**
- * The feature id for the 'Order By For Xml' reference.
- *
- *
- * @generated
- * @ordered
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 6;
-
/**
* The feature id for the 'Map Key For Xml' containment reference.
*
@@ -2033,7 +2024,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 7;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 6;
/**
* The number of structural features of the 'Xml Multi Relationship Mapping Internal' class.
@@ -2042,7 +2033,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL_FEATURE_COUNT = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 8;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL_FEATURE_COUNT = XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 7;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml Xml Multi Relationship Mapping For Xml}' class.
@@ -2063,15 +2054,6 @@ public class OrmPackage extends EPackageImpl
*/
public static final int XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__JOIN_TABLE_FOR_XML = 0;
- /**
- * The feature id for the 'Order By For Xml' reference.
- *
- *
- * @generated
- * @ordered
- */
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__ORDER_BY_FOR_XML = 1;
-
/**
* The feature id for the 'Map Key For Xml' containment reference.
*
@@ -2079,7 +2061,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__MAP_KEY_FOR_XML = 2;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__MAP_KEY_FOR_XML = 1;
/**
* The number of structural features of the 'Xml Multi Relationship Mapping For Xml' class.
@@ -2088,7 +2070,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML_FEATURE_COUNT = 3;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML_FEATURE_COUNT = 2;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMapping Xml Multi Relationship Mapping}' class.
@@ -2155,31 +2137,31 @@ public class OrmPackage extends EPackageImpl
public static final int XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY = JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
/**
- * The feature id for the 'Fetch' attribute.
+ * The feature id for the 'Order By' attribute.
*
*
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING__FETCH = JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__FETCH;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY = JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
/**
- * The feature id for the 'Join Table' containment reference.
+ * The feature id for the 'Fetch' attribute.
*
*
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING__FETCH = JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__FETCH;
/**
- * The feature id for the 'Order By' containment reference.
+ * The feature id for the 'Join Table' containment reference.
*
*
* @generated
* @ordered
*/
- public static final int XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY = JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
+ public static final int XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
/**
* The feature id for the 'Map Key' attribute.
@@ -2273,31 +2255,31 @@ public class OrmPackage extends EPackageImpl
public static final int XML_ONE_TO_MANY__MAPPED_BY = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAPPED_BY;
/**
- * The feature id for the 'Fetch' attribute.
+ * The feature id for the 'Order By' attribute.
*
*
* @generated
* @ordered
*/
- public static final int XML_ONE_TO_MANY__FETCH = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH;
+ public static final int XML_ONE_TO_MANY__ORDER_BY = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY;
/**
- * The feature id for the 'Join Table' containment reference.
+ * The feature id for the 'Fetch' attribute.
*
*
* @generated
* @ordered
*/
- public static final int XML_ONE_TO_MANY__JOIN_TABLE = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE;
+ public static final int XML_ONE_TO_MANY__FETCH = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH;
/**
- * The feature id for the 'Order By' containment reference.
+ * The feature id for the 'Join Table' containment reference.
*
*
* @generated
* @ordered
*/
- public static final int XML_ONE_TO_MANY__ORDER_BY = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY;
+ public static final int XML_ONE_TO_MANY__JOIN_TABLE = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE;
/**
* The feature id for the 'Map Key' attribute.
@@ -2317,15 +2299,6 @@ public class OrmPackage extends EPackageImpl
*/
public static final int XML_ONE_TO_MANY__JOIN_TABLE_FOR_XML = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE_FOR_XML;
- /**
- * The feature id for the 'Order By For Xml' reference.
- *
- *
- * @generated
- * @ordered
- */
- public static final int XML_ONE_TO_MANY__ORDER_BY_FOR_XML = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML;
-
/**
* The feature id for the 'Map Key For Xml' containment reference.
*
@@ -2418,31 +2391,31 @@ public class OrmPackage extends EPackageImpl
public static final int XML_MANY_TO_MANY__MAPPED_BY = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAPPED_BY;
/**
- * The feature id for the 'Fetch' attribute.
+ * The feature id for the 'Order By' attribute.
*
*
* @generated
* @ordered
*/
- public static final int XML_MANY_TO_MANY__FETCH = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH;
+ public static final int XML_MANY_TO_MANY__ORDER_BY = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY;
/**
- * The feature id for the 'Join Table' containment reference.
+ * The feature id for the 'Fetch' attribute.
*
*
* @generated
* @ordered
*/
- public static final int XML_MANY_TO_MANY__JOIN_TABLE = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE;
+ public static final int XML_MANY_TO_MANY__FETCH = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH;
/**
- * The feature id for the 'Order By' containment reference.
+ * The feature id for the 'Join Table' containment reference.
*
*
* @generated
* @ordered
*/
- public static final int XML_MANY_TO_MANY__ORDER_BY = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY;
+ public static final int XML_MANY_TO_MANY__JOIN_TABLE = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE;
/**
* The feature id for the 'Map Key' attribute.
@@ -2462,15 +2435,6 @@ public class OrmPackage extends EPackageImpl
*/
public static final int XML_MANY_TO_MANY__JOIN_TABLE_FOR_XML = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE_FOR_XML;
- /**
- * The feature id for the 'Order By For Xml' reference.
- *
- *
- * @generated
- * @ordered
- */
- public static final int XML_MANY_TO_MANY__ORDER_BY_FOR_XML = XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML;
-
/**
* The feature id for the 'Map Key For Xml' containment reference.
*
@@ -5478,43 +5442,6 @@ public class OrmPackage extends EPackageImpl
*/
public static final int XML_TABLE_GENERATOR_FEATURE_COUNT = XML_GENERATOR_FEATURE_COUNT + 19;
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlOrderBy Xml Order By}' class.
- *
- *
- * @see org.eclipse.jpt.core.internal.content.orm.XmlOrderBy
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlOrderBy()
- * @generated
- */
- public static final int XML_ORDER_BY = 53;
-
- /**
- * The feature id for the 'Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_BY__VALUE = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the 'Type' attribute.
- *
- *
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_BY__TYPE = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the 'Xml Order By' class.
- *
- *
- * @generated
- * @ordered
- */
- public static final int XML_ORDER_BY_FEATURE_COUNT = JpaCorePackage.XML_EOBJECT_FEATURE_COUNT + 2;
-
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.AbstractXmlQuery Abstract Xml Query}' class.
*
@@ -5523,7 +5450,7 @@ public class OrmPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getAbstractXmlQuery()
* @generated
*/
- public static final int ABSTRACT_XML_QUERY = 54;
+ public static final int ABSTRACT_XML_QUERY = 53;
/**
* The feature id for the 'Name' attribute.
@@ -5569,7 +5496,7 @@ public class OrmPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlNamedQuery()
* @generated
*/
- public static final int XML_NAMED_QUERY = 55;
+ public static final int XML_NAMED_QUERY = 54;
/**
* The feature id for the 'Name' attribute.
@@ -5615,7 +5542,7 @@ public class OrmPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlNamedNativeQuery()
* @generated
*/
- public static final int XML_NAMED_NATIVE_QUERY = 56;
+ public static final int XML_NAMED_NATIVE_QUERY = 55;
/**
* The feature id for the 'Name' attribute.
@@ -5679,7 +5606,7 @@ public class OrmPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlQueryHint()
* @generated
*/
- public static final int XML_QUERY_HINT = 57;
+ public static final int XML_QUERY_HINT = 56;
/**
* The feature id for the 'Name' attribute.
@@ -5716,7 +5643,7 @@ public class OrmPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlUniqueConstraint()
* @generated
*/
- public static final int XML_UNIQUE_CONSTRAINT = 58;
+ public static final int XML_UNIQUE_CONSTRAINT = 57;
/**
* The feature id for the 'Column Names' attribute list.
@@ -5744,7 +5671,7 @@ public class OrmPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlCascade()
* @generated
*/
- public static final int XML_CASCADE = 59;
+ public static final int XML_CASCADE = 58;
/**
* The feature id for the 'All' attribute.
@@ -5808,7 +5735,7 @@ public class OrmPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlIdClass()
* @generated
*/
- public static final int XML_ID_CLASS = 60;
+ public static final int XML_ID_CLASS = 59;
/**
* The feature id for the 'Value' attribute.
@@ -5836,7 +5763,7 @@ public class OrmPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlInheritance()
* @generated
*/
- public static final int XML_INHERITANCE = 61;
+ public static final int XML_INHERITANCE = 60;
/**
* The feature id for the 'Strategy' attribute.
@@ -5864,7 +5791,7 @@ public class OrmPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlMapKey()
* @generated
*/
- public static final int XML_MAP_KEY = 62;
+ public static final int XML_MAP_KEY = 61;
/**
* The feature id for the 'Name' attribute.
@@ -6255,13 +6182,6 @@ public class OrmPackage extends EPackageImpl
*/
private EClass xmlTableGeneratorEClass = null;
- /**
- *
- *
- * @generated
- */
- private EClass xmlOrderByEClass = null;
-
/**
*
*
@@ -7256,19 +7176,6 @@ public class OrmPackage extends EPackageImpl
return (EReference) xmlMultiRelationshipMappingForXmlEClass.getEStructuralFeatures().get(0);
}
- /**
- * Returns the meta object for the reference '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getOrderByForXml Order By For Xml}'.
- *
- *
- * @return the meta object for the reference 'Order By For Xml'.
- * @see org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getOrderByForXml()
- * @see #getXmlMultiRelationshipMappingForXml()
- * @generated
- */
- public EReference getXmlMultiRelationshipMappingForXml_OrderByForXml() {
- return (EReference) xmlMultiRelationshipMappingForXmlEClass.getEStructuralFeatures().get(1);
- }
-
/**
* Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getMapKeyForXml Map Key For Xml}'.
*
@@ -7279,7 +7186,7 @@ public class OrmPackage extends EPackageImpl
* @generated
*/
public EReference getXmlMultiRelationshipMappingForXml_MapKeyForXml() {
- return (EReference) xmlMultiRelationshipMappingForXmlEClass.getEStructuralFeatures().get(2);
+ return (EReference) xmlMultiRelationshipMappingForXmlEClass.getEStructuralFeatures().get(1);
}
/**
@@ -8147,18 +8054,6 @@ public class OrmPackage extends EPackageImpl
return xmlTableGeneratorEClass;
}
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.orm.XmlOrderBy Xml Order By}'.
- *
- *
- * @return the meta object for class 'Xml Order By'.
- * @see org.eclipse.jpt.core.internal.content.orm.XmlOrderBy
- * @generated
- */
- public EClass getXmlOrderBy() {
- return xmlOrderByEClass;
- }
-
/**
* Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.orm.AbstractXmlQuery Abstract Xml Query}'.
*
@@ -8403,7 +8298,6 @@ public class OrmPackage extends EPackageImpl
xmlMultiRelationshipMappingInternalEClass = createEClass(XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL);
xmlMultiRelationshipMappingForXmlEClass = createEClass(XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML);
createEReference(xmlMultiRelationshipMappingForXmlEClass, XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__JOIN_TABLE_FOR_XML);
- createEReference(xmlMultiRelationshipMappingForXmlEClass, XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__ORDER_BY_FOR_XML);
createEReference(xmlMultiRelationshipMappingForXmlEClass, XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__MAP_KEY_FOR_XML);
xmlMultiRelationshipMappingEClass = createEClass(XML_MULTI_RELATIONSHIP_MAPPING);
xmlOneToManyEClass = createEClass(XML_ONE_TO_MANY);
@@ -8474,7 +8368,6 @@ public class OrmPackage extends EPackageImpl
xmlGeneratorEClass = createEClass(XML_GENERATOR);
xmlSequenceGeneratorEClass = createEClass(XML_SEQUENCE_GENERATOR);
xmlTableGeneratorEClass = createEClass(XML_TABLE_GENERATOR);
- xmlOrderByEClass = createEClass(XML_ORDER_BY);
abstractXmlQueryEClass = createEClass(ABSTRACT_XML_QUERY);
xmlNamedQueryEClass = createEClass(XML_NAMED_QUERY);
xmlNamedNativeQueryEClass = createEClass(XML_NAMED_NATIVE_QUERY);
@@ -8619,8 +8512,6 @@ public class OrmPackage extends EPackageImpl
xmlSequenceGeneratorEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getISequenceGenerator());
xmlTableGeneratorEClass.getESuperTypes().add(this.getXmlGenerator());
xmlTableGeneratorEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getITableGenerator());
- xmlOrderByEClass.getESuperTypes().add(theJpaCorePackage.getXmlEObject());
- xmlOrderByEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIOrderBy());
abstractXmlQueryEClass.getESuperTypes().add(theJpaCorePackage.getXmlEObject());
abstractXmlQueryEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIQuery());
xmlNamedQueryEClass.getESuperTypes().add(this.getAbstractXmlQuery());
@@ -8704,7 +8595,6 @@ public class OrmPackage extends EPackageImpl
initEClass(xmlMultiRelationshipMappingInternalEClass, XmlMultiRelationshipMappingInternal.class, "XmlMultiRelationshipMappingInternal", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlMultiRelationshipMappingForXmlEClass, XmlMultiRelationshipMappingForXml.class, "XmlMultiRelationshipMappingForXml", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getXmlMultiRelationshipMappingForXml_JoinTableForXml(), this.getXmlJoinTable(), null, "joinTableForXml", null, 0, 1, XmlMultiRelationshipMappingForXml.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlMultiRelationshipMappingForXml_OrderByForXml(), this.getXmlOrderBy(), null, "orderByForXml", null, 0, 1, XmlMultiRelationshipMappingForXml.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getXmlMultiRelationshipMappingForXml_MapKeyForXml(), this.getXmlMapKey(), null, "mapKeyForXml", null, 0, 1, XmlMultiRelationshipMappingForXml.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(xmlMultiRelationshipMappingEClass, XmlMultiRelationshipMapping.class, "XmlMultiRelationshipMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlOneToManyEClass, XmlOneToMany.class, "XmlOneToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -8777,7 +8667,6 @@ public class OrmPackage extends EPackageImpl
initEClass(xmlGeneratorEClass, XmlGenerator.class, "XmlGenerator", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlSequenceGeneratorEClass, XmlSequenceGenerator.class, "XmlSequenceGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlTableGeneratorEClass, XmlTableGenerator.class, "XmlTableGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(xmlOrderByEClass, XmlOrderBy.class, "XmlOrderBy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(abstractXmlQueryEClass, AbstractXmlQuery.class, "AbstractXmlQuery", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlNamedQueryEClass, XmlNamedQuery.class, "XmlNamedQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlNamedNativeQueryEClass, XmlNamedNativeQuery.class, "XmlNamedNativeQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -9387,14 +9276,6 @@ public class OrmPackage extends EPackageImpl
*/
public static final EReference XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__JOIN_TABLE_FOR_XML = eINSTANCE.getXmlMultiRelationshipMappingForXml_JoinTableForXml();
- /**
- * The meta object literal for the 'Order By For Xml' reference feature.
- *
- *
- * @generated
- */
- public static final EReference XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__ORDER_BY_FOR_XML = eINSTANCE.getXmlMultiRelationshipMappingForXml_OrderByForXml();
-
/**
* The meta object literal for the 'Map Key For Xml' containment reference feature.
*
@@ -10019,16 +9900,6 @@ public class OrmPackage extends EPackageImpl
*/
public static final EClass XML_TABLE_GENERATOR = eINSTANCE.getXmlTableGenerator();
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlOrderBy Xml Order By}' class.
- *
- *
- * @see org.eclipse.jpt.core.internal.content.orm.XmlOrderBy
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlOrderBy()
- * @generated
- */
- public static final EClass XML_ORDER_BY = eINSTANCE.getXmlOrderBy();
-
/**
* The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.orm.AbstractXmlQuery Abstract Xml Query}' class.
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEmbedded.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEmbedded.java
index 7c18ea9e7c..e82e1dc496 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEmbedded.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEmbedded.java
@@ -14,7 +14,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
@@ -77,7 +76,6 @@ public class XmlEmbedded extends XmlAttributeMapping implements IEmbedded
super();
}
-
@Override
protected void addInsignificantFeatureIdsTo(Set insignificantFeatureIds) {
super.addInsignificantFeatureIdsTo(insignificantFeatureIds);
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingForXml.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingForXml.java
index a58b4e041c..333d0cc30c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingForXml.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingForXml.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.ecore.EObject;
* The following features are supported:
*
* - {@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getJoinTableForXml Join Table For Xml}
- * - {@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getOrderByForXml Order By For Xml}
* - {@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getMapKeyForXml Map Key For Xml}
*
*
@@ -56,32 +55,6 @@ public interface XmlMultiRelationshipMappingForXml extends EObject
*/
void setJoinTableForXml(XmlJoinTable value);
- /**
- * Returns the value of the 'Order By For Xml' reference.
- *
- *
- * If the meaning of the 'Order By For Xml' reference isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Order By For Xml' reference.
- * @see #setOrderByForXml(XmlOrderBy)
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlMultiRelationshipMappingForXml_OrderByForXml()
- * @model resolveProxies="false" volatile="true"
- * @generated
- */
- XmlOrderBy getOrderByForXml();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingForXml#getOrderByForXml Order By For Xml}' reference.
- *
- *
- * @param value the new value of the 'Order By For Xml' reference.
- * @see #getOrderByForXml()
- * @generated
- */
- void setOrderByForXml(XmlOrderBy value);
-
/**
* Returns the value of the 'Map Key For Xml' containment reference.
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingInternal.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingInternal.java
index 26ef44e803..a7c3849405 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingInternal.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlMultiRelationshipMappingInternal.java
@@ -21,11 +21,13 @@ import org.eclipse.jpt.core.internal.ITypeMapping;
import org.eclipse.jpt.core.internal.content.orm.resource.OrmXmlMapper;
import org.eclipse.jpt.core.internal.emfutility.DOMUtilities;
import org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType;
+import org.eclipse.jpt.core.internal.mappings.IEntity;
import org.eclipse.jpt.core.internal.mappings.IJoinTable;
import org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping;
import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
-import org.eclipse.jpt.core.internal.mappings.IOrderBy;
import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
+import org.eclipse.jpt.core.internal.platform.DefaultsContext;
+import org.eclipse.jpt.utility.internal.StringTools;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
/**
@@ -63,6 +65,26 @@ public abstract class XmlMultiRelationshipMappingInternal
*/
protected String mappedBy = MAPPED_BY_EDEFAULT;
+ /**
+ * The default value of the '{@link #getOrderBy() Order By}' attribute.
+ *
+ *
+ * @see #getOrderBy()
+ * @generated
+ * @ordered
+ */
+ protected static final String ORDER_BY_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getOrderBy() Order By}' attribute.
+ *
+ *
+ * @see #getOrderBy()
+ * @generated
+ * @ordered
+ */
+ protected String orderBy = ORDER_BY_EDEFAULT;
+
/**
* The default value of the '{@link #getFetch() Fetch}' attribute.
*
@@ -93,16 +115,6 @@ public abstract class XmlMultiRelationshipMappingInternal
*/
protected IJoinTable joinTable;
- /**
- * The cached value of the '{@link #getOrderBy() Order By}' containment reference.
- *
- *
- * @see #getOrderBy()
- * @generated
- * @ordered
- */
- protected IOrderBy orderBy;
-
/**
* The default value of the '{@link #getMapKey() Map Key}' attribute.
*
@@ -137,8 +149,6 @@ public abstract class XmlMultiRelationshipMappingInternal
super();
this.joinTable = OrmFactory.eINSTANCE.createXmlJoinTable(buildJoinTableOwner());
((InternalEObject) this.joinTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE, null, null);
- this.orderBy = OrmFactory.eINSTANCE.createXmlOrderBy();
- ((InternalEObject) this.orderBy).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY, null, null);
this.eAdapters().add(this.buildListener());
}
@@ -241,6 +251,89 @@ public abstract class XmlMultiRelationshipMappingInternal
eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAPPED_BY, oldMappedBy, mappedBy));
}
+ /**
+ * Returns the value of the 'Order By' attribute.
+ *
+ *
+ * If the meaning of the 'Order By' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Order By' attribute.
+ * @see #setOrderBy(String)
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getIMultiRelationshipMapping_OrderBy()
+ * @model unique="false" ordered="false"
+ * @generated
+ */
+ public String getOrderBy() {
+ return orderBy;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlMultiRelationshipMappingInternal#getOrderBy Order By}' attribute.
+ *
+ *
+ * @param value the new value of the 'Order By' attribute.
+ * @see #getOrderBy()
+ * @generated
+ */
+ public void setOrderBy(String newOrderBy) {
+ String oldOrderBy = orderBy;
+ orderBy = newOrderBy;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY, oldOrderBy, orderBy));
+ }
+
+ /**
+ *
+ *
+ * @model kind="operation" unique="false" required="true" ordered="false"
+ * @generated NOT
+ */
+ public boolean isNoOrdering() {
+ return getOrderBy() == null;
+ }
+
+ /**
+ *
+ *
+ * @model
+ * @generated NOT
+ */
+ public void setNoOrdering() {
+ setOrderBy(null);
+ }
+
+ /**
+ *
+ *
+ * @model kind="operation" unique="false" required="true" ordered="false"
+ * @generated NOT
+ */
+ public boolean isOrderByPk() {
+ return "".equals(getOrderBy());
+ }
+
+ /**
+ *
+ *
+ * @model
+ * @generated NOT
+ */
+ public void setOrderByPk() {
+ setOrderBy("");
+ }
+
+ /**
+ *
+ *
+ * @model kind="operation" unique="false" required="true" ordered="false"
+ * @generated NOT
+ */
+ public boolean isCustomOrdering() {
+ return ! StringTools.stringIsEmpty(getOrderBy());
+ }
+
public ITextRange mappedByTextRange() {
if (node == null) {
return typeMapping().validationTextRange();
@@ -325,41 +418,6 @@ public abstract class XmlMultiRelationshipMappingInternal
return table != null && table.isSpecified();
}
- /**
- * Returns the value of the 'Order By' containment reference.
- *
- *
- * If the meaning of the 'Order By' reference isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Order By' containment reference.
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getIMultiRelationshipMapping_OrderBy()
- * @model containment="true" required="true" changeable="false"
- * @generated
- */
- public IOrderBy getOrderBy() {
- return orderBy;
- }
-
- /**
- *
- *
- * @generated
- */
- public NotificationChain basicSetOrderBy(IOrderBy newOrderBy, NotificationChain msgs) {
- IOrderBy oldOrderBy = orderBy;
- orderBy = newOrderBy;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY, oldOrderBy, newOrderBy);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
/**
* Returns the value of the 'Map Key' attribute.
*
@@ -417,23 +475,6 @@ public abstract class XmlMultiRelationshipMappingInternal
}
}
- public XmlOrderBy getOrderByForXml() {
- if (getOrderByInternal().isAllFeaturesUnset()) {
- return null;
- }
- return getOrderByInternal();
- }
-
- private XmlOrderBy getOrderByInternal() {
- return (XmlOrderBy) getOrderBy();
- }
-
- public void setOrderByForXml(XmlOrderBy newOrderByForXml) {
- XmlOrderBy oldValue = newOrderByForXml == null ? (XmlOrderBy) getOrderBy() : null;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML, oldValue, newOrderByForXml));
- }
-
/**
* Returns the value of the 'Map Key For Xml' containment reference.
*
@@ -503,8 +544,6 @@ public abstract class XmlMultiRelationshipMappingInternal
switch (featureID) {
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE :
return basicSetJoinTable(null, msgs);
- case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY :
- return basicSetOrderBy(null, msgs);
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
return basicSetMapKeyForXml(null, msgs);
}
@@ -521,18 +560,16 @@ public abstract class XmlMultiRelationshipMappingInternal
switch (featureID) {
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAPPED_BY :
return getMappedBy();
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY :
+ return getOrderBy();
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH :
return getFetch();
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE :
return getJoinTable();
- case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY :
- return getOrderBy();
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY :
return getMapKey();
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE_FOR_XML :
return getJoinTableForXml();
- case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML :
- return getOrderByForXml();
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
return getMapKeyForXml();
}
@@ -550,6 +587,9 @@ public abstract class XmlMultiRelationshipMappingInternal
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAPPED_BY :
setMappedBy((String) newValue);
return;
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY :
+ setOrderBy((String) newValue);
+ return;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH :
setFetch((DefaultLazyFetchType) newValue);
return;
@@ -559,9 +599,6 @@ public abstract class XmlMultiRelationshipMappingInternal
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE_FOR_XML :
setJoinTableForXml((XmlJoinTable) newValue);
return;
- case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML :
- setOrderByForXml((XmlOrderBy) newValue);
- return;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
setMapKeyForXml((XmlMapKey) newValue);
return;
@@ -580,6 +617,9 @@ public abstract class XmlMultiRelationshipMappingInternal
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAPPED_BY :
setMappedBy(MAPPED_BY_EDEFAULT);
return;
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY :
+ setOrderBy(ORDER_BY_EDEFAULT);
+ return;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH :
setFetch(FETCH_EDEFAULT);
return;
@@ -589,9 +629,6 @@ public abstract class XmlMultiRelationshipMappingInternal
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE_FOR_XML :
setJoinTableForXml((XmlJoinTable) null);
return;
- case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML :
- setOrderByForXml((XmlOrderBy) null);
- return;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
setMapKeyForXml((XmlMapKey) null);
return;
@@ -609,18 +646,16 @@ public abstract class XmlMultiRelationshipMappingInternal
switch (featureID) {
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAPPED_BY :
return MAPPED_BY_EDEFAULT == null ? mappedBy != null : !MAPPED_BY_EDEFAULT.equals(mappedBy);
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY :
+ return ORDER_BY_EDEFAULT == null ? orderBy != null : !ORDER_BY_EDEFAULT.equals(orderBy);
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH :
return fetch != FETCH_EDEFAULT;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE :
return joinTable != null;
- case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY :
- return orderBy != null;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY :
return MAP_KEY_EDEFAULT == null ? mapKey != null : !MAP_KEY_EDEFAULT.equals(mapKey);
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE_FOR_XML :
return getJoinTableForXml() != null;
- case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML :
- return getOrderByForXml() != null;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
return mapKeyForXml != null;
}
@@ -644,12 +679,12 @@ public abstract class XmlMultiRelationshipMappingInternal
}
if (baseClass == IMultiRelationshipMapping.class) {
switch (derivedFeatureID) {
+ case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY :
+ return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH :
return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__FETCH;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE :
return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
- case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY :
- return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY :
return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__MAP_KEY;
default :
@@ -660,8 +695,6 @@ public abstract class XmlMultiRelationshipMappingInternal
switch (derivedFeatureID) {
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE_FOR_XML :
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__JOIN_TABLE_FOR_XML;
- case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML :
- return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__ORDER_BY_FOR_XML;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML :
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__MAP_KEY_FOR_XML;
default :
@@ -694,12 +727,12 @@ public abstract class XmlMultiRelationshipMappingInternal
}
if (baseClass == IMultiRelationshipMapping.class) {
switch (baseFeatureID) {
+ case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY :
+ return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY;
case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__FETCH :
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__FETCH;
case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE;
- case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY;
case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__MAP_KEY :
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY;
default :
@@ -710,8 +743,6 @@ public abstract class XmlMultiRelationshipMappingInternal
switch (baseFeatureID) {
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__JOIN_TABLE_FOR_XML :
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__JOIN_TABLE_FOR_XML;
- case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__ORDER_BY_FOR_XML :
- return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__ORDER_BY_FOR_XML;
case OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_FOR_XML__MAP_KEY_FOR_XML :
return OrmPackage.XML_MULTI_RELATIONSHIP_MAPPING_INTERNAL__MAP_KEY_FOR_XML;
default :
@@ -739,6 +770,8 @@ public abstract class XmlMultiRelationshipMappingInternal
StringBuffer result = new StringBuffer(super.toString());
result.append(" (mappedBy: ");
result.append(mappedBy);
+ result.append(", orderBy: ");
+ result.append(orderBy);
result.append(", fetch: ");
result.append(fetch);
result.append(", mapKey: ");
@@ -755,14 +788,6 @@ public abstract class XmlMultiRelationshipMappingInternal
setJoinTableForXmlGen(getJoinTableForXml());
}
- public void makeOrderByForXmlNull() {
- setOrderByForXml(null);
- }
-
- public void makeOrderByForXmlNonNull() {
- setOrderByForXml(getOrderByForXml());
- }
-
@Override
public void initializeFromXmlMulitRelationshipMapping(XmlMultiRelationshipMappingInternal oldMapping) {
super.initializeFromXmlMulitRelationshipMapping(oldMapping);
@@ -772,4 +797,20 @@ public abstract class XmlMultiRelationshipMappingInternal
public Iterator candidateMapKeyNames() {
return this.allTargetEntityAttributeNames();
}
+
+ public void refreshDefaults(DefaultsContext defaultsContext) {
+ super.refreshDefaults(defaultsContext);
+ // TODO
+ // if (isOrderByPk()) {
+ // refreshDefaultOrderBy(defaultsContext);
+ // }
+ }
+
+ //primary key ordering when just the @OrderBy annotation is present
+ protected void refreshDefaultOrderBy(DefaultsContext defaultsContext) {
+ IEntity targetEntity = getResolvedTargetEntity();
+ if (targetEntity != null) {
+ setOrderBy(targetEntity.primaryKeyAttributeName() + " ASC");
+ }
+ }
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlOrderBy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlOrderBy.java
deleted file mode 100644
index 1a0f1950ea..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlOrderBy.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.content.orm;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jpt.core.internal.XmlEObject;
-import org.eclipse.jpt.core.internal.mappings.IOrderBy;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.mappings.OrderingType;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- * A representation of the model object 'Xml Order By'.
- *
- *
- *
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlOrderBy()
- * @model kind="class"
- * @generated
- */
-public class XmlOrderBy extends XmlEObject implements IOrderBy
-{
- /**
- * The default value of the '{@link #getValue() Value}' attribute.
- *
- *
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected static final String VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getValue() Value}' attribute.
- *
- *
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected String value = VALUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getType() Type}' attribute.
- *
- *
- * @see #getType()
- * @generated
- * @ordered
- */
- protected static final OrderingType TYPE_EDEFAULT = OrderingType.NONE;
-
- /**
- * The cached value of the '{@link #getType() Type}' attribute.
- *
- *
- * @see #getType()
- * @generated
- * @ordered
- */
- protected OrderingType type = TYPE_EDEFAULT;
-
- /**
- *
- *
- * @generated
- */
- protected XmlOrderBy() {
- super();
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return OrmPackage.Literals.XML_ORDER_BY;
- }
-
- /**
- * Returns the value of the 'Value' attribute.
- *
- *
- * If the meaning of the 'Value' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Value' attribute.
- * @see #setValue(String)
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getIOrderBy_Value()
- * @model
- * @generated
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlOrderBy#getValue Value}' attribute.
- *
- *
- * @param value the new value of the 'Value' attribute.
- * @see #getValue()
- * @generated
- */
- public void setValueGen(String newValue) {
- String oldValue = value;
- value = newValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ORDER_BY__VALUE, oldValue, value));
- }
-
- public void setValue(String newValue) {
- setValueGen(newValue);
- if (newValue == null) {
- setTypeGen(OrderingType.NONE);
- }
- else {
- setTypeGen(OrderingType.CUSTOM);
- }
- }
-
- /**
- * Returns the value of the 'Type' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.OrderingType}.
- *
- *
- * If the meaning of the 'Type' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Type' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.OrderingType
- * @see #setType(OrderingType)
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getIOrderBy_Type()
- * @model
- * @generated
- */
- public OrderingType getType() {
- return type;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.XmlOrderBy#getType Type}' attribute.
- *
- *
- * @param value the new value of the 'Type' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.OrderingType
- * @see #getType()
- * @generated
- */
- public void setTypeGen(OrderingType newType) {
- OrderingType oldType = type;
- type = newType == null ? TYPE_EDEFAULT : newType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ORDER_BY__TYPE, oldType, type));
- }
-
- public void setType(OrderingType newType) {
- setTypeGen(newType);
- if (newType == OrderingType.NONE) {
- multiRelationshipMapping().makeOrderByForXmlNull();
- }
- else {
- if (newType == OrderingType.CUSTOM) {
- setValueGen("");
- }
- else {
- setValueGen(null);
- }
- multiRelationshipMapping().makeOrderByForXmlNonNull();
- }
- }
-
- private XmlMultiRelationshipMappingInternal multiRelationshipMapping() {
- return (XmlMultiRelationshipMappingInternal) eContainer();
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case OrmPackage.XML_ORDER_BY__VALUE :
- return getValue();
- case OrmPackage.XML_ORDER_BY__TYPE :
- return getType();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case OrmPackage.XML_ORDER_BY__VALUE :
- setValue((String) newValue);
- return;
- case OrmPackage.XML_ORDER_BY__TYPE :
- setType((OrderingType) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case OrmPackage.XML_ORDER_BY__VALUE :
- setValue(VALUE_EDEFAULT);
- return;
- case OrmPackage.XML_ORDER_BY__TYPE :
- setType(TYPE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case OrmPackage.XML_ORDER_BY__VALUE :
- return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
- case OrmPackage.XML_ORDER_BY__TYPE :
- return type != TYPE_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
- if (baseClass == IOrderBy.class) {
- switch (derivedFeatureID) {
- case OrmPackage.XML_ORDER_BY__VALUE :
- return JpaCoreMappingsPackage.IORDER_BY__VALUE;
- case OrmPackage.XML_ORDER_BY__TYPE :
- return JpaCoreMappingsPackage.IORDER_BY__TYPE;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class> baseClass) {
- if (baseClass == IOrderBy.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IORDER_BY__VALUE :
- return OrmPackage.XML_ORDER_BY__VALUE;
- case JpaCoreMappingsPackage.IORDER_BY__TYPE :
- return OrmPackage.XML_ORDER_BY__TYPE;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (value: ");
- result.append(value);
- result.append(", type: ");
- result.append(type);
- result.append(')');
- return result.toString();
- }
-
- // private IMultiRelationshipMapping multiRelationshipMapping() {
- // return (IMultiRelationshipMapping) eContainer();
- // }
- //
- public void refreshDefaults(DefaultsContext defaultsContext) {
- // IEntity targetEntity = multiRelationshipMapping().getResolvedTargetEntity();
- // if (targetEntity != null) {
- // setValue(targetEntity.primaryKeyAttributeName() + " ASC");
- // }
- }
-} // XmlOrderBy
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/ManyToManyTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/ManyToManyTranslator.java
index d3268989c6..f2775fcbf2 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/ManyToManyTranslator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/ManyToManyTranslator.java
@@ -35,7 +35,6 @@ public class ManyToManyTranslator extends MultiRelationshipTranslator
createFetchTypeTranslator(),
createMappedByTranslator(),
createOrderByTranslator(),
- //getOrderByTranslator(),
createMapKeyTranslator(),
getJoinTableTranslator(),
createCascadeTranslator()
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MultiRelationshipTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MultiRelationshipTranslator.java
index ef8061725e..20b5c7be42 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MultiRelationshipTranslator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/MultiRelationshipTranslator.java
@@ -8,7 +8,6 @@
*******************************************************************************/
package org.eclipse.jpt.core.internal.content.orm.resource;
-import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping;
import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
import org.eclipse.wst.common.internal.emf.resource.Translator;
@@ -17,12 +16,9 @@ public abstract class MultiRelationshipTranslator extends RelationshipTranslator
{
private JoinTableTranslator tableTranslator;
- //private OrderByRefTranslator orderByTranslator;
-
public MultiRelationshipTranslator(String domNameAndPath) {
super(domNameAndPath);
this.tableTranslator = createTableTranslator();
- //this.orderByTranslator = createOrderByTranslator();
}
protected Translator createFetchTypeTranslator() {
@@ -38,17 +34,8 @@ public abstract class MultiRelationshipTranslator extends RelationshipTranslator
return this.tableTranslator;
}
-// protected OrderByRefTranslator getOrderByTranslator() {
-// return this.orderByTranslator;
-// }
-//
-// protected OrderByRefTranslator createOrderByTranslator() {
-// this.orderByTranslator = new OrderByRefTranslator();
-// return this.orderByTranslator;
-// }
-
- protected Translator createOrderByTranslator() {
- return new Translator(ORDER_BY , (EStructuralFeature) null);
+ protected OrderByTranslator createOrderByTranslator() {
+ return new OrderByTranslator();
}
protected Translator createMapKeyTranslator() {
@@ -57,6 +44,5 @@ public abstract class MultiRelationshipTranslator extends RelationshipTranslator
protected void setMapping(IMultiRelationshipMapping multiRelationshipMapping) {
this.getJoinTableTranslator().setMapping(multiRelationshipMapping);
- //this.getOrderByTranslator().setMapping(mapping);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OneToManyTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OneToManyTranslator.java
index cd623331f6..740d998852 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OneToManyTranslator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OneToManyTranslator.java
@@ -35,7 +35,6 @@ public class OneToManyTranslator extends MultiRelationshipTranslator
createFetchTypeTranslator(),
createMappedByTranslator(),
createOrderByTranslator(),
- //getOrderByTranslator(),
createMapKeyTranslator(),
getJoinTableTranslator(),
createCascadeTranslator()
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrderByRefTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrderByRefTranslator.java
deleted file mode 100644
index a2a282ec02..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrderByRefTranslator.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.content.orm.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jpt.core.internal.content.orm.OrmPackage;
-import org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.mappings.OrderingType;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-public class OrderByRefTranslator extends Translator implements OrmXmlMapper
-{
- protected static final OrmPackage JPA_CORE_XML_PKG =
- OrmPackage.eINSTANCE;
-
- private static Translator[] children;
-
- private IMultiRelationshipMapping mapping;
-
- public OrderByRefTranslator() {
- super(ORDER_BY, JPA_CORE_XML_PKG.getXmlMultiRelationshipMappingForXml_OrderByForXml());
- this.fStyle = EMPTY_TAG;
- }
-
-
- public Translator[] getChildren(Object target, int versionID) {
- if (children == null) {
- children = createChildren();
- }
- return children;
- }
-
- private static Translator[] createChildren() {
- return new Translator[] {
- new Translator(TEXT_ATTRIBUTE_VALUE, JpaCoreMappingsPackage.eINSTANCE.getIOrderBy_Value())
- };
- }
-
- public EObject createEMFObject(String nodeName, String readAheadName) {
- return this.mapping.getOrderBy();
- }
-
- protected IMultiRelationshipMapping getMapping() {
- return this.mapping;
- }
-
- void setMapping(IMultiRelationshipMapping mapping) {
- this.mapping = mapping;
- }
-
- @Override
- public Object convertStringToValue(String strValue, EObject owner) {
- if (strValue == null) {
- if (mapping.getOrderBy().getType() == OrderingType.PRIMARY_KEY) {
- return Boolean.TRUE;
- }
- }
- return super.convertStringToValue(strValue, owner);
- }
-
- public boolean isSetMOFValue(EObject emfObject) {
- boolean isSet = feature != null && emfObject.eIsSet(feature);
- return isSet && (mapping.getOrderBy().getType() == OrderingType.PRIMARY_KEY);
- }
-
- @Override
- public boolean isManagedByParent() {
- return (mapping.getOrderBy().getType() == OrderingType.PRIMARY_KEY);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrderByTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrderByTranslator.java
new file mode 100644
index 0000000000..78f118d7d5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrderByTranslator.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.core.internal.content.orm.resource;
+
+import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+public class OrderByTranslator extends Translator implements OrmXmlMapper
+{
+ public OrderByTranslator() {
+ super(ORDER_BY, JpaCoreMappingsPackage.eINSTANCE.getIMultiRelationshipMapping_OrderBy(), END_TAG_NO_INDENT);
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmAdapterFactory.java
index 0b5cb18202..2e42c3c2dd 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmAdapterFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmAdapterFactory.java
@@ -71,7 +71,6 @@ import org.eclipse.jpt.core.internal.content.orm.XmlNamedQuery;
import org.eclipse.jpt.core.internal.content.orm.XmlNullAttributeMapping;
import org.eclipse.jpt.core.internal.content.orm.XmlOneToMany;
import org.eclipse.jpt.core.internal.content.orm.XmlOneToOne;
-import org.eclipse.jpt.core.internal.content.orm.XmlOrderBy;
import org.eclipse.jpt.core.internal.content.orm.XmlOverride;
import org.eclipse.jpt.core.internal.content.orm.XmlPersistentAttribute;
import org.eclipse.jpt.core.internal.content.orm.XmlPersistentType;
@@ -116,7 +115,6 @@ import org.eclipse.jpt.core.internal.mappings.INamedQuery;
import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
import org.eclipse.jpt.core.internal.mappings.IOneToMany;
import org.eclipse.jpt.core.internal.mappings.IOneToOne;
-import org.eclipse.jpt.core.internal.mappings.IOrderBy;
import org.eclipse.jpt.core.internal.mappings.IOverride;
import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.internal.mappings.IQuery;
@@ -452,11 +450,6 @@ public class OrmAdapterFactory extends AdapterFactoryImpl
return createXmlTableGeneratorAdapter();
}
- @Override
- public Adapter caseXmlOrderBy(XmlOrderBy object) {
- return createXmlOrderByAdapter();
- }
-
@Override
public Adapter caseAbstractXmlQuery(AbstractXmlQuery object) {
return createAbstractXmlQueryAdapter();
@@ -732,11 +725,6 @@ public class OrmAdapterFactory extends AdapterFactoryImpl
return createITableGeneratorAdapter();
}
- @Override
- public Adapter caseIOrderBy(IOrderBy object) {
- return createIOrderByAdapter();
- }
-
@Override
public Adapter caseIQuery(IQuery object) {
return createIQueryAdapter();
@@ -1500,20 +1488,6 @@ public class OrmAdapterFactory extends AdapterFactoryImpl
return null;
}
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.orm.XmlOrderBy Xml Order By}'.
- *
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.orm.XmlOrderBy
- * @generated
- */
- public Adapter createXmlOrderByAdapter() {
- return null;
- }
-
/**
* Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.orm.AbstractXmlQuery Abstract Xml Query}'.
*
@@ -2088,20 +2062,6 @@ public class OrmAdapterFactory extends AdapterFactoryImpl
return null;
}
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IOrderBy IOrder By}'.
- *
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IOrderBy
- * @generated
- */
- public Adapter createIOrderByAdapter() {
- return null;
- }
-
/**
* Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IQuery IQuery}'.
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmSwitch.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmSwitch.java
index 6969850722..54e5ce9cda 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmSwitch.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/util/OrmSwitch.java
@@ -70,7 +70,6 @@ import org.eclipse.jpt.core.internal.content.orm.XmlNamedQuery;
import org.eclipse.jpt.core.internal.content.orm.XmlNullAttributeMapping;
import org.eclipse.jpt.core.internal.content.orm.XmlOneToMany;
import org.eclipse.jpt.core.internal.content.orm.XmlOneToOne;
-import org.eclipse.jpt.core.internal.content.orm.XmlOrderBy;
import org.eclipse.jpt.core.internal.content.orm.XmlOverride;
import org.eclipse.jpt.core.internal.content.orm.XmlPersistentAttribute;
import org.eclipse.jpt.core.internal.content.orm.XmlPersistentType;
@@ -115,7 +114,6 @@ import org.eclipse.jpt.core.internal.mappings.INamedQuery;
import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
import org.eclipse.jpt.core.internal.mappings.IOneToMany;
import org.eclipse.jpt.core.internal.mappings.IOneToOne;
-import org.eclipse.jpt.core.internal.mappings.IOrderBy;
import org.eclipse.jpt.core.internal.mappings.IOverride;
import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.internal.mappings.IQuery;
@@ -1341,25 +1339,6 @@ public class OrmSwitch
result = defaultCase(theEObject);
return result;
}
- case OrmPackage.XML_ORDER_BY : {
- XmlOrderBy xmlOrderBy = (XmlOrderBy) theEObject;
- T result = caseXmlOrderBy(xmlOrderBy);
- if (result == null)
- result = caseXmlEObject(xmlOrderBy);
- if (result == null)
- result = caseIOrderBy(xmlOrderBy);
- if (result == null)
- result = caseJpaEObject(xmlOrderBy);
- if (result == null)
- result = caseIXmlEObject(xmlOrderBy);
- if (result == null)
- result = caseIJpaSourceObject(xmlOrderBy);
- if (result == null)
- result = caseIJpaEObject(xmlOrderBy);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
case OrmPackage.ABSTRACT_XML_QUERY : {
AbstractXmlQuery abstractXmlQuery = (AbstractXmlQuery) theEObject;
T result = caseAbstractXmlQuery(abstractXmlQuery);
@@ -2288,21 +2267,6 @@ public class OrmSwitch
return null;
}
- /**
- * Returns the result of interpretting the object as an instance of 'Xml Order By'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of 'Xml Order By'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseXmlOrderBy(XmlOrderBy object) {
- return null;
- }
-
/**
* Returns the result of interpretting the object as an instance of 'Abstract Xml Query'.
*
@@ -2933,21 +2897,6 @@ public class OrmSwitch
return null;
}
- /**
- * Returns the result of interpretting the object as an instance of 'IOrder By'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of 'IOrder By'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIOrderBy(IOrderBy object) {
- return null;
- }
-
/**
* Returns the result of interpretting the object as an instance of 'IQuery'.
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IAbstractJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IAbstractJoinColumn.java
index 74ee7da63c..8cdd52ff5d 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IAbstractJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IAbstractJoinColumn.java
@@ -2,7 +2,7 @@
*
*
*
- * $Id: IAbstractJoinColumn.java,v 1.8 2007/05/23 18:40:10 kmoore Exp $
+ * $Id: IAbstractJoinColumn.java,v 1.9 2007/05/30 20:39:02 pfullbright Exp $
*/
package org.eclipse.jpt.core.internal.mappings;
@@ -117,11 +117,10 @@ public interface IAbstractJoinColumn extends INamedColumn
* Return the wrapper for the datasource table for the referenced column
*/
Table dbReferencedColumnTable();
-
+
/**
* return the list of join columns containing the join column
*/
List extends IAbstractJoinColumn> joinColumns();
-
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IJoinColumn.java
index f6f3b2268e..fe077636f4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IJoinColumn.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
-
/**
*
* A representation of the model object 'IJoin Column'.
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IMultiRelationshipMapping.java
index 5e5f0bcfd0..85db84e718 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IMultiRelationshipMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IMultiRelationshipMapping.java
@@ -19,9 +19,9 @@ import java.util.Iterator;
*
* The following features are supported:
*
+ * - {@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getOrderBy Order By}
* - {@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getFetch Fetch}
* - {@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getJoinTable Join Table}
- * - {@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getOrderBy Order By}
* - {@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getMapKey Map Key}
*
*
@@ -32,6 +32,32 @@ import java.util.Iterator;
*/
public interface IMultiRelationshipMapping extends INonOwningMapping
{
+ /**
+ * Returns the value of the 'Order By' attribute.
+ *
+ *
+ * If the meaning of the 'Order By' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Order By' attribute.
+ * @see #setOrderBy(String)
+ * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIMultiRelationshipMapping_OrderBy()
+ * @model unique="false" ordered="false"
+ * @generated
+ */
+ String getOrderBy();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getOrderBy Order By}' attribute.
+ *
+ *
+ * @param value the new value of the 'Order By' attribute.
+ * @see #getOrderBy()
+ * @generated
+ */
+ void setOrderBy(String value);
+
/**
* Returns the value of the 'Fetch' attribute.
* The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType}.
@@ -83,21 +109,6 @@ public interface IMultiRelationshipMapping extends INonOwningMapping
*/
boolean isJoinTableSpecified();
- /**
- * Returns the value of the 'Order By' containment reference.
- *
- *
- * If the meaning of the 'Order By' reference isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Order By' containment reference.
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIMultiRelationshipMapping_OrderBy()
- * @model containment="true" required="true" changeable="false"
- * @generated
- */
- IOrderBy getOrderBy();
-
/**
* Returns the value of the 'Map Key' attribute.
*
@@ -124,5 +135,45 @@ public interface IMultiRelationshipMapping extends INonOwningMapping
*/
void setMapKey(String value);
+ /**
+ *
+ *
+ * @model kind="operation" unique="false" required="true" ordered="false"
+ * @generated
+ */
+ boolean isNoOrdering();
+
+ /**
+ *
+ *
+ * @model
+ * @generated
+ */
+ void setNoOrdering();
+
+ /**
+ *
+ *
+ * @model kind="operation" unique="false" required="true" ordered="false"
+ * @generated
+ */
+ boolean isOrderByPk();
+
+ /**
+ *
+ *
+ * @model
+ * @generated
+ */
+ void setOrderByPk();
+
+ /**
+ *
+ *
+ * @model kind="operation" unique="false" required="true" ordered="false"
+ * @generated
+ */
+ boolean isCustomOrdering();
+
Iterator candidateMapKeyNames();
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IOrderBy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IOrderBy.java
deleted file mode 100644
index 90075968c3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IOrderBy.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.core.internal.mappings;
-
-import org.eclipse.jpt.core.internal.IJpaSourceObject;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- * A representation of the model object 'IOrder By'.
- *
- *
- *
- * The following features are supported:
- *
- * - {@link org.eclipse.jpt.core.internal.mappings.IOrderBy#getValue Value}
- * - {@link org.eclipse.jpt.core.internal.mappings.IOrderBy#getType Type}
- *
- *
- *
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIOrderBy()
- * @model kind="class" interface="true" abstract="true"
- * @generated
- */
-public interface IOrderBy extends IJpaSourceObject
-{
- /**
- * Returns the value of the 'Value' attribute.
- *
- *
- * If the meaning of the 'Value' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Value' attribute.
- * @see #setValue(String)
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIOrderBy_Value()
- * @model
- * @generated
- */
- String getValue();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.mappings.IOrderBy#getValue Value}' attribute.
- *
- *
- * @param value the new value of the 'Value' attribute.
- * @see #getValue()
- * @generated
- */
- void setValue(String value);
-
- /**
- * Returns the value of the 'Type' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.OrderingType}.
- *
- *
- * If the meaning of the 'Type' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Type' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.OrderingType
- * @see #setType(OrderingType)
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIOrderBy_Type()
- * @model
- * @generated
- */
- OrderingType getType();
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.mappings.IOrderBy#getType Type}' attribute.
- *
- *
- * @param value the new value of the 'Type' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.OrderingType
- * @see #getType()
- * @generated
- */
- void setType(OrderingType value);
-
- void refreshDefaults(DefaultsContext defaultsContext);
-} // IOrderBy
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISecondaryTable.java
index 14ecb50e94..9e64992251 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISecondaryTable.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISecondaryTable.java
@@ -122,6 +122,7 @@ public interface ISecondaryTable extends ITable
public Table dbReferencedColumnTable() {
return getTypeMapping().primaryDbTable();
}
+
public List joinColumns() {
return this.secondaryTable.getPrimaryKeyJoinColumns();
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsFactory.java
index f8bf52bf92..71e1442228 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsFactory.java
@@ -101,8 +101,6 @@ public class JpaCoreMappingsFactory extends EFactoryImpl
return createGenerationTypeFromString(eDataType, initialValue);
case JpaCoreMappingsPackage.ENUM_TYPE :
return createEnumTypeFromString(eDataType, initialValue);
- case JpaCoreMappingsPackage.ORDERING_TYPE :
- return createOrderingTypeFromString(eDataType, initialValue);
case JpaCoreMappingsPackage.CASCADE_TYPE :
return createCascadeTypeFromString(eDataType, initialValue);
default :
@@ -136,8 +134,6 @@ public class JpaCoreMappingsFactory extends EFactoryImpl
return convertGenerationTypeToString(eDataType, instanceValue);
case JpaCoreMappingsPackage.ENUM_TYPE :
return convertEnumTypeToString(eDataType, instanceValue);
- case JpaCoreMappingsPackage.ORDERING_TYPE :
- return convertOrderingTypeToString(eDataType, instanceValue);
case JpaCoreMappingsPackage.CASCADE_TYPE :
return convertCascadeTypeToString(eDataType, instanceValue);
default :
@@ -334,27 +330,6 @@ public class JpaCoreMappingsFactory extends EFactoryImpl
return instanceValue == null ? null : instanceValue.toString();
}
- /**
- *
- *
- * @generated
- */
- public OrderingType createOrderingTypeFromString(EDataType eDataType, String initialValue) {
- OrderingType result = OrderingType.get(initialValue);
- if (result == null)
- throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- *
- *
- * @generated
- */
- public String convertOrderingTypeToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
/**
*
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsPackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsPackage.java
index ece516c60f..b5399b7eed 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsPackage.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsPackage.java
@@ -1332,31 +1332,31 @@ public class JpaCoreMappingsPackage extends EPackageImpl
public static final int IMULTI_RELATIONSHIP_MAPPING__MAPPED_BY = INON_OWNING_MAPPING__MAPPED_BY;
/**
- * The feature id for the 'Fetch' attribute.
+ * The feature id for the 'Order By' attribute.
*
*
* @generated
* @ordered
*/
- public static final int IMULTI_RELATIONSHIP_MAPPING__FETCH = INON_OWNING_MAPPING_FEATURE_COUNT + 0;
+ public static final int IMULTI_RELATIONSHIP_MAPPING__ORDER_BY = INON_OWNING_MAPPING_FEATURE_COUNT + 0;
/**
- * The feature id for the 'Join Table' containment reference.
+ * The feature id for the 'Fetch' attribute.
*
*
* @generated
* @ordered
*/
- public static final int IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = INON_OWNING_MAPPING_FEATURE_COUNT + 1;
+ public static final int IMULTI_RELATIONSHIP_MAPPING__FETCH = INON_OWNING_MAPPING_FEATURE_COUNT + 1;
/**
- * The feature id for the 'Order By' containment reference.
+ * The feature id for the 'Join Table' containment reference.
*
*
* @generated
* @ordered
*/
- public static final int IMULTI_RELATIONSHIP_MAPPING__ORDER_BY = INON_OWNING_MAPPING_FEATURE_COUNT + 2;
+ public static final int IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = INON_OWNING_MAPPING_FEATURE_COUNT + 2;
/**
* The feature id for the 'Map Key' attribute.
@@ -1441,31 +1441,31 @@ public class JpaCoreMappingsPackage extends EPackageImpl
public static final int IONE_TO_MANY__MAPPED_BY = IMULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
/**
- * The feature id for the 'Fetch' attribute.
+ * The feature id for the 'Order By' attribute.
*
*
* @generated
* @ordered
*/
- public static final int IONE_TO_MANY__FETCH = IMULTI_RELATIONSHIP_MAPPING__FETCH;
+ public static final int IONE_TO_MANY__ORDER_BY = IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
/**
- * The feature id for the 'Join Table' containment reference.
+ * The feature id for the 'Fetch' attribute.
*
*
* @generated
* @ordered
*/
- public static final int IONE_TO_MANY__JOIN_TABLE = IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
+ public static final int IONE_TO_MANY__FETCH = IMULTI_RELATIONSHIP_MAPPING__FETCH;
/**
- * The feature id for the 'Order By' containment reference.
+ * The feature id for the 'Join Table' containment reference.
*
*
* @generated
* @ordered
*/
- public static final int IONE_TO_MANY__ORDER_BY = IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
+ public static final int IONE_TO_MANY__JOIN_TABLE = IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
/**
* The feature id for the 'Map Key' attribute.
@@ -1550,31 +1550,31 @@ public class JpaCoreMappingsPackage extends EPackageImpl
public static final int IMANY_TO_MANY__MAPPED_BY = IMULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
/**
- * The feature id for the 'Fetch' attribute.
+ * The feature id for the 'Order By' attribute.
*
*
* @generated
* @ordered
*/
- public static final int IMANY_TO_MANY__FETCH = IMULTI_RELATIONSHIP_MAPPING__FETCH;
+ public static final int IMANY_TO_MANY__ORDER_BY = IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
/**
- * The feature id for the 'Join Table' containment reference.
+ * The feature id for the 'Fetch' attribute.
*
*
* @generated
* @ordered
*/
- public static final int IMANY_TO_MANY__JOIN_TABLE = IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
+ public static final int IMANY_TO_MANY__FETCH = IMULTI_RELATIONSHIP_MAPPING__FETCH;
/**
- * The feature id for the 'Order By' containment reference.
+ * The feature id for the 'Join Table' containment reference.
*
*
* @generated
* @ordered
*/
- public static final int IMANY_TO_MANY__ORDER_BY = IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
+ public static final int IMANY_TO_MANY__JOIN_TABLE = IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
/**
* The feature id for the 'Map Key' attribute.
@@ -3230,43 +3230,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
*/
public static final int IGENERATED_VALUE_FEATURE_COUNT = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 2;
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.IOrderBy IOrder By}' class.
- *
- *
- * @see org.eclipse.jpt.core.internal.mappings.IOrderBy
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIOrderBy()
- * @generated
- */
- public static final int IORDER_BY = 36;
-
- /**
- * The feature id for the 'Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- public static final int IORDER_BY__VALUE = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the 'Type' attribute.
- *
- *
- * @generated
- * @ordered
- */
- public static final int IORDER_BY__TYPE = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the 'IOrder By' class.
- *
- *
- * @generated
- * @ordered
- */
- public static final int IORDER_BY_FEATURE_COUNT = JpaCorePackage.IJPA_SOURCE_OBJECT_FEATURE_COUNT + 2;
-
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.IQuery IQuery}' class.
*
@@ -3275,7 +3238,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIQuery()
* @generated
*/
- public static final int IQUERY = 37;
+ public static final int IQUERY = 36;
/**
* The feature id for the 'Name' attribute.
@@ -3321,7 +3284,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getINamedQuery()
* @generated
*/
- public static final int INAMED_QUERY = 38;
+ public static final int INAMED_QUERY = 37;
/**
* The feature id for the 'Name' attribute.
@@ -3367,7 +3330,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getINamedNativeQuery()
* @generated
*/
- public static final int INAMED_NATIVE_QUERY = 39;
+ public static final int INAMED_NATIVE_QUERY = 38;
/**
* The feature id for the 'Name' attribute.
@@ -3431,7 +3394,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIQueryHint()
* @generated
*/
- public static final int IQUERY_HINT = 40;
+ public static final int IQUERY_HINT = 39;
/**
* The feature id for the 'Name' attribute.
@@ -3468,7 +3431,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getICascade()
* @generated
*/
- public static final int ICASCADE = 41;
+ public static final int ICASCADE = 40;
/**
* The feature id for the 'All' attribute.
@@ -3532,7 +3495,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getDefaultEagerFetchType()
* @generated
*/
- public static final int DEFAULT_EAGER_FETCH_TYPE = 42;
+ public static final int DEFAULT_EAGER_FETCH_TYPE = 41;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType Default Lazy Fetch Type}' enum.
@@ -3542,7 +3505,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getDefaultLazyFetchType()
* @generated
*/
- public static final int DEFAULT_LAZY_FETCH_TYPE = 43;
+ public static final int DEFAULT_LAZY_FETCH_TYPE = 42;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.DefaultFalseBoolean Default False Boolean}' enum.
@@ -3552,7 +3515,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getDefaultFalseBoolean()
* @generated
*/
- public static final int DEFAULT_FALSE_BOOLEAN = 44;
+ public static final int DEFAULT_FALSE_BOOLEAN = 43;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean Default True Boolean}' enum.
@@ -3562,7 +3525,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getDefaultTrueBoolean()
* @generated
*/
- public static final int DEFAULT_TRUE_BOOLEAN = 45;
+ public static final int DEFAULT_TRUE_BOOLEAN = 44;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.TemporalType Temporal Type}' enum.
@@ -3572,7 +3535,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getTemporalType()
* @generated
*/
- public static final int TEMPORAL_TYPE = 46;
+ public static final int TEMPORAL_TYPE = 45;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.InheritanceType Inheritance Type}' enum.
@@ -3582,7 +3545,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getInheritanceType()
* @generated
*/
- public static final int INHERITANCE_TYPE = 47;
+ public static final int INHERITANCE_TYPE = 46;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.DiscriminatorType Discriminator Type}' enum.
@@ -3592,7 +3555,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getDiscriminatorType()
* @generated
*/
- public static final int DISCRIMINATOR_TYPE = 48;
+ public static final int DISCRIMINATOR_TYPE = 47;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.GenerationType Generation Type}' enum.
@@ -3602,7 +3565,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getGenerationType()
* @generated
*/
- public static final int GENERATION_TYPE = 49;
+ public static final int GENERATION_TYPE = 48;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.EnumType Enum Type}' enum.
@@ -3612,17 +3575,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getEnumType()
* @generated
*/
- public static final int ENUM_TYPE = 50;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.OrderingType Ordering Type}' enum.
- *
- *
- * @see org.eclipse.jpt.core.internal.mappings.OrderingType
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getOrderingType()
- * @generated
- */
- public static final int ORDERING_TYPE = 51;
+ public static final int ENUM_TYPE = 49;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.CascadeType Cascade Type}' enum.
@@ -3632,7 +3585,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getCascadeType()
* @generated
*/
- public static final int CASCADE_TYPE = 52;
+ public static final int CASCADE_TYPE = 50;
/**
*
@@ -3886,13 +3839,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
*/
private EClass iGeneratedValueEClass = null;
- /**
- *
- *
- * @generated
- */
- private EClass iOrderByEClass = null;
-
/**
*
*
@@ -3991,13 +3937,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
*/
private EEnum enumTypeEEnum = null;
- /**
- *
- *
- * @generated
- */
- private EEnum orderingTypeEEnum = null;
-
/**
*
*
@@ -5226,41 +5165,41 @@ public class JpaCoreMappingsPackage extends EPackageImpl
}
/**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getFetch Fetch}'.
+ * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getOrderBy Order By}'.
*
*
- * @return the meta object for the attribute 'Fetch'.
- * @see org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getFetch()
+ * @return the meta object for the attribute 'Order By'.
+ * @see org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getOrderBy()
* @see #getIMultiRelationshipMapping()
* @generated
*/
- public EAttribute getIMultiRelationshipMapping_Fetch() {
+ public EAttribute getIMultiRelationshipMapping_OrderBy() {
return (EAttribute) iMultiRelationshipMappingEClass.getEStructuralFeatures().get(0);
}
/**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getJoinTable Join Table}'.
+ * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getFetch Fetch}'.
*
*
- * @return the meta object for the containment reference 'Join Table'.
- * @see org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getJoinTable()
+ * @return the meta object for the attribute 'Fetch'.
+ * @see org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getFetch()
* @see #getIMultiRelationshipMapping()
* @generated
*/
- public EReference getIMultiRelationshipMapping_JoinTable() {
- return (EReference) iMultiRelationshipMappingEClass.getEStructuralFeatures().get(1);
+ public EAttribute getIMultiRelationshipMapping_Fetch() {
+ return (EAttribute) iMultiRelationshipMappingEClass.getEStructuralFeatures().get(1);
}
/**
- * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getOrderBy Order By}'.
+ * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getJoinTable Join Table}'.
*
*
- * @return the meta object for the containment reference 'Order By'.
- * @see org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getOrderBy()
+ * @return the meta object for the containment reference 'Join Table'.
+ * @see org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping#getJoinTable()
* @see #getIMultiRelationshipMapping()
* @generated
*/
- public EReference getIMultiRelationshipMapping_OrderBy() {
+ public EReference getIMultiRelationshipMapping_JoinTable() {
return (EReference) iMultiRelationshipMappingEClass.getEStructuralFeatures().get(2);
}
@@ -6234,44 +6173,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
return (EAttribute) iGeneratedValueEClass.getEStructuralFeatures().get(1);
}
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.mappings.IOrderBy IOrder By}'.
- *
- *
- * @return the meta object for class 'IOrder By'.
- * @see org.eclipse.jpt.core.internal.mappings.IOrderBy
- * @generated
- */
- public EClass getIOrderBy() {
- return iOrderByEClass;
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IOrderBy#getValue Value}'.
- *
- *
- * @return the meta object for the attribute 'Value'.
- * @see org.eclipse.jpt.core.internal.mappings.IOrderBy#getValue()
- * @see #getIOrderBy()
- * @generated
- */
- public EAttribute getIOrderBy_Value() {
- return (EAttribute) iOrderByEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IOrderBy#getType Type}'.
- *
- *
- * @return the meta object for the attribute 'Type'.
- * @see org.eclipse.jpt.core.internal.mappings.IOrderBy#getType()
- * @see #getIOrderBy()
- * @generated
- */
- public EAttribute getIOrderBy_Type() {
- return (EAttribute) iOrderByEClass.getEStructuralFeatures().get(1);
- }
-
/**
* Returns the meta object for class '{@link org.eclipse.jpt.core.internal.mappings.IQuery IQuery}'.
*
@@ -6596,18 +6497,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
return enumTypeEEnum;
}
- /**
- * Returns the meta object for enum '{@link org.eclipse.jpt.core.internal.mappings.OrderingType Ordering Type}'.
- *
- *
- * @return the meta object for enum 'Ordering Type'.
- * @see org.eclipse.jpt.core.internal.mappings.OrderingType
- * @generated
- */
- public EEnum getOrderingType() {
- return orderingTypeEEnum;
- }
-
/**
* Returns the meta object for enum '{@link org.eclipse.jpt.core.internal.mappings.CascadeType Cascade Type}'.
*
@@ -6739,9 +6628,9 @@ public class JpaCoreMappingsPackage extends EPackageImpl
iNonOwningMappingEClass = createEClass(INON_OWNING_MAPPING);
createEAttribute(iNonOwningMappingEClass, INON_OWNING_MAPPING__MAPPED_BY);
iMultiRelationshipMappingEClass = createEClass(IMULTI_RELATIONSHIP_MAPPING);
+ createEAttribute(iMultiRelationshipMappingEClass, IMULTI_RELATIONSHIP_MAPPING__ORDER_BY);
createEAttribute(iMultiRelationshipMappingEClass, IMULTI_RELATIONSHIP_MAPPING__FETCH);
createEReference(iMultiRelationshipMappingEClass, IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE);
- createEReference(iMultiRelationshipMappingEClass, IMULTI_RELATIONSHIP_MAPPING__ORDER_BY);
createEAttribute(iMultiRelationshipMappingEClass, IMULTI_RELATIONSHIP_MAPPING__MAP_KEY);
iOneToManyEClass = createEClass(IONE_TO_MANY);
iManyToManyEClass = createEClass(IMANY_TO_MANY);
@@ -6818,9 +6707,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
iGeneratedValueEClass = createEClass(IGENERATED_VALUE);
createEAttribute(iGeneratedValueEClass, IGENERATED_VALUE__STRATEGY);
createEAttribute(iGeneratedValueEClass, IGENERATED_VALUE__GENERATOR);
- iOrderByEClass = createEClass(IORDER_BY);
- createEAttribute(iOrderByEClass, IORDER_BY__VALUE);
- createEAttribute(iOrderByEClass, IORDER_BY__TYPE);
iQueryEClass = createEClass(IQUERY);
createEAttribute(iQueryEClass, IQUERY__NAME);
createEAttribute(iQueryEClass, IQUERY__QUERY);
@@ -6848,7 +6734,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
discriminatorTypeEEnum = createEEnum(DISCRIMINATOR_TYPE);
generationTypeEEnum = createEEnum(GENERATION_TYPE);
enumTypeEEnum = createEEnum(ENUM_TYPE);
- orderingTypeEEnum = createEEnum(ORDERING_TYPE);
cascadeTypeEEnum = createEEnum(CASCADE_TYPE);
}
@@ -6921,7 +6806,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
iTableGeneratorEClass.getESuperTypes().add(this.getIGenerator());
iSequenceGeneratorEClass.getESuperTypes().add(this.getIGenerator());
iGeneratedValueEClass.getESuperTypes().add(theJpaCorePackage.getIJpaSourceObject());
- iOrderByEClass.getESuperTypes().add(theJpaCorePackage.getIJpaSourceObject());
iQueryEClass.getESuperTypes().add(theJpaCorePackage.getIJpaSourceObject());
iNamedQueryEClass.getESuperTypes().add(theJpaCorePackage.getIJpaSourceObject());
iNamedQueryEClass.getESuperTypes().add(this.getIQuery());
@@ -7025,10 +6909,15 @@ public class JpaCoreMappingsPackage extends EPackageImpl
initEClass(iNonOwningMappingEClass, INonOwningMapping.class, "INonOwningMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getINonOwningMapping_MappedBy(), theEcorePackage.getEString(), "mappedBy", null, 0, 1, INonOwningMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(iMultiRelationshipMappingEClass, IMultiRelationshipMapping.class, "IMultiRelationshipMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getIMultiRelationshipMapping_OrderBy(), theEcorePackage.getEString(), "orderBy", null, 0, 1, IMultiRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(getIMultiRelationshipMapping_Fetch(), this.getDefaultLazyFetchType(), "fetch", null, 0, 1, IMultiRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getIMultiRelationshipMapping_JoinTable(), this.getIJoinTable(), null, "joinTable", null, 1, 1, IMultiRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getIMultiRelationshipMapping_OrderBy(), this.getIOrderBy(), null, "orderBy", null, 1, 1, IMultiRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIMultiRelationshipMapping_MapKey(), theEcorePackage.getEString(), "mapKey", null, 0, 1, IMultiRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ addEOperation(iMultiRelationshipMappingEClass, ecorePackage.getEBoolean(), "isNoOrdering", 1, 1);
+ addEOperation(iMultiRelationshipMappingEClass, null, "setNoOrdering");
+ addEOperation(iMultiRelationshipMappingEClass, theEcorePackage.getEBoolean(), "isOrderByPk", 1, 1);
+ addEOperation(iMultiRelationshipMappingEClass, null, "setOrderByPk");
+ addEOperation(iMultiRelationshipMappingEClass, theEcorePackage.getEBoolean(), "isCustomOrdering", 1, 1);
initEClass(iOneToManyEClass, IOneToMany.class, "IOneToMany", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(iManyToManyEClass, IManyToMany.class, "IManyToMany", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(iSingleRelationshipMappingEClass, ISingleRelationshipMapping.class, "ISingleRelationshipMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -7105,9 +6994,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
initEClass(iGeneratedValueEClass, IGeneratedValue.class, "IGeneratedValue", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getIGeneratedValue_Strategy(), this.getGenerationType(), "strategy", null, 0, 1, IGeneratedValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIGeneratedValue_Generator(), theEcorePackage.getEString(), "generator", null, 0, 1, IGeneratedValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEClass(iOrderByEClass, IOrderBy.class, "IOrderBy", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getIOrderBy_Value(), theEcorePackage.getEString(), "value", null, 0, 1, IOrderBy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getIOrderBy_Type(), this.getOrderingType(), "type", null, 0, 1, IOrderBy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(iQueryEClass, IQuery.class, "IQuery", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getIQuery_Name(), theEcorePackage.getEString(), "name", null, 0, 1, IQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIQuery_Query(), theEcorePackage.getEString(), "query", null, 0, 1, IQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -7167,10 +7053,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
addEEnumLiteral(enumTypeEEnum, EnumType.DEFAULT);
addEEnumLiteral(enumTypeEEnum, EnumType.ORDINAL);
addEEnumLiteral(enumTypeEEnum, EnumType.STRING);
- initEEnum(orderingTypeEEnum, OrderingType.class, "OrderingType");
- addEEnumLiteral(orderingTypeEEnum, OrderingType.NONE);
- addEEnumLiteral(orderingTypeEEnum, OrderingType.PRIMARY_KEY);
- addEEnumLiteral(orderingTypeEEnum, OrderingType.CUSTOM);
initEEnum(cascadeTypeEEnum, CascadeType.class, "CascadeType");
addEEnumLiteral(cascadeTypeEEnum, CascadeType.ALL);
addEEnumLiteral(cascadeTypeEEnum, CascadeType.PERSIST);
@@ -7943,28 +7825,28 @@ public class JpaCoreMappingsPackage extends EPackageImpl
public static final EClass IMULTI_RELATIONSHIP_MAPPING = eINSTANCE.getIMultiRelationshipMapping();
/**
- * The meta object literal for the 'Fetch' attribute feature.
+ * The meta object literal for the 'Order By' attribute feature.
*
*
* @generated
*/
- public static final EAttribute IMULTI_RELATIONSHIP_MAPPING__FETCH = eINSTANCE.getIMultiRelationshipMapping_Fetch();
+ public static final EAttribute IMULTI_RELATIONSHIP_MAPPING__ORDER_BY = eINSTANCE.getIMultiRelationshipMapping_OrderBy();
/**
- * The meta object literal for the 'Join Table' containment reference feature.
+ * The meta object literal for the 'Fetch' attribute feature.
*
*
* @generated
*/
- public static final EReference IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = eINSTANCE.getIMultiRelationshipMapping_JoinTable();
+ public static final EAttribute IMULTI_RELATIONSHIP_MAPPING__FETCH = eINSTANCE.getIMultiRelationshipMapping_Fetch();
/**
- * The meta object literal for the 'Order By' containment reference feature.
+ * The meta object literal for the 'Join Table' containment reference feature.
*
*
* @generated
*/
- public static final EReference IMULTI_RELATIONSHIP_MAPPING__ORDER_BY = eINSTANCE.getIMultiRelationshipMapping_OrderBy();
+ public static final EReference IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = eINSTANCE.getIMultiRelationshipMapping_JoinTable();
/**
* The meta object literal for the 'Map Key' attribute feature.
@@ -8610,32 +8492,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
*/
public static final EAttribute IGENERATED_VALUE__GENERATOR = eINSTANCE.getIGeneratedValue_Generator();
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.mappings.IOrderBy IOrder By}' class.
- *
- *
- * @see org.eclipse.jpt.core.internal.mappings.IOrderBy
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIOrderBy()
- * @generated
- */
- public static final EClass IORDER_BY = eINSTANCE.getIOrderBy();
-
- /**
- * The meta object literal for the 'Value' attribute feature.
- *
- *
- * @generated
- */
- public static final EAttribute IORDER_BY__VALUE = eINSTANCE.getIOrderBy_Value();
-
- /**
- * The meta object literal for the 'Type' attribute feature.
- *
- *
- * @generated
- */
- public static final EAttribute IORDER_BY__TYPE = eINSTANCE.getIOrderBy_Type();
-
/**
* The meta object literal for the '{@link org.eclipse.jpt.core.internal.mappings.IQuery IQuery}' class.
*
@@ -8872,16 +8728,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
*/
public static final EEnum ENUM_TYPE = eINSTANCE.getEnumType();
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.mappings.OrderingType Ordering Type}' enum.
- *
- *
- * @see org.eclipse.jpt.core.internal.mappings.OrderingType
- * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getOrderingType()
- * @generated
- */
- public static final EEnum ORDERING_TYPE = eINSTANCE.getOrderingType();
-
/**
* The meta object literal for the '{@link org.eclipse.jpt.core.internal.mappings.CascadeType Cascade Type}' enum.
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsAdapterFactory.java
index fa2fc4e816..5a79a56363 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsAdapterFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsAdapterFactory.java
@@ -45,7 +45,6 @@ import org.eclipse.jpt.core.internal.mappings.INamedQuery;
import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
import org.eclipse.jpt.core.internal.mappings.IOneToMany;
import org.eclipse.jpt.core.internal.mappings.IOneToOne;
-import org.eclipse.jpt.core.internal.mappings.IOrderBy;
import org.eclipse.jpt.core.internal.mappings.IOverride;
import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.internal.mappings.IQuery;
@@ -297,11 +296,6 @@ public class JpaCoreMappingsAdapterFactory extends AdapterFactoryImpl
return createIGeneratedValueAdapter();
}
- @Override
- public Adapter caseIOrderBy(IOrderBy object) {
- return createIOrderByAdapter();
- }
-
@Override
public Adapter caseIQuery(IQuery object) {
return createIQueryAdapter();
@@ -870,20 +864,6 @@ public class JpaCoreMappingsAdapterFactory extends AdapterFactoryImpl
return null;
}
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IOrderBy IOrder By}'.
- *
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IOrderBy
- * @generated
- */
- public Adapter createIOrderByAdapter() {
- return null;
- }
-
/**
* Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IQuery IQuery}'.
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsSwitch.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsSwitch.java
index 99bc98d55a..db4c09b572 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsSwitch.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/util/JpaCoreMappingsSwitch.java
@@ -44,7 +44,6 @@ import org.eclipse.jpt.core.internal.mappings.INamedQuery;
import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
import org.eclipse.jpt.core.internal.mappings.IOneToMany;
import org.eclipse.jpt.core.internal.mappings.IOneToOne;
-import org.eclipse.jpt.core.internal.mappings.IOrderBy;
import org.eclipse.jpt.core.internal.mappings.IOverride;
import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.internal.mappings.IQuery;
@@ -628,17 +627,6 @@ public class JpaCoreMappingsSwitch
result = defaultCase(theEObject);
return result;
}
- case JpaCoreMappingsPackage.IORDER_BY : {
- IOrderBy iOrderBy = (IOrderBy) theEObject;
- T result = caseIOrderBy(iOrderBy);
- if (result == null)
- result = caseIJpaSourceObject(iOrderBy);
- if (result == null)
- result = caseIJpaEObject(iOrderBy);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
case JpaCoreMappingsPackage.IQUERY : {
IQuery iQuery = (IQuery) theEObject;
T result = caseIQuery(iQuery);
@@ -1243,21 +1231,6 @@ public class JpaCoreMappingsSwitch
return null;
}
- /**
- * Returns the result of interpretting the object as an instance of 'IOrder By'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of 'IOrder By'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIOrderBy(IOrderBy object) {
- return null;
- }
-
/**
* Returns the result of interpretting the object as an instance of 'IQuery'.
*
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JavaMultiRelationshipMappingContext.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JavaMultiRelationshipMappingContext.java
index 091ec3a072..87b72940f7 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JavaMultiRelationshipMappingContext.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JavaMultiRelationshipMappingContext.java
@@ -36,7 +36,6 @@ public abstract class JavaMultiRelationshipMappingContext extends JavaRelationsh
public void refreshDefaultsInternal(DefaultsContext defaultsContext) {
super.refreshDefaultsInternal(defaultsContext);
this.joinTableContext.refreshDefaults(defaultsContext);
- getMapping().getOrderBy().refreshDefaults(defaultsContext);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlMultiRelationshipMappingContext.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlMultiRelationshipMappingContext.java
index eb621a135b..becd8cd84d 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlMultiRelationshipMappingContext.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlMultiRelationshipMappingContext.java
@@ -34,7 +34,6 @@ public abstract class XmlMultiRelationshipMappingContext
public void refreshDefaults(final DefaultsContext defaultsContext) {
super.refreshDefaults(defaultsContext);
this.joinTableContext.refreshDefaults(defaultsContext);
- multiRelationshipMapping().getOrderBy().refreshDefaults(defaultsContext);
}
@Override
--
cgit v1.2.3