Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2007-05-06 19:05:52 -0400
committerkmoore2007-05-06 19:05:52 -0400
commitf4bf44aa6b97ba82134ba386482bdccefe836e86 (patch)
tree6a0f6226d8b7ada6f5a4030e136fff0e32cc77fb
parent765d3acc77568028486da87b942a21f741496d00 (diff)
downloadwebtools.dali-f4bf44aa6b97ba82134ba386482bdccefe836e86.tar.gz
webtools.dali-f4bf44aa6b97ba82134ba386482bdccefe836e86.tar.xz
webtools.dali-f4bf44aa6b97ba82134ba386482bdccefe836e86.zip
142011 - editing of secondary tables
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/model/core.ecore2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/model/java.ecore5
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/model/orm.ecore5
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaCorePackage.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaProject.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/XmlEObject.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JpaJavaPackage.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntity.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSecondaryTable.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java80
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/OrmPackage.java123
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntity.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityInternal.java136
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlPersistentAttribute.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrmXmlResourceImpl.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/SecondaryTableTranslator.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/persistence/PersistenceUnitTransactionType.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/persistence/resource/PersistenceResource.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultEagerFetchType.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultFalseBoolean.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultLazyFetchType.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultTrueBoolean.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DiscriminatorType.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/EnumType.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/GenerationType.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IAbstractJoinColumn.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IAssociationOverride.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IEmbedded.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IEntity.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IJoinColumn.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IJoinTable.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/INamedColumn.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IOverride.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISingleRelationshipMapping.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITable.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/InheritanceType.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/JpaCoreMappingsPackage.java108
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/OrderingType.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/TemporalType.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlEntityContext.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/property_files/jpa_ui_mappings.properties11
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/JpaUiMappingsMessages.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/CatalogCombo.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EntityComposite.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnsComposite.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SchemaCombo.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SecondaryTableDialog.java234
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SecondaryTablesComposite.java330
48 files changed, 962 insertions, 358 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/core.ecore b/jpa/plugins/org.eclipse.jpt.core/model/core.ecore
index e278cdf354..1494dd9ae6 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/core.ecore
+++ b/jpa/plugins/org.eclipse.jpt.core/model/core.ecore
@@ -130,6 +130,8 @@
changeable="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="table" lowerBound="1"
eType="#//mappings/ITable" changeable="false" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="specifiedSecondaryTables"
+ upperBound="-1" eType="#//mappings/ISecondaryTable" containment="true" resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="primaryKeyJoinColumns"
upperBound="-1" eType="#//mappings/IPrimaryKeyJoinColumn" changeable="false"
volatile="true" transient="true" containment="true" resolveProxies="false"/>
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/java.ecore b/jpa/plugins/org.eclipse.jpt.core/model/java.ecore
index 605cc31a9a..ef45046bf5 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/java.ecore
+++ b/jpa/plugins/org.eclipse.jpt.core/model/java.ecore
@@ -35,10 +35,7 @@
</eClassifiers>
<eSubpackages name="mappings" nsURI="jpt.core.java.mappings.xmi" nsPrefix="jpt.core.java.mappings">
<eClassifiers xsi:type="ecore:EClass" name="JavaTypeMapping" abstract="true" eSuperTypes="#//JavaEObject #//IJavaTypeMapping"/>
- <eClassifiers xsi:type="ecore:EClass" name="JavaEntity" eSuperTypes="#//mappings/JavaTypeMapping core.ecore#//mappings/IEntity">
- <eStructuralFeatures xsi:type="ecore:EReference" name="secondaryTables" upperBound="-1"
- eType="ecore:EClass core.ecore#//mappings/ISecondaryTable" containment="true"/>
- </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="JavaEntity" eSuperTypes="#//mappings/JavaTypeMapping core.ecore#//mappings/IEntity"/>
<eClassifiers xsi:type="ecore:EClass" name="JavaMappedSuperclass" eSuperTypes="#//mappings/JavaTypeMapping core.ecore#//mappings/IMappedSuperclass"/>
<eClassifiers xsi:type="ecore:EClass" name="JavaEmbeddable" eSuperTypes="#//mappings/JavaTypeMapping core.ecore#//mappings/IEmbeddable"/>
<eClassifiers xsi:type="ecore:EClass" name="JavaNullTypeMapping" eSuperTypes="#//mappings/JavaTypeMapping"/>
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore b/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
index 2d3a575788..2ee6c9b047 100644
--- a/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
+++ b/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
@@ -96,10 +96,7 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="secondaryTables" upperBound="-1"
eType="ecore:EClass core.ecore#//mappings/ISecondaryTable" changeable="false"
volatile="true" transient="true" containment="true" resolveProxies="false"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="specifiedSecondaryTables"
- upperBound="-1" eType="ecore:EClass core.ecore#//mappings/ISecondaryTable"
- containment="true" resolveProxies="false"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="defaultSecondaryTables"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="virtualSecondaryTables"
upperBound="-1" eType="ecore:EClass core.ecore#//mappings/ISecondaryTable"
containment="true" resolveProxies="false"/>
</eClassifiers>
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaCorePackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaCorePackage.java
index 0be500a7e0..9b2feb4f36 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaCorePackage.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaCorePackage.java
@@ -1478,8 +1478,6 @@ public class JpaCorePackage extends EPackageImpl
// Create resource
createResource(eNS_URI);
}
-
-
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaProject.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaProject.java
index 86f90144a5..ac0f4b46b1 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaProject.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaProject.java
@@ -377,7 +377,7 @@ public class JpaProject extends JpaEObject implements IJpaProject
}
public boolean isDiscoverAnnotatedClasses() {
- if (! isSetDiscoverAnnotatedClasses()) {
+ if (!isSetDiscoverAnnotatedClasses()) {
setDiscoverAnnotatedClasses(JpaFacetUtils.getDiscoverAnnotatedClasses(project));
}
return isDiscoverAnnotatedClassesGen();
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/XmlEObject.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/XmlEObject.java
index ef0b5647e0..2db6130ae6 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/XmlEObject.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/XmlEObject.java
@@ -89,8 +89,6 @@ public abstract class XmlEObject extends JpaEObject implements IXmlEObject
public IDOMNode getNode() {
return this.node;
}
-
-
protected class XmlEAdapterList extends EAdapterList
{
public XmlEAdapterList(Notifier notifier) {
@@ -204,8 +202,6 @@ public abstract class XmlEObject extends JpaEObject implements IXmlEObject
// when you override this method, don't forget to include:
// super.addInsignificantXmlFeatureIdsTo(insignificantXmlFeatureIds);
}
-
-
/**
* Implementation of ITextRange that adapts a IDOMNode.
*/
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JpaJavaPackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JpaJavaPackage.java
index 33ea8c9570..d8ed72742c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JpaJavaPackage.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/JpaJavaPackage.java
@@ -662,8 +662,6 @@ public class JpaJavaPackage extends EPackageImpl
// Create resource
createResource(eNS_URI);
}
-
-
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntity.java
index 48f0d0e099..8e54c6729a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntity.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntity.java
@@ -65,12 +65,6 @@ import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
* A representation of the model object '<em><b>Java Entity</b></em>'.
* <!-- end-user-doc -->
*
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity#getSecondaryTables <em>Secondary Tables</em>}</li>
- * </ul>
- * </p>
*
* @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEntity()
* @model kind="class"
@@ -129,6 +123,16 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
protected ITable table;
/**
+ * The cached value of the '{@link #getSpecifiedSecondaryTables() <em>Specified Secondary Tables</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSpecifiedSecondaryTables()
+ * @generated
+ * @ordered
+ */
+ protected EList<ISecondaryTable> specifiedSecondaryTables;
+
+ /**
* The cached value of the '{@link #getSpecifiedPrimaryKeyJoinColumns() <em>Specified Primary Key Join Columns</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -308,16 +312,6 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
*/
protected EList<INamedNativeQuery> namedNativeQueries;
- /**
- * The cached value of the '{@link #getSecondaryTables() <em>Secondary Tables</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSecondaryTables()
- * @generated
- * @ordered
- */
- protected EList<ISecondaryTable> secondaryTables;
-
private AnnotationElementAdapter nameAdapter;
private AnnotationElementAdapter inheritanceStrategyAdapter;
@@ -407,7 +401,7 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
case JpaCoreMappingsPackage.IENTITY__SPECIFIED_ASSOCIATION_OVERRIDES :
this.associationOverridesChanged(notification);
break;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SECONDARY_TABLES :
+ case JpaCoreMappingsPackage.IENTITY__SPECIFIED_SECONDARY_TABLES :
this.secondaryTablesChanged(notification);
break;
case JpaCoreMappingsPackage.IENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
@@ -1238,24 +1232,28 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
}
/**
- * Returns the value of the '<em><b>Secondary Tables</b></em>' containment reference list.
+ * Returns the value of the '<em><b>Specified Secondary Tables</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.ISecondaryTable}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Secondary Tables</em>' containment reference list isn't clear,
+ * If the meaning of the '<em>Specified Secondary Tables</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Secondary Tables</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEntity_SecondaryTables()
+ * @return the value of the '<em>Specified Secondary Tables</em>' containment reference list.
+ * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_SpecifiedSecondaryTables()
* @model type="org.eclipse.jpt.core.internal.mappings.ISecondaryTable" containment="true"
* @generated
*/
- public EList<ISecondaryTable> getSecondaryTables() {
- if (secondaryTables == null) {
- secondaryTables = new EObjectContainmentEList<ISecondaryTable>(ISecondaryTable.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__SECONDARY_TABLES);
+ public EList<ISecondaryTable> getSpecifiedSecondaryTables() {
+ if (specifiedSecondaryTables == null) {
+ specifiedSecondaryTables = new EObjectContainmentEList<ISecondaryTable>(ISecondaryTable.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_SECONDARY_TABLES);
}
- return secondaryTables;
+ return specifiedSecondaryTables;
+ }
+
+ public EList<ISecondaryTable> getSecondaryTables() {
+ return getSpecifiedSecondaryTables();
}
public boolean containsSecondaryTable(String name) {
@@ -1803,6 +1801,8 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
switch (featureID) {
case JpaJavaMappingsPackage.JAVA_ENTITY__TABLE :
return basicSetTable(null, msgs);
+ case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_SECONDARY_TABLES :
+ return ((InternalEList<?>) getSpecifiedSecondaryTables()).basicRemove(otherEnd, msgs);
case JpaJavaMappingsPackage.JAVA_ENTITY__PRIMARY_KEY_JOIN_COLUMNS :
return ((InternalEList<?>) getPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
@@ -1831,8 +1831,6 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
return ((InternalEList<?>) getNamedQueries()).basicRemove(otherEnd, msgs);
case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES :
return ((InternalEList<?>) getNamedNativeQueries()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__SECONDARY_TABLES :
- return ((InternalEList<?>) getSecondaryTables()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -1858,6 +1856,8 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
return getDefaultName();
case JpaJavaMappingsPackage.JAVA_ENTITY__TABLE :
return getTable();
+ case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_SECONDARY_TABLES :
+ return getSpecifiedSecondaryTables();
case JpaJavaMappingsPackage.JAVA_ENTITY__PRIMARY_KEY_JOIN_COLUMNS :
return getPrimaryKeyJoinColumns();
case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
@@ -1894,8 +1894,6 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
return getNamedQueries();
case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES :
return getNamedNativeQueries();
- case JpaJavaMappingsPackage.JAVA_ENTITY__SECONDARY_TABLES :
- return getSecondaryTables();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -1912,6 +1910,10 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_NAME :
setSpecifiedName((String) newValue);
return;
+ case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_SECONDARY_TABLES :
+ getSpecifiedSecondaryTables().clear();
+ getSpecifiedSecondaryTables().addAll((Collection<? extends ISecondaryTable>) newValue);
+ return;
case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
getSpecifiedPrimaryKeyJoinColumns().clear();
getSpecifiedPrimaryKeyJoinColumns().addAll((Collection<? extends IPrimaryKeyJoinColumn>) newValue);
@@ -1959,10 +1961,6 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
getNamedNativeQueries().clear();
getNamedNativeQueries().addAll((Collection<? extends INamedNativeQuery>) newValue);
return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SECONDARY_TABLES :
- getSecondaryTables().clear();
- getSecondaryTables().addAll((Collection<? extends ISecondaryTable>) newValue);
- return;
}
super.eSet(featureID, newValue);
}
@@ -1978,6 +1976,9 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_NAME :
setSpecifiedName(SPECIFIED_NAME_EDEFAULT);
return;
+ case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_SECONDARY_TABLES :
+ getSpecifiedSecondaryTables().clear();
+ return;
case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
getSpecifiedPrimaryKeyJoinColumns().clear();
return;
@@ -2017,9 +2018,6 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES :
getNamedNativeQueries().clear();
return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SECONDARY_TABLES :
- getSecondaryTables().clear();
- return;
}
super.eUnset(featureID);
}
@@ -2038,6 +2036,8 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
return DEFAULT_NAME_EDEFAULT == null ? defaultName != null : !DEFAULT_NAME_EDEFAULT.equals(defaultName);
case JpaJavaMappingsPackage.JAVA_ENTITY__TABLE :
return table != null;
+ case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_SECONDARY_TABLES :
+ return specifiedSecondaryTables != null && !specifiedSecondaryTables.isEmpty();
case JpaJavaMappingsPackage.JAVA_ENTITY__PRIMARY_KEY_JOIN_COLUMNS :
return !getPrimaryKeyJoinColumns().isEmpty();
case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
@@ -2074,8 +2074,6 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
return namedQueries != null && !namedQueries.isEmpty();
case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES :
return namedNativeQueries != null && !namedNativeQueries.isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__SECONDARY_TABLES :
- return secondaryTables != null && !secondaryTables.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -2095,6 +2093,8 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
return JpaCoreMappingsPackage.IENTITY__DEFAULT_NAME;
case JpaJavaMappingsPackage.JAVA_ENTITY__TABLE :
return JpaCoreMappingsPackage.IENTITY__TABLE;
+ case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_SECONDARY_TABLES :
+ return JpaCoreMappingsPackage.IENTITY__SPECIFIED_SECONDARY_TABLES;
case JpaJavaMappingsPackage.JAVA_ENTITY__PRIMARY_KEY_JOIN_COLUMNS :
return JpaCoreMappingsPackage.IENTITY__PRIMARY_KEY_JOIN_COLUMNS;
case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
@@ -2153,6 +2153,8 @@ public class JavaEntity extends JavaTypeMapping implements IEntity
return JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_NAME;
case JpaCoreMappingsPackage.IENTITY__TABLE :
return JpaJavaMappingsPackage.JAVA_ENTITY__TABLE;
+ case JpaCoreMappingsPackage.IENTITY__SPECIFIED_SECONDARY_TABLES :
+ return JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_SECONDARY_TABLES;
case JpaCoreMappingsPackage.IENTITY__PRIMARY_KEY_JOIN_COLUMNS :
return JpaJavaMappingsPackage.JAVA_ENTITY__PRIMARY_KEY_JOIN_COLUMNS;
case JpaCoreMappingsPackage.IENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSecondaryTable.java
index 4a5410e109..ae51ad5ce0 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSecondaryTable.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSecondaryTable.java
@@ -64,6 +64,11 @@ public class JavaSecondaryTable extends AbstractJavaTable
return this.annotationAdapter.getAnnotation(astRoot);
}
+ @Override
+ protected void setDefaultName(String newDefaultName) {
+ throw new UnsupportedOperationException("No default name for a secondary table");
+ }
+
// ********** AbstractJavaTable implementation **********
@Override
protected DeclarationAnnotationElementAdapter nameAdapter(DeclarationAnnotationAdapter daa) {
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 e3f6a95683..08cb67fdc5 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
@@ -11,7 +11,6 @@ package org.eclipse.jpt.core.internal.content.java.mappings;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.jem.java.JavaRefPackage;
@@ -163,13 +162,22 @@ public class JpaJavaMappingsPackage extends EPackageImpl
public static final int JAVA_ENTITY__TABLE = JAVA_TYPE_MAPPING_FEATURE_COUNT + 2;
/**
+ * The feature id for the '<em><b>Specified Secondary Tables</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int JAVA_ENTITY__SPECIFIED_SECONDARY_TABLES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 3;
+
+ /**
* The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__PRIMARY_KEY_JOIN_COLUMNS = JAVA_TYPE_MAPPING_FEATURE_COUNT + 3;
+ public static final int JAVA_ENTITY__PRIMARY_KEY_JOIN_COLUMNS = JAVA_TYPE_MAPPING_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Specified Primary Key Join Columns</b></em>' containment reference list.
@@ -178,7 +186,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS = JAVA_TYPE_MAPPING_FEATURE_COUNT + 4;
+ public static final int JAVA_ENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS = JAVA_TYPE_MAPPING_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Default Primary Key Join Columns</b></em>' containment reference list.
@@ -187,7 +195,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS = JAVA_TYPE_MAPPING_FEATURE_COUNT + 5;
+ public static final int JAVA_ENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS = JAVA_TYPE_MAPPING_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Inheritance Strategy</b></em>' attribute.
@@ -196,7 +204,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__INHERITANCE_STRATEGY = JAVA_TYPE_MAPPING_FEATURE_COUNT + 6;
+ public static final int JAVA_ENTITY__INHERITANCE_STRATEGY = JAVA_TYPE_MAPPING_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Default Discriminator Value</b></em>' attribute.
@@ -205,7 +213,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__DEFAULT_DISCRIMINATOR_VALUE = JAVA_TYPE_MAPPING_FEATURE_COUNT + 7;
+ public static final int JAVA_ENTITY__DEFAULT_DISCRIMINATOR_VALUE = JAVA_TYPE_MAPPING_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Specified Discriminator Value</b></em>' attribute.
@@ -214,7 +222,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__SPECIFIED_DISCRIMINATOR_VALUE = JAVA_TYPE_MAPPING_FEATURE_COUNT + 8;
+ public static final int JAVA_ENTITY__SPECIFIED_DISCRIMINATOR_VALUE = JAVA_TYPE_MAPPING_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Discriminator Value</b></em>' attribute.
@@ -223,7 +231,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__DISCRIMINATOR_VALUE = JAVA_TYPE_MAPPING_FEATURE_COUNT + 9;
+ public static final int JAVA_ENTITY__DISCRIMINATOR_VALUE = JAVA_TYPE_MAPPING_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Discriminator Column</b></em>' containment reference.
@@ -232,7 +240,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__DISCRIMINATOR_COLUMN = JAVA_TYPE_MAPPING_FEATURE_COUNT + 10;
+ public static final int JAVA_ENTITY__DISCRIMINATOR_COLUMN = JAVA_TYPE_MAPPING_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
@@ -241,7 +249,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__SEQUENCE_GENERATOR = JAVA_TYPE_MAPPING_FEATURE_COUNT + 11;
+ public static final int JAVA_ENTITY__SEQUENCE_GENERATOR = JAVA_TYPE_MAPPING_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Table Generator</b></em>' containment reference.
@@ -250,7 +258,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__TABLE_GENERATOR = JAVA_TYPE_MAPPING_FEATURE_COUNT + 12;
+ public static final int JAVA_ENTITY__TABLE_GENERATOR = JAVA_TYPE_MAPPING_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
@@ -259,7 +267,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__ATTRIBUTE_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 13;
+ public static final int JAVA_ENTITY__ATTRIBUTE_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 14;
/**
* The feature id for the '<em><b>Specified Attribute Overrides</b></em>' containment reference list.
@@ -268,7 +276,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 14;
+ public static final int JAVA_ENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 15;
/**
* The feature id for the '<em><b>Default Attribute Overrides</b></em>' containment reference list.
@@ -277,7 +285,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__DEFAULT_ATTRIBUTE_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 15;
+ public static final int JAVA_ENTITY__DEFAULT_ATTRIBUTE_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 16;
/**
* The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
@@ -286,7 +294,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__ASSOCIATION_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 16;
+ public static final int JAVA_ENTITY__ASSOCIATION_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 17;
/**
* The feature id for the '<em><b>Specified Association Overrides</b></em>' containment reference list.
@@ -295,7 +303,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__SPECIFIED_ASSOCIATION_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 17;
+ public static final int JAVA_ENTITY__SPECIFIED_ASSOCIATION_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 18;
/**
* The feature id for the '<em><b>Default Association Overrides</b></em>' containment reference list.
@@ -304,7 +312,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__DEFAULT_ASSOCIATION_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 18;
+ public static final int JAVA_ENTITY__DEFAULT_ASSOCIATION_OVERRIDES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 19;
/**
* The feature id for the '<em><b>Named Queries</b></em>' containment reference list.
@@ -313,7 +321,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__NAMED_QUERIES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 19;
+ public static final int JAVA_ENTITY__NAMED_QUERIES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 20;
/**
* The feature id for the '<em><b>Named Native Queries</b></em>' containment reference list.
@@ -322,16 +330,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int JAVA_ENTITY__NAMED_NATIVE_QUERIES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 20;
-
- /**
- * The feature id for the '<em><b>Secondary Tables</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ENTITY__SECONDARY_TABLES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 21;
+ public static final int JAVA_ENTITY__NAMED_NATIVE_QUERIES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 21;
/**
* The number of structural features of the '<em>Java Entity</em>' class.
@@ -3660,19 +3659,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
}
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity#getSecondaryTables <em>Secondary Tables</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Secondary Tables</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity#getSecondaryTables()
- * @see #getJavaEntity()
- * @generated
- */
- public EReference getJavaEntity_SecondaryTables() {
- return (EReference) javaEntityEClass.getEStructuralFeatures().get(0);
- }
-
- /**
* Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass <em>Java Mapped Superclass</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -4196,7 +4182,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
// Create classes and their features
javaTypeMappingEClass = createEClass(JAVA_TYPE_MAPPING);
javaEntityEClass = createEClass(JAVA_ENTITY);
- createEReference(javaEntityEClass, JAVA_ENTITY__SECONDARY_TABLES);
javaMappedSuperclassEClass = createEClass(JAVA_MAPPED_SUPERCLASS);
javaEmbeddableEClass = createEClass(JAVA_EMBEDDABLE);
javaNullTypeMappingEClass = createEClass(JAVA_NULL_TYPE_MAPPING);
@@ -4351,7 +4336,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
// Initialize classes and features; add operations and parameters
initEClass(javaTypeMappingEClass, JavaTypeMapping.class, "JavaTypeMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(javaEntityEClass, JavaEntity.class, "JavaEntity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getJavaEntity_SecondaryTables(), theJpaCoreMappingsPackage.getISecondaryTable(), null, "secondaryTables", null, 0, -1, JavaEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(javaMappedSuperclassEClass, JavaMappedSuperclass.class, "JavaMappedSuperclass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(javaEmbeddableEClass, JavaEmbeddable.class, "JavaEmbeddable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(javaNullTypeMappingEClass, JavaNullTypeMapping.class, "JavaNullTypeMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -4393,8 +4377,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
initEClass(javaNamedNativeQueryEClass, JavaNamedNativeQuery.class, "JavaNamedNativeQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(javaQueryHintEClass, JavaQueryHint.class, "JavaQueryHint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
}
-
-
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
@@ -4420,14 +4402,6 @@ public class JpaJavaMappingsPackage extends EPackageImpl
public static final EClass JAVA_ENTITY = eINSTANCE.getJavaEntity();
/**
- * The meta object literal for the '<em><b>Secondary Tables</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference JAVA_ENTITY__SECONDARY_TABLES = eINSTANCE.getJavaEntity_SecondaryTables();
-
- /**
* The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass <em>Java Mapped Superclass</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
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 3862c80df7..0ad15225bc 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
@@ -791,13 +791,22 @@ public class OrmPackage extends EPackageImpl
public static final int XML_ENTITY_INTERNAL__TABLE = XML_TYPE_MAPPING_FEATURE_COUNT + 4;
/**
+ * The feature id for the '<em><b>Specified Secondary Tables</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 5;
+
+ /**
* The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 5;
+ public static final int XML_ENTITY_INTERNAL__PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Specified Primary Key Join Columns</b></em>' containment reference list.
@@ -806,7 +815,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 6;
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Default Primary Key Join Columns</b></em>' containment reference list.
@@ -815,7 +824,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 7;
+ public static final int XML_ENTITY_INTERNAL__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS = XML_TYPE_MAPPING_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Inheritance Strategy</b></em>' attribute.
@@ -824,7 +833,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__INHERITANCE_STRATEGY = XML_TYPE_MAPPING_FEATURE_COUNT + 8;
+ public static final int XML_ENTITY_INTERNAL__INHERITANCE_STRATEGY = XML_TYPE_MAPPING_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Default Discriminator Value</b></em>' attribute.
@@ -833,7 +842,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DEFAULT_DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 9;
+ public static final int XML_ENTITY_INTERNAL__DEFAULT_DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Specified Discriminator Value</b></em>' attribute.
@@ -842,7 +851,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 10;
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Discriminator Value</b></em>' attribute.
@@ -851,7 +860,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 11;
+ public static final int XML_ENTITY_INTERNAL__DISCRIMINATOR_VALUE = XML_TYPE_MAPPING_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Discriminator Column</b></em>' containment reference.
@@ -860,7 +869,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN = XML_TYPE_MAPPING_FEATURE_COUNT + 12;
+ public static final int XML_ENTITY_INTERNAL__DISCRIMINATOR_COLUMN = XML_TYPE_MAPPING_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
@@ -869,7 +878,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SEQUENCE_GENERATOR = XML_TYPE_MAPPING_FEATURE_COUNT + 13;
+ public static final int XML_ENTITY_INTERNAL__SEQUENCE_GENERATOR = XML_TYPE_MAPPING_FEATURE_COUNT + 14;
/**
* The feature id for the '<em><b>Table Generator</b></em>' containment reference.
@@ -878,7 +887,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__TABLE_GENERATOR = XML_TYPE_MAPPING_FEATURE_COUNT + 14;
+ public static final int XML_ENTITY_INTERNAL__TABLE_GENERATOR = XML_TYPE_MAPPING_FEATURE_COUNT + 15;
/**
* The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
@@ -887,7 +896,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 15;
+ public static final int XML_ENTITY_INTERNAL__ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 16;
/**
* The feature id for the '<em><b>Specified Attribute Overrides</b></em>' containment reference list.
@@ -896,7 +905,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 16;
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 17;
/**
* The feature id for the '<em><b>Default Attribute Overrides</b></em>' containment reference list.
@@ -905,7 +914,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DEFAULT_ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 17;
+ public static final int XML_ENTITY_INTERNAL__DEFAULT_ATTRIBUTE_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 18;
/**
* The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
@@ -914,7 +923,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 18;
+ public static final int XML_ENTITY_INTERNAL__ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 19;
/**
* The feature id for the '<em><b>Specified Association Overrides</b></em>' containment reference list.
@@ -923,7 +932,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 19;
+ public static final int XML_ENTITY_INTERNAL__SPECIFIED_ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 20;
/**
* The feature id for the '<em><b>Default Association Overrides</b></em>' containment reference list.
@@ -932,7 +941,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__DEFAULT_ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 20;
+ public static final int XML_ENTITY_INTERNAL__DEFAULT_ASSOCIATION_OVERRIDES = XML_TYPE_MAPPING_FEATURE_COUNT + 21;
/**
* The feature id for the '<em><b>Named Queries</b></em>' containment reference list.
@@ -941,7 +950,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__NAMED_QUERIES = XML_TYPE_MAPPING_FEATURE_COUNT + 21;
+ public static final int XML_ENTITY_INTERNAL__NAMED_QUERIES = XML_TYPE_MAPPING_FEATURE_COUNT + 22;
/**
* The feature id for the '<em><b>Named Native Queries</b></em>' containment reference list.
@@ -950,7 +959,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__NAMED_NATIVE_QUERIES = XML_TYPE_MAPPING_FEATURE_COUNT + 22;
+ public static final int XML_ENTITY_INTERNAL__NAMED_NATIVE_QUERIES = XML_TYPE_MAPPING_FEATURE_COUNT + 23;
/**
* The feature id for the '<em><b>Secondary Tables</b></em>' containment reference list.
@@ -959,25 +968,16 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 23;
+ public static final int XML_ENTITY_INTERNAL__SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 24;
/**
- * The feature id for the '<em><b>Specified Secondary Tables</b></em>' containment reference list.
+ * The feature id for the '<em><b>Virtual Secondary Tables</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 24;
-
- /**
- * The feature id for the '<em><b>Default Secondary Tables</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY_INTERNAL__DEFAULT_SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 25;
+ public static final int XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES = XML_TYPE_MAPPING_FEATURE_COUNT + 25;
/**
* The number of structural features of the '<em>Xml Entity Internal</em>' class.
@@ -1081,6 +1081,15 @@ public class OrmPackage extends EPackageImpl
public static final int XML_ENTITY__TABLE = JpaCoreMappingsPackage.IENTITY__TABLE;
/**
+ * The feature id for the '<em><b>Specified Secondary Tables</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int XML_ENTITY__SPECIFIED_SECONDARY_TABLES = JpaCoreMappingsPackage.IENTITY__SPECIFIED_SECONDARY_TABLES;
+
+ /**
* The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1252,22 +1261,13 @@ public class OrmPackage extends EPackageImpl
public static final int XML_ENTITY__SECONDARY_TABLES = JpaCoreMappingsPackage.IENTITY_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Specified Secondary Tables</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int XML_ENTITY__SPECIFIED_SECONDARY_TABLES = JpaCoreMappingsPackage.IENTITY_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Secondary Tables</b></em>' containment reference list.
+ * The feature id for the '<em><b>Virtual Secondary Tables</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int XML_ENTITY__DEFAULT_SECONDARY_TABLES = JpaCoreMappingsPackage.IENTITY_FEATURE_COUNT + 2;
+ public static final int XML_ENTITY__VIRTUAL_SECONDARY_TABLES = JpaCoreMappingsPackage.IENTITY_FEATURE_COUNT + 1;
/**
* The number of structural features of the '<em>Xml Entity</em>' class.
@@ -1276,7 +1276,7 @@ public class OrmPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int XML_ENTITY_FEATURE_COUNT = JpaCoreMappingsPackage.IENTITY_FEATURE_COUNT + 3;
+ public static final int XML_ENTITY_FEATURE_COUNT = JpaCoreMappingsPackage.IENTITY_FEATURE_COUNT + 2;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlEmbeddable <em>Xml Embeddable</em>}' class.
@@ -6523,32 +6523,19 @@ public class OrmPackage extends EPackageImpl
}
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntity#getSpecifiedSecondaryTables <em>Specified Secondary Tables</em>}'.
+ * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntity#getVirtualSecondaryTables <em>Virtual Secondary Tables</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Specified Secondary Tables</em>'.
- * @see org.eclipse.jpt.core.internal.content.orm.XmlEntity#getSpecifiedSecondaryTables()
+ * @return the meta object for the containment reference list '<em>Virtual Secondary Tables</em>'.
+ * @see org.eclipse.jpt.core.internal.content.orm.XmlEntity#getVirtualSecondaryTables()
* @see #getXmlEntity()
* @generated
*/
- public EReference getXmlEntity_SpecifiedSecondaryTables() {
+ public EReference getXmlEntity_VirtualSecondaryTables() {
return (EReference) xmlEntityEClass.getEStructuralFeatures().get(1);
}
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.internal.content.orm.XmlEntity#getDefaultSecondaryTables <em>Default Secondary Tables</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Default Secondary Tables</em>'.
- * @see org.eclipse.jpt.core.internal.content.orm.XmlEntity#getDefaultSecondaryTables()
- * @see #getXmlEntity()
- * @generated
- */
- public EReference getXmlEntity_DefaultSecondaryTables() {
- return (EReference) xmlEntityEClass.getEStructuralFeatures().get(2);
- }
-
- /**
* Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.orm.XmlEmbeddable <em>Xml Embeddable</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -7750,8 +7737,7 @@ public class OrmPackage extends EPackageImpl
createEReference(xmlEntityForXmlEClass, XML_ENTITY_FOR_XML__DISCRIMINATOR_COLUMN_FOR_XML);
xmlEntityEClass = createEClass(XML_ENTITY);
createEReference(xmlEntityEClass, XML_ENTITY__SECONDARY_TABLES);
- createEReference(xmlEntityEClass, XML_ENTITY__SPECIFIED_SECONDARY_TABLES);
- createEReference(xmlEntityEClass, XML_ENTITY__DEFAULT_SECONDARY_TABLES);
+ createEReference(xmlEntityEClass, XML_ENTITY__VIRTUAL_SECONDARY_TABLES);
xmlEmbeddableEClass = createEClass(XML_EMBEDDABLE);
xmlAttributeMappingEClass = createEClass(XML_ATTRIBUTE_MAPPING);
createEReference(xmlAttributeMappingEClass, XML_ATTRIBUTE_MAPPING__PERSISTENT_ATTRIBUTE);
@@ -8035,8 +8021,7 @@ public class OrmPackage extends EPackageImpl
initEReference(getXmlEntityForXml_DiscriminatorColumnForXml(), this.getXmlDiscriminatorColumn(), null, "discriminatorColumnForXml", null, 0, 1, XmlEntityForXml.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(xmlEntityEClass, XmlEntity.class, "XmlEntity", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getXmlEntity_SecondaryTables(), theJpaCoreMappingsPackage.getISecondaryTable(), null, "secondaryTables", null, 0, -1, XmlEntity.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntity_SpecifiedSecondaryTables(), theJpaCoreMappingsPackage.getISecondaryTable(), null, "specifiedSecondaryTables", null, 0, -1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getXmlEntity_DefaultSecondaryTables(), theJpaCoreMappingsPackage.getISecondaryTable(), null, "defaultSecondaryTables", null, 0, -1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getXmlEntity_VirtualSecondaryTables(), theJpaCoreMappingsPackage.getISecondaryTable(), null, "virtualSecondaryTables", null, 0, -1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(xmlEmbeddableEClass, XmlEmbeddable.class, "XmlEmbeddable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(xmlAttributeMappingEClass, XmlAttributeMapping.class, "XmlAttributeMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getXmlAttributeMapping_PersistentAttribute(), this.getXmlPersistentAttribute(), null, "persistentAttribute", null, 1, 1, XmlAttributeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -8567,20 +8552,12 @@ public class OrmPackage extends EPackageImpl
public static final EReference XML_ENTITY__SECONDARY_TABLES = eINSTANCE.getXmlEntity_SecondaryTables();
/**
- * The meta object literal for the '<em><b>Specified Secondary Tables</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final EReference XML_ENTITY__SPECIFIED_SECONDARY_TABLES = eINSTANCE.getXmlEntity_SpecifiedSecondaryTables();
-
- /**
- * The meta object literal for the '<em><b>Default Secondary Tables</b></em>' containment reference list feature.
+ * The meta object literal for the '<em><b>Virtual Secondary Tables</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static final EReference XML_ENTITY__DEFAULT_SECONDARY_TABLES = eINSTANCE.getXmlEntity_DefaultSecondaryTables();
+ public static final EReference XML_ENTITY__VIRTUAL_SECONDARY_TABLES = eINSTANCE.getXmlEntity_VirtualSecondaryTables();
/**
* The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.orm.XmlEmbeddable <em>Xml Embeddable</em>}' class.
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntity.java
index 1a1704b771..7f88ec7fbb 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntity.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntity.java
@@ -21,8 +21,7 @@ import org.eclipse.jpt.core.internal.mappings.ISecondaryTable;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlEntity#getSecondaryTables <em>Secondary Tables</em>}</li>
- * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlEntity#getSpecifiedSecondaryTables <em>Specified Secondary Tables</em>}</li>
- * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlEntity#getDefaultSecondaryTables <em>Default Secondary Tables</em>}</li>
+ * <li>{@link org.eclipse.jpt.core.internal.content.orm.XmlEntity#getVirtualSecondaryTables <em>Virtual Secondary Tables</em>}</li>
* </ul>
* </p>
*
@@ -49,34 +48,18 @@ public interface XmlEntity extends IEntity
EList<ISecondaryTable> getSecondaryTables();
/**
- * Returns the value of the '<em><b>Specified Secondary Tables</b></em>' containment reference list.
+ * Returns the value of the '<em><b>Virtual Secondary Tables</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.ISecondaryTable}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Specified Secondary Tables</em>' containment reference list isn't clear,
+ * If the meaning of the '<em>Virtual Secondary Tables</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Specified Secondary Tables</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlEntity_SpecifiedSecondaryTables()
+ * @return the value of the '<em>Virtual Secondary Tables</em>' containment reference list.
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlEntity_VirtualSecondaryTables()
* @model type="org.eclipse.jpt.core.internal.mappings.ISecondaryTable" containment="true"
* @generated
*/
- EList<ISecondaryTable> getSpecifiedSecondaryTables();
-
- /**
- * Returns the value of the '<em><b>Default Secondary Tables</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.ISecondaryTable}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Secondary Tables</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Default Secondary Tables</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlEntity_DefaultSecondaryTables()
- * @model type="org.eclipse.jpt.core.internal.mappings.ISecondaryTable" containment="true"
- * @generated
- */
- EList<ISecondaryTable> getDefaultSecondaryTables();
+ EList<ISecondaryTable> getVirtualSecondaryTables();
} // XmlEntity
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityInternal.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityInternal.java
index fe2b6b2ecf..bb103e3623 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityInternal.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlEntityInternal.java
@@ -113,6 +113,16 @@ public class XmlEntityInternal extends XmlTypeMapping
protected ITable table;
/**
+ * The cached value of the '{@link #getSpecifiedSecondaryTables() <em>Specified Secondary Tables</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSpecifiedSecondaryTables()
+ * @generated
+ * @ordered
+ */
+ protected EList<ISecondaryTable> specifiedSecondaryTables;
+
+ /**
* The cached value of the '{@link #getSpecifiedPrimaryKeyJoinColumns() <em>Specified Primary Key Join Columns</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -293,24 +303,14 @@ public class XmlEntityInternal extends XmlTypeMapping
protected EList<INamedNativeQuery> namedNativeQueries;
/**
- * The cached value of the '{@link #getSpecifiedSecondaryTables() <em>Specified Secondary Tables</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedSecondaryTables()
- * @generated
- * @ordered
- */
- protected EList<ISecondaryTable> specifiedSecondaryTables;
-
- /**
- * The cached value of the '{@link #getDefaultSecondaryTables() <em>Default Secondary Tables</em>}' containment reference list.
+ * The cached value of the '{@link #getVirtualSecondaryTables() <em>Virtual Secondary Tables</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getDefaultSecondaryTables()
+ * @see #getVirtualSecondaryTables()
* @generated
* @ordered
*/
- protected EList<ISecondaryTable> defaultSecondaryTables;
+ protected EList<ISecondaryTable> virtualSecondaryTables;
protected XmlEntityInternal() {
super();
@@ -450,10 +450,31 @@ public class XmlEntityInternal extends XmlTypeMapping
public EList<ISecondaryTable> getSecondaryTables() {
EList<ISecondaryTable> list = new BasicEList<ISecondaryTable>();
list.addAll(getSpecifiedSecondaryTables());
- list.addAll(getDefaultSecondaryTables());
+ list.addAll(getVirtualSecondaryTables());
return list;
}
+ /**
+ * Returns the value of the '<em><b>Virtual Secondary Tables</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.ISecondaryTable}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Virtual Secondary Tables</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Virtual Secondary Tables</em>' containment reference list.
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlEntity_VirtualSecondaryTables()
+ * @model type="org.eclipse.jpt.core.internal.mappings.ISecondaryTable" containment="true"
+ * @generated
+ */
+ public EList<ISecondaryTable> getVirtualSecondaryTables() {
+ if (virtualSecondaryTables == null) {
+ virtualSecondaryTables = new EObjectContainmentEList<ISecondaryTable>(ISecondaryTable.class, this, OrmPackage.XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES);
+ }
+ return virtualSecondaryTables;
+ }
+
public boolean containsSecondaryTable(String name) {
for (ISecondaryTable secondaryTable : getSecondaryTables()) {
String secondaryTableName = secondaryTable.getName();
@@ -474,7 +495,7 @@ public class XmlEntityInternal extends XmlTypeMapping
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Specified Secondary Tables</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlEntity_SpecifiedSecondaryTables()
+ * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getIEntity_SpecifiedSecondaryTables()
* @model type="org.eclipse.jpt.core.internal.mappings.ISecondaryTable" containment="true"
* @generated
*/
@@ -486,27 +507,6 @@ public class XmlEntityInternal extends XmlTypeMapping
}
/**
- * Returns the value of the '<em><b>Default Secondary Tables</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.ISecondaryTable}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Secondary Tables</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Default Secondary Tables</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getXmlEntity_DefaultSecondaryTables()
- * @model type="org.eclipse.jpt.core.internal.mappings.ISecondaryTable" containment="true"
- * @generated
- */
- public EList<ISecondaryTable> getDefaultSecondaryTables() {
- if (defaultSecondaryTables == null) {
- defaultSecondaryTables = new EObjectContainmentEList<ISecondaryTable>(ISecondaryTable.class, this, OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_SECONDARY_TABLES);
- }
- return defaultSecondaryTables;
- }
-
- /**
* Returns the value of the '<em><b>Inheritance Strategy</b></em>' attribute.
* The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.InheritanceType}.
* <!-- begin-user-doc -->
@@ -1104,6 +1104,8 @@ public class XmlEntityInternal extends XmlTypeMapping
switch (featureID) {
case OrmPackage.XML_ENTITY_INTERNAL__TABLE :
return basicSetTable(null, msgs);
+ case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
+ return ((InternalEList<?>) getSpecifiedSecondaryTables()).basicRemove(otherEnd, msgs);
case OrmPackage.XML_ENTITY_INTERNAL__PRIMARY_KEY_JOIN_COLUMNS :
return ((InternalEList<?>) getPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
@@ -1134,10 +1136,8 @@ public class XmlEntityInternal extends XmlTypeMapping
return ((InternalEList<?>) getNamedNativeQueries()).basicRemove(otherEnd, msgs);
case OrmPackage.XML_ENTITY_INTERNAL__SECONDARY_TABLES :
return ((InternalEList<?>) getSecondaryTables()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
- return ((InternalEList<?>) getSpecifiedSecondaryTables()).basicRemove(otherEnd, msgs);
- case OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_SECONDARY_TABLES :
- return ((InternalEList<?>) getDefaultSecondaryTables()).basicRemove(otherEnd, msgs);
+ case OrmPackage.XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES :
+ return ((InternalEList<?>) getVirtualSecondaryTables()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -1177,6 +1177,8 @@ public class XmlEntityInternal extends XmlTypeMapping
return getDefaultName();
case OrmPackage.XML_ENTITY_INTERNAL__TABLE :
return getTable();
+ case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
+ return getSpecifiedSecondaryTables();
case OrmPackage.XML_ENTITY_INTERNAL__PRIMARY_KEY_JOIN_COLUMNS :
return getPrimaryKeyJoinColumns();
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
@@ -1215,10 +1217,8 @@ public class XmlEntityInternal extends XmlTypeMapping
return getNamedNativeQueries();
case OrmPackage.XML_ENTITY_INTERNAL__SECONDARY_TABLES :
return getSecondaryTables();
- case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
- return getSpecifiedSecondaryTables();
- case OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_SECONDARY_TABLES :
- return getDefaultSecondaryTables();
+ case OrmPackage.XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES :
+ return getVirtualSecondaryTables();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -1241,6 +1241,10 @@ public class XmlEntityInternal extends XmlTypeMapping
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_NAME :
setSpecifiedName((String) newValue);
return;
+ case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
+ getSpecifiedSecondaryTables().clear();
+ getSpecifiedSecondaryTables().addAll((Collection<? extends ISecondaryTable>) newValue);
+ return;
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
getSpecifiedPrimaryKeyJoinColumns().clear();
getSpecifiedPrimaryKeyJoinColumns().addAll((Collection<? extends IPrimaryKeyJoinColumn>) newValue);
@@ -1288,13 +1292,9 @@ public class XmlEntityInternal extends XmlTypeMapping
getNamedNativeQueries().clear();
getNamedNativeQueries().addAll((Collection<? extends INamedNativeQuery>) newValue);
return;
- case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
- getSpecifiedSecondaryTables().clear();
- getSpecifiedSecondaryTables().addAll((Collection<? extends ISecondaryTable>) newValue);
- return;
- case OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_SECONDARY_TABLES :
- getDefaultSecondaryTables().clear();
- getDefaultSecondaryTables().addAll((Collection<? extends ISecondaryTable>) newValue);
+ case OrmPackage.XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES :
+ getVirtualSecondaryTables().clear();
+ getVirtualSecondaryTables().addAll((Collection<? extends ISecondaryTable>) newValue);
return;
}
super.eSet(featureID, newValue);
@@ -1317,6 +1317,9 @@ public class XmlEntityInternal extends XmlTypeMapping
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_NAME :
setSpecifiedName(SPECIFIED_NAME_EDEFAULT);
return;
+ case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
+ getSpecifiedSecondaryTables().clear();
+ return;
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
getSpecifiedPrimaryKeyJoinColumns().clear();
return;
@@ -1356,11 +1359,8 @@ public class XmlEntityInternal extends XmlTypeMapping
case OrmPackage.XML_ENTITY_INTERNAL__NAMED_NATIVE_QUERIES :
getNamedNativeQueries().clear();
return;
- case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
- getSpecifiedSecondaryTables().clear();
- return;
- case OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_SECONDARY_TABLES :
- getDefaultSecondaryTables().clear();
+ case OrmPackage.XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES :
+ getVirtualSecondaryTables().clear();
return;
}
super.eUnset(featureID);
@@ -1384,6 +1384,8 @@ public class XmlEntityInternal extends XmlTypeMapping
return DEFAULT_NAME_EDEFAULT == null ? defaultName != null : !DEFAULT_NAME_EDEFAULT.equals(defaultName);
case OrmPackage.XML_ENTITY_INTERNAL__TABLE :
return table != null;
+ case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
+ return specifiedSecondaryTables != null && !specifiedSecondaryTables.isEmpty();
case OrmPackage.XML_ENTITY_INTERNAL__PRIMARY_KEY_JOIN_COLUMNS :
return !getPrimaryKeyJoinColumns().isEmpty();
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
@@ -1422,10 +1424,8 @@ public class XmlEntityInternal extends XmlTypeMapping
return namedNativeQueries != null && !namedNativeQueries.isEmpty();
case OrmPackage.XML_ENTITY_INTERNAL__SECONDARY_TABLES :
return !getSecondaryTables().isEmpty();
- case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
- return specifiedSecondaryTables != null && !specifiedSecondaryTables.isEmpty();
- case OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_SECONDARY_TABLES :
- return defaultSecondaryTables != null && !defaultSecondaryTables.isEmpty();
+ case OrmPackage.XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES :
+ return virtualSecondaryTables != null && !virtualSecondaryTables.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -1455,6 +1455,8 @@ public class XmlEntityInternal extends XmlTypeMapping
return JpaCoreMappingsPackage.IENTITY__DEFAULT_NAME;
case OrmPackage.XML_ENTITY_INTERNAL__TABLE :
return JpaCoreMappingsPackage.IENTITY__TABLE;
+ case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
+ return JpaCoreMappingsPackage.IENTITY__SPECIFIED_SECONDARY_TABLES;
case OrmPackage.XML_ENTITY_INTERNAL__PRIMARY_KEY_JOIN_COLUMNS :
return JpaCoreMappingsPackage.IENTITY__PRIMARY_KEY_JOIN_COLUMNS;
case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
@@ -1499,10 +1501,8 @@ public class XmlEntityInternal extends XmlTypeMapping
switch (derivedFeatureID) {
case OrmPackage.XML_ENTITY_INTERNAL__SECONDARY_TABLES :
return OrmPackage.XML_ENTITY__SECONDARY_TABLES;
- case OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES :
- return OrmPackage.XML_ENTITY__SPECIFIED_SECONDARY_TABLES;
- case OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_SECONDARY_TABLES :
- return OrmPackage.XML_ENTITY__DEFAULT_SECONDARY_TABLES;
+ case OrmPackage.XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES :
+ return OrmPackage.XML_ENTITY__VIRTUAL_SECONDARY_TABLES;
default :
return -1;
}
@@ -1535,6 +1535,8 @@ public class XmlEntityInternal extends XmlTypeMapping
return OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_NAME;
case JpaCoreMappingsPackage.IENTITY__TABLE :
return OrmPackage.XML_ENTITY_INTERNAL__TABLE;
+ case JpaCoreMappingsPackage.IENTITY__SPECIFIED_SECONDARY_TABLES :
+ return OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES;
case JpaCoreMappingsPackage.IENTITY__PRIMARY_KEY_JOIN_COLUMNS :
return OrmPackage.XML_ENTITY_INTERNAL__PRIMARY_KEY_JOIN_COLUMNS;
case JpaCoreMappingsPackage.IENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
@@ -1579,10 +1581,8 @@ public class XmlEntityInternal extends XmlTypeMapping
switch (baseFeatureID) {
case OrmPackage.XML_ENTITY__SECONDARY_TABLES :
return OrmPackage.XML_ENTITY_INTERNAL__SECONDARY_TABLES;
- case OrmPackage.XML_ENTITY__SPECIFIED_SECONDARY_TABLES :
- return OrmPackage.XML_ENTITY_INTERNAL__SPECIFIED_SECONDARY_TABLES;
- case OrmPackage.XML_ENTITY__DEFAULT_SECONDARY_TABLES :
- return OrmPackage.XML_ENTITY_INTERNAL__DEFAULT_SECONDARY_TABLES;
+ case OrmPackage.XML_ENTITY__VIRTUAL_SECONDARY_TABLES :
+ return OrmPackage.XML_ENTITY_INTERNAL__VIRTUAL_SECONDARY_TABLES;
default :
return -1;
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlPersistentAttribute.java
index 69948fa5f5..4758b709be 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlPersistentAttribute.java
@@ -137,6 +137,8 @@ public class XmlPersistentAttribute extends XmlEObject
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
+ case OrmPackage.XML_PERSISTENT_ATTRIBUTE__MAPPING :
+ return getMapping();
case OrmPackage.XML_PERSISTENT_ATTRIBUTE__NAME :
return getName();
}
@@ -181,6 +183,8 @@ public class XmlPersistentAttribute extends XmlEObject
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
+ case OrmPackage.XML_PERSISTENT_ATTRIBUTE__MAPPING :
+ return getMapping() != null;
case OrmPackage.XML_PERSISTENT_ATTRIBUTE__NAME :
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrmXmlResourceImpl.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrmXmlResourceImpl.java
index 49d578fdb3..62f1eab457 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrmXmlResourceImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/OrmXmlResourceImpl.java
@@ -13,6 +13,7 @@ import org.eclipse.jpt.core.internal.content.orm.EntityMappingsInternal;
import org.eclipse.jpt.core.internal.content.orm.OrmXmlResource;
import org.eclipse.wst.common.internal.emf.resource.Renderer;
import org.eclipse.wst.common.internal.emf.resource.Translator;
+import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl;
public class OrmXmlResourceImpl extends TranslatorResourceImpl
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/SecondaryTableTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/SecondaryTableTranslator.java
index 169dc17ef3..1b9b70c1cd 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/SecondaryTableTranslator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/resource/SecondaryTableTranslator.java
@@ -20,7 +20,7 @@ public class SecondaryTableTranslator extends AbstractTableTranslator
private IEntity entity;
public SecondaryTableTranslator() {
- super(SECONDARY_TABLE, JPA_CORE_XML_PKG.getXmlEntity_SpecifiedSecondaryTables());
+ super(SECONDARY_TABLE, MAPPINGS_PKG.getIEntity_SpecifiedSecondaryTables());
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/persistence/PersistenceUnitTransactionType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/persistence/PersistenceUnitTransactionType.java
index cc3658a166..8a9ad2853d 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/persistence/PersistenceUnitTransactionType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/persistence/PersistenceUnitTransactionType.java
@@ -8,6 +8,8 @@
*******************************************************************************/
package org.eclipse.jpt.core.internal.content.persistence;
+import static org.eclipse.jpt.core.internal.content.persistence.PersistenceUnitTransactionType.JTA_VALUE;
+import static org.eclipse.jpt.core.internal.content.persistence.PersistenceUnitTransactionType.RESOURCE_LOCAL_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/persistence/resource/PersistenceResource.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/persistence/resource/PersistenceResource.java
index ac2d37a318..d05495ab4d 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/persistence/resource/PersistenceResource.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/persistence/resource/PersistenceResource.java
@@ -12,6 +12,7 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.jpt.core.internal.content.persistence.Persistence;
import org.eclipse.wst.common.internal.emf.resource.Renderer;
import org.eclipse.wst.common.internal.emf.resource.Translator;
+import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl;
public class PersistenceResource extends TranslatorResourceImpl
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultEagerFetchType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultEagerFetchType.java
index 73c30ca367..f76d0d78eb 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultEagerFetchType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultEagerFetchType.java
@@ -9,6 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
+import static org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType.DEFAULT_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType.EAGER_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType.LAZY_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultFalseBoolean.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultFalseBoolean.java
index e2e379b9e0..2bc9fcdb87 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultFalseBoolean.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultFalseBoolean.java
@@ -9,6 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
+import static org.eclipse.jpt.core.internal.mappings.DefaultFalseBoolean.DEFAULT_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DefaultFalseBoolean.FALSE_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DefaultFalseBoolean.TRUE_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultLazyFetchType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultLazyFetchType.java
index 3c6961dd7a..63b44ea65f 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultLazyFetchType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultLazyFetchType.java
@@ -9,6 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
+import static org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType.DEFAULT_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType.EAGER_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType.LAZY_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultTrueBoolean.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultTrueBoolean.java
index d0215f32b1..cac2c8f830 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultTrueBoolean.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DefaultTrueBoolean.java
@@ -9,6 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
+import static org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean.DEFAULT_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean.FALSE_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean.TRUE_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DiscriminatorType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DiscriminatorType.java
index 77811e98a3..ef1b54227b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DiscriminatorType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/DiscriminatorType.java
@@ -9,6 +9,10 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
+import static org.eclipse.jpt.core.internal.mappings.DiscriminatorType.CHAR_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DiscriminatorType.DEFAULT_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DiscriminatorType.INTEGER_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.DiscriminatorType.STRING_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/EnumType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/EnumType.java
index c205679964..fd7b48c8ff 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/EnumType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/EnumType.java
@@ -9,6 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
+import static org.eclipse.jpt.core.internal.mappings.EnumType.DEFAULT_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.EnumType.ORDINAL_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.EnumType.STRING_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/GenerationType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/GenerationType.java
index cf46467312..f3156c7b79 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/GenerationType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/GenerationType.java
@@ -9,6 +9,11 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
+import static org.eclipse.jpt.core.internal.mappings.GenerationType.AUTO_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.GenerationType.DEFAULT_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.GenerationType.IDENTITY_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.GenerationType.SEQUENCE_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.GenerationType.TABLE_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
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 7347e79faa..5a0be770dc 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 @@
* <copyright>
* </copyright>
*
- * $Id: IAbstractJoinColumn.java,v 1.2 2007/05/05 19:49:50 pfullbright Exp $
+ * $Id: IAbstractJoinColumn.java,v 1.3 2007/05/06 23:05:38 kmoore Exp $
*/
package org.eclipse.jpt.core.internal.mappings;
@@ -88,8 +88,6 @@ public interface IAbstractJoinColumn extends INamedColumn
String getDefaultReferencedColumnName();
public Owner getOwner();
-
-
public interface Owner extends INamedColumn.Owner
{
/**
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IAssociationOverride.java
index 65c9a86d13..3c515b735e 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IAssociationOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IAssociationOverride.java
@@ -88,8 +88,6 @@ public interface IAssociationOverride extends IOverride
boolean containsSpecifiedJoinColumns();
ITypeMapping typeMapping();
-
-
public class JoinColumnOwner implements IJoinColumn.Owner
{
private IAssociationOverride associationOverride;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IEmbedded.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IEmbedded.java
index 34a841c41d..aaf7dde765 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IEmbedded.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IEmbedded.java
@@ -100,8 +100,6 @@ public interface IEmbedded extends IAttributeMapping
boolean containsAttributeOverride(String name);
boolean containsSpecifiedAttributeOverride(String name);
-
-
class AttributeOverrideOwner implements Owner
{
private IEmbedded embedded;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IEntity.java
index dd165905e9..8ab8d7ff68 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IEntity.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IEntity.java
@@ -28,6 +28,7 @@ import org.eclipse.jpt.db.internal.Table;
* <li>{@link org.eclipse.jpt.core.internal.mappings.IEntity#getSpecifiedName <em>Specified Name</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.mappings.IEntity#getDefaultName <em>Default Name</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.mappings.IEntity#getTable <em>Table</em>}</li>
+ * <li>{@link org.eclipse.jpt.core.internal.mappings.IEntity#getSpecifiedSecondaryTables <em>Specified Secondary Tables</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.mappings.IEntity#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.mappings.IEntity#getSpecifiedPrimaryKeyJoinColumns <em>Specified Primary Key Join Columns</em>}</li>
* <li>{@link org.eclipse.jpt.core.internal.mappings.IEntity#getDefaultPrimaryKeyJoinColumns <em>Default Primary Key Join Columns</em>}</li>
@@ -112,6 +113,22 @@ public interface IEntity extends ITypeMapping
ITable getTable();
/**
+ * Returns the value of the '<em><b>Specified Secondary Tables</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.ISecondaryTable}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Specified Secondary Tables</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Specified Secondary Tables</em>' containment reference list.
+ * @see org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage#getIEntity_SpecifiedSecondaryTables()
+ * @model type="org.eclipse.jpt.core.internal.mappings.ISecondaryTable" containment="true"
+ * @generated
+ */
+ EList<ISecondaryTable> getSpecifiedSecondaryTables();
+
+ /**
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Secondary Tables</em>' containment reference list isn't clear,
@@ -536,8 +553,6 @@ public interface IEntity extends ITypeMapping
INamedQuery createNamedQuery(int index);
INamedNativeQuery createNamedNativeQuery(int index);
-
-
abstract class OverrideOwner implements IOverride.Owner
{
protected IEntity entity;
@@ -554,8 +569,6 @@ public interface IEntity extends ITypeMapping
return entity.getTextRange();
}
}
-
-
class AttributeOverrideOwner extends OverrideOwner
{
public AttributeOverrideOwner(IEntity entity) {
@@ -582,8 +595,6 @@ public interface IEntity extends ITypeMapping
return entity.getDefaultAttributeOverrides().contains(override);
}
}
-
-
class AssociationOverrideOwner extends OverrideOwner
{
public AssociationOverrideOwner(IEntity entity) {
@@ -606,8 +617,6 @@ public interface IEntity extends ITypeMapping
return entity.getDefaultAssociationOverrides().contains(override);
}
}
-
-
class PrimaryKeyJoinColumnOwner implements IAbstractJoinColumn.Owner
{
private IEntity entity;
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 c066e46982..9ecc78897c 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
@@ -24,8 +24,6 @@ import java.util.List;
public interface IJoinColumn extends IAbstractColumn, IAbstractJoinColumn
{
IJoinColumn.Owner getOwner();
-
-
/**
* interface allowing join columns to be used in multiple places
* (e.g. 1:1 mappings and join tables)
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IJoinTable.java
index bfb48bfdfa..3aa7f773da 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IJoinTable.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IJoinTable.java
@@ -146,8 +146,6 @@ public interface IJoinTable extends ITable
boolean containsSpecifiedInverseJoinColumns();
IRelationshipMapping relationshipMapping();
-
-
/**
* just a little common behavior
*/
@@ -195,8 +193,6 @@ public interface IJoinTable extends ITable
return (joinTable.getName().equals(tableName)) ? joinTable.dbTable() : null;
}
}
-
-
/**
* owner for "forward-pointer" JoinColumns;
* these point at the target/inverse entity
@@ -233,8 +229,6 @@ public interface IJoinTable extends ITable
return (targetEntity == null) ? null : targetEntity.primaryDbTable();
}
}
-
-
/**
* owner for "back-pointer" JoinColumns;
* these point at the source/owning entity
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/INamedColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/INamedColumn.java
index 954090cba0..f18633b968 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/INamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/INamedColumn.java
@@ -118,8 +118,6 @@ public interface INamedColumn extends IJpaSourceObject
void setColumnDefinition(String value);
Owner getOwner();
-
-
/**
* interface allowing columns to be used in multiple places
* (e.g. basic mappings and attribute overrides)
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IOverride.java
index 3348aa86fb..9df9e50293 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/IOverride.java
@@ -65,8 +65,6 @@ public interface IOverride extends IJpaSourceObject
boolean isVirtual();
Owner getOwner();
-
-
interface Owner
{
ITypeMapping getTypeMapping();
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISingleRelationshipMapping.java
index 14ca65b349..80ea9064ac 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISingleRelationshipMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISingleRelationshipMapping.java
@@ -116,8 +116,6 @@ public interface ISingleRelationshipMapping extends IRelationshipMapping
boolean containsSpecifiedJoinColumns();
IJoinColumn createJoinColumn(int index);
-
-
public class JoinColumnOwner implements IJoinColumn.Owner
{
private ISingleRelationshipMapping singleRelationshipMapping;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITable.java
index 8ba0f3578f..afcaa9c0db 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITable.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ITable.java
@@ -233,8 +233,6 @@ public interface ITable extends IJpaSourceObject
ITextRange getSchemaTextRange();
Owner getOwner();
-
-
/**
* interface allowing tables to be owned by various objects
*/
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/InheritanceType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/InheritanceType.java
index 5f216d2d98..ccd4ef21ed 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/InheritanceType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/InheritanceType.java
@@ -9,6 +9,10 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
+import static org.eclipse.jpt.core.internal.mappings.InheritanceType.DEFAULT_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.InheritanceType.JOINED_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.InheritanceType.SINGLE_TABLE_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.InheritanceType.TABLE_PER_CLASS_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
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 0cb8b20e6d..9102771c4b 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
@@ -165,13 +165,22 @@ public class JpaCoreMappingsPackage extends EPackageImpl
public static final int IENTITY__TABLE = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 2;
/**
+ * The feature id for the '<em><b>Specified Secondary Tables</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int IENTITY__SPECIFIED_SECONDARY_TABLES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 3;
+
+ /**
* The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int IENTITY__PRIMARY_KEY_JOIN_COLUMNS = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 3;
+ public static final int IENTITY__PRIMARY_KEY_JOIN_COLUMNS = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Specified Primary Key Join Columns</b></em>' containment reference list.
@@ -180,7 +189,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 4;
+ public static final int IENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Default Primary Key Join Columns</b></em>' containment reference list.
@@ -189,7 +198,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 5;
+ public static final int IENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Inheritance Strategy</b></em>' attribute.
@@ -198,7 +207,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__INHERITANCE_STRATEGY = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 6;
+ public static final int IENTITY__INHERITANCE_STRATEGY = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Default Discriminator Value</b></em>' attribute.
@@ -207,7 +216,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__DEFAULT_DISCRIMINATOR_VALUE = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 7;
+ public static final int IENTITY__DEFAULT_DISCRIMINATOR_VALUE = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Specified Discriminator Value</b></em>' attribute.
@@ -216,7 +225,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__SPECIFIED_DISCRIMINATOR_VALUE = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 8;
+ public static final int IENTITY__SPECIFIED_DISCRIMINATOR_VALUE = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Discriminator Value</b></em>' attribute.
@@ -225,7 +234,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__DISCRIMINATOR_VALUE = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 9;
+ public static final int IENTITY__DISCRIMINATOR_VALUE = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Discriminator Column</b></em>' containment reference.
@@ -234,7 +243,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__DISCRIMINATOR_COLUMN = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 10;
+ public static final int IENTITY__DISCRIMINATOR_COLUMN = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
@@ -243,7 +252,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__SEQUENCE_GENERATOR = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 11;
+ public static final int IENTITY__SEQUENCE_GENERATOR = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Table Generator</b></em>' containment reference.
@@ -252,7 +261,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__TABLE_GENERATOR = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 12;
+ public static final int IENTITY__TABLE_GENERATOR = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
@@ -261,7 +270,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__ATTRIBUTE_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 13;
+ public static final int IENTITY__ATTRIBUTE_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 14;
/**
* The feature id for the '<em><b>Specified Attribute Overrides</b></em>' containment reference list.
@@ -270,7 +279,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 14;
+ public static final int IENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 15;
/**
* The feature id for the '<em><b>Default Attribute Overrides</b></em>' containment reference list.
@@ -279,7 +288,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__DEFAULT_ATTRIBUTE_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 15;
+ public static final int IENTITY__DEFAULT_ATTRIBUTE_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 16;
/**
* The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
@@ -288,7 +297,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__ASSOCIATION_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 16;
+ public static final int IENTITY__ASSOCIATION_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 17;
/**
* The feature id for the '<em><b>Specified Association Overrides</b></em>' containment reference list.
@@ -297,7 +306,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__SPECIFIED_ASSOCIATION_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 17;
+ public static final int IENTITY__SPECIFIED_ASSOCIATION_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 18;
/**
* The feature id for the '<em><b>Default Association Overrides</b></em>' containment reference list.
@@ -306,7 +315,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__DEFAULT_ASSOCIATION_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 18;
+ public static final int IENTITY__DEFAULT_ASSOCIATION_OVERRIDES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 19;
/**
* The feature id for the '<em><b>Named Queries</b></em>' containment reference list.
@@ -315,7 +324,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__NAMED_QUERIES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 19;
+ public static final int IENTITY__NAMED_QUERIES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 20;
/**
* The feature id for the '<em><b>Named Native Queries</b></em>' containment reference list.
@@ -324,7 +333,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY__NAMED_NATIVE_QUERIES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 20;
+ public static final int IENTITY__NAMED_NATIVE_QUERIES = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 21;
/**
* The number of structural features of the '<em>IEntity</em>' class.
@@ -333,7 +342,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int IENTITY_FEATURE_COUNT = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 21;
+ public static final int IENTITY_FEATURE_COUNT = JpaCorePackage.ITYPE_MAPPING_FEATURE_COUNT + 22;
/**
* The meta object id for the '{@link org.eclipse.jpt.core.internal.mappings.IEmbeddable <em>IEmbeddable</em>}' class.
@@ -3813,6 +3822,19 @@ public class JpaCoreMappingsPackage extends EPackageImpl
}
/**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.internal.mappings.IEntity#getSpecifiedSecondaryTables <em>Specified Secondary Tables</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Specified Secondary Tables</em>'.
+ * @see org.eclipse.jpt.core.internal.mappings.IEntity#getSpecifiedSecondaryTables()
+ * @see #getIEntity()
+ * @generated
+ */
+ public EReference getIEntity_SpecifiedSecondaryTables() {
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
* Returns the meta object for the attribute '{@link org.eclipse.jpt.core.internal.mappings.IEntity#getInheritanceStrategy <em>Inheritance Strategy</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3822,7 +3844,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EAttribute getIEntity_InheritanceStrategy() {
- return (EAttribute) iEntityEClass.getEStructuralFeatures().get(6);
+ return (EAttribute) iEntityEClass.getEStructuralFeatures().get(7);
}
/**
@@ -3835,7 +3857,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_DiscriminatorColumn() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(10);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(11);
}
/**
@@ -3848,7 +3870,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_SequenceGenerator() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(11);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(12);
}
/**
@@ -3861,7 +3883,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_TableGenerator() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(12);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(13);
}
/**
@@ -3874,7 +3896,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EAttribute getIEntity_DefaultDiscriminatorValue() {
- return (EAttribute) iEntityEClass.getEStructuralFeatures().get(7);
+ return (EAttribute) iEntityEClass.getEStructuralFeatures().get(8);
}
/**
@@ -3887,7 +3909,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EAttribute getIEntity_SpecifiedDiscriminatorValue() {
- return (EAttribute) iEntityEClass.getEStructuralFeatures().get(8);
+ return (EAttribute) iEntityEClass.getEStructuralFeatures().get(9);
}
/**
@@ -3900,7 +3922,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EAttribute getIEntity_DiscriminatorValue() {
- return (EAttribute) iEntityEClass.getEStructuralFeatures().get(9);
+ return (EAttribute) iEntityEClass.getEStructuralFeatures().get(10);
}
/**
@@ -3913,7 +3935,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_PrimaryKeyJoinColumns() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(3);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(4);
}
/**
@@ -3926,7 +3948,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_SpecifiedPrimaryKeyJoinColumns() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(4);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(5);
}
/**
@@ -3939,7 +3961,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_DefaultPrimaryKeyJoinColumns() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(5);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(6);
}
/**
@@ -3952,7 +3974,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_AttributeOverrides() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(13);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(14);
}
/**
@@ -3965,7 +3987,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_SpecifiedAttributeOverrides() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(14);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(15);
}
/**
@@ -3978,7 +4000,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_DefaultAttributeOverrides() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(15);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(16);
}
/**
@@ -3991,7 +4013,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_AssociationOverrides() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(16);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(17);
}
/**
@@ -4004,7 +4026,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_SpecifiedAssociationOverrides() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(17);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(18);
}
/**
@@ -4017,7 +4039,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_DefaultAssociationOverrides() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(18);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(19);
}
/**
@@ -4030,7 +4052,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_NamedQueries() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(19);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(20);
}
/**
@@ -4043,7 +4065,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
* @generated
*/
public EReference getIEntity_NamedNativeQueries() {
- return (EReference) iEntityEClass.getEStructuralFeatures().get(20);
+ return (EReference) iEntityEClass.getEStructuralFeatures().get(21);
}
/**
@@ -6113,6 +6135,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
createEAttribute(iEntityEClass, IENTITY__SPECIFIED_NAME);
createEAttribute(iEntityEClass, IENTITY__DEFAULT_NAME);
createEReference(iEntityEClass, IENTITY__TABLE);
+ createEReference(iEntityEClass, IENTITY__SPECIFIED_SECONDARY_TABLES);
createEReference(iEntityEClass, IENTITY__PRIMARY_KEY_JOIN_COLUMNS);
createEReference(iEntityEClass, IENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS);
createEReference(iEntityEClass, IENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS);
@@ -6375,6 +6398,7 @@ public class JpaCoreMappingsPackage extends EPackageImpl
initEAttribute(getIEntity_SpecifiedName(), ecorePackage.getEString(), "specifiedName", null, 0, 1, IEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIEntity_DefaultName(), ecorePackage.getEString(), "defaultName", null, 0, 1, IEntity.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getIEntity_Table(), this.getITable(), null, "table", null, 1, 1, IEntity.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getIEntity_SpecifiedSecondaryTables(), this.getISecondaryTable(), null, "specifiedSecondaryTables", null, 0, -1, IEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getIEntity_PrimaryKeyJoinColumns(), this.getIPrimaryKeyJoinColumn(), null, "primaryKeyJoinColumns", null, 0, -1, IEntity.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getIEntity_SpecifiedPrimaryKeyJoinColumns(), this.getIPrimaryKeyJoinColumn(), null, "specifiedPrimaryKeyJoinColumns", null, 0, -1, IEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getIEntity_DefaultPrimaryKeyJoinColumns(), this.getIPrimaryKeyJoinColumn(), null, "defaultPrimaryKeyJoinColumns", null, 0, -1, IEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -6596,8 +6620,6 @@ public class JpaCoreMappingsPackage extends EPackageImpl
addEEnumLiteral(orderingTypeEEnum, OrderingType.PRIMARY_KEY);
addEEnumLiteral(orderingTypeEEnum, OrderingType.CUSTOM);
}
-
-
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
@@ -6657,6 +6679,14 @@ public class JpaCoreMappingsPackage extends EPackageImpl
public static final EReference IENTITY__TABLE = eINSTANCE.getIEntity_Table();
/**
+ * The meta object literal for the '<em><b>Specified Secondary Tables</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EReference IENTITY__SPECIFIED_SECONDARY_TABLES = eINSTANCE.getIEntity_SpecifiedSecondaryTables();
+
+ /**
* The meta object literal for the '<em><b>Inheritance Strategy</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/OrderingType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/OrderingType.java
index 0eb6c45af5..1eb81e3f64 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/OrderingType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/OrderingType.java
@@ -9,6 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
+import static org.eclipse.jpt.core.internal.mappings.OrderingType.CUSTOM_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.OrderingType.NONE_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.OrderingType.PRIMARY_KEY_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/TemporalType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/TemporalType.java
index 2d7cd326de..2824053a47 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/TemporalType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/TemporalType.java
@@ -9,6 +9,10 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.mappings;
+import static org.eclipse.jpt.core.internal.mappings.TemporalType.DATE_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.TemporalType.NULL_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.TemporalType.TIMESTAMP_VALUE;
+import static org.eclipse.jpt.core.internal.mappings.TemporalType.TIME_VALUE;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlEntityContext.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlEntityContext.java
index 2c067aecd5..a48af7dc02 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlEntityContext.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlEntityContext.java
@@ -239,13 +239,13 @@ public class XmlEntityContext extends XmlTypeContext
if (!getEntity().containsSecondaryTable(secondaryTable.getName())) {
ISecondaryTable defaultSecondaryTable = getEntity().createSecondaryTable(0);
defaultSecondaryTable.setSpecifiedName(secondaryTable.getName());
- getEntity().getDefaultSecondaryTables().add(defaultSecondaryTable);
+ getEntity().getVirtualSecondaryTables().add(defaultSecondaryTable);
}
}
}
Collection<ISecondaryTable> secondaryTablesToRemove = new ArrayList<ISecondaryTable>();
- for (Iterator<ISecondaryTable> i = getEntity().getDefaultSecondaryTables().iterator(); i.hasNext(); ) {
+ for (Iterator<ISecondaryTable> i = getEntity().getVirtualSecondaryTables().iterator(); i.hasNext(); ) {
ISecondaryTable secondaryTable = i.next();
if (getXmlTypeMapping().isXmlMetadataComplete()) {
secondaryTablesToRemove.add(secondaryTable);
@@ -258,7 +258,7 @@ public class XmlEntityContext extends XmlTypeContext
secondaryTablesToRemove.add(secondaryTable);
}
}
- getEntity().getDefaultSecondaryTables().removeAll(secondaryTablesToRemove);
+ getEntity().getVirtualSecondaryTables().removeAll(secondaryTablesToRemove);
}
diff --git a/jpa/plugins/org.eclipse.jpt.ui/property_files/jpa_ui_mappings.properties b/jpa/plugins/org.eclipse.jpt.ui/property_files/jpa_ui_mappings.properties
index 0641854f26..32e290cfc4 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/property_files/jpa_ui_mappings.properties
+++ b/jpa/plugins/org.eclipse.jpt.ui/property_files/jpa_ui_mappings.properties
@@ -162,3 +162,14 @@ OrderByComposite_noOrdering=No Ordering
OrderByComposite_primaryKeyOrdering=Primary Key Ordering
OrderByComposite_customOrdering=Custom Ordering
+SecondaryTablesComposite_secondaryTables=Secondary Tables
+SecondaryTablesComposite_add=Add...
+SecondaryTablesComposite_edit=Edit...
+SecondaryTablesComposite_remove=Remove
+
+SecondaryTableDialog_editSecondaryTable=Edit Secondary Table
+SecondaryTableDialog_name=Name:
+SecondaryTableDialog_catalog=Catalog:
+SecondaryTableDialog_schema=Schema:
+SecondaryTableDialog_defaultSchema=Default({0})
+SecondaryTableDialog_defaultCatalog=Default({0})
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/JpaUiMappingsMessages.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/JpaUiMappingsMessages.java
index 6d9b5589c6..c7a5f67575 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/JpaUiMappingsMessages.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/JpaUiMappingsMessages.java
@@ -170,6 +170,18 @@ public class JpaUiMappingsMessages extends NLS
public static String OrderByComposite_customOrdering;
public static String OrderByComposite_orderByLabel;
+ public static String SecondaryTablesComposite_secondaryTables;
+ public static String SecondaryTablesComposite_add;
+ public static String SecondaryTablesComposite_edit;
+ public static String SecondaryTablesComposite_remove;
+
+ public static String SecondaryTableDialog_editSecondaryTable;
+ public static String SecondaryTableDialog_name;
+ public static String SecondaryTableDialog_catalog;
+ public static String SecondaryTableDialog_schema;
+ public static String SecondaryTableDialog_defaultSchema;
+ public static String SecondaryTableDialog_defaultCatalog;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, JpaUiMappingsMessages.class);
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/CatalogCombo.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/CatalogCombo.java
index 2749946601..02aab134bc 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/CatalogCombo.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/CatalogCombo.java
@@ -220,9 +220,9 @@ public class CatalogCombo extends BaseJpaController
Database database = this.getDatabase();
if ( database != null) {
- Iterator catalogs = database.catalogNames();
- for ( Iterator stream = CollectionTools.sort( catalogs); stream.hasNext(); ) {
- this.combo.add(( String) stream.next());
+ Iterator<String> catalogs = database.catalogNames();
+ for ( Iterator<String> stream = CollectionTools.sort(catalogs); stream.hasNext(); ) {
+ this.combo.add(stream.next());
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EntityComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EntityComposite.java
index 4600b99d5a..83bf5c6779 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EntityComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/EntityComposite.java
@@ -38,6 +38,7 @@ public class EntityComposite extends BaseJpaComposite
private TableComposite tableComposite;
private InheritanceComposite inheritanceComposite;
+ private SecondaryTablesComposite secondaryTablesComposite;
private OverridesComposite attributeOverridesComposite;
public EntityComposite(Composite parent, CommandStack commandStack, TabbedPropertySheetWidgetFactory widgetFactory) {
@@ -62,6 +63,11 @@ public class EntityComposite extends BaseJpaComposite
gridData.grabExcessHorizontalSpace = true;
attributeOverridesControl.setLayoutData(gridData);
+ Control secondaryTablesControl = buildSecondaryTablesComposite(composite);
+ gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ secondaryTablesControl.setLayoutData(gridData);
Control inheritanceControl = buildInheritanceComposite(composite);
gridData = new GridData();
@@ -99,6 +105,28 @@ public class EntityComposite extends BaseJpaComposite
return generalComposite;
}
+ private Control buildSecondaryTablesComposite(Composite composite) {
+ Section section = getWidgetFactory().createSection(composite, SWT.FLAT | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
+ section.setText(JpaUiMappingsMessages.SecondaryTablesComposite_secondaryTables);
+
+ Composite client = getWidgetFactory().createComposite(section);
+ section.setClient(client);
+
+ GridLayout layout = new GridLayout();
+ layout.marginWidth = 0;
+ client.setLayout(layout);
+
+ this.secondaryTablesComposite = new SecondaryTablesComposite(client, this.commandStack, getWidgetFactory());
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.verticalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.grabExcessVerticalSpace = true;
+ this.secondaryTablesComposite.getControl().setLayoutData(gridData);
+
+ return section;
+ }
+
private Control buildInheritanceComposite(Composite composite) {
Section section = getWidgetFactory().createSection(composite, SWT.FLAT | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
section.setText(JpaUiMappingsMessages.EntityComposite_inheritance);
@@ -149,6 +177,7 @@ public class EntityComposite extends BaseJpaComposite
this.entity = (IEntity) obj;
this.entityNameCombo.populate(obj);
this.attributeOverridesComposite.populate(obj);
+ this.secondaryTablesComposite.populate(obj);
this.inheritanceComposite.populate(obj);
if (this.entity != null) {
this.tableComposite.populate(this.entity.getTable());
@@ -162,6 +191,7 @@ public class EntityComposite extends BaseJpaComposite
this.entityNameCombo.populate();
this.tableComposite.populate();
this.attributeOverridesComposite.populate();
+ this.secondaryTablesComposite.populate();
this.inheritanceComposite.populate();
}
@@ -176,6 +206,7 @@ public class EntityComposite extends BaseJpaComposite
this.entityNameCombo.dispose();
this.tableComposite.dispose();
this.attributeOverridesComposite.dispose();
+ this.secondaryTablesComposite.dispose();
this.inheritanceComposite.dispose();
super.dispose();
}
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnsComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnsComposite.java
index bbb7215f58..af151f8555 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnsComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/PrimaryKeyJoinColumnsComposite.java
@@ -370,6 +370,9 @@ public class PrimaryKeyJoinColumnsComposite extends BaseJpaComposite
}
Display.getDefault().asyncExec(new Runnable() {
public void run() {
+ if (getControl().isDisposed()) {
+ return;
+ }
pkJoinColumnsListViewer.refresh();
overrideDefaultJoinColumnsCheckBox.setSelection(entity.containsSpecifiedPrimaryKeyJoinColumns());
updatePrimaryKeyJoinColumnsEnablement();
@@ -393,10 +396,4 @@ public class PrimaryKeyJoinColumnsComposite extends BaseJpaComposite
});
}
}
-
-
- public void dispose() {
- disengageListeners();
- super.dispose();
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SchemaCombo.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SchemaCombo.java
index 13aa332ce6..312d344f05 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SchemaCombo.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SchemaCombo.java
@@ -243,9 +243,9 @@ public class SchemaCombo extends BaseJpaController
Database database = this.getDatabase();
if ( database != null) {
- Iterator schemata = database.schemaNames();
- for ( Iterator stream = CollectionTools.sort( schemata); stream.hasNext(); ) {
- this.combo.add(( String) stream.next());
+ Iterator<String> schemata = database.schemaNames();
+ for ( Iterator<String> stream = CollectionTools.sort( schemata); stream.hasNext(); ) {
+ this.combo.add(stream.next());
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SecondaryTableDialog.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SecondaryTableDialog.java
new file mode 100644
index 0000000000..2349a93003
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SecondaryTableDialog.java
@@ -0,0 +1,234 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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.ui.internal.mappings.details;
+
+import java.util.Iterator;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jpt.core.internal.IJpaProject;
+import org.eclipse.jpt.core.internal.mappings.IEntity;
+import org.eclipse.jpt.core.internal.mappings.ISecondaryTable;
+import org.eclipse.jpt.db.internal.ConnectionProfile;
+import org.eclipse.jpt.db.internal.Database;
+import org.eclipse.jpt.ui.internal.mappings.JpaUiMappingsMessages;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+public class SecondaryTableDialog extends Dialog {
+
+ //if creating a new JoinColumn, this will be null,
+ //specify the JoinColumnOwner instead in the appropriate construtor
+ private ISecondaryTable secondaryTable;
+ private IEntity entity;
+
+ protected Combo nameCombo;
+ protected Combo catalogCombo;
+ protected Combo schemaCombo;
+
+ private String selectedName;
+ private String selectedSchema;
+ private String selectedCatalog;
+
+ private boolean defaultSchemaSelected;
+ private boolean defaultCatalogSelected;
+
+ SecondaryTableDialog(Shell parent, IEntity entity) {
+ super(parent);
+ this.entity = entity;
+ }
+
+ SecondaryTableDialog(Shell parent, ISecondaryTable secondaryTable, IEntity entity) {
+ super(parent);
+ this.secondaryTable = secondaryTable;
+ this.entity = entity;
+ }
+
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText(getTitle());
+ }
+
+ protected String getTitle() {
+ return JpaUiMappingsMessages.SecondaryTableDialog_editSecondaryTable;
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+ GridLayout gridLayout = (GridLayout) composite.getLayout();
+ gridLayout.numColumns = 2;
+
+ Label nameLabel = new Label(composite, SWT.LEFT);
+ nameLabel.setText(JpaUiMappingsMessages.SecondaryTableDialog_name);
+ GridData gridData = new GridData();
+ nameLabel.setLayoutData(gridData);
+
+ this.nameCombo = new Combo(composite, SWT.LEFT);
+ gridData = new GridData();
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.horizontalAlignment = SWT.FILL;
+ this.nameCombo.setLayoutData(gridData);
+ populateNameCombo();
+
+ Label catalogLabel = new Label(composite, SWT.LEFT);
+ catalogLabel.setText(JpaUiMappingsMessages.SecondaryTableDialog_catalog);
+ gridData = new GridData();
+ catalogLabel.setLayoutData(gridData);
+
+ this.catalogCombo = new Combo(composite, SWT.LEFT);
+ gridData = new GridData();
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.horizontalAlignment = SWT.FILL;
+ this.catalogCombo.setLayoutData(gridData);
+ populateCatalogCombo();
+
+ Label schemaLabel = new Label(composite, SWT.LEFT);
+ schemaLabel.setText(JpaUiMappingsMessages.SecondaryTableDialog_schema);
+ gridData = new GridData();
+ schemaLabel.setLayoutData(gridData);
+
+ this.schemaCombo = new Combo(composite, SWT.LEFT);
+ gridData = new GridData();
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.horizontalAlignment = SWT.FILL;
+ this.schemaCombo.setLayoutData(gridData);
+ populateSchemaCombo();
+
+ return composite;
+ }
+
+ protected Database getDatabase() {
+ return this.getConnectionProfile().getDatabase();
+ }
+
+ private ConnectionProfile getConnectionProfile() {
+ IJpaProject project = (this.secondaryTable == null) ? this.entity.getJpaProject() : this.secondaryTable.getJpaProject();
+ return project.connectionProfile();
+ }
+
+ protected void populateNameCombo() {
+ //TODO populate with the tables from the secondaryTable's schema
+// Table table = getNameTable();
+// if (table != null) {
+// for (Iterator i = table.columnNames(); i.hasNext(); ) {
+// this.nameCombo.add((String) i.next());
+// }
+// }
+ if (getSecondaryTable() != null) {
+ if (getSecondaryTable().getSpecifiedName() != null) {
+ this.nameCombo.setText(getSecondaryTable().getSpecifiedName());
+ }
+ }
+ }
+
+ protected void populateSchemaCombo() {
+ if (getSecondaryTable() != null) {
+ this.schemaCombo.add(NLS.bind(JpaUiMappingsMessages.SecondaryTableDialog_defaultSchema, getSecondaryTable().getDefaultSchema()));
+ }
+
+ Database database = this.getDatabase();
+
+ if (database != null) {
+ Iterator<String> schemata = database.schemaNames();
+ for (Iterator<String> stream = CollectionTools.sort(schemata); stream.hasNext(); ) {
+ this.schemaCombo.add(stream.next());
+ }
+ }
+
+ if (getSecondaryTable() != null) {
+ if (getSecondaryTable().getSpecifiedSchema() != null) {
+ this.schemaCombo.setText(getSecondaryTable().getSpecifiedSchema());
+ }
+ else {
+ this.schemaCombo.select(0);
+ }
+ }
+ }
+
+ protected void populateCatalogCombo() {
+ if (getSecondaryTable() != null) {
+ this.catalogCombo.add(NLS.bind(JpaUiMappingsMessages.SecondaryTableDialog_defaultCatalog, getSecondaryTable().getDefaultCatalog()));
+ }
+ Database database = this.getDatabase();
+
+ if (database != null) {
+ Iterator<String> catalogs = database.catalogNames();
+ for (Iterator<String> stream = CollectionTools.sort(catalogs); stream.hasNext(); ) {
+ this.catalogCombo.add(stream.next());
+ }
+ }
+
+ if (getSecondaryTable() != null) {
+ if (getSecondaryTable().getSpecifiedCatalog() != null) {
+ this.catalogCombo.setText(getSecondaryTable().getSpecifiedCatalog());
+ }
+ else {
+ this.catalogCombo.select(0);
+ }
+ }
+ }
+
+ protected Combo getNameCombo() {
+ return this.nameCombo;
+ }
+
+ protected Combo getSchemaCombo() {
+ return this.schemaCombo;
+ }
+
+ protected Combo getCatalogCombo() {
+ return this.catalogCombo;
+ }
+
+ protected ISecondaryTable getSecondaryTable() {
+ return this.secondaryTable;
+ }
+
+
+ protected String getSelectedName() {
+ return this.selectedName;
+ }
+
+ protected String getSelectedCatalog() {
+ return this.selectedCatalog;
+ }
+
+ protected String getSelectedSchema() {
+ return this.selectedSchema;
+ }
+
+ protected boolean isDefaultSchemaSelected() {
+ return this.defaultSchemaSelected;
+ }
+
+ protected boolean isDefaultCatalogSelected() {
+ return this.defaultCatalogSelected;
+ }
+
+ public boolean close() {
+ this.selectedName = this.nameCombo.getText();
+ this.selectedSchema = this.schemaCombo.getText();
+ if (this.selectedSchema.equals("")) {
+ this.selectedSchema = null;
+ }
+ this.selectedCatalog = this.catalogCombo.getText();
+ if (this.selectedCatalog.equals("")) {
+ this.selectedCatalog = null;
+ }
+ this.defaultSchemaSelected = this.schemaCombo.getSelectionIndex() == 0;
+ this.defaultCatalogSelected = this.catalogCombo.getSelectionIndex() == 0;
+ return super.close();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SecondaryTablesComposite.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SecondaryTablesComposite.java
new file mode 100644
index 0000000000..9037e2c68d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/mappings/details/SecondaryTablesComposite.java
@@ -0,0 +1,330 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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.ui.internal.mappings.details;
+
+import java.util.Iterator;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jpt.core.internal.mappings.IEntity;
+import org.eclipse.jpt.core.internal.mappings.ISecondaryTable;
+import org.eclipse.jpt.core.internal.mappings.ITable;
+import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
+import org.eclipse.jpt.ui.internal.details.BaseJpaComposite;
+import org.eclipse.jpt.ui.internal.mappings.JpaUiMappingsMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
+
+//TODO need to support a list of tables
+public class SecondaryTablesComposite extends BaseJpaComposite
+{
+ private IEntity entity;
+ private final Adapter entityListener;
+ private final Adapter secondaryTableListener;
+
+ ListViewer secondaryTablesListViewer;
+
+ private Button addButton;
+ private Button editButton;
+ private Button removeButton;
+
+
+ public SecondaryTablesComposite(Composite parent, CommandStack commandStack, TabbedPropertySheetWidgetFactory widgetFactory) {
+ super(parent, SWT.NULL, commandStack, widgetFactory);
+ this.entityListener = buildEntityListener();
+ this.secondaryTableListener = buildSecondaryTableListener();
+ }
+
+ private Adapter buildEntityListener() {
+ return new AdapterImpl() {
+ public void notifyChanged(Notification notification) {
+ entityChanged(notification);
+ }
+ };
+ }
+
+ private Adapter buildSecondaryTableListener() {
+ return new AdapterImpl() {
+ public void notifyChanged(Notification notification) {
+ seoncaryTableChanged(notification);
+ }
+ };
+ }
+
+ @Override
+ protected void initializeLayout(Composite composite) {
+ GridLayout layout = new GridLayout(2, false);
+ layout.marginWidth = 0;
+ composite.setLayout(layout);
+
+ GridData gridData = new GridData();
+
+ this.secondaryTablesListViewer = new ListViewer(composite, SWT.BORDER | SWT.MULTI);
+ this.secondaryTablesListViewer.setContentProvider(buildSecondaryTablesListContentProvider());
+ this.secondaryTablesListViewer.setLabelProvider(buildSecondaryTablesListLabelProvider());
+ gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.verticalAlignment = GridData.FILL;
+ gridData.verticalSpan = 3;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.grabExcessVerticalSpace = true;
+ this.secondaryTablesListViewer.getList().setLayoutData(gridData);
+ //PlatformUI.getWorkbench().getHelpSystem().setHelp(this.secondaryTablesListViewer.getList(), IJpaHelpContextIds.MAPPING_JOIN_TABLE_COLUMNS);
+
+ this.addButton = new Button(composite, SWT.NONE);
+ this.addButton.setText(JpaUiMappingsMessages.SecondaryTablesComposite_add);
+ gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ this.addButton.setLayoutData(gridData);
+ this.addButton.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ addSecondaryTable();
+ }
+ });
+
+ this.editButton = new Button(composite, SWT.NONE);
+ this.editButton.setText(JpaUiMappingsMessages.SecondaryTablesComposite_edit);
+ gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ this.editButton.setLayoutData(gridData);
+ this.editButton.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ editSecondaryTable();
+ }
+ });
+
+ this.removeButton = new Button(composite, SWT.NONE);
+ this.removeButton.setText(JpaUiMappingsMessages.SecondaryTablesComposite_remove);
+ gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.verticalAlignment = GridData.BEGINNING;
+ this.removeButton.setLayoutData(gridData);
+ this.removeButton.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ removeSecondaryTable();
+ }
+ });
+
+ this.secondaryTablesListViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ updateEnablement();
+ }
+ });
+ }
+
+ private IContentProvider buildSecondaryTablesListContentProvider() {
+ return new IStructuredContentProvider(){
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // do nothing
+ }
+
+ public void dispose() {
+ // do nothing
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return ((IEntity) inputElement).getSecondaryTables().toArray();
+ }
+ };
+ }
+
+ private ILabelProvider buildSecondaryTablesListLabelProvider() {
+ return new LabelProvider() {
+ public String getText(Object element) {
+ //TODO display a qualified name instead
+ ISecondaryTable secondaryTable = (ISecondaryTable) element;
+ return secondaryTable.getName();
+ }
+ };
+ }
+
+ void addSecondaryTable() {
+ SecondaryTableDialog dialog = new SecondaryTableDialog(this.getControl().getShell(), this.entity);
+ addSecondaryTableFromDialog(dialog);
+ }
+
+ private void addSecondaryTableFromDialog(SecondaryTableDialog dialog) {
+ if (dialog.open() == Window.OK) {
+ int index = this.entity.getSpecifiedSecondaryTables().size();
+ String name = dialog.getSelectedName();
+ String catalog = dialog.getSelectedCatalog();
+ String schema = dialog.getSelectedSchema();
+ ISecondaryTable secondaryTable = this.entity.createSecondaryTable(index);
+ this.entity.getSpecifiedSecondaryTables().add(secondaryTable);
+ secondaryTable.setSpecifiedName(name);
+ secondaryTable.setSpecifiedCatalog(catalog);
+ secondaryTable.setSpecifiedSchema(schema);
+ }
+ }
+
+ void editSecondaryTable() {
+ ISecondaryTable secondaryTable = getSelectedSecondaryTable();
+ SecondaryTableDialog dialog = new SecondaryTableDialog(this.getControl().getShell(), secondaryTable, this.entity);
+ editSecondaryTableFromDialog(dialog, secondaryTable);
+ }
+
+ private void editSecondaryTableFromDialog(SecondaryTableDialog dialog, ISecondaryTable secondaryTable) {
+ if (dialog.open() == Window.OK) {
+ editSecondaryTableDialogOkd(dialog, secondaryTable);
+ }
+ }
+
+ private void editSecondaryTableDialogOkd(SecondaryTableDialog dialog, ISecondaryTable secondaryTable) {
+ String name = dialog.getSelectedName();
+ String catalog = dialog.getSelectedCatalog();
+ String schema = dialog.getSelectedSchema();
+
+ if (secondaryTable.getSpecifiedName() == null || !secondaryTable.getSpecifiedName().equals(name)){
+ secondaryTable.setSpecifiedName(name);
+ }
+
+ if (dialog.isDefaultCatalogSelected()) {
+ if (secondaryTable.getSpecifiedCatalog() != null) {
+ secondaryTable.setSpecifiedCatalog(null);
+ }
+ }
+ else if (secondaryTable.getSpecifiedCatalog() == null || !secondaryTable.getSpecifiedCatalog().equals(catalog)){
+ secondaryTable.setSpecifiedCatalog(catalog);
+ }
+
+ if (dialog.isDefaultSchemaSelected()) {
+ if (secondaryTable.getSpecifiedSchema() != null) {
+ secondaryTable.setSpecifiedSchema(null);
+ }
+ }
+ else if (secondaryTable.getSpecifiedSchema() == null || !secondaryTable.getSpecifiedSchema().equals(schema)){
+ secondaryTable.setSpecifiedSchema(schema);
+ }
+ }
+
+ private ISecondaryTable getSelectedSecondaryTable() {
+ return (ISecondaryTable) ((StructuredSelection) this.secondaryTablesListViewer.getSelection()).getFirstElement();
+ }
+
+
+ void removeSecondaryTable() {
+ ISelection selection = this.secondaryTablesListViewer.getSelection();
+ if (selection instanceof StructuredSelection) {
+ for (Iterator<ISecondaryTable> i = ((StructuredSelection) selection).iterator(); i.hasNext(); ) {
+ this.entity.getSecondaryTables().remove(i.next());
+ }
+ }
+ }
+
+ void updateEnablement() {
+ this.editButton.setEnabled(!((StructuredSelection) this.secondaryTablesListViewer.getSelection()).isEmpty());
+ this.removeButton.setEnabled(!((StructuredSelection) this.secondaryTablesListViewer.getSelection()).isEmpty());
+ }
+
+ public void doPopulate(EObject obj) {
+ this.entity = (IEntity) obj;
+ if (this.entity == null) {
+ this.secondaryTablesListViewer.setInput(null);
+ return;
+ }
+
+ this.secondaryTablesListViewer.setInput(this.entity);
+
+ updateEnablement();
+ }
+
+ @Override
+ protected void doPopulate() {
+ }
+
+ protected void engageListeners() {
+ if (this.entity != null) {
+ this.entity.eAdapters().add(this.entityListener);
+ for (ISecondaryTable secondaryTable : this.entity.getSecondaryTables()) {
+ secondaryTable.eAdapters().add(this.secondaryTableListener);
+ }
+ //this.addConnectionListener();
+ }
+ }
+
+ protected void disengageListeners() {
+ if (this.entity != null) {
+ //this.removeConnectionListener();
+ for (ISecondaryTable secondaryTable : this.entity.getSecondaryTables()) {
+ secondaryTable.eAdapters().remove(this.secondaryTableListener);
+ }
+ this.entity.eAdapters().remove(this.entityListener);
+ }
+ }
+
+ protected void entityChanged(Notification notification) {
+ if (notification.getFeatureID(IEntity.class) == JpaCoreMappingsPackage.IENTITY__SPECIFIED_SECONDARY_TABLES) {
+ if (notification.getEventType() == Notification.ADD) {
+ ((ISecondaryTable) notification.getNewValue()).eAdapters().add(this.secondaryTableListener);
+ }
+ else if (notification.getEventType() == Notification.REMOVE) {
+ ((ISecondaryTable) notification.getOldValue()).eAdapters().remove(this.secondaryTableListener);
+ }
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ if (getControl().isDisposed()) {
+ return;
+ }
+ secondaryTablesListViewer.refresh();
+ updateEnablement();
+ }
+ });
+ }
+ }
+
+ protected void seoncaryTableChanged(Notification notification) {
+ if (notification.getFeatureID(ITable.class) == JpaCoreMappingsPackage.ITABLE__SPECIFIED_NAME
+ || notification.getFeatureID(ITable.class) == JpaCoreMappingsPackage.ITABLE__SPECIFIED_CATALOG
+ || notification.getFeatureID(ITable.class) == JpaCoreMappingsPackage.ITABLE__SPECIFIED_SCHEMA
+ || notification.getFeatureID(ITable.class) == JpaCoreMappingsPackage.ITABLE__DEFAULT_CATALOG
+ || notification.getFeatureID(ITable.class) == JpaCoreMappingsPackage.ITABLE__DEFAULT_SCHEMA) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ if (getControl().isDisposed()) {
+ return;
+ }
+ secondaryTablesListViewer.refresh();
+ }
+ });
+ }
+ }
+}

Back to the top