diff options
author | kmoore | 2007-05-07 18:58:48 +0000 |
---|---|---|
committer | kmoore | 2007-05-07 18:58:48 +0000 |
commit | 12d956def54e9320119b80a2116072f35e3a1e34 (patch) | |
tree | 3bad2b11a4be1ec1676eb7f3a40a4c9548163840 | |
parent | 2256a36d879ebb409e8f7093059037c724974091 (diff) | |
download | webtools.dali-12d956def54e9320119b80a2116072f35e3a1e34.tar.gz webtools.dali-12d956def54e9320119b80a2116072f35e3a1e34.tar.xz webtools.dali-12d956def54e9320119b80a2116072f35e3a1e34.zip |
moved JavaPrimaryKeyJoinColumn to the JavaNamedColumn hierarchy, fixed the annotation adapters as well
11 files changed, 71 insertions, 354 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/java.ecore b/jpa/plugins/org.eclipse.jpt.core/model/java.ecore index ef45046bf5..4e387b0b97 100644 --- a/jpa/plugins/org.eclipse.jpt.core/model/java.ecore +++ b/jpa/plugins/org.eclipse.jpt.core/model/java.ecore @@ -72,7 +72,7 @@ <eClassifiers xsi:type="ecore:EClass" name="JavaAttributeOverride" eSuperTypes="#//mappings/JavaOverride core.ecore#//mappings/IAttributeOverride"/> <eClassifiers xsi:type="ecore:EClass" name="JavaAssociationOverride" eSuperTypes="#//mappings/JavaOverride core.ecore#//mappings/IAssociationOverride"/> <eClassifiers xsi:type="ecore:EClass" name="JavaDiscriminatorColumn" eSuperTypes="#//JavaEObject core.ecore#//mappings/IDiscriminatorColumn"/> - <eClassifiers xsi:type="ecore:EClass" name="JavaPrimaryKeyJoinColumn" eSuperTypes="#//JavaEObject core.ecore#//mappings/IPrimaryKeyJoinColumn"/> + <eClassifiers xsi:type="ecore:EClass" name="JavaPrimaryKeyJoinColumn" eSuperTypes="#//mappings/JavaNamedColumn core.ecore#//mappings/IPrimaryKeyJoinColumn"/> <eClassifiers xsi:type="ecore:EClass" name="JavaGeneratedValue" eSuperTypes="#//JavaEObject core.ecore#//mappings/IGeneratedValue"/> <eClassifiers xsi:type="ecore:EClass" name="JavaGenerator" abstract="true" eSuperTypes="#//JavaEObject core.ecore#//mappings/IGenerator"/> <eClassifiers xsi:type="ecore:EClass" name="JavaTableGenerator" eSuperTypes="#//mappings/JavaGenerator core.ecore#//mappings/ITableGenerator"/> diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/AbstractJavaTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/AbstractJavaTable.java index ba988c5763..546ded806a 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/AbstractJavaTable.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/AbstractJavaTable.java @@ -733,6 +733,10 @@ public abstract class AbstractJavaTable extends JavaEObject implements ITable return this.member; } + protected DeclarationAnnotationAdapter getDeclarationAnnotationAdapter() { + return this.daa; + } + //set these defaults here or call setDefaultCatalog from JavaTableContext instead public void refreshDefaults(DefaultsContext defaultsContext) { this.setDefaultCatalog((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_TABLE_CATALOG_KEY)); 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 8e54c6729a..960e031b7f 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 @@ -2700,7 +2700,7 @@ public class JavaEntity extends JavaTypeMapping implements IEntity } private JavaPrimaryKeyJoinColumn createJavaPrimaryKeyJoinColumn(int index) { - return JavaPrimaryKeyJoinColumn.createJavaPrimaryKeyJoinColumn(buildPkJoinColumnOwner(), this.getType(), index); + return JavaPrimaryKeyJoinColumn.createEntityPrimaryKeyJoinColumn(buildPkJoinColumnOwner(), this.getType(), index); } protected IAbstractJoinColumn.Owner buildPkJoinColumnOwner() { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaPrimaryKeyJoinColumn.java index 37cd112cde..4fd5ba2525 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaPrimaryKeyJoinColumn.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaPrimaryKeyJoinColumn.java @@ -15,19 +15,16 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.jdt.core.dom.Annotation; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jpt.core.internal.ITextRange; -import org.eclipse.jpt.core.internal.content.java.JavaEObject; import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter; import org.eclipse.jpt.core.internal.jdtutility.CombinationIndexedDeclarationAnnotationAdapter; -import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter; import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter; import org.eclipse.jpt.core.internal.jdtutility.IndexedAnnotationAdapter; import org.eclipse.jpt.core.internal.jdtutility.IndexedDeclarationAnnotationAdapter; import org.eclipse.jpt.core.internal.jdtutility.Member; import org.eclipse.jpt.core.internal.jdtutility.MemberIndexedAnnotationAdapter; -import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter; +import org.eclipse.jpt.core.internal.jdtutility.NestedIndexedDeclarationAnnotationAdapter; import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter; import org.eclipse.jpt.core.internal.mappings.IAbstractJoinColumn; -import org.eclipse.jpt.core.internal.mappings.INamedColumn; import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn; import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage; import org.eclipse.jpt.core.internal.platform.BaseJpaPlatform; @@ -45,101 +42,21 @@ import org.eclipse.jpt.db.internal.Table; * @model kind="class" * @generated */ -public class JavaPrimaryKeyJoinColumn extends JavaEObject +public class JavaPrimaryKeyJoinColumn extends JavaNamedColumn implements IPrimaryKeyJoinColumn { - private final IAbstractJoinColumn.Owner owner; - - private final Member member; - - private final IndexedDeclarationAnnotationAdapter daa; - private final IndexedAnnotationAdapter annotationAdapter; - private final AnnotationElementAdapter nameAdapter; - // hold this so we can get the 'referenced column name' text range private final DeclarationAnnotationElementAdapter referencedColumnNameDeclarationAdapter; private final AnnotationElementAdapter referencedColumnNameAdapter; - private final AnnotationElementAdapter columnDefinitionAdapter; - public static final SimpleDeclarationAnnotationAdapter SINGLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.PRIMARY_KEY_JOIN_COLUMN); public static final SimpleDeclarationAnnotationAdapter MULTIPLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.PRIMARY_KEY_JOIN_COLUMNS); /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The default value of the '{@link #getSpecifiedName() <em>Specified Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getSpecifiedName() - * @generated - * @ordered - */ - protected static final String SPECIFIED_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSpecifiedName() <em>Specified Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getSpecifiedName() - * @generated - * @ordered - */ - protected String specifiedName = SPECIFIED_NAME_EDEFAULT; - - /** - * The default value of the '{@link #getDefaultName() <em>Default Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getDefaultName() - * @generated - * @ordered - */ - protected static final String DEFAULT_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDefaultName() <em>Default Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getDefaultName() - * @generated - * @ordered - */ - protected String defaultName = DEFAULT_NAME_EDEFAULT; - - /** - * The default value of the '{@link #getColumnDefinition() <em>Column Definition</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getColumnDefinition() - * @generated - * @ordered - */ - protected static final String COLUMN_DEFINITION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getColumnDefinition() <em>Column Definition</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getColumnDefinition() - * @generated - * @ordered - */ - protected String columnDefinition = COLUMN_DEFINITION_EDEFAULT; - - /** * The default value of the '{@link #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -193,28 +110,33 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject throw new UnsupportedOperationException(); } - protected JavaPrimaryKeyJoinColumn(IAbstractJoinColumn.Owner owner, Member member, int index) { - super(); - this.owner = owner; - this.member = member; - this.daa = new CombinationIndexedDeclarationAnnotationAdapter(SINGLE_DECLARATION_ANNOTATION_ADAPTER, MULTIPLE_DECLARATION_ANNOTATION_ADAPTER, index, JPA.PRIMARY_KEY_JOIN_COLUMN); - this.annotationAdapter = new MemberIndexedAnnotationAdapter(member, this.daa); - this.nameAdapter = this.buildAdapter(JPA.PRIMARY_KEY_JOIN_COLUMN__NAME); + protected JavaPrimaryKeyJoinColumn(IAbstractJoinColumn.Owner owner, Member member, IndexedDeclarationAnnotationAdapter daa) { + super(owner, member, daa); + this.annotationAdapter = new MemberIndexedAnnotationAdapter(member, daa); this.referencedColumnNameDeclarationAdapter = this.buildStringElementAdapter(JPA.PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME); this.referencedColumnNameAdapter = this.buildShortCircuitElementAdapter(this.referencedColumnNameDeclarationAdapter); - this.columnDefinitionAdapter = this.buildAdapter(JPA.PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION); } - private AnnotationElementAdapter buildAdapter(String elementName) { - return new ShortCircuitAnnotationElementAdapter(this.member, new ConversionDeclarationAnnotationElementAdapter(this.daa, elementName)); + @Override + protected String nameElementName() { + return JPA.PRIMARY_KEY_JOIN_COLUMN__NAME; } - protected DeclarationAnnotationElementAdapter buildStringElementAdapter(String elementName) { - return new ConversionDeclarationAnnotationElementAdapter(this.daa, elementName); + @Override + protected String columnDefinitionElementName() { + return JPA.PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION; } - protected AnnotationElementAdapter buildShortCircuitElementAdapter(DeclarationAnnotationElementAdapter daea) { - return new ShortCircuitAnnotationElementAdapter(this.member, daea); + @Override + protected void notifyChanged(Notification notification) { + super.notifyChanged(notification); + switch (notification.getFeatureID(IAbstractJoinColumn.class)) { + case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME : + this.referencedColumnNameAdapter.setValue(notification.getNewValue()); + break; + default : + break; + } } /** @@ -228,88 +150,6 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject } /** - * Returns the value of the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Name</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Name</em>' attribute. - * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIPrimaryKeyJoinColumn_Name() - * @model changeable="false" volatile="true" derived="true" - * @generated NOT - */ - public String getName() { - return (this.specifiedName == null) ? this.defaultName : this.specifiedName; - } - - /** - * Returns the value of the '<em><b>Specified Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Specified Name</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Specified Name</em>' attribute. - * @see #setSpecifiedName(String) - * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getINamedColumn_SpecifiedName() - * @model - * @generated - */ - public String getSpecifiedName() { - return specifiedName; - } - - /** - * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn#getSpecifiedName <em>Specified Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Specified Name</em>' attribute. - * @see #getSpecifiedName() - * @generated - */ - public void setSpecifiedNameGen(String newSpecifiedName) { - String oldSpecifiedName = specifiedName; - specifiedName = newSpecifiedName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_NAME, oldSpecifiedName, specifiedName)); - } - - public void setSpecifiedName(String newSpecifiedName) { - this.nameAdapter.setValue(newSpecifiedName); - setSpecifiedNameGen(newSpecifiedName); - } - - /** - * Returns the value of the '<em><b>Default Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Default Name</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Default Name</em>' attribute. - * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getINamedColumn_DefaultName() - * @model changeable="false" - * @generated - */ - public String getDefaultName() { - return defaultName; - } - - //TODO should we allow setting through the ecore, that would make this method - //public and part of the ITable api. only the model needs to be setting the default, - //but the ui needs to be listening for changes to the default. - protected void setDefaultName(String newDefaultName) { - String oldDefaultName = this.defaultName; - this.defaultName = newDefaultName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_NAME, oldDefaultName, this.defaultName)); - } - - /** * Returns the value of the '<em><b>Referenced Column Name</b></em>' attribute. * <!-- begin-user-doc --> * <p> @@ -352,18 +192,13 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject * @see #getSpecifiedReferencedColumnName() * @generated */ - public void setSpecifiedReferencedColumnNameGen(String newSpecifiedReferencedColumnName) { + public void setSpecifiedReferencedColumnName(String newSpecifiedReferencedColumnName) { String oldSpecifiedReferencedColumnName = specifiedReferencedColumnName; specifiedReferencedColumnName = newSpecifiedReferencedColumnName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME, oldSpecifiedReferencedColumnName, specifiedReferencedColumnName)); } - public void setSpecifiedReferencedColumnName(String newSpecifiedReferencedColumnName) { - this.referencedColumnNameAdapter.setValue(newSpecifiedReferencedColumnName); - setSpecifiedReferencedColumnNameGen(newSpecifiedReferencedColumnName); - } - /** * Returns the value of the '<em><b>Default Referenced Column Name</b></em>' attribute. * <!-- begin-user-doc --> @@ -389,44 +224,6 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject } /** - * Returns the value of the '<em><b>Column Definition</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Column Definition</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Column Definition</em>' attribute. - * @see #setColumnDefinition(String) - * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getINamedColumn_ColumnDefinition() - * @model - * @generated - */ - public String getColumnDefinition() { - return columnDefinition; - } - - /** - * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn#getColumnDefinition <em>Column Definition</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Column Definition</em>' attribute. - * @see #getColumnDefinition() - * @generated - */ - public void setColumnDefinitionGen(String newColumnDefinition) { - String oldColumnDefinition = columnDefinition; - columnDefinition = newColumnDefinition; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION, oldColumnDefinition, columnDefinition)); - } - - public void setColumnDefinition(String newColumnDefinition) { - this.columnDefinitionAdapter.setValue(newColumnDefinition); - setColumnDefinitionGen(newColumnDefinition); - } - - /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated @@ -434,14 +231,6 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__NAME : - return getName(); - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_NAME : - return getSpecifiedName(); - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_NAME : - return getDefaultName(); - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION : - return getColumnDefinition(); case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME : return getReferencedColumnName(); case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME : @@ -460,12 +249,6 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_NAME : - setSpecifiedName((String) newValue); - return; - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION : - setColumnDefinition((String) newValue); - return; case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME : setSpecifiedReferencedColumnName((String) newValue); return; @@ -481,12 +264,6 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject @Override public void eUnset(int featureID) { switch (featureID) { - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_NAME : - setSpecifiedName(SPECIFIED_NAME_EDEFAULT); - return; - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION : - setColumnDefinition(COLUMN_DEFINITION_EDEFAULT); - return; case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME : setSpecifiedReferencedColumnName(SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT); return; @@ -502,14 +279,6 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject @Override public boolean eIsSet(int featureID) { switch (featureID) { - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__NAME : - return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_NAME : - return SPECIFIED_NAME_EDEFAULT == null ? specifiedName != null : !SPECIFIED_NAME_EDEFAULT.equals(specifiedName); - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_NAME : - return DEFAULT_NAME_EDEFAULT == null ? defaultName != null : !DEFAULT_NAME_EDEFAULT.equals(defaultName); - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION : - return COLUMN_DEFINITION_EDEFAULT == null ? columnDefinition != null : !COLUMN_DEFINITION_EDEFAULT.equals(columnDefinition); case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME : return REFERENCED_COLUMN_NAME_EDEFAULT == null ? getReferencedColumnName() != null : !REFERENCED_COLUMN_NAME_EDEFAULT.equals(getReferencedColumnName()); case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME : @@ -527,20 +296,6 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject */ @Override public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { - if (baseClass == INamedColumn.class) { - switch (derivedFeatureID) { - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__NAME : - return JpaCoreMappingsPackage.INAMED_COLUMN__NAME; - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_NAME : - return JpaCoreMappingsPackage.INAMED_COLUMN__SPECIFIED_NAME; - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_NAME : - return JpaCoreMappingsPackage.INAMED_COLUMN__DEFAULT_NAME; - case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION : - return JpaCoreMappingsPackage.INAMED_COLUMN__COLUMN_DEFINITION; - default : - return -1; - } - } if (baseClass == IAbstractJoinColumn.class) { switch (derivedFeatureID) { case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME : @@ -569,20 +324,6 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject */ @Override public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { - if (baseClass == INamedColumn.class) { - switch (baseFeatureID) { - case JpaCoreMappingsPackage.INAMED_COLUMN__NAME : - return JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__NAME; - case JpaCoreMappingsPackage.INAMED_COLUMN__SPECIFIED_NAME : - return JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_NAME; - case JpaCoreMappingsPackage.INAMED_COLUMN__DEFAULT_NAME : - return JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_NAME; - case JpaCoreMappingsPackage.INAMED_COLUMN__COLUMN_DEFINITION : - return JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION; - default : - return -1; - } - } if (baseClass == IAbstractJoinColumn.class) { switch (baseFeatureID) { case JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__REFERENCED_COLUMN_NAME : @@ -614,13 +355,7 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (specifiedName: "); - result.append(specifiedName); - result.append(", defaultName: "); - result.append(defaultName); - result.append(", columnDefinition: "); - result.append(columnDefinition); - result.append(", specifiedReferencedColumnName: "); + result.append(" (specifiedReferencedColumnName: "); result.append(specifiedReferencedColumnName); result.append(", defaultReferencedColumnName: "); result.append(defaultReferencedColumnName); @@ -628,6 +363,11 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject return result.toString(); } + @Override + public IAbstractJoinColumn.Owner getOwner() { + return (IAbstractJoinColumn.Owner) super.getOwner(); + } + public Column dbReferencedColumn() { Table table = this.dbReferencedColumnTable(); return (table == null) ? null : table.columnNamed(this.getReferencedColumnName()); @@ -645,18 +385,6 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject return elementTextRange(this.referencedColumnNameDeclarationAdapter); } - public ITextRange getTextRange() { - return this.member.annotationTextRange(this.daa); - } - - protected ITextRange elementTextRange(DeclarationAnnotationElementAdapter elementAdapter) { - return this.elementTextRange(this.member.annotationElementTextRange(elementAdapter)); - } - - public IAbstractJoinColumn.Owner getOwner() { - return this.owner; - } - public void refreshDefaults(DefaultsContext defaultsContext) { setDefaultReferencedColumnName((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_JOIN_COLUMN_REFERENCED_COLUMN_NAME_KEY)); setDefaultName((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_JOIN_COLUMN_NAME_KEY)); @@ -670,10 +398,10 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject } // ********** persistence model -> java annotations ********** + @Override public void updateFromJava(CompilationUnit astRoot) { - setSpecifiedName((String) this.nameAdapter.getValue(astRoot)); + super.updateFromJava(astRoot); setSpecifiedReferencedColumnName((String) this.referencedColumnNameAdapter.getValue(astRoot)); - setColumnDefinition((String) this.columnDefinitionAdapter.getValue(astRoot)); } void moveAnnotation(int newIndex) { @@ -689,7 +417,19 @@ public class JavaPrimaryKeyJoinColumn extends JavaEObject } // ********** static methods ********** - static JavaPrimaryKeyJoinColumn createJavaPrimaryKeyJoinColumn(Owner owner, Member member, int index) { - return JpaJavaMappingsFactory.eINSTANCE.createJavaPrimaryKeyJoinColumn(owner, member, index); + static JavaPrimaryKeyJoinColumn createSecondaryTableJoinColumn(JavaSecondaryTable secondaryTable, IAbstractJoinColumn.Owner owner, Member member, int index) { + return JpaJavaMappingsFactory.eINSTANCE.createJavaPrimaryKeyJoinColumn(owner, member, buildSecondaryTableAnnotationAdapter(secondaryTable, index)); + } + + private static IndexedDeclarationAnnotationAdapter buildSecondaryTableAnnotationAdapter(JavaSecondaryTable secondaryTable, int index) { + return new NestedIndexedDeclarationAnnotationAdapter(secondaryTable.getDeclarationAnnotationAdapter(), JPA.SECONDARY_TABLE__PK_JOIN_COLUMNS, index, JPA.PRIMARY_KEY_JOIN_COLUMN); + } + + static JavaPrimaryKeyJoinColumn createEntityPrimaryKeyJoinColumn(IAbstractJoinColumn.Owner owner, Member member, int index) { + return JpaJavaMappingsFactory.eINSTANCE.createJavaPrimaryKeyJoinColumn(owner, member, buildEntityPrimaryKeyJoinColumnAnnotationAdapter(index)); + } + + private static IndexedDeclarationAnnotationAdapter buildEntityPrimaryKeyJoinColumnAnnotationAdapter(int index) { + return new CombinationIndexedDeclarationAnnotationAdapter(SINGLE_DECLARATION_ANNOTATION_ADAPTER, MULTIPLE_DECLARATION_ANNOTATION_ADAPTER, index, JPA.PRIMARY_KEY_JOIN_COLUMN); } }
\ No newline at end of file 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 a9fa652caf..9be89b299e 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 @@ -30,7 +30,6 @@ import org.eclipse.jpt.core.internal.jdtutility.IndexedDeclarationAnnotationAdap import org.eclipse.jpt.core.internal.jdtutility.Member; import org.eclipse.jpt.core.internal.jdtutility.MemberIndexedAnnotationAdapter; import org.eclipse.jpt.core.internal.mappings.IAbstractJoinColumn; -import org.eclipse.jpt.core.internal.mappings.IEntity; import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn; import org.eclipse.jpt.core.internal.mappings.ISecondaryTable; import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage; @@ -365,7 +364,7 @@ public class JavaSecondaryTable extends AbstractJavaTable } private JavaPrimaryKeyJoinColumn createJavaPrimaryKeyJoinColumn(int index) { - return JavaPrimaryKeyJoinColumn.createJavaPrimaryKeyJoinColumn(buildPkJoinColumnOwner(), ((JavaTypeMapping) typeMapping()).getType(), index); + return JavaPrimaryKeyJoinColumn.createSecondaryTableJoinColumn(this, buildPkJoinColumnOwner(), ((JavaTypeMapping) typeMapping()).getType(), index); } protected IAbstractJoinColumn.Owner buildPkJoinColumnOwner() { diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsFactory.java index 21700b8d22..fcc50652d4 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsFactory.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsFactory.java @@ -247,11 +247,6 @@ public class JpaJavaMappingsFactory extends EFactoryImpl return javaId; } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ public JavaTable createJavaTable() { throw new UnsupportedOperationException("Use createJavaTable(ITable.Owner, Member) instead"); } @@ -261,11 +256,6 @@ public class JpaJavaMappingsFactory extends EFactoryImpl return javaTable; } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ public JavaColumn createJavaColumn() { throw new UnsupportedOperationException("Use createJavaColumn(Member ) instead"); } @@ -340,11 +330,6 @@ public class JpaJavaMappingsFactory extends EFactoryImpl return this.createJavaAssociationOverride(owner, member, NullDeclarationAnnotationAdapter.instance()); } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ public JavaDiscriminatorColumn createJavaDiscriminatorColumn() { throw new UnsupportedOperationException(); } @@ -422,16 +407,11 @@ public class JpaJavaMappingsFactory extends EFactoryImpl return javaSequenceGenerator; } - public JavaPrimaryKeyJoinColumn createJavaPrimaryKeyJoinColumn(IAbstractJoinColumn.Owner owner, Member member, int index) { - JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn = new JavaPrimaryKeyJoinColumn(owner, member, index); + public JavaPrimaryKeyJoinColumn createJavaPrimaryKeyJoinColumn(IAbstractJoinColumn.Owner owner, Member member, IndexedDeclarationAnnotationAdapter idaa) { + JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn = new JavaPrimaryKeyJoinColumn(owner, member, idaa); return javaPrimaryKeyJoinColumn; } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ public JavaSecondaryTable createJavaSecondaryTable() { throw new UnsupportedOperationException(); } 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 7496198060..a6906fb0ec 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 @@ -2570,7 +2570,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl * @generated * @ordered */ - public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0; + public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__NAME = JAVA_NAMED_COLUMN__NAME; /** * The feature id for the '<em><b>Specified Name</b></em>' attribute. @@ -2579,7 +2579,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl * @generated * @ordered */ - public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1; + public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_NAME = JAVA_NAMED_COLUMN__SPECIFIED_NAME; /** * The feature id for the '<em><b>Default Name</b></em>' attribute. @@ -2588,7 +2588,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl * @generated * @ordered */ - public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2; + public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_NAME = JAVA_NAMED_COLUMN__DEFAULT_NAME; /** * The feature id for the '<em><b>Column Definition</b></em>' attribute. @@ -2597,7 +2597,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl * @generated * @ordered */ - public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 3; + public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION = JAVA_NAMED_COLUMN__COLUMN_DEFINITION; /** * The feature id for the '<em><b>Referenced Column Name</b></em>' attribute. @@ -2606,7 +2606,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl * @generated * @ordered */ - public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 4; + public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME = JAVA_NAMED_COLUMN_FEATURE_COUNT + 0; /** * The feature id for the '<em><b>Specified Referenced Column Name</b></em>' attribute. @@ -2615,7 +2615,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl * @generated * @ordered */ - public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 5; + public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME = JAVA_NAMED_COLUMN_FEATURE_COUNT + 1; /** * The feature id for the '<em><b>Default Referenced Column Name</b></em>' attribute. @@ -2624,7 +2624,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl * @generated * @ordered */ - public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 6; + public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME = JAVA_NAMED_COLUMN_FEATURE_COUNT + 2; /** * The number of structural features of the '<em>Java Primary Key Join Column</em>' class. @@ -2633,7 +2633,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl * @generated * @ordered */ - public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 7; + public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN_FEATURE_COUNT = JAVA_NAMED_COLUMN_FEATURE_COUNT + 3; /** * The feature id for the '<em><b>Strategy</b></em>' attribute. @@ -4340,7 +4340,7 @@ public class JpaJavaMappingsPackage extends EPackageImpl javaAssociationOverrideEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIAssociationOverride()); javaDiscriminatorColumnEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject()); javaDiscriminatorColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIDiscriminatorColumn()); - javaPrimaryKeyJoinColumnEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject()); + javaPrimaryKeyJoinColumnEClass.getESuperTypes().add(this.getJavaNamedColumn()); javaPrimaryKeyJoinColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIPrimaryKeyJoinColumn()); javaGeneratedValueEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject()); javaGeneratedValueEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIGeneratedValue()); diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java index e3145bbe42..f4d27833fb 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java @@ -928,19 +928,21 @@ public class JpaJavaMappingsSwitch<T> JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn = (JavaPrimaryKeyJoinColumn) theEObject; T result = caseJavaPrimaryKeyJoinColumn(javaPrimaryKeyJoinColumn); if (result == null) - result = caseJavaEObject(javaPrimaryKeyJoinColumn); + result = caseJavaNamedColumn(javaPrimaryKeyJoinColumn); if (result == null) result = caseIPrimaryKeyJoinColumn(javaPrimaryKeyJoinColumn); if (result == null) - result = caseJpaEObject(javaPrimaryKeyJoinColumn); + result = caseJavaEObject(javaPrimaryKeyJoinColumn); if (result == null) - result = caseIJpaSourceObject(javaPrimaryKeyJoinColumn); + result = caseINamedColumn(javaPrimaryKeyJoinColumn); if (result == null) result = caseIAbstractJoinColumn(javaPrimaryKeyJoinColumn); if (result == null) - result = caseIJpaEObject(javaPrimaryKeyJoinColumn); + result = caseJpaEObject(javaPrimaryKeyJoinColumn); if (result == null) - result = caseINamedColumn(javaPrimaryKeyJoinColumn); + result = caseIJpaSourceObject(javaPrimaryKeyJoinColumn); + if (result == null) + result = caseIJpaEObject(javaPrimaryKeyJoinColumn); if (result == null) result = defaultCase(theEObject); return result; diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlSecondaryTable.java index 3c46560724..6a07c64dce 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlSecondaryTable.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/XmlSecondaryTable.java @@ -17,7 +17,6 @@ import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.jpt.core.internal.ITypeMapping; -import org.eclipse.jpt.core.internal.mappings.IEntity; import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn; import org.eclipse.jpt.core.internal.mappings.ISecondaryTable; import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage; @@ -275,9 +274,8 @@ public class XmlSecondaryTable extends AbstractXmlTable //secondaryTables are part of a collection, the secondary-table element will be removed/added //when the XmlSecondaryTable is removed/added to the XmlEntity collection } - + public IPrimaryKeyJoinColumn createPrimaryKeyJoinColumn(int index) { return OrmFactory.eINSTANCE.createXmlPrimaryKeyJoinColumn(new ISecondaryTable.PrimaryKeyJoinColumnOwner(this)); } - } // XmlSecondaryTable diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISecondaryTable.java index be5ff4b7f3..d252be5cca 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISecondaryTable.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/mappings/ISecondaryTable.java @@ -89,12 +89,11 @@ public interface ISecondaryTable extends ITable * @generated */ ITypeMapping typeMapping(); - + /** * Create a primary key join column with the given index */ IPrimaryKeyJoinColumn createPrimaryKeyJoinColumn(int index); - class PrimaryKeyJoinColumnOwner implements IAbstractJoinColumn.Owner { private ISecondaryTable secondaryTable; 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 index d24c80a73a..0fd16b87c5 100644 --- 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 @@ -194,11 +194,6 @@ public class SecondaryTablesComposite extends BaseJpaComposite secondaryTable.setSpecifiedName(name); secondaryTable.setSpecifiedCatalog(catalog); secondaryTable.setSpecifiedSchema(schema); - - IPrimaryKeyJoinColumn joinColumn = secondaryTable.createPrimaryKeyJoinColumn(0); - secondaryTable.getSpecifiedPrimaryKeyJoinColumns().add(joinColumn); - joinColumn.setSpecifiedName("foo"); - joinColumn.setSpecifiedReferencedColumnName("bar"); } } |