Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings')
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/AbstractJavaColumn.java695
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/AbstractJavaTable.java1114
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/IntAnnotationElementAdapter.java100
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JPA.java294
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAbstractQuery.java631
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAssociationOverride.java506
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAttributeMapping.java170
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAttributeOverride.java268
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaBasic.java938
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaBasicProvider.java228
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaCascade.java583
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaColumn.java453
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java451
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddable.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddableProvider.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbedded.java577
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedId.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedIdProvider.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedProvider.java73
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntity.java3000
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntityProvider.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaGeneratedValue.java347
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaGenerator.java570
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaId.java767
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaIdProvider.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaJoinColumn.java517
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaJoinTable.java822
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToMany.java98
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToManyProvider.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToOne.java95
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToOneProvider.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMappedSuperclass.java330
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMappedSuperclassProvider.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMultiRelationshipMapping.java811
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedColumn.java528
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedNativeQuery.java354
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedQuery.java76
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullAttributeMapping.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullAttributeMappingProvider.java60
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullTypeMapping.java62
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullTypeMappingProvider.java55
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToMany.java98
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToManyProvider.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToOne.java328
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToOneProvider.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOverride.java331
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaPrimaryKeyJoinColumn.java474
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaQueryHint.java384
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaRelationshipMapping.java687
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSecondaryTable.java553
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSequenceGenerator.java348
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSingleRelationshipMapping.java686
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTable.java88
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTableGenerator.java1350
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTransient.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTransientProvider.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTypeMapping.java264
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaUniqueConstraint.java369
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaVersion.java396
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaVersionProvider.java59
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsFactory.java499
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java5109
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsAdapterFactory.java1944
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java2541
64 files changed, 0 insertions, 32900 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/AbstractJavaColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/AbstractJavaColumn.java
deleted file mode 100644
index 23cbe8fb51..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/AbstractJavaColumn.java
+++ /dev/null
@@ -1,695 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.mappings.DefaultFalseBoolean;
-import org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean;
-import org.eclipse.jpt.core.internal.mappings.IAbstractColumn;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.StringTools;
-import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Java Column</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getAbstractJavaColumn()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractJavaColumn extends JavaNamedColumn
- implements IAbstractColumn
-{
- /**
- * The default value of the '{@link #getUnique() <em>Unique</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUnique()
- * @generated
- * @ordered
- */
- protected static final DefaultFalseBoolean UNIQUE_EDEFAULT = DefaultFalseBoolean.DEFAULT;
-
- /**
- * The cached value of the '{@link #getUnique() <em>Unique</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUnique()
- * @generated
- * @ordered
- */
- protected DefaultFalseBoolean unique = UNIQUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getNullable() <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNullable()
- * @generated
- * @ordered
- */
- protected static final DefaultTrueBoolean NULLABLE_EDEFAULT = DefaultTrueBoolean.DEFAULT;
-
- /**
- * The cached value of the '{@link #getNullable() <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNullable()
- * @generated
- * @ordered
- */
- protected DefaultTrueBoolean nullable = NULLABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getInsertable() <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInsertable()
- * @generated
- * @ordered
- */
- protected static final DefaultTrueBoolean INSERTABLE_EDEFAULT = DefaultTrueBoolean.DEFAULT;
-
- /**
- * The cached value of the '{@link #getInsertable() <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInsertable()
- * @generated
- * @ordered
- */
- protected DefaultTrueBoolean insertable = INSERTABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getUpdatable() <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUpdatable()
- * @generated
- * @ordered
- */
- protected static final DefaultTrueBoolean UPDATABLE_EDEFAULT = DefaultTrueBoolean.DEFAULT;
-
- /**
- * The cached value of the '{@link #getUpdatable() <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUpdatable()
- * @generated
- * @ordered
- */
- protected DefaultTrueBoolean updatable = UPDATABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getTable() <em>Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTable()
- * @generated
- * @ordered
- */
- protected static final String TABLE_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedTable() <em>Specified Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedTable()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_TABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedTable() <em>Specified Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedTable()
- * @generated
- * @ordered
- */
- protected String specifiedTable = SPECIFIED_TABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultTable() <em>Default Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultTable()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_TABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultTable() <em>Default Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultTable()
- * @generated
- * @ordered
- */
- protected String defaultTable = DEFAULT_TABLE_EDEFAULT;
-
- // hold this so we can get the 'table' text range
- private final DeclarationAnnotationElementAdapter<String> tableDeclarationAdapter;
-
- private final AnnotationElementAdapter<String> tableAdapter;
-
- private final AnnotationElementAdapter<String> uniqueAdapter;
-
- private final AnnotationElementAdapter<String> nullableAdapter;
-
- private final AnnotationElementAdapter<String> insertableAdapter;
-
- private final AnnotationElementAdapter<String> updatableAdapter;
-
- protected AbstractJavaColumn() {
- super();
- throw new UnsupportedOperationException("Use AbstractJavaColumn(Owner, Member, DeclarationAnnotationAdapter) instead");
- }
-
- protected AbstractJavaColumn(Owner owner, Member member, DeclarationAnnotationAdapter daa) {
- super(owner, member, daa);
- this.tableDeclarationAdapter = this.buildStringElementAdapter(this.tableElementName());
- this.tableAdapter = this.buildShortCircuitElementAdapter(this.tableDeclarationAdapter);
- this.uniqueAdapter = this.buildShortCircuitBooleanElementAdapter(this.uniqueElementName());
- this.nullableAdapter = this.buildShortCircuitBooleanElementAdapter(this.nullableElementName());
- this.insertableAdapter = this.buildShortCircuitBooleanElementAdapter(this.insertableElementName());
- this.updatableAdapter = this.buildShortCircuitBooleanElementAdapter(this.updatableElementName());
- }
-
- protected abstract String tableElementName();
-
- protected abstract String uniqueElementName();
-
- protected abstract String nullableElementName();
-
- protected abstract String insertableElementName();
-
- protected abstract String updatableElementName();
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IAbstractColumn.class)) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE :
- this.tableAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UNIQUE :
- this.uniqueAdapter.setValue(((DefaultFalseBoolean) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__NULLABLE :
- this.nullableAdapter.setValue(((DefaultTrueBoolean) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__INSERTABLE :
- this.insertableAdapter.setValue(((DefaultTrueBoolean) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UPDATABLE :
- this.updatableAdapter.setValue(((DefaultTrueBoolean) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.ABSTRACT_JAVA_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Unique</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DefaultFalseBoolean}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Unique</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Unique</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultFalseBoolean
- * @see #setUnique(DefaultFalseBoolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAbstractColumn_Unique()
- * @model
- * @generated
- */
- public DefaultFalseBoolean getUnique() {
- return unique;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn#getUnique <em>Unique</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Unique</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultFalseBoolean
- * @see #getUnique()
- * @generated
- */
- public void setUnique(DefaultFalseBoolean newUnique) {
- DefaultFalseBoolean oldUnique = unique;
- unique = newUnique == null ? UNIQUE_EDEFAULT : newUnique;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UNIQUE, oldUnique, unique));
- }
-
- /**
- * Returns the value of the '<em><b>Nullable</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Nullable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Nullable</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean
- * @see #setNullable(DefaultTrueBoolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAbstractColumn_Nullable()
- * @model
- * @generated
- */
- public DefaultTrueBoolean getNullable() {
- return nullable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn#getNullable <em>Nullable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Nullable</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean
- * @see #getNullable()
- * @generated
- */
- public void setNullable(DefaultTrueBoolean newNullable) {
- DefaultTrueBoolean oldNullable = nullable;
- nullable = newNullable == null ? NULLABLE_EDEFAULT : newNullable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__NULLABLE, oldNullable, nullable));
- }
-
- /**
- * Returns the value of the '<em><b>Insertable</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Insertable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Insertable</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean
- * @see #setInsertable(DefaultTrueBoolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAbstractColumn_Insertable()
- * @model
- * @generated
- */
- public DefaultTrueBoolean getInsertable() {
- return insertable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn#getInsertable <em>Insertable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Insertable</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean
- * @see #getInsertable()
- * @generated
- */
- public void setInsertable(DefaultTrueBoolean newInsertable) {
- DefaultTrueBoolean oldInsertable = insertable;
- insertable = newInsertable == null ? INSERTABLE_EDEFAULT : newInsertable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__INSERTABLE, oldInsertable, insertable));
- }
-
- /**
- * Returns the value of the '<em><b>Updatable</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Updatable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Updatable</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean
- * @see #setUpdatable(DefaultTrueBoolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAbstractColumn_Updatable()
- * @model
- * @generated
- */
- public DefaultTrueBoolean getUpdatable() {
- return updatable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn#getUpdatable <em>Updatable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Updatable</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean
- * @see #getUpdatable()
- * @generated
- */
- public void setUpdatable(DefaultTrueBoolean newUpdatable) {
- DefaultTrueBoolean oldUpdatable = updatable;
- updatable = newUpdatable == null ? UPDATABLE_EDEFAULT : newUpdatable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UPDATABLE, oldUpdatable, updatable));
- }
-
- public String getTable() {
- return (this.getSpecifiedTable() == null) ? getDefaultTable() : this.getSpecifiedTable();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Table</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 Table</em>' attribute.
- * @see #setSpecifiedTable(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAbstractColumn_SpecifiedTable()
- * @model
- * @generated
- */
- public String getSpecifiedTable() {
- return specifiedTable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn#getSpecifiedTable <em>Specified Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Table</em>' attribute.
- * @see #getSpecifiedTable()
- * @generated
- */
- public void setSpecifiedTable(String newSpecifiedTable) {
- String oldSpecifiedTable = specifiedTable;
- specifiedTable = newSpecifiedTable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE, oldSpecifiedTable, specifiedTable));
- }
-
- protected void setDefaultTable(String newDefaultTable) {
- String oldDefaultTable = this.defaultTable;
- this.defaultTable = newDefaultTable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__DEFAULT_TABLE, oldDefaultTable, newDefaultTable));
- }
-
- /**
- * Returns the value of the '<em><b>Default Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Table</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 Table</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAbstractColumn_DefaultTable()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultTable() {
- return defaultTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UNIQUE :
- return getUnique();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__NULLABLE :
- return getNullable();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__INSERTABLE :
- return getInsertable();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UPDATABLE :
- return getUpdatable();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__TABLE :
- return getTable();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE :
- return getSpecifiedTable();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__DEFAULT_TABLE :
- return getDefaultTable();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UNIQUE :
- setUnique((DefaultFalseBoolean) newValue);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__NULLABLE :
- setNullable((DefaultTrueBoolean) newValue);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__INSERTABLE :
- setInsertable((DefaultTrueBoolean) newValue);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UPDATABLE :
- setUpdatable((DefaultTrueBoolean) newValue);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE :
- setSpecifiedTable((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UNIQUE :
- setUnique(UNIQUE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__NULLABLE :
- setNullable(NULLABLE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__INSERTABLE :
- setInsertable(INSERTABLE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UPDATABLE :
- setUpdatable(UPDATABLE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE :
- setSpecifiedTable(SPECIFIED_TABLE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UNIQUE :
- return unique != UNIQUE_EDEFAULT;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__NULLABLE :
- return nullable != NULLABLE_EDEFAULT;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__INSERTABLE :
- return insertable != INSERTABLE_EDEFAULT;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UPDATABLE :
- return updatable != UPDATABLE_EDEFAULT;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__TABLE :
- return TABLE_EDEFAULT == null ? getTable() != null : !TABLE_EDEFAULT.equals(getTable());
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE :
- return SPECIFIED_TABLE_EDEFAULT == null ? specifiedTable != null : !SPECIFIED_TABLE_EDEFAULT.equals(specifiedTable);
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__DEFAULT_TABLE :
- return DEFAULT_TABLE_EDEFAULT == null ? defaultTable != null : !DEFAULT_TABLE_EDEFAULT.equals(defaultTable);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IAbstractColumn.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UNIQUE :
- return JpaCoreMappingsPackage.IABSTRACT_COLUMN__UNIQUE;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__NULLABLE :
- return JpaCoreMappingsPackage.IABSTRACT_COLUMN__NULLABLE;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__INSERTABLE :
- return JpaCoreMappingsPackage.IABSTRACT_COLUMN__INSERTABLE;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UPDATABLE :
- return JpaCoreMappingsPackage.IABSTRACT_COLUMN__UPDATABLE;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__TABLE :
- return JpaCoreMappingsPackage.IABSTRACT_COLUMN__TABLE;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE :
- return JpaCoreMappingsPackage.IABSTRACT_COLUMN__SPECIFIED_TABLE;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__DEFAULT_TABLE :
- return JpaCoreMappingsPackage.IABSTRACT_COLUMN__DEFAULT_TABLE;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IAbstractColumn.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IABSTRACT_COLUMN__UNIQUE :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UNIQUE;
- case JpaCoreMappingsPackage.IABSTRACT_COLUMN__NULLABLE :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__NULLABLE;
- case JpaCoreMappingsPackage.IABSTRACT_COLUMN__INSERTABLE :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__INSERTABLE;
- case JpaCoreMappingsPackage.IABSTRACT_COLUMN__UPDATABLE :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__UPDATABLE;
- case JpaCoreMappingsPackage.IABSTRACT_COLUMN__TABLE :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__TABLE;
- case JpaCoreMappingsPackage.IABSTRACT_COLUMN__SPECIFIED_TABLE :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE;
- case JpaCoreMappingsPackage.IABSTRACT_COLUMN__DEFAULT_TABLE :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN__DEFAULT_TABLE;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (unique: ");
- result.append(unique);
- result.append(", nullable: ");
- result.append(nullable);
- result.append(", insertable: ");
- result.append(insertable);
- result.append(", updatable: ");
- result.append(updatable);
- result.append(", specifiedTable: ");
- result.append(specifiedTable);
- result.append(", defaultTable: ");
- result.append(defaultTable);
- result.append(')');
- return result.toString();
- }
-
- @Override
- protected String tableName() {
- return this.getTable();
- }
-
- public ITextRange tableTextRange() {
- return this.elementTextRange(this.tableDeclarationAdapter);
- }
-
- public boolean tableTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.tableDeclarationAdapter, pos, astRoot);
- }
-
- private Iterator<String> candidateTableNames() {
- return this.tableIsAllowed() ? this.getOwner().getTypeMapping().associatedTableNamesIncludingInherited() : EmptyIterator.<String> instance();
- }
-
- private Iterator<String> candidateTableNames(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateTableNames(), filter);
- }
-
- private Iterator<String> quotedCandidateTableNames(Filter<String> filter) {
- return StringTools.quote(this.candidateTableNames(filter));
- }
-
- /**
- * Return whether the 'table' element is allowed. It is not allowed for
- * join columns inside of join tables.
- */
- public abstract boolean tableIsAllowed();
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.tableTouches(pos, astRoot)) {
- return this.quotedCandidateTableNames(filter);
- }
- return null;
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.setSpecifiedTable(this.tableAdapter.getValue(astRoot));
- this.setUnique(DefaultFalseBoolean.fromJavaAnnotationValue(this.uniqueAdapter.getValue(astRoot)));
- this.setNullable(DefaultTrueBoolean.fromJavaAnnotationValue(this.nullableAdapter.getValue(astRoot)));
- this.setInsertable(DefaultTrueBoolean.fromJavaAnnotationValue(this.insertableAdapter.getValue(astRoot)));
- this.setUpdatable(DefaultTrueBoolean.fromJavaAnnotationValue(this.updatableAdapter.getValue(astRoot)));
- }
-}
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
deleted file mode 100644
index 6bf5e1b0f8..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/AbstractJavaTable.java
+++ /dev/null
@@ -1,1114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-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.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.mappings.ITable;
-import org.eclipse.jpt.core.internal.mappings.IUniqueConstraint;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.platform.BaseJpaPlatform;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-import org.eclipse.jpt.db.internal.Schema;
-import org.eclipse.jpt.db.internal.Table;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.StringTools;
-import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Java Table</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getAbstractJavaTable()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class AbstractJavaTable extends JavaEObject implements ITable
-{
- /**
- * 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 #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected static final String CATALOG_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedCatalog() <em>Specified Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedCatalog()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_CATALOG_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedCatalog() <em>Specified Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedCatalog()
- * @generated
- * @ordered
- */
- protected String specifiedCatalog = SPECIFIED_CATALOG_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultCatalog() <em>Default Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultCatalog()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_CATALOG_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultCatalog() <em>Default Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultCatalog()
- * @generated
- * @ordered
- */
- protected String defaultCatalog = DEFAULT_CATALOG_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected static final String SCHEMA_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedSchema() <em>Specified Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedSchema()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_SCHEMA_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedSchema() <em>Specified Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedSchema()
- * @generated
- * @ordered
- */
- protected String specifiedSchema = SPECIFIED_SCHEMA_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultSchema() <em>Default Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultSchema()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_SCHEMA_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultSchema() <em>Default Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultSchema()
- * @generated
- * @ordered
- */
- protected String defaultSchema = DEFAULT_SCHEMA_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getUniqueConstraints() <em>Unique Constraints</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUniqueConstraints()
- * @generated
- * @ordered
- */
- protected EList<IUniqueConstraint> uniqueConstraints;
-
- private final Owner owner;
-
- private final Member member;
-
- // hold this so we can get the annotation's text range
- private final DeclarationAnnotationAdapter daa;
-
- // hold this so we can get the 'name' text range
- private final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
-
- // hold this so we can get the 'schema' text range
- private final DeclarationAnnotationElementAdapter<String> schemaDeclarationAdapter;
-
- // hold this so we can get the 'catalog' text range
- private final DeclarationAnnotationElementAdapter<String> catalogDeclarationAdapter;
-
- private final AnnotationElementAdapter<String> nameAdapter;
-
- private final AnnotationElementAdapter<String> schemaAdapter;
-
- private final AnnotationElementAdapter<String> catalogAdapter;
-
- protected AbstractJavaTable() {
- super();
- throw new UnsupportedOperationException("Use AbstractJavaTable(Owner, Member) instead");
- }
-
- protected AbstractJavaTable(Owner owner, Member member, DeclarationAnnotationAdapter daa) {
- super();
- this.owner = owner;
- this.member = member;
- this.daa = daa;
- this.nameDeclarationAdapter = this.nameAdapter(daa);
- this.schemaDeclarationAdapter = this.schemaAdapter(daa);
- this.catalogDeclarationAdapter = this.catalogAdapter(daa);
- this.nameAdapter = new ShortCircuitAnnotationElementAdapter<String>(this.member, this.nameDeclarationAdapter);
- this.schemaAdapter = new ShortCircuitAnnotationElementAdapter<String>(this.member, this.schemaDeclarationAdapter);
- this.catalogAdapter = new ShortCircuitAnnotationElementAdapter<String>(this.member, this.catalogDeclarationAdapter);
- }
-
- /**
- * Build and return a declaration element adapter for the table's 'name' element
- */
- protected abstract DeclarationAnnotationElementAdapter<String> nameAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter);
-
- /**
- * Build and return a declaration element adapter for the table's 'schema' element
- */
- protected abstract DeclarationAnnotationElementAdapter<String> schemaAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter);
-
- /**
- * Build and return a declaration element adapter for the table's 'catalog' element
- */
- protected abstract DeclarationAnnotationElementAdapter<String> catalogAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter);
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(ITable.class)) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_NAME :
- this.nameAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA :
- this.schemaAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG :
- this.catalogAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS :
- uniqueConstraintsChanged(notification);
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void uniqueConstraintsChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- uniqueConstraintAdded(notification.getPosition(), (IUniqueConstraint) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- uniqueConstraintsAdded(notification.getPosition(), (List<IUniqueConstraint>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- uniqueConstraintRemoved(notification.getPosition(), (IUniqueConstraint) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- uniqueConstraintsCleared((List<IUniqueConstraint>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- uniqueConstraintsRemoved((int[]) notification.getNewValue(), (List<IUniqueConstraint>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- uniqueConstraintSet(notification.getPosition(), (IUniqueConstraint) notification.getOldValue(), (IUniqueConstraint) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- uniqueConstraintMoved(notification.getOldIntValue(), notification.getPosition(), (IUniqueConstraint) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.ABSTRACT_JAVA_TABLE;
- }
-
- /**
- * 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#getITable_Name()
- * @model changeable="false" volatile="true" derived="true"
- * @generated NOT
- */
- public String getName() {
- return (this.getSpecifiedName() == null) ? getDefaultName() : this.getSpecifiedName();
- }
-
- /**
- * 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#getITable_SpecifiedName()
- * @model
- * @generated
- */
- public String getSpecifiedName() {
- return specifiedName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable#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 setSpecifiedName(String newSpecifiedName) {
- String oldSpecifiedName = specifiedName;
- specifiedName = newSpecifiedName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_NAME, oldSpecifiedName, specifiedName));
- }
-
- /**
- * 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#getITable_DefaultName()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultName() {
- return defaultName;
- }
-
- /**
- * Returns the value of the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Catalog</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITable_Catalog()
- * @model changeable="false" volatile="true" derived="true"
- * @generated NOT
- */
- public String getCatalog() {
- return (this.getSpecifiedCatalog() == null) ? getDefaultCatalog() : this.getSpecifiedCatalog();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Catalog</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 Catalog</em>' attribute.
- * @see #setSpecifiedCatalog(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITable_SpecifiedCatalog()
- * @model
- * @generated
- */
- public String getSpecifiedCatalog() {
- return specifiedCatalog;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable#getSpecifiedCatalog <em>Specified Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Catalog</em>' attribute.
- * @see #getSpecifiedCatalog()
- * @generated
- */
- public void setSpecifiedCatalog(String newSpecifiedCatalog) {
- String oldSpecifiedCatalog = specifiedCatalog;
- specifiedCatalog = newSpecifiedCatalog;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG, oldSpecifiedCatalog, specifiedCatalog));
- }
-
- /**
- * Returns the value of the '<em><b>Default Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Catalog</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 Catalog</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITable_DefaultCatalog()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultCatalog() {
- return defaultCatalog;
- }
-
- /**
- * Returns the value of the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Schema</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Schema</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITable_Schema()
- * @model changeable="false" volatile="true" derived="true"
- * @generated NOT
- */
- public String getSchema() {
- return (this.getSpecifiedSchema() == null) ? getDefaultSchema() : this.getSpecifiedSchema();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Schema</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 Schema</em>' attribute.
- * @see #setSpecifiedSchema(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITable_SpecifiedSchema()
- * @model
- * @generated
- */
- public String getSpecifiedSchema() {
- return specifiedSchema;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable#getSpecifiedSchema <em>Specified Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Schema</em>' attribute.
- * @see #getSpecifiedSchema()
- * @generated
- */
- public void setSpecifiedSchema(String newSpecifiedSchema) {
- String oldSpecifiedSchema = specifiedSchema;
- specifiedSchema = newSpecifiedSchema;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA, oldSpecifiedSchema, specifiedSchema));
- }
-
- /**
- * Returns the value of the '<em><b>Default Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Schema</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 Schema</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITable_DefaultSchema()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultSchema() {
- return defaultSchema;
- }
-
- /**
- * Returns the value of the '<em><b>Unique Constraints</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IUniqueConstraint}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Unique Constraints</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>Unique Constraints</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITable_UniqueConstraints()
- * @model type="org.eclipse.jpt.core.internal.mappings.IUniqueConstraint" containment="true"
- * @generated
- */
- public EList<IUniqueConstraint> getUniqueConstraints() {
- if (uniqueConstraints == null) {
- uniqueConstraints = new EObjectContainmentEList<IUniqueConstraint>(IUniqueConstraint.class, this, JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS);
- }
- return uniqueConstraints;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS :
- return ((InternalEList<?>) getUniqueConstraints()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__NAME :
- return getName();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_NAME :
- return getSpecifiedName();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_NAME :
- return getDefaultName();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__CATALOG :
- return getCatalog();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG :
- return getSpecifiedCatalog();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_CATALOG :
- return getDefaultCatalog();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SCHEMA :
- return getSchema();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA :
- return getSpecifiedSchema();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_SCHEMA :
- return getDefaultSchema();
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS :
- return getUniqueConstraints();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_NAME :
- setSpecifiedName((String) newValue);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG :
- setSpecifiedCatalog((String) newValue);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA :
- setSpecifiedSchema((String) newValue);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS :
- getUniqueConstraints().clear();
- getUniqueConstraints().addAll((Collection<? extends IUniqueConstraint>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_NAME :
- setSpecifiedName(SPECIFIED_NAME_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG :
- setSpecifiedCatalog(SPECIFIED_CATALOG_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA :
- setSpecifiedSchema(SPECIFIED_SCHEMA_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS :
- getUniqueConstraints().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__NAME :
- return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName());
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_NAME :
- return SPECIFIED_NAME_EDEFAULT == null ? specifiedName != null : !SPECIFIED_NAME_EDEFAULT.equals(specifiedName);
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_NAME :
- return DEFAULT_NAME_EDEFAULT == null ? defaultName != null : !DEFAULT_NAME_EDEFAULT.equals(defaultName);
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__CATALOG :
- return CATALOG_EDEFAULT == null ? getCatalog() != null : !CATALOG_EDEFAULT.equals(getCatalog());
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG :
- return SPECIFIED_CATALOG_EDEFAULT == null ? specifiedCatalog != null : !SPECIFIED_CATALOG_EDEFAULT.equals(specifiedCatalog);
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_CATALOG :
- return DEFAULT_CATALOG_EDEFAULT == null ? defaultCatalog != null : !DEFAULT_CATALOG_EDEFAULT.equals(defaultCatalog);
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SCHEMA :
- return SCHEMA_EDEFAULT == null ? getSchema() != null : !SCHEMA_EDEFAULT.equals(getSchema());
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA :
- return SPECIFIED_SCHEMA_EDEFAULT == null ? specifiedSchema != null : !SPECIFIED_SCHEMA_EDEFAULT.equals(specifiedSchema);
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_SCHEMA :
- return DEFAULT_SCHEMA_EDEFAULT == null ? defaultSchema != null : !DEFAULT_SCHEMA_EDEFAULT.equals(defaultSchema);
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS :
- return uniqueConstraints != null && !uniqueConstraints.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == ITable.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__NAME :
- return JpaCoreMappingsPackage.ITABLE__NAME;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_NAME :
- return JpaCoreMappingsPackage.ITABLE__SPECIFIED_NAME;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_NAME :
- return JpaCoreMappingsPackage.ITABLE__DEFAULT_NAME;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__CATALOG :
- return JpaCoreMappingsPackage.ITABLE__CATALOG;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG :
- return JpaCoreMappingsPackage.ITABLE__SPECIFIED_CATALOG;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_CATALOG :
- return JpaCoreMappingsPackage.ITABLE__DEFAULT_CATALOG;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SCHEMA :
- return JpaCoreMappingsPackage.ITABLE__SCHEMA;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA :
- return JpaCoreMappingsPackage.ITABLE__SPECIFIED_SCHEMA;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_SCHEMA :
- return JpaCoreMappingsPackage.ITABLE__DEFAULT_SCHEMA;
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS :
- return JpaCoreMappingsPackage.ITABLE__UNIQUE_CONSTRAINTS;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == ITable.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.ITABLE__NAME :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__NAME;
- case JpaCoreMappingsPackage.ITABLE__SPECIFIED_NAME :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_NAME;
- case JpaCoreMappingsPackage.ITABLE__DEFAULT_NAME :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_NAME;
- case JpaCoreMappingsPackage.ITABLE__CATALOG :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__CATALOG;
- case JpaCoreMappingsPackage.ITABLE__SPECIFIED_CATALOG :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG;
- case JpaCoreMappingsPackage.ITABLE__DEFAULT_CATALOG :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_CATALOG;
- case JpaCoreMappingsPackage.ITABLE__SCHEMA :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SCHEMA;
- case JpaCoreMappingsPackage.ITABLE__SPECIFIED_SCHEMA :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA;
- case JpaCoreMappingsPackage.ITABLE__DEFAULT_SCHEMA :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__DEFAULT_SCHEMA;
- case JpaCoreMappingsPackage.ITABLE__UNIQUE_CONSTRAINTS :
- return JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- 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(", specifiedCatalog: ");
- result.append(specifiedCatalog);
- result.append(", defaultCatalog: ");
- result.append(defaultCatalog);
- result.append(", specifiedSchema: ");
- result.append(specifiedSchema);
- result.append(", defaultSchema: ");
- result.append(defaultSchema);
- result.append(')');
- return result.toString();
- }
-
- // ********** ITable implementation **********
- public ITextRange nameTextRange() {
- return this.elementTextRange(this.nameDeclarationAdapter);
- }
-
- public ITextRange nameTextRange(CompilationUnit astRoot) {
- return this.elementTextRange(this.nameDeclarationAdapter, astRoot);
- }
-
- public boolean nameTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.nameDeclarationAdapter, pos, astRoot);
- }
-
- public ITextRange schemaTextRange() {
- return this.elementTextRange(this.schemaDeclarationAdapter);
- }
-
- public ITextRange schemaTextRange(CompilationUnit astRoot) {
- return this.elementTextRange(this.schemaDeclarationAdapter, astRoot);
- }
-
- public boolean schemaTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.schemaDeclarationAdapter, pos, astRoot);
- }
-
- public ITextRange catalogTextRange() {
- return this.elementTextRange(this.catalogDeclarationAdapter);
- }
-
- public ITextRange catalogTextRange(CompilationUnit astRoot) {
- return this.elementTextRange(this.catalogDeclarationAdapter, astRoot);
- }
-
- public boolean catalogTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.catalogDeclarationAdapter, pos, astRoot);
- }
-
- //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_TABLE__DEFAULT_NAME, oldDefaultName, this.defaultName));
- }
-
- protected void setDefaultCatalog(String newDefaultCatalog) {
- String oldDefaultCatalog = this.defaultCatalog;
- this.defaultCatalog = newDefaultCatalog;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_TABLE__DEFAULT_CATALOG, oldDefaultCatalog, this.defaultCatalog));
- }
-
- protected void setDefaultSchema(String newDefaultSchema) {
- String oldDefaultSchema = this.defaultSchema;
- this.defaultSchema = newDefaultSchema;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_TABLE__DEFAULT_SCHEMA, oldDefaultSchema, this.defaultSchema));
- }
-
- public Owner getOwner() {
- return owner;
- }
-
- protected Member getMember() {
- return this.member;
- }
-
- protected DeclarationAnnotationAdapter getDeclarationAnnotationAdapter() {
- return this.daa;
- }
-
- public IUniqueConstraint createUniqueConstraint(int index) {
- return createJavaUniqueConstraint(index);
- }
-
- protected abstract JavaUniqueConstraint createJavaUniqueConstraint(int index);
-
- //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));
- this.setDefaultSchema((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_TABLE_SCHEMA_KEY));
- }
-
- protected void updateFromJava(CompilationUnit astRoot) {
- this.setSpecifiedName(this.nameAdapter.getValue(astRoot));
- this.setSpecifiedSchema(this.schemaAdapter.getValue(astRoot));
- this.setSpecifiedCatalog(this.catalogAdapter.getValue(astRoot));
- this.updateUniqueConstraintsFromJava(astRoot);
- }
-
- /**
- * here we just worry about getting the unique constraints lists the same size;
- * then we delegate to the unique constraints to synch themselves up
- */
- private void updateUniqueConstraintsFromJava(CompilationUnit astRoot) {
- // synchronize the model join columns with the Java source
- List<IUniqueConstraint> constraints = this.getUniqueConstraints();
- int persSize = constraints.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaUniqueConstraint uniqueConstraint = (JavaUniqueConstraint) constraints.get(i);
- if (uniqueConstraint.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- uniqueConstraint.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model join columns beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- constraints.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaUniqueConstraint uniqueConstraint = this.createJavaUniqueConstraint(javaSize);
- if (uniqueConstraint.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- this.getUniqueConstraints().add(uniqueConstraint);
- uniqueConstraint.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- public ITextRange validationTextRange() {
- ITextRange textRange = this.member.annotationTextRange(this.daa);
- return (textRange != null) ? textRange : this.getOwner().validationTextRange();
- }
-
- public Table dbTable() {
- Schema schema = this.dbSchema();
- return (schema == null) ? null : schema.tableNamed(this.getName());
- }
-
- public Schema dbSchema() {
- return this.database().schemaNamed(this.getSchema());
- }
-
- public boolean hasResolvedSchema() {
- return this.dbSchema() != null;
- }
-
- public boolean isResolved() {
- return this.dbTable() != null;
- }
-
- protected ITextRange elementTextRange(DeclarationAnnotationElementAdapter<?> elementAdapter) {
- return this.elementTextRange(this.member.annotationElementTextRange(elementAdapter));
- }
-
- protected ITextRange elementTextRange(DeclarationAnnotationElementAdapter<?> elementAdapter, CompilationUnit astRoot) {
- return this.elementTextRange(this.member.annotationElementTextRange(elementAdapter, astRoot));
- }
-
- protected boolean elementTouches(DeclarationAnnotationElementAdapter<?> elementAdapter, int pos) {
- return this.elementTouches(this.member.annotationElementTextRange(elementAdapter), pos);
- }
-
- protected boolean elementTouches(DeclarationAnnotationElementAdapter<?> elementAdapter, int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.member.annotationElementTextRange(elementAdapter, astRoot), pos);
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (IUniqueConstraint constraint : this.getUniqueConstraints()) {
- result = ((JavaUniqueConstraint) constraint).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * called if the database is connected
- * name, schema, catalog
- */
- @Override
- public Iterator<String> connectedCandidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.connectedCandidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.nameTouches(pos, astRoot)) {
- return this.quotedCandidateNames(filter);
- }
- if (this.schemaTouches(pos, astRoot)) {
- return this.quotedCandidateSchemas(filter);
- }
- if (this.catalogTouches(pos, astRoot)) {
- return this.quotedCandidateCatalogs(filter);
- }
- return null;
- }
-
- private Iterator<String> candidateNames() {
- Schema dbSchema = this.dbSchema();
- return (dbSchema != null) ? dbSchema.tableNames() : EmptyIterator.<String> instance();
- }
-
- private Iterator<String> candidateNames(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateNames(), filter);
- }
-
- private Iterator<String> quotedCandidateNames(Filter<String> filter) {
- return StringTools.quote(this.candidateNames(filter));
- }
-
- private Iterator<String> candidateSchemas() {
- return this.database().schemaNames();
- }
-
- private Iterator<String> candidateSchemas(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateSchemas(), filter);
- }
-
- private Iterator<String> quotedCandidateSchemas(Filter<String> filter) {
- return StringTools.quote(this.candidateSchemas(filter));
- }
-
- private Iterator<String> candidateCatalogs() {
- return this.database().catalogNames();
- }
-
- private Iterator<String> candidateCatalogs(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateCatalogs(), filter);
- }
-
- private Iterator<String> quotedCandidateCatalogs(Filter<String> filter) {
- return StringTools.quote(this.candidateCatalogs(filter));
- }
-
- // ********** jpa model -> java annotations **********
- ////////////////////////////////////////////////////////
- /**
- * slide over all the annotations that follow the new join column
- */
- public void uniqueConstraintAdded(int index, IUniqueConstraint uniqueConstraint) {
- // JoinColumn was added to jpa model when updating from java, do not need
- // to edit the java in this case. TODO is there a better way to handle this??
- if (((JavaUniqueConstraint) uniqueConstraint).annotation(getMember().astRoot()) == null) {
- this.synchUniqueConstraintAnnotationsAfterAdd(index + 1);
- ((JavaUniqueConstraint) uniqueConstraint).newAnnotation();
- }
- }
-
- // bjv look at this
- public void uniqueConstraintsAdded(int index, List<IUniqueConstraint> constraints) {
- // JoinColumn was added to jpa model when updating from java, do not need
- // to edit the java in this case. TODO is there a better way to handle this??
- if (!constraints.isEmpty() && ((JavaUniqueConstraint) constraints.get(0)).annotation(getMember().astRoot()) == null) {
- this.synchUniqueConstraintAnnotationsAfterAdd(index + constraints.size());
- for (IUniqueConstraint uniqueConstraint : constraints) {
- ((JavaUniqueConstraint) uniqueConstraint).newAnnotation();
- }
- }
- }
-
- public void uniqueConstraintRemoved(int index, IUniqueConstraint uniqueConstraint) {
- ((JavaUniqueConstraint) uniqueConstraint).removeAnnotation();
- this.synchUniqueConstraintAnnotationsAfterRemove(index);
- }
-
- public void uniqueConstraintsRemoved(int[] indexes, List<IUniqueConstraint> constraints) {
- for (IUniqueConstraint uniqueConstraint : constraints) {
- ((JavaUniqueConstraint) uniqueConstraint).removeAnnotation();
- }
- this.synchUniqueConstraintAnnotationsAfterRemove(indexes[0]);
- }
-
- public void uniqueConstraintsCleared(List<IUniqueConstraint> constraints) {
- for (IUniqueConstraint uniqueConstraint : constraints) {
- ((JavaUniqueConstraint) uniqueConstraint).removeAnnotation();
- }
- }
-
- public void uniqueConstraintSet(int index, IUniqueConstraint oldUniqueConstraint, IUniqueConstraint newUniqueConstraint) {
- ((JavaUniqueConstraint) newUniqueConstraint).newAnnotation();
- }
-
- public void uniqueConstraintMoved(int sourceIndex, int targetIndex, IUniqueConstraint uniqueConstraint) {
- List<IUniqueConstraint> constraints = this.getUniqueConstraints();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch(constraints.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchUniqueConstraintAnnotationsAfterAdd(int index) {
- List<IUniqueConstraint> constraints = this.getUniqueConstraints();
- for (int i = constraints.size(); i-- > index;) {
- this.synch(constraints.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchUniqueConstraintAnnotationsAfterRemove(int index) {
- List<IUniqueConstraint> joinColumns = this.getUniqueConstraints();
- for (int i = index; i < joinColumns.size(); i++) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- private void synch(IUniqueConstraint uniqueConstraint, int index) {
- ((JavaUniqueConstraint) uniqueConstraint).moveAnnotation(index);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/IntAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/IntAnnotationElementAdapter.java
deleted file mode 100644
index 1660481a5b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/IntAnnotationElementAdapter.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.utility.internal.StringTools;
-
-/**
- * Wrap an AnnotationElementAdapter and convert its value to an int,
- * and vice-versa. The public protocol is identical to
- * AnnotationElementAdapter; except the #getValue and #setValue
- * methods deal with an int instead of an Object.
- *
- * Assumptions:
- * - the nested adapter returns and expects a String value
- * - the value should be a non-negative number (value >= 0)
- * - an invalid value is represented with a -1/null
- * These assumptions work reasonably enough with the JPA requirements.
- */
-public class IntAnnotationElementAdapter {
- private final AnnotationElementAdapter<String> adapter;
-
- public IntAnnotationElementAdapter(AnnotationElementAdapter<String> adapter) {
- super();
- this.adapter = adapter;
- }
-
- public ASTNode astNode() {
- return this.adapter.astNode();
- }
-
- public ASTNode astNode(CompilationUnit astRoot) {
- return this.adapter.astNode(astRoot);
- }
-
- public int getValue() {
- return this.convertValueToInt(this.adapter.getValue());
- }
-
- public int getValue(CompilationUnit astRoot) {
- return this.convertValueToInt(this.adapter.getValue(astRoot));
- }
-
- protected int convertValueToInt(Object value) {
- return this.convertStringToInt(this.convertValueToString(value));
- }
-
- /**
- * assume the wrapped adapter returns a string
- */
- protected String convertValueToString(Object value) {
- return (String) value;
- }
-
- protected int convertStringToInt(String stringValue) {
- if (stringValue == null) {
- return -1;
- }
- try {
- int intValue = Integer.parseInt(stringValue);
- return (intValue >= 0) ? intValue : -1;
- } catch (NumberFormatException ex) {
- return -1;
- }
- }
-
- public void setValue(int value) {
- this.adapter.setValue(this.convertIntToValue(value));
- }
-
- protected String convertIntToValue(int intValue) {
- return this.convertStringToValue(this.convertIntToString(intValue));
- }
-
- /**
- * assume the wrapped adapter expects a string
- */
- protected String convertStringToValue(String stringValue) {
- return stringValue;
- }
-
- protected String convertIntToString(int intValue) {
- return (intValue >= 0) ? Integer.toString(intValue) : null;
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.adapter);
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JPA.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JPA.java
deleted file mode 100644
index 8675c6da6f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JPA.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-
-/**
- * JPA Java-related stuff (annotations etc.)
- */
-public interface JPA {
-
- // JPA package
- String PACKAGE = "javax.persistence";
- String PACKAGE_ = PACKAGE + ".";
-
-
- // ********** API **********
-
- // JPA annotations
- String ASSOCIATION_OVERRIDE = PACKAGE_ + "AssociationOverride";
- String ASSOCIATION_OVERRIDE__NAME = "name";
- String ASSOCIATION_OVERRIDE__JOIN_COLUMNS = "joinColumns";
- String ASSOCIATION_OVERRIDES = PACKAGE_ + "AssociationOverrides";
- String ASSOCIATION_OVERRIDES__VALUE = "value";
- String ATTRIBUTE_OVERRIDE = PACKAGE_ + "AttributeOverride";
- String ATTRIBUTE_OVERRIDE__NAME = "name";
- String ATTRIBUTE_OVERRIDE__COLUMN = "column";
- String ATTRIBUTE_OVERRIDES = PACKAGE_ + "AttributeOverrides";
- String ATTRIBUTE_OVERRIDES__VALUE = "value";
- String BASIC = PACKAGE_ + "Basic";
- String BASIC__FETCH = "fetch";
- String BASIC__OPTIONAL = "optional";
- String COLUMN = PACKAGE_ + "Column";
- String COLUMN__NAME = "name";
- String COLUMN__UNIQUE = "unique";
- String COLUMN__NULLABLE = "nullable";
- String COLUMN__INSERTABLE = "insertable";
- String COLUMN__UPDATABLE = "updatable";
- String COLUMN__COLUMN_DEFINITION = "columnDefinition";
- String COLUMN__TABLE = "table";
- String COLUMN__LENGTH = "length";
- String COLUMN__PRECISION = "precision";
- String COLUMN__SCALE = "scale";
- String COLUMN_RESULT = PACKAGE_ + "ColumnResult";
- String COLUMN_RESULT__NAME = "name";
- String DISCRIMINATOR_COLUMN = PACKAGE_ + "DiscriminatorColumn";
- String DISCRIMINATOR_COLUMN__NAME = "name";
- String DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = "discriminatorType";
- String DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = "columnDefinition";
- String DISCRIMINATOR_COLUMN__LENGTH = "length";
- String DISCRIMINATOR_VALUE = PACKAGE_ + "DiscriminatorValue";
- String DISCRIMINATOR_VALUE__VALUE = "value";
- String EMBEDDABLE = PACKAGE_ + "Embeddable";
- String EMBEDDED = PACKAGE_ + "Embedded";
- String EMBEDDED_ID = PACKAGE_ + "EmbeddedId";
- String ENTITY = PACKAGE_ + "Entity";
- String ENTITY__NAME = "name";
- String ENTITY_LISTENERS = PACKAGE_ + "EntityListeners";
- String ENTITY_LISTENERS__VALUE = "value";
- String ENTITY_RESULT = PACKAGE_ + "EntityResult";
- String ENTITY_RESULT__ENTITY_CLASS = "entityClass";
- String ENTITY_RESULT__FIELDS = "fields";
- String ENTITY_RESULT__DISCRIMINATOR_COLUMN = "discriminatorColumn";
- String ENUMERATED = PACKAGE_ + "Enumerated";
- String ENUMERATED__VALUE = "value";
- String EXCLUDE_DEFAULT_LISTENERS = PACKAGE_ + "ExcludeDefaultListeners";
- String EXCLUDE_SUPERCLASS_LISTENERS = PACKAGE_ + "ExcludeSuperclassListeners";
- String FIELD_RESULT = PACKAGE_ + "FieldResult";
- String FIELD_RESULT__NAME = "name";
- String FIELD_RESULT__COLUMN = "column";
- String FLUSH_MODE = PACKAGE_ + "FlushMode";
- String FLUSH_MODE__VALUE = "value";
- String GENERATED_VALUE = PACKAGE_ + "GeneratedValue";
- String GENERATED_VALUE__STRATEGY = "strategy";
- String GENERATED_VALUE__GENERATOR = "generator";
- String ID = PACKAGE_ + "Id";
- String ID_CLASS = PACKAGE_ + "IdClass";
- String ID_CLASS__VALUE = "value";
- String INHERITANCE = PACKAGE_ + "Inheritance";
- String INHERITANCE__STRATEGY = "strategy";
- String JOIN_COLUMN = PACKAGE_ + "JoinColumn";
- String JOIN_COLUMN__NAME = "name";
- String JOIN_COLUMN__REFERENCED_COLUMN_NAME = "referencedColumnName";
- String JOIN_COLUMN__UNIQUE = "unique";
- String JOIN_COLUMN__NULLABLE = "nullable";
- String JOIN_COLUMN__INSERTABLE = "insertable";
- String JOIN_COLUMN__UPDATABLE = "updatable";
- String JOIN_COLUMN__COLUMN_DEFINITION = "columnDefinition";
- String JOIN_COLUMN__TABLE = "table";
- String JOIN_COLUMNS = PACKAGE_ + "JoinColumns";
- String JOIN_COLUMNS__VALUE = "value";
- String JOIN_TABLE = PACKAGE_ + "JoinTable";
- String JOIN_TABLE__NAME = "name";
- String JOIN_TABLE__CATALOG = "catalog";
- String JOIN_TABLE__SCHEMA = "schema";
- String JOIN_TABLE__JOIN_COLUMNS = "joinColumns";
- String JOIN_TABLE__INVERSE_JOIN_COLUMNS = "inverseJoinColumns";
- String JOIN_TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
- String LOB = PACKAGE_ + "Lob";
- String MANY_TO_MANY = PACKAGE_ + "ManyToMany";
- String MANY_TO_MANY__TARGET_ENTITY = "targetEntity";
- String MANY_TO_MANY__CASCADE = "cascade";
- String MANY_TO_MANY__FETCH = "fetch";
- String MANY_TO_MANY__MAPPED_BY = "mappedBy";
- String MANY_TO_ONE = PACKAGE_ + "ManyToOne";
- String MANY_TO_ONE__TARGET_ENTITY = "targetEntity";
- String MANY_TO_ONE__CASCADE = "cascade";
- String MANY_TO_ONE__FETCH = "fetch";
- String MANY_TO_ONE__OPTIONAL = "optional";
- String MAP_KEY = PACKAGE_ + "MapKey";
- String MAP_KEY__NAME = "name";
- String MAPPED_SUPERCLASS = PACKAGE_ + "MappedSuperclass";
- String NAMED_NATIVE_QUERIES = PACKAGE_ + "NamedNativeQueries";
- String NAMED_NATIVE_QUERIES__VALUE = "value";
- String NAMED_NATIVE_QUERY = PACKAGE_ + "NamedNativeQuery";
- String NAMED_NATIVE_QUERY__NAME = "name";
- String NAMED_NATIVE_QUERY__QUERY = "query";
- String NAMED_NATIVE_QUERY__HINTS = "hints";
- String NAMED_NATIVE_QUERY__RESULT_CLASS = "resultClass";
- String NAMED_NATIVE_QUERY__RESULT_SET_MAPPING = "resultSetMapping";
- String NAMED_QUERIES = PACKAGE_ + "NamedQueries";
- String NAMED_QUERIES__VALUE = "value";
- String NAMED_QUERY = PACKAGE_ + "NamedQuery";
- String NAMED_QUERY__NAME = "name";
- String NAMED_QUERY__QUERY = "query";
- String NAMED_QUERY__HINTS = "hints";
- String ONE_TO_MANY = PACKAGE_ + "OneToMany";
- String ONE_TO_MANY__TARGET_ENTITY = "targetEntity";
- String ONE_TO_MANY__CASCADE = "cascade";
- String ONE_TO_MANY__FETCH = "fetch";
- String ONE_TO_MANY__MAPPED_BY = "mappedBy";
- String ONE_TO_ONE = PACKAGE_ + "OneToOne";
- String ONE_TO_ONE__TARGET_ENTITY = "targetEntity";
- String ONE_TO_ONE__CASCADE = "cascade";
- String ONE_TO_ONE__FETCH = "fetch";
- String ONE_TO_ONE__OPTIONAL = "optional";
- String ONE_TO_ONE__MAPPED_BY = "mappedBy";
- String ORDER_BY = PACKAGE_ + "OrderBy";
- String ORDER_BY__VALUE = "value";
- String PERSISTENCE_CONTEXT = PACKAGE_ + "PersistenceContext";
- String PERSISTENCE_CONTEXT__NAME = "name";
- String PERSISTENCE_CONTEXT__UNIT_NAME = "unitName";
- String PERSISTENCE_CONTEXT__TYPE = "type";
- String PERSISTENCE_CONTEXTS = PACKAGE_ + "PersistenceContexts";
- String PERSISTENCE_CONTEXTS__VALUE = "value";
- String PERSISTENCE_UNIT = PACKAGE_ + "PersistenceUnit";
- String PERSISTENCE_UNIT__NAME = "name";
- String PERSISTENCE_UNIT__UNIT_NAME = "unitName";
- String PERSISTENCE_UNITS = PACKAGE_ + "PersistenceUnits";
- String PERSISTENCE_UNITS__VALUE = "value";
- String POST_LOAD = PACKAGE_ + "PostLoad";
- String POST_PERSIST = PACKAGE_ + "PostPersist";
- String POST_REMOVE = PACKAGE_ + "PostRemove";
- String POST_UPDATE = PACKAGE_ + "PostUpdate";
- String PRE_PERSIST = PACKAGE_ + "PrePersist";
- String PRE_REMOVE = PACKAGE_ + "PreRemove";
- String PRE_UPDATE = PACKAGE_ + "PreUpdate";
- String PRIMARY_KEY_JOIN_COLUMN = PACKAGE_ + "PrimaryKeyJoinColumn";
- String PRIMARY_KEY_JOIN_COLUMN__NAME = "name";
- String PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME = "referencedColumnName";
- String PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION = "columnDefinition";
- String PRIMARY_KEY_JOIN_COLUMNS = PACKAGE_ + "PrimaryKeyJoinColumns";
- String PRIMARY_KEY_JOIN_COLUMNS__VALUE = "value";
- String QUERY_HINT = PACKAGE_ + "QueryHint";
- String QUERY_HINT__NAME = "name";
- String QUERY_HINT__VALUE = "value";
- String SECONDARY_TABLE = PACKAGE_ + "SecondaryTable";
- String SECONDARY_TABLE__NAME = "name";
- String SECONDARY_TABLE__CATALOG = "catalog";
- String SECONDARY_TABLE__SCHEMA = "schema";
- String SECONDARY_TABLE__PK_JOIN_COLUMNS = "pkJoinColumns";
- String SECONDARY_TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
- String SECONDARY_TABLES = PACKAGE_ + "SecondaryTables";
- String SECONDARY_TABLES__VALUE = "value";
- String SEQUENCE_GENERATOR = PACKAGE_ + "SequenceGenerator";
- String SEQUENCE_GENERATOR__NAME = "name";
- String SEQUENCE_GENERATOR__SEQUENCE_NAME = "sequenceName";
- String SEQUENCE_GENERATOR__INITIAL_VALUE = "initialValue";
- String SEQUENCE_GENERATOR__ALLOCATION_SIZE = "allocationSize";
- String SQL_RESULT_SET_MAPPING = PACKAGE_ + "SqlResultSetMapping";
- String SQL_RESULT_SET_MAPPING__NAME = "name";
- String SQL_RESULT_SET_MAPPING__ENTITIES = "entities";
- String SQL_RESULT_SET_MAPPING__COLUMNS = "columns";
- String TABLE = PACKAGE_ + "Table";
- String TABLE__NAME = "name";
- String TABLE__CATALOG = "catalog";
- String TABLE__SCHEMA = "schema";
- String TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
- String TABLE_GENERATOR = PACKAGE_ + "TableGenerator";
- String TABLE_GENERATOR__NAME = "name";
- String TABLE_GENERATOR__TABLE = "table";
- String TABLE_GENERATOR__CATALOG = "catalog";
- String TABLE_GENERATOR__SCHEMA = "schema";
- String TABLE_GENERATOR__PK_COLUMN_NAME = "pkColumnName";
- String TABLE_GENERATOR__VALUE_COLUMN_NAME = "valueColumnName";
- String TABLE_GENERATOR__PK_COLUMN_VALUE = "pkColumnValue";
- String TABLE_GENERATOR__INITIAL_VALUE = "initialValue";
- String TABLE_GENERATOR__ALLOCATION_SIZE = "allocationSize";
- String TABLE_GENERATOR__UNIQUE_CONSTRAINTS = "uniqueConstraints";
- String TEMPORAL = PACKAGE_ + "Temporal";
- String TEMPORAL__VALUE = "value";
- String TRANSIENT = PACKAGE_ + "Transient";
- String UNIQUE_CONSTRAINT = PACKAGE_ + "UniqueConstraint";
- String UNIQUE_CONSTRAINT__COLUMN_NAMES = "columnNames";
- String VERSION = PACKAGE_ + "Version";
-
- // JPA enums
- String GENERATION_TYPE = PACKAGE_ + "GenerationType";
- String GENERATION_TYPE_ = GENERATION_TYPE + ".";
- String GENERATION_TYPE__AUTO = GENERATION_TYPE_ + "AUTO";
- String GENERATION_TYPE__IDENTITY = GENERATION_TYPE_ + "IDENTITY";
- String GENERATION_TYPE__SEQUENCE = GENERATION_TYPE_ + "SEQUENCE";
- String GENERATION_TYPE__TABLE = GENERATION_TYPE_ + "TABLE";
-
- String CASCADE_TYPE = PACKAGE_ + "CascadeType";
- String CASCADE_TYPE_ = CASCADE_TYPE + ".";
- String CASCADE_TYPE__ALL = CASCADE_TYPE_ + "ALL";
- String CASCADE_TYPE__MERGE = CASCADE_TYPE_ + "MERGE";
- String CASCADE_TYPE__PERSIST = CASCADE_TYPE_ + "PERSIST";
- String CASCADE_TYPE__REFRESH = CASCADE_TYPE_ + "REFRESH";
- String CASCADE_TYPE__REMOVE = CASCADE_TYPE_ + "REMOVE";
-
- String DISCRIMINATOR_TYPE = PACKAGE_ + "DiscriminatorType";
- String DISCRIMINATOR_TYPE_ = DISCRIMINATOR_TYPE + ".";
- String DISCRIMINATOR_TYPE__CHAR = DISCRIMINATOR_TYPE_ + "CHAR";
- String DISCRIMINATOR_TYPE__INTEGER = DISCRIMINATOR_TYPE_ + "INTEGER";
- String DISCRIMINATOR_TYPE__STRING = DISCRIMINATOR_TYPE_ + "STRING";
-
- String ENUM_TYPE = PACKAGE_ + "EnumType";
- String ENUM_TYPE_ = ENUM_TYPE + ".";
- String ENUM_TYPE__ORDINAL = ENUM_TYPE_ + "ORDINAL";
- String ENUM_TYPE__STRING = ENUM_TYPE_ + "STRING";
-
- String FETCH_TYPE = PACKAGE_ + "FetchType";
- String FETCH_TYPE_ = FETCH_TYPE + ".";
- String FETCH_TYPE__EAGER = FETCH_TYPE_ + "EAGER";
- String FETCH_TYPE__LAZY = FETCH_TYPE_ + "LAZY";
-
- String FLUSH_MODE_TYPE = PACKAGE_ + "FlushModeType";
- String FLUSH_MODE_TYPE_ = FLUSH_MODE_TYPE + ".";
- String FLUSH_MODE_TYPE__AUTO = FLUSH_MODE_TYPE_ + "AUTO";
- String FLUSH_MODE_TYPE__COMMIT = FLUSH_MODE_TYPE_ + "COMMIT";
-
- String INHERITANCE_TYPE = PACKAGE_ + "InheritanceType";
- String INHERITANCE_TYPE_ = INHERITANCE_TYPE + ".";
- String INHERITANCE_TYPE__JOINED = INHERITANCE_TYPE_ + "JOINED";
- String INHERITANCE_TYPE__SINGLE_TABLE = INHERITANCE_TYPE_ + "SINGLE_TABLE";
- String INHERITANCE_TYPE__TABLE_PER_CLASS = INHERITANCE_TYPE_ + "TABLE_PER_CLASS";
-
- String PERSISTENCE_CONTEXT_TYPE = PACKAGE_ + "PersistenceContextType";
- String PERSISTENCE_CONTEXT_TYPE_ = PERSISTENCE_CONTEXT_TYPE + ".";
- String PERSISTENCE_CONTEXT_TYPE__EXTENDED = PERSISTENCE_CONTEXT_TYPE_ + "EXTENDED";
- String PERSISTENCE_CONTEXT_TYPE__TRANSACTION = PERSISTENCE_CONTEXT_TYPE_ + "TRANSACTION";
-
- String TEMPORAL_TYPE = PACKAGE_ + "TemporalType";
- String TEMPORAL_TYPE_ = TEMPORAL_TYPE + ".";
- String TEMPORAL_TYPE__DATE = TEMPORAL_TYPE_ + "DATE";
- String TEMPORAL_TYPE__TIME = TEMPORAL_TYPE_ + "TIME";
- String TEMPORAL_TYPE__TIMESTAMP = TEMPORAL_TYPE_ + "TIMESTAMP";
-
- // JPA interfaces
- String ENTITY_MANAGER = PACKAGE_ + "EntityManager";
- String ENTITY_MANAGER_FACTORY = PACKAGE_ + "EntityManagerFactory";
- String ENTITY_TRANSACTION = PACKAGE_ + "EntityTransaction";
- String INSTRUMENTABLE_CLASS_LOADER = PACKAGE_ + "InstrumentableClassLoader";
- String QUERY = PACKAGE_ + "Query";
-
- // JPA classes
- String PERSISTENCE = PACKAGE_ + "Persistence";
-
- // JPA exceptions
- String NON_UNIQUE_RESULT_EXCEPTION = PACKAGE_ + "NonUniqueResultException";
- String OBJECT_NOT_FOUND_EXCEPTION = PACKAGE_ + "ObjectNotFoundException";
- String PERSISTENCE_EXCEPTION = PACKAGE_ + "PersistenceException";
-
-
- // ********** SPI **********
-
- // JPA SPI package
- String SPI_PACKAGE = PACKAGE_ + "spi";
- String SPI_PACKAGE_ = SPI_PACKAGE + ".";
-
- // JPA SPI interfaces
- String ENTITY_MANAGER_FACTORY_PROVIDER = SPI_PACKAGE_ + "EntityManagerFactoryProvider";
- String PERSISTENCE_INFO = SPI_PACKAGE_ + "PersistenceInfo";
- String PERSISTENCE_PROVIDER = SPI_PACKAGE_ + "PersistenceProvider";
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAbstractQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAbstractQuery.java
deleted file mode 100644
index bc6aba495a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAbstractQuery.java
+++ /dev/null
@@ -1,631 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-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.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-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.mappings.IQuery;
-import org.eclipse.jpt.core.internal.mappings.IQueryHint;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Abstract Query</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAbstractQuery()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class JavaAbstractQuery extends JavaEObject implements IQuery
-{
- private final Member member;
-
- // hold this so we can get the annotation's text range
- private final IndexedDeclarationAnnotationAdapter idaa;
-
- // hold this so we can get the 'name' text range
- private final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
-
- // hold this so we can get the 'query' text range
- private final DeclarationAnnotationElementAdapter<String> queryDeclarationAdapter;
-
- private final IndexedAnnotationAdapter annotationAdapter;
-
- private final AnnotationElementAdapter<String> nameAdapter;
-
- private final AnnotationElementAdapter<String> queryAdapter;
-
- /**
- * 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 cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getQuery() <em>Query</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuery()
- * @generated
- * @ordered
- */
- protected static final String QUERY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getQuery() <em>Query</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuery()
- * @generated
- * @ordered
- */
- protected String query = QUERY_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getHints() <em>Hints</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHints()
- * @generated
- * @ordered
- */
- protected EList<IQueryHint> hints;
-
- protected JavaAbstractQuery() {
- throw new UnsupportedOperationException("Use JavaAbstractQuery(Member) instead");
- }
-
- protected JavaAbstractQuery(Member member, IndexedDeclarationAnnotationAdapter idaa) {
- super();
- this.member = member;
- this.idaa = idaa;
- this.annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
- this.nameDeclarationAdapter = nameAdapter(this.idaa);
- this.queryDeclarationAdapter = queryAdapter(this.idaa);
- this.nameAdapter = this.buildAdapter(this.nameDeclarationAdapter);
- this.queryAdapter = this.buildAdapter(this.queryDeclarationAdapter);
- }
-
- // ********** initialization **********
- protected AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new ShortCircuitAnnotationElementAdapter<String>(this.member, daea);
- }
-
- protected DeclarationAnnotationElementAdapter<String> nameAdapter(DeclarationAnnotationAdapter daa) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(daa, nameElementName());
- }
-
- protected DeclarationAnnotationElementAdapter<String> queryAdapter(DeclarationAnnotationAdapter daa) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(daa, queryElementName());
- }
-
- protected abstract String nameElementName();
-
- protected abstract String queryElementName();
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IQuery.class)) {
- case JpaCoreMappingsPackage.IQUERY__NAME :
- this.nameAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaCoreMappingsPackage.IQUERY__QUERY :
- this.queryAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaCoreMappingsPackage.IQUERY__HINTS :
- hintsChanged(notification);
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void hintsChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- hintAdded(notification.getPosition(), (IQueryHint) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- hintsAdded(notification.getPosition(), (List<IQueryHint>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- hintRemoved(notification.getPosition(), (IQueryHint) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- hintsCleared((List<IQueryHint>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- hintsRemoved((int[]) notification.getNewValue(), (List<IQueryHint>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- hintSet(notification.getPosition(), (IQueryHint) notification.getOldValue(), (IQueryHint) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- hintMoved(notification.getOldIntValue(), notification.getPosition(), (IQueryHint) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_ABSTRACT_QUERY;
- }
-
- /**
- * 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 #setName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIQuery_Name()
- * @model
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Query</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Query</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Query</em>' attribute.
- * @see #setQuery(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIQuery_Query()
- * @model
- * @generated
- */
- public String getQuery() {
- return query;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery#getQuery <em>Query</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Query</em>' attribute.
- * @see #getQuery()
- * @generated
- */
- public void setQuery(String newQuery) {
- String oldQuery = query;
- query = newQuery;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__QUERY, oldQuery, query));
- }
-
- /**
- * Returns the value of the '<em><b>Hints</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IQueryHint}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Hints</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>Hints</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIQuery_Hints()
- * @model type="org.eclipse.jpt.core.internal.mappings.IQueryHint" containment="true"
- * @generated
- */
- public EList<IQueryHint> getHints() {
- if (hints == null) {
- hints = new EObjectContainmentEList<IQueryHint>(IQueryHint.class, this, JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__HINTS);
- }
- return hints;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__HINTS :
- return ((InternalEList<?>) getHints()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__NAME :
- return getName();
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__QUERY :
- return getQuery();
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__HINTS :
- return getHints();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__NAME :
- setName((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__QUERY :
- setQuery((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__HINTS :
- getHints().clear();
- getHints().addAll((Collection<? extends IQueryHint>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__NAME :
- setName(NAME_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__QUERY :
- setQuery(QUERY_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__HINTS :
- getHints().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__NAME :
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__QUERY :
- return QUERY_EDEFAULT == null ? query != null : !QUERY_EDEFAULT.equals(query);
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__HINTS :
- return hints != null && !hints.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IQuery.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__NAME :
- return JpaCoreMappingsPackage.IQUERY__NAME;
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__QUERY :
- return JpaCoreMappingsPackage.IQUERY__QUERY;
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__HINTS :
- return JpaCoreMappingsPackage.IQUERY__HINTS;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IQuery.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IQUERY__NAME :
- return JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__NAME;
- case JpaCoreMappingsPackage.IQUERY__QUERY :
- return JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__QUERY;
- case JpaCoreMappingsPackage.IQUERY__HINTS :
- return JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY__HINTS;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", query: ");
- result.append(query);
- result.append(')');
- return result.toString();
- }
-
- protected Member getMember() {
- return this.member;
- }
-
- // ********** jpa model -> java annotations **********
- /**
- * slide over all the annotations that follow the new join column
- */
- public void hintAdded(int index, IQueryHint hint) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (((JavaQueryHint) hint).annotation(getMember().astRoot()) == null) {
- this.synchHintAnnotationsAfterAdd(index + 1);
- ((JavaQueryHint) hint).newAnnotation();
- }
- }
-
- // bjv look at this
- public void hintsAdded(int index, List<IQueryHint> queryHints) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!queryHints.isEmpty() && ((JavaQueryHint) queryHints.get(0)).annotation(getMember().astRoot()) == null) {
- this.synchHintAnnotationsAfterAdd(index + queryHints.size());
- for (IQueryHint hint : queryHints) {
- ((JavaQueryHint) hint).newAnnotation();
- }
- }
- }
-
- public void hintRemoved(int index, IQueryHint hint) {
- ((JavaQueryHint) hint).removeAnnotation();
- this.synchHintAnnotationsAfterRemove(index);
- }
-
- public void hintsRemoved(int[] indexes, List<IQueryHint> queryHints) {
- for (IQueryHint hint : queryHints) {
- ((JavaQueryHint) hint).removeAnnotation();
- }
- this.synchHintAnnotationsAfterRemove(indexes[0]);
- }
-
- public void hintsCleared(List<IQueryHint> queryHints) {
- for (IQueryHint hint : queryHints) {
- ((JavaQueryHint) hint).removeAnnotation();
- }
- }
-
- public void hintSet(int index, IQueryHint oldHint, IQueryHint newHint) {
- ((JavaQueryHint) newHint).newAnnotation();
- }
-
- public void hintMoved(int sourceIndex, int targetIndex, IQueryHint hint) {
- List<IQueryHint> queryHints = this.getHints();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch(queryHints.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchHintAnnotationsAfterAdd(int index) {
- List<IQueryHint> queryHints = this.getHints();
- for (int i = queryHints.size(); i-- > index;) {
- this.synch(queryHints.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchHintAnnotationsAfterRemove(int index) {
- List<IQueryHint> queryHints = this.getHints();
- for (int i = index; i < queryHints.size(); i++) {
- this.synch(queryHints.get(i), i);
- }
- }
-
- private void synch(IQueryHint queryHint, int index) {
- ((JavaQueryHint) queryHint).moveAnnotation(index);
- }
-
- /**
- * allow owners to verify the annotation
- */
- public Annotation annotation(CompilationUnit astRoot) {
- return this.annotationAdapter.getAnnotation(astRoot);
- }
-
- protected void updateFromJava(CompilationUnit astRoot) {
- this.setName(this.nameAdapter.getValue(astRoot));
- this.setQuery(this.queryAdapter.getValue(astRoot));
- this.updateQueryHintsFromJava(astRoot);
- }
-
- /**
- * here we just worry about getting the named query lists the same size;
- * then we delegate to the named queries to synch themselves up
- */
- private void updateQueryHintsFromJava(CompilationUnit astRoot) {
- // synchronize the model named queries with the Java source
- List<IQueryHint> queryHints = this.getHints();
- int persSize = queryHints.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaQueryHint hint = (JavaQueryHint) queryHints.get(i);
- if (hint.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- hint.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model named queries beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- queryHints.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaQueryHint javaQueryHint = createJavaQueryHint(javaSize);
- if (javaQueryHint.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getHints().add(javaQueryHint);
- javaQueryHint.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- public JavaQueryHint createQueryHint(int index) {
- return createJavaQueryHint(index);
- }
-
- protected abstract JavaQueryHint createJavaQueryHint(int index);
-
- protected IndexedDeclarationAnnotationAdapter getDeclarationAnnotationAdapter() {
- return this.idaa;
- }
-
- // ********** persistence model -> java annotations **********
- void moveAnnotation(int newIndex) {
- this.annotationAdapter.moveAnnotation(newIndex);
- }
-
- void newAnnotation() {
- this.annotationAdapter.newMarkerAnnotation();
- }
-
- void removeAnnotation() {
- this.annotationAdapter.removeAnnotation();
- }
-
- // ********* IJpaSourceObject implementation ***********
- public ITextRange validationTextRange() {
- return this.member.annotationTextRange(this.idaa);
- }
-
- // ********** static methods **********
- protected static DeclarationAnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(annotationAdapter, elementName);
- }
-} // JavaAbstractQuery
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAssociationOverride.java
deleted file mode 100644
index 1966b57575..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAssociationOverride.java
+++ /dev/null
@@ -1,506 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0, which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.ITypeMapping;
-import org.eclipse.jpt.core.internal.jdtutility.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IAssociationOverride;
-import org.eclipse.jpt.core.internal.mappings.IJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IJoinTable;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.utility.internal.Filter;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Association Override</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAssociationOverride()
- * @model kind="class"
- * @generated
- */
-public class JavaAssociationOverride extends JavaOverride
- implements IAssociationOverride
-{
- /**
- * The cached value of the '{@link #getSpecifiedJoinColumns() <em>Specified Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IJoinColumn> specifiedJoinColumns;
-
- /**
- * The cached value of the '{@link #getDefaultJoinColumns() <em>Default Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IJoinColumn> defaultJoinColumns;
-
- public static final SimpleDeclarationAnnotationAdapter SINGLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ASSOCIATION_OVERRIDE);
-
- public static final SimpleDeclarationAnnotationAdapter MULTIPLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ASSOCIATION_OVERRIDES);
-
- protected JavaAssociationOverride() {
- throw new UnsupportedOperationException("use JavaAssociationOverride(Owner, Member, IndexedDeclarationAnnotationAdapter)");
- }
-
- protected JavaAssociationOverride(Owner owner, Member member, IndexedDeclarationAnnotationAdapter daa) {
- super(owner, member, daa);
- }
-
- /**
- * check for changes to the 'specifiedJoinColumns' and
- * 'specifiedInverseJoinColumns' lists so we can notify the
- * model adapter of any changes;
- * also listen for changes to the 'defaultJoinColumns' and
- * 'defaultInverseJoinColumns' lists so we can spank the developer
- */
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IJoinTable.class)) {
- case JpaCoreMappingsPackage.IASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS :
- specifiedJoinColumnsChanged(notification);
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void specifiedJoinColumnsChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- specifiedJoinColumnAdded(notification.getPosition(), (IJoinColumn) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- specifiedJoinColumnsAdded(notification.getPosition(), (List<IJoinColumn>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- specifiedJoinColumnRemoved(notification.getPosition(), (IJoinColumn) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- specifiedJoinColumnsCleared((List<IJoinColumn>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- specifiedJoinColumnsRemoved((int[]) notification.getNewValue(), (List<IJoinColumn>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- specifiedJoinColumnSet(notification.getPosition(), (IJoinColumn) notification.getOldValue(), (IJoinColumn) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- specifiedJoinColumnMoved(notification.getOldIntValue(), notification.getPosition(), (IJoinColumn) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- @Override
- protected String nameElementName() {
- return JPA.ASSOCIATION_OVERRIDE__NAME;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_ASSOCIATION_OVERRIDE;
- }
-
- public EList<IJoinColumn> getJoinColumns() {
- return this.getSpecifiedJoinColumns().isEmpty() ? this.getDefaultJoinColumns() : this.getSpecifiedJoinColumns();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Join Columns</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 Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAssociationOverride_SpecifiedJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IJoinColumn" containment="true"
- * @generated
- */
- public EList<IJoinColumn> getSpecifiedJoinColumns() {
- if (specifiedJoinColumns == null) {
- specifiedJoinColumns = new EObjectContainmentEList<IJoinColumn>(IJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS);
- }
- return specifiedJoinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Default Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Join Columns</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 Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAssociationOverride_DefaultJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IJoinColumn" containment="true"
- * @generated
- */
- public EList<IJoinColumn> getDefaultJoinColumns() {
- if (defaultJoinColumns == null) {
- defaultJoinColumns = new EObjectContainmentEList<IJoinColumn>(IJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS);
- }
- return defaultJoinColumns;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__JOIN_COLUMNS :
- return ((InternalEList<?>) getJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS :
- return ((InternalEList<?>) getSpecifiedJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS :
- return ((InternalEList<?>) getDefaultJoinColumns()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__JOIN_COLUMNS :
- return getJoinColumns();
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS :
- return getSpecifiedJoinColumns();
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS :
- return getDefaultJoinColumns();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS :
- getSpecifiedJoinColumns().clear();
- getSpecifiedJoinColumns().addAll((Collection<? extends IJoinColumn>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS :
- getDefaultJoinColumns().clear();
- getDefaultJoinColumns().addAll((Collection<? extends IJoinColumn>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS :
- getSpecifiedJoinColumns().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS :
- getDefaultJoinColumns().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__JOIN_COLUMNS :
- return !getJoinColumns().isEmpty();
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS :
- return specifiedJoinColumns != null && !specifiedJoinColumns.isEmpty();
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS :
- return defaultJoinColumns != null && !defaultJoinColumns.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IAssociationOverride.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__JOIN_COLUMNS :
- return JpaCoreMappingsPackage.IASSOCIATION_OVERRIDE__JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.IASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.IASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IAssociationOverride.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IASSOCIATION_OVERRIDE__JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__JOIN_COLUMNS;
- case JpaCoreMappingsPackage.IASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.IASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- public ITypeMapping typeMapping() {
- return (ITypeMapping) eContainer();
- }
-
- public boolean containsSpecifiedJoinColumns() {
- return !this.getSpecifiedJoinColumns().isEmpty();
- }
-
- public IJoinColumn createJoinColumn(int index) {
- return this.createJavaJoinColumn(index);
- }
-
- private JavaJoinColumn createJavaJoinColumn(int index) {
- return JavaJoinColumn.createAssociationOverrideJoinColumn(this.getDeclarationAnnotationAdapter(), new JoinColumnOwner(this), this.getMember(), index);
- }
-
- // ********** jpa model -> java annotations **********
- /**
- * slide over all the annotations that follow the new join column
- */
- public void specifiedJoinColumnAdded(int index, IJoinColumn joinColumn) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (((JavaJoinColumn) joinColumn).annotation(getMember().astRoot()) == null) {
- this.synchJoinColumnAnnotationsAfterAdd(index + 1);
- ((JavaJoinColumn) joinColumn).newAnnotation();
- }
- }
-
- // bjv look at this
- public void specifiedJoinColumnsAdded(int index, List<IJoinColumn> joinColumns) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!joinColumns.isEmpty() && ((JavaJoinColumn) joinColumns.get(0)).annotation(getMember().astRoot()) == null) {
- this.synchJoinColumnAnnotationsAfterAdd(index + joinColumns.size());
- for (IJoinColumn joinColumn : joinColumns) {
- ((JavaJoinColumn) joinColumn).newAnnotation();
- }
- }
- }
-
- public void specifiedJoinColumnRemoved(int index, IJoinColumn joinColumn) {
- ((JavaJoinColumn) joinColumn).removeAnnotation();
- this.synchJoinColumnAnnotationsAfterRemove(index);
- }
-
- public void specifiedJoinColumnsRemoved(int[] indexes, List<IJoinColumn> joinColumns) {
- for (IJoinColumn joinColumn : joinColumns) {
- ((JavaJoinColumn) joinColumn).removeAnnotation();
- }
- this.synchJoinColumnAnnotationsAfterRemove(indexes[0]);
- }
-
- public void specifiedJoinColumnsCleared(List<IJoinColumn> joinColumns) {
- for (IJoinColumn joinColumn : joinColumns) {
- ((JavaJoinColumn) joinColumn).removeAnnotation();
- }
- }
-
- public void specifiedJoinColumnSet(int index, IJoinColumn oldJoinColumn, IJoinColumn newJoinColumn) {
- ((JavaJoinColumn) newJoinColumn).newAnnotation();
- }
-
- public void specifiedJoinColumnMoved(int sourceIndex, int targetIndex, IJoinColumn joinColumn) {
- List<IJoinColumn> joinColumns = this.getSpecifiedJoinColumns();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchJoinColumnAnnotationsAfterAdd(int index) {
- List<IJoinColumn> joinColumns = this.getSpecifiedJoinColumns();
- for (int i = joinColumns.size(); i-- > index;) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchJoinColumnAnnotationsAfterRemove(int index) {
- List<IJoinColumn> joinColumns = this.getSpecifiedJoinColumns();
- for (int i = index; i < joinColumns.size(); i++) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- private void synch(IJoinColumn joinColumn, int index) {
- ((JavaJoinColumn) joinColumn).moveAnnotation(index);
- }
-
- @Override
- protected Iterator<String> candidateNames() {
- return this.getOwner().getTypeMapping().allOverridableAssociationNames();
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (IJoinColumn column : this.getJoinColumns()) {
- result = ((JavaJoinColumn) column).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- updateSpecifiedJoinColumnsFromJava(astRoot);
- }
-
- /**
- * here we just worry about getting the join column lists the same size;
- * then we delegate to the join columns to synch themselves up
- */
- private void updateSpecifiedJoinColumnsFromJava(CompilationUnit astRoot) {
- // synchronize the model join columns with the Java source
- List<IJoinColumn> joinColumns = getSpecifiedJoinColumns();
- int persSize = joinColumns.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaJoinColumn joinColumn = (JavaJoinColumn) joinColumns.get(i);
- if (joinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- joinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model join columns beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- joinColumns.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaJoinColumn joinColumn = this.createJavaJoinColumn(javaSize);
- if (joinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getSpecifiedJoinColumns().add(joinColumn);
- joinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- static JavaAssociationOverride createAssociationOverride(Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaAssociationOverride(owner, member, buildAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildAnnotationAdapter(int index) {
- return new CombinationIndexedDeclarationAnnotationAdapter(SINGLE_DECLARATION_ANNOTATION_ADAPTER, MULTIPLE_DECLARATION_ANNOTATION_ADAPTER, index, JPA.ASSOCIATION_OVERRIDE);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAttributeMapping.java
deleted file mode 100644
index a12eeeaa59..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAttributeMapping.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.ITypeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.JavaEObject;
-import org.eclipse.jpt.core.internal.content.java.JavaPersistentAttribute;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.INamedColumn;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-import org.eclipse.jpt.db.internal.Table;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Attribute Mapping</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAttributeMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class JavaAttributeMapping extends JavaEObject
- implements IJavaAttributeMapping
-{
- private final Attribute attribute;
-
- // TODO remove?
- private final AnnotationAdapter annotationAdapter;
-
- protected JavaAttributeMapping() {
- throw new UnsupportedOperationException("Use JavaAttributeMapping(Attribute) instead");
- }
-
- protected JavaAttributeMapping(Attribute attribute) {
- super();
- this.attribute = attribute;
- this.annotationAdapter = this.buildAnnotationAdapter(this.declarationAnnotationAdapter());
- }
-
- /**
- * Return the declaration adapter for the mapping's annotation.
- */
- protected abstract DeclarationAnnotationAdapter declarationAnnotationAdapter();
-
- /**
- * Build and return an adapter for the mapping's annotation.
- */
- protected AnnotationAdapter buildAnnotationAdapter(DeclarationAnnotationAdapter daa) {
- return new MemberAnnotationAdapter(this.attribute, daa);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_ATTRIBUTE_MAPPING;
- }
-
- public void initialize() {
- this.updateFromJava(this.attribute.astRoot());
- }
-
- public JavaPersistentAttribute getPersistentAttribute() {
- return (JavaPersistentAttribute) this.eContainer();
- }
-
- /**
- * the persistent attribute can tell whether there is a "specified" mapping
- * or a "default" one
- */
- public boolean isDefault() {
- return this.getPersistentAttribute().mappingIsDefault();
- }
-
- public ITypeMapping typeMapping() {
- return this.getPersistentAttribute().typeMapping();
- }
-
- public Attribute getAttribute() {
- return this.attribute;
- }
-
- public ITextRange validationTextRange() {
- ITextRange textRange = attribute.annotationTextRange(this.declarationAnnotationAdapter());
- return (textRange == null) ? this.getPersistentAttribute().validationTextRange() : textRange;
- }
-
- protected ITextRange elementTextRange(DeclarationAnnotationElementAdapter<?> elementAdapter) {
- return this.elementTextRange(this.attribute.annotationElementTextRange(elementAdapter));
- }
-
- protected IType jdtType() {
- return this.typeMapping().getPersistentType().findJdtType();
- }
-
- public void updateFromJava(CompilationUnit astRoot) {
- // do nothing - override as appropriate
- }
-
- protected INamedColumn.Owner buildColumnOwner() {
- return new ColumnOwner();
- }
-
- public void refreshDefaults(DefaultsContext defaultsContext) {
- // do nothing - override as appropriate
- }
-
- public String primaryKeyColumnName() {
- return null;
- }
-
- protected boolean elementTouches(DeclarationAnnotationElementAdapter<?> elementAdapter, int pos) {
- return this.elementTouches(this.attribute.annotationElementTextRange(elementAdapter), pos);
- }
-
- protected boolean elementTouches(DeclarationAnnotationElementAdapter<?> elementAdapter, int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.attribute.annotationElementTextRange(elementAdapter, astRoot), pos);
- }
-
- public boolean isOverridableAttributeMapping() {
- return false;
- }
-
- public boolean isOverridableAssociationMapping() {
- return false;
- }
-
- public boolean isIdMapping() {
- return false;
- }
-
-
- /**
- * mapping implementation of column owner
- */
- protected class ColumnOwner implements INamedColumn.Owner
- {
- public ITypeMapping getTypeMapping() {
- return JavaAttributeMapping.this.typeMapping();
- }
-
- public ITextRange validationTextRange() {
- return JavaAttributeMapping.this.validationTextRange();
- }
-
- public Table dbTable(String tableName) {
- return this.getTypeMapping().dbTable(tableName);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAttributeOverride.java
deleted file mode 100644
index 467b5a512d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaAttributeOverride.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0, which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.ITypeMapping;
-import org.eclipse.jpt.core.internal.jdtutility.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IAttributeOverride;
-import org.eclipse.jpt.core.internal.mappings.IColumn;
-import org.eclipse.jpt.core.internal.mappings.IColumnMapping;
-import org.eclipse.jpt.core.internal.mappings.INamedColumn;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.db.internal.Table;
-import org.eclipse.jpt.utility.internal.Filter;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Attribute Override</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAttributeOverride()
- * @model kind="class"
- * @generated
- */
-public class JavaAttributeOverride extends JavaOverride
- implements IAttributeOverride
-{
- /**
- * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected IColumn column;
-
- public static final SimpleDeclarationAnnotationAdapter SINGLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ATTRIBUTE_OVERRIDE);
-
- public static final SimpleDeclarationAnnotationAdapter MULTIPLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ATTRIBUTE_OVERRIDES);
-
- protected JavaAttributeOverride() {
- throw new UnsupportedOperationException("use JavaAttributeOverride(Owner, Member, IndexedDeclarationAnnotationAdapter)");
- }
-
- protected JavaAttributeOverride(Owner owner, Member member, IndexedDeclarationAnnotationAdapter daa) {
- super(owner, member, daa);
- this.column = JavaColumn.createAttributeOverrideColumn(this.buildColumnOwner(), member, daa);
- ((InternalEObject) this.column).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ATTRIBUTE_OVERRIDE__COLUMN, null, null);
- }
-
- @Override
- protected String nameElementName() {
- return JPA.ATTRIBUTE_OVERRIDE__NAME;
- }
-
- // TODO figure out how to use [stupid] EMF to implement the Column.Owner interface directly
- protected INamedColumn.Owner buildColumnOwner() {
- return new ColumnOwner();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_ATTRIBUTE_OVERRIDE;
- }
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAttributeOverride_Column()
- * @model containment="true" required="true" changeable="false"
- * @generated
- */
- public IColumn getColumn() {
- return column;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetColumn(IColumn newColumn, NotificationChain msgs) {
- IColumn oldColumn = column;
- column = newColumn;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ATTRIBUTE_OVERRIDE__COLUMN, oldColumn, newColumn);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ATTRIBUTE_OVERRIDE__COLUMN :
- return basicSetColumn(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ATTRIBUTE_OVERRIDE__COLUMN :
- return getColumn();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ATTRIBUTE_OVERRIDE__COLUMN :
- return column != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IColumnMapping.class) {
- switch (derivedFeatureID) {
- default :
- return -1;
- }
- }
- if (baseClass == IAttributeOverride.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_ATTRIBUTE_OVERRIDE__COLUMN :
- return JpaCoreMappingsPackage.IATTRIBUTE_OVERRIDE__COLUMN;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IColumnMapping.class) {
- switch (baseFeatureID) {
- default :
- return -1;
- }
- }
- if (baseClass == IAttributeOverride.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IATTRIBUTE_OVERRIDE__COLUMN :
- return JpaJavaMappingsPackage.JAVA_ATTRIBUTE_OVERRIDE__COLUMN;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.getJavaColumn().updateFromJava(astRoot);
- }
-
- private JavaColumn getJavaColumn() {
- return (JavaColumn) this.column;
- }
-
- @Override
- protected Iterator<String> candidateNames() {
- return this.getOwner().getTypeMapping().allOverridableAttributeNames();
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.getJavaColumn().candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- // ********** static methods **********
- static JavaAttributeOverride createAttributeOverride(Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaAttributeOverride(owner, member, buildAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildAnnotationAdapter(int index) {
- return new CombinationIndexedDeclarationAnnotationAdapter(SINGLE_DECLARATION_ANNOTATION_ADAPTER, MULTIPLE_DECLARATION_ANNOTATION_ADAPTER, index, JPA.ATTRIBUTE_OVERRIDE);
- }
-
-
- // ********** member class **********
- public class ColumnOwner implements INamedColumn.Owner
- {
- public ITypeMapping getTypeMapping() {
- return JavaAttributeOverride.this.getOwner().getTypeMapping();
- }
-
- public ITextRange validationTextRange() {
- return JavaAttributeOverride.this.validationTextRange();
- }
-
- public Table dbTable(String tableName) {
- return this.getTypeMapping().dbTable(tableName);
- }
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaBasic.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaBasic.java
deleted file mode 100644
index 7ab0f41a1a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaBasic.java
+++ /dev/null
@@ -1,938 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeHierarchy;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.WorkingCopyOwner;
-import org.eclipse.jdt.core.dom.BooleanLiteral;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.BooleanAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.BooleanStringExpressionConverter;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.JDTTools;
-import org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleBooleanAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType;
-import org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean;
-import org.eclipse.jpt.core.internal.mappings.EnumType;
-import org.eclipse.jpt.core.internal.mappings.IBasic;
-import org.eclipse.jpt.core.internal.mappings.IColumn;
-import org.eclipse.jpt.core.internal.mappings.IColumnMapping;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.mappings.TemporalType;
-import org.eclipse.jpt.utility.internal.CollectionTools;
-import org.eclipse.jpt.utility.internal.Filter;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Basic</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaBasic()
- * @model kind="class"
- * @generated
- */
-public class JavaBasic extends JavaAttributeMapping implements IBasic
-{
- private final AnnotationElementAdapter<String> optionalAdapter;
-
- private final AnnotationElementAdapter<String> fetchAdapter;
-
- private final AnnotationAdapter temporalAnnotationAdapter;
-
- private final AnnotationElementAdapter<String> temporalValueAdapter;
-
- private final AnnotationAdapter enumeratedAnnotationAdapter;
-
- private final AnnotationElementAdapter<String> enumeratedValueAdapter;
-
- private final BooleanAnnotationAdapter lobAdapter;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.BASIC);
-
- private static final DeclarationAnnotationElementAdapter<String> OPTIONAL_ADAPTER = buildOptionalAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
-
- public static final DeclarationAnnotationAdapter TEMPORAL_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.TEMPORAL);
-
- private static final DeclarationAnnotationElementAdapter<String> TEMPORAL_VALUE_ADAPTER = buildTemporalValueAdapter();
-
- public static final DeclarationAnnotationAdapter ENUMERATED_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ENUMERATED);
-
- private static final DeclarationAnnotationElementAdapter<String> ENUMERATED_VALUE_ADAPTER = buildEnumeratedValueAdapter();
-
- public static final DeclarationAnnotationAdapter LOB_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.LOB);
-
- /**
- * The default value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFetch()
- * @generated
- * @ordered
- */
- protected static final DefaultEagerFetchType FETCH_EDEFAULT = DefaultEagerFetchType.DEFAULT;
-
- /**
- * The cached value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFetch()
- * @generated
- * @ordered
- */
- protected DefaultEagerFetchType fetch = FETCH_EDEFAULT;
-
- /**
- * The default value of the '{@link #getOptional() <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOptional()
- * @generated
- * @ordered
- */
- protected static final DefaultTrueBoolean OPTIONAL_EDEFAULT = DefaultTrueBoolean.DEFAULT;
-
- /**
- * The cached value of the '{@link #getOptional() <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOptional()
- * @generated
- * @ordered
- */
- protected DefaultTrueBoolean optional = OPTIONAL_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected IColumn column;
-
- /**
- * The default value of the '{@link #isLob() <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isLob()
- * @generated
- * @ordered
- */
- protected static final boolean LOB_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isLob() <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isLob()
- * @generated
- * @ordered
- */
- protected boolean lob = LOB_EDEFAULT;
-
- /**
- * The default value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTemporal()
- * @generated
- * @ordered
- */
- protected static final TemporalType TEMPORAL_EDEFAULT = TemporalType.NULL;
-
- /**
- * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTemporal()
- * @generated
- * @ordered
- */
- protected TemporalType temporal = TEMPORAL_EDEFAULT;
-
- /**
- * The default value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEnumerated()
- * @generated
- * @ordered
- */
- protected static final EnumType ENUMERATED_EDEFAULT = EnumType.DEFAULT;
-
- /**
- * The cached value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEnumerated()
- * @generated
- * @ordered
- */
- protected EnumType enumerated = ENUMERATED_EDEFAULT;
-
- protected JavaBasic() {
- this(null);
- }
-
- protected JavaBasic(Attribute attribute) {
- super(attribute);
- this.column = JavaColumn.createColumnMappingColumn(buildColumnOwner(), getAttribute());
- ((InternalEObject) this.column).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_BASIC__COLUMN, null, null);
- this.optionalAdapter = new ShortCircuitAnnotationElementAdapter<String>(attribute, OPTIONAL_ADAPTER);
- this.fetchAdapter = new ShortCircuitAnnotationElementAdapter<String>(attribute, FETCH_ADAPTER);
- this.lobAdapter = new SimpleBooleanAnnotationAdapter(new MemberAnnotationAdapter(attribute, LOB_ADAPTER));
- this.temporalAnnotationAdapter = new MemberAnnotationAdapter(this.getAttribute(), TEMPORAL_ADAPTER);
- this.temporalValueAdapter = new ShortCircuitAnnotationElementAdapter<String>(attribute, TEMPORAL_VALUE_ADAPTER);
- this.enumeratedAnnotationAdapter = new MemberAnnotationAdapter(this.getAttribute(), ENUMERATED_ADAPTER);
- this.enumeratedValueAdapter = new ShortCircuitAnnotationElementAdapter<String>(attribute, ENUMERATED_VALUE_ADAPTER);
- }
-
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IBasic.class)) {
- case JpaJavaMappingsPackage.JAVA_BASIC__FETCH :
- this.fetchAdapter.setValue(((DefaultEagerFetchType) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- case JpaJavaMappingsPackage.JAVA_BASIC__OPTIONAL :
- this.optionalAdapter.setValue(((DefaultTrueBoolean) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- case JpaJavaMappingsPackage.JAVA_BASIC__LOB :
- this.lobAdapter.setValue(notification.getNewBooleanValue());
- break;
- case JpaJavaMappingsPackage.JAVA_BASIC__TEMPORAL :
- TemporalType newTemporal = (TemporalType) notification.getNewValue();
- if (newTemporal == TemporalType.NULL) {
- this.temporalAnnotationAdapter.removeAnnotation();
- }
- else {
- this.temporalValueAdapter.setValue(newTemporal.convertToJavaAnnotationValue());
- }
- break;
- case JpaJavaMappingsPackage.JAVA_BASIC__ENUMERATED :
- EnumType newEnumerated = (EnumType) notification.getNewValue();
- if (newEnumerated == EnumType.DEFAULT) {
- this.enumeratedAnnotationAdapter.removeAnnotation();
- }
- else {
- this.enumeratedValueAdapter.setValue(newEnumerated.convertToJavaAnnotationValue());
- }
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_BASIC;
- }
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIBasic_Column()
- * @model containment="true" required="true" changeable="false"
- * @generated
- */
- public IColumn getColumn() {
- return column;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetColumn(IColumn newColumn, NotificationChain msgs) {
- IColumn oldColumn = column;
- column = newColumn;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_BASIC__COLUMN, oldColumn, newColumn);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Returns the value of the '<em><b>Fetch</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType
- * @see #setFetch(DefaultEagerFetchType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIBasic_Fetch()
- * @model
- * @generated
- */
- public DefaultEagerFetchType getFetch() {
- return fetch;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic#getFetch <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType
- * @see #getFetch()
- * @generated
- */
- public void setFetch(DefaultEagerFetchType newFetch) {
- DefaultEagerFetchType oldFetch = fetch;
- fetch = newFetch == null ? FETCH_EDEFAULT : newFetch;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_BASIC__FETCH, oldFetch, fetch));
- }
-
- /**
- * Returns the value of the '<em><b>Optional</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Optional</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Optional</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean
- * @see #setOptional(DefaultTrueBoolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIBasic_Optional()
- * @model
- * @generated
- */
- public DefaultTrueBoolean getOptional() {
- return optional;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic#getOptional <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Optional</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean
- * @see #getOptional()
- * @generated
- */
- public void setOptional(DefaultTrueBoolean newOptional) {
- DefaultTrueBoolean oldOptional = optional;
- optional = newOptional == null ? OPTIONAL_EDEFAULT : newOptional;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_BASIC__OPTIONAL, oldOptional, optional));
- }
-
- /**
- * Returns the value of the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Lob</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Lob</em>' attribute.
- * @see #setLob(boolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIBasic_Lob()
- * @model
- * @generated
- */
- public boolean isLob() {
- return lob;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic#isLob <em>Lob</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Lob</em>' attribute.
- * @see #isLob()
- * @generated
- */
- public void setLob(boolean newLob) {
- boolean oldLob = lob;
- lob = newLob;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_BASIC__LOB, oldLob, lob));
- }
-
- /**
- * Returns the value of the '<em><b>Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Temporal</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.TemporalType
- * @see #setTemporal(TemporalType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIBasic_Temporal()
- * @model
- * @generated
- */
- public TemporalType getTemporal() {
- return temporal;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic#getTemporal <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.TemporalType
- * @see #getTemporal()
- * @generated
- */
- public void setTemporal(TemporalType newTemporal) {
- TemporalType oldTemporal = temporal;
- temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_BASIC__TEMPORAL, oldTemporal, temporal));
- }
-
- /**
- * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.EnumType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.EnumType
- * @see #setEnumerated(EnumType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIBasic_Enumerated()
- * @model
- * @generated
- */
- public EnumType getEnumerated() {
- return enumerated;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic#getEnumerated <em>Enumerated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Enumerated</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.EnumType
- * @see #getEnumerated()
- * @generated
- */
- public void setEnumerated(EnumType newEnumerated) {
- EnumType oldEnumerated = enumerated;
- enumerated = newEnumerated == null ? ENUMERATED_EDEFAULT : newEnumerated;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_BASIC__ENUMERATED, oldEnumerated, enumerated));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_BASIC__COLUMN :
- return basicSetColumn(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_BASIC__FETCH :
- return getFetch();
- case JpaJavaMappingsPackage.JAVA_BASIC__OPTIONAL :
- return getOptional();
- case JpaJavaMappingsPackage.JAVA_BASIC__COLUMN :
- return getColumn();
- case JpaJavaMappingsPackage.JAVA_BASIC__LOB :
- return isLob() ? Boolean.TRUE : Boolean.FALSE;
- case JpaJavaMappingsPackage.JAVA_BASIC__TEMPORAL :
- return getTemporal();
- case JpaJavaMappingsPackage.JAVA_BASIC__ENUMERATED :
- return getEnumerated();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_BASIC__FETCH :
- setFetch((DefaultEagerFetchType) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_BASIC__OPTIONAL :
- setOptional((DefaultTrueBoolean) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_BASIC__LOB :
- setLob(((Boolean) newValue).booleanValue());
- return;
- case JpaJavaMappingsPackage.JAVA_BASIC__TEMPORAL :
- setTemporal((TemporalType) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_BASIC__ENUMERATED :
- setEnumerated((EnumType) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_BASIC__FETCH :
- setFetch(FETCH_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_BASIC__OPTIONAL :
- setOptional(OPTIONAL_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_BASIC__LOB :
- setLob(LOB_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_BASIC__TEMPORAL :
- setTemporal(TEMPORAL_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_BASIC__ENUMERATED :
- setEnumerated(ENUMERATED_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_BASIC__FETCH :
- return fetch != FETCH_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_BASIC__OPTIONAL :
- return optional != OPTIONAL_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_BASIC__COLUMN :
- return column != null;
- case JpaJavaMappingsPackage.JAVA_BASIC__LOB :
- return lob != LOB_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_BASIC__TEMPORAL :
- return temporal != TEMPORAL_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_BASIC__ENUMERATED :
- return enumerated != ENUMERATED_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IColumnMapping.class) {
- switch (derivedFeatureID) {
- default :
- return -1;
- }
- }
- if (baseClass == IBasic.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_BASIC__FETCH :
- return JpaCoreMappingsPackage.IBASIC__FETCH;
- case JpaJavaMappingsPackage.JAVA_BASIC__OPTIONAL :
- return JpaCoreMappingsPackage.IBASIC__OPTIONAL;
- case JpaJavaMappingsPackage.JAVA_BASIC__COLUMN :
- return JpaCoreMappingsPackage.IBASIC__COLUMN;
- case JpaJavaMappingsPackage.JAVA_BASIC__LOB :
- return JpaCoreMappingsPackage.IBASIC__LOB;
- case JpaJavaMappingsPackage.JAVA_BASIC__TEMPORAL :
- return JpaCoreMappingsPackage.IBASIC__TEMPORAL;
- case JpaJavaMappingsPackage.JAVA_BASIC__ENUMERATED :
- return JpaCoreMappingsPackage.IBASIC__ENUMERATED;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IColumnMapping.class) {
- switch (baseFeatureID) {
- default :
- return -1;
- }
- }
- if (baseClass == IBasic.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IBASIC__FETCH :
- return JpaJavaMappingsPackage.JAVA_BASIC__FETCH;
- case JpaCoreMappingsPackage.IBASIC__OPTIONAL :
- return JpaJavaMappingsPackage.JAVA_BASIC__OPTIONAL;
- case JpaCoreMappingsPackage.IBASIC__COLUMN :
- return JpaJavaMappingsPackage.JAVA_BASIC__COLUMN;
- case JpaCoreMappingsPackage.IBASIC__LOB :
- return JpaJavaMappingsPackage.JAVA_BASIC__LOB;
- case JpaCoreMappingsPackage.IBASIC__TEMPORAL :
- return JpaJavaMappingsPackage.JAVA_BASIC__TEMPORAL;
- case JpaCoreMappingsPackage.IBASIC__ENUMERATED :
- return JpaJavaMappingsPackage.JAVA_BASIC__ENUMERATED;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (fetch: ");
- result.append(fetch);
- result.append(", optional: ");
- result.append(optional);
- result.append(", lob: ");
- result.append(lob);
- result.append(", temporal: ");
- result.append(temporal);
- result.append(", enumerated: ");
- result.append(enumerated);
- result.append(')');
- return result.toString();
- }
-
- public String getKey() {
- return IMappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.setOptional(DefaultTrueBoolean.fromJavaAnnotationValue(this.optionalAdapter.getValue(astRoot)));
- this.setFetch(DefaultEagerFetchType.fromJavaAnnotationValue(this.fetchAdapter.getValue(astRoot)));
- this.getJavaColumn().updateFromJava(astRoot);
- this.setLob(this.lobAdapter.getValue(astRoot));
- this.updateTemporalFromJava(astRoot);
- this.updateEnumeratedFromJava(astRoot);
- }
-
- private JavaColumn getJavaColumn() {
- return (JavaColumn) this.column;
- }
-
- /*
- * The @Temporal annotation is a bit different than most JPA annotations.
- * For some indecipherable reason it has no default value (e.g. TIMESTAMP).
- * Also, it is *required* for any attribute declared with a type of
- * java.util.Date or java.util.Calendar; otherwise, it is *prohibited*.
- * As a result we allow a Basic mapping to have a null 'temporal',
- * indicating that the annotation is completely missing, as opposed
- * to the annotation being present but its value is invalid (e.g.
- * @Temporal(FRIDAY)).
- *
- * TODO this comment is wrong now, revisit this with Brian at some point
- */
- private void updateTemporalFromJava(CompilationUnit astRoot) {
- if (this.temporalAnnotationAdapter.getAnnotation(astRoot) == null) {
- this.setTemporal(TemporalType.NULL);
- }
- else {
- this.setTemporal(TemporalType.fromJavaAnnotationValue(this.temporalValueAdapter.getValue(astRoot)));
- }
- }
-
- private void updateEnumeratedFromJava(CompilationUnit astRoot) {
- if (this.enumeratedAnnotationAdapter.getAnnotation(astRoot) == null) {
- this.setEnumerated(EnumType.DEFAULT);
- }
- else {
- this.setEnumerated(EnumType.fromJavaAnnotationValue(this.enumeratedValueAdapter.getValue(astRoot)));
- }
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildOptionalAdapter() {
- return new ConversionDeclarationAnnotationElementAdapter<String, BooleanLiteral>(DECLARATION_ANNOTATION_ADAPTER, JPA.BASIC__OPTIONAL, false, BooleanStringExpressionConverter.instance());
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.BASIC__FETCH, false);
- }
-
- /**
- * From the JPA spec, when the basic mapping applies:
- * If the type of the attribute (field or property) is one of the following
- * it must be mapped as @Basic:
- * primitive types
- * byte[]
- * Byte[]
- * char[]
- * Character[]
- * primitive wrappers
- * java.lang.String
- * java.math.BigInteger
- * java.math.BigDecimal
- * java.util.Date
- * java.util.Calendar
- * java.sql.Date
- * java.sql.Time
- * java.sql.Timestamp
- * enums
- * any other type that implements java.io.Serializable
- */
- public static boolean signatureIsBasic(String signature, IType scope) {
- if (JDTTools.signatureIsPrimitive(signature)) {
- return true;
- }
- int arrayCount = Signature.getArrayCount(signature);
- if (arrayCount > 1) {
- return false; // multi-dimensional arrays are not supported
- }
- signature = Signature.getElementType(signature);
- String typeName = JDTTools.resolveSignature(signature, scope);
- if (typeName == null) {
- return false; // unable to resolve the type
- }
- if (arrayCount == 1) {
- return elementTypeIsValid(typeName);
- }
- if (typeIsPrimitiveWrapper(typeName)) {
- return true;
- }
- if (typeIsOtherSupportedType(typeName)) {
- return true;
- }
- IType type = findType(scope.getCompilationUnit().getJavaProject(), typeName);
- if (type == null) {
- return false; // type not found
- }
- if (typeIsEnum(type)) {
- return true;
- }
- if (typeImplementsSerializable(type)) {
- return true;
- }
- return false;
- }
-
- private static IType findType(IJavaProject javaProject, String typeName) {
- try {
- return javaProject.findType(typeName);
- }
- catch (JavaModelException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- /**
- * Return whether the specified type is a valid element type for
- * a one-dimensional array:
- * byte
- * char
- * java.lang.Byte
- * java.lang.Character
- */
- private static boolean elementTypeIsValid(String elementTypeName) {
- return CollectionTools.contains(VALID_ELEMENT_TYPE_NAMES, elementTypeName);
- }
-
- private static final String[] VALID_ELEMENT_TYPE_NAMES = {
- byte.class.getName(),
- char.class.getName(),
- java.lang.Byte.class.getName(),
- java.lang.Character.class.getName()
- };
-
- /**
- * Return whether the specified type is a primitive wrapper.
- */
- private static boolean typeIsPrimitiveWrapper(String typeName) {
- return CollectionTools.contains(PRIMITIVE_WRAPPER_TYPE_NAMES, typeName);
- }
-
- private static final String[] PRIMITIVE_WRAPPER_TYPE_NAMES = {
- java.lang.Byte.class.getName(),
- java.lang.Character.class.getName(),
- java.lang.Double.class.getName(),
- java.lang.Float.class.getName(),
- java.lang.Integer.class.getName(),
- java.lang.Long.class.getName(),
- java.lang.Short.class.getName(),
- java.lang.Boolean.class.getName(),
- };
-
- /**
- * Return whether the specified type is among the various other types
- * that default to a Basic mapping.
- */
- private static boolean typeIsOtherSupportedType(String typeName) {
- return CollectionTools.contains(OTHER_SUPPORTED_TYPE_NAMES, typeName);
- }
-
- private static final String[] OTHER_SUPPORTED_TYPE_NAMES = {
- java.lang.String.class.getName(),
- java.math.BigInteger.class.getName(),
- java.math.BigDecimal.class.getName(),
- java.util.Date.class.getName(),
- java.util.Calendar.class.getName(),
- java.sql.Date.class.getName(),
- java.sql.Time.class.getName(),
- java.sql.Timestamp.class.getName(),
- };
-
- /**
- * Return whether the specified type is an enum.
- */
- private static boolean typeIsEnum(IType type) {
- try {
- return type.isEnum();
- }
- catch (JavaModelException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- /**
- * Return whether the specified type implements java.io.Serializable.
- */
- // TODO should we be using IType.getSuperInterfaceTypeSignatures() instead?
- // would this be less of a performance hog??
- private static boolean typeImplementsSerializable(IType type) {
- ITypeHierarchy hierarchy = typeHierarchy(type);
- IType[] interfaces = hierarchy.getAllSuperInterfaces(type);
- for (int i = interfaces.length; i-- > 0;) {
- if (interfaces[i].getFullyQualifiedName().equals(SERIALIZABLE_TYPE_NAME)) {
- return true;
- }
- }
- return false;
- }
-
- private static final String SERIALIZABLE_TYPE_NAME = java.io.Serializable.class.getName();
-
- private static ITypeHierarchy typeHierarchy(IType type) {
- // TODO hmm... what to do about the working copy, probably shouldn't pass in null;
- // also, this looks like a performance hog, other ways to do this?
- try {
- return type.newSupertypeHierarchy((WorkingCopyOwner) null, null);
- }
- catch (JavaModelException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- @Override
- public boolean isOverridableAttributeMapping() {
- return true;
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.getJavaColumn().candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildTemporalValueAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(TEMPORAL_ADAPTER, JPA.TEMPORAL__VALUE, false);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildEnumeratedValueAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(ENUMERATED_ADAPTER, JPA.ENUMERATED__VALUE, false);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaBasicProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaBasicProvider.java
deleted file mode 100644
index e08673bf43..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaBasicProvider.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeHierarchy;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.WorkingCopyOwner;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.JDTTools;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-import org.eclipse.jpt.utility.internal.CollectionTools;
-
-/**
- *
- */
-public class JavaBasicProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaBasicProvider INSTANCE = new JavaBasicProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaBasicProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return signatureIsBasic(attribute.typeSignature(), attribute.getDeclaringType().getJdtMember());
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaBasic(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaBasic.DECLARATION_ANNOTATION_ADAPTER;
- }
-
- // ********** static methods **********
-
- /**
- * From the JPA spec, when the basic mapping applies:
- * If the type of the attribute (field or property) is one of the following
- * it must be mapped as @Basic:
- * primitive types
- * byte[]
- * Byte[]
- * char[]
- * Character[]
- * primitive wrappers
- * java.lang.String
- * java.math.BigInteger
- * java.math.BigDecimal
- * java.util.Date
- * java.util.Calendar
- * java.sql.Date
- * java.sql.Time
- * java.sql.Timestamp
- * enums
- * any other type that implements java.io.Serializable
- */
- public static boolean signatureIsBasic(String signature, IType scope) {
- if (JDTTools.signatureIsPrimitive(signature)) {
- return true;
- }
- int arrayCount = Signature.getArrayCount(signature);
- if (arrayCount > 1) {
- return false; // multi-dimensional arrays are not supported
- }
- signature = Signature.getElementType(signature);
- String typeName = JDTTools.resolveSignature(signature, scope);
- if (typeName == null) {
- return false; // unable to resolve the type
- }
- if (arrayCount == 1) {
- return elementTypeIsValid(typeName);
- }
- if (typeIsPrimitiveWrapper(typeName)) {
- return true;
- }
- if (typeIsOtherSupportedType(typeName)) {
- return true;
- }
- IType type = findType(scope.getCompilationUnit().getJavaProject(), typeName);
- if (type == null) {
- return false; // type not found
- }
- if (typeIsEnum(type)) {
- return true;
- }
- if (typeImplementsSerializable(type)) {
- return true;
- }
- return false;
- }
-
- private static IType findType(IJavaProject javaProject, String typeName) {
- try {
- return javaProject.findType(typeName);
- } catch (JavaModelException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- /**
- * Return whether the specified type is a valid element type for
- * a one-dimensional array:
- * byte
- * char
- * java.lang.Byte
- * java.lang.Character
- */
- private static boolean elementTypeIsValid(String elementTypeName) {
- return CollectionTools.contains(VALID_ELEMENT_TYPE_NAMES, elementTypeName);
- }
-
- private static final String[] VALID_ELEMENT_TYPE_NAMES = {
- byte.class.getName(),
- char.class.getName(),
- java.lang.Byte.class.getName(),
- java.lang.Character.class.getName()
- };
-
- /**
- * Return whether the specified type is a primitive wrapper.
- */
- private static boolean typeIsPrimitiveWrapper(String typeName) {
- return CollectionTools.contains(PRIMITIVE_WRAPPER_TYPE_NAMES, typeName);
- }
-
- private static final String[] PRIMITIVE_WRAPPER_TYPE_NAMES = {
- java.lang.Byte.class.getName(),
- java.lang.Character.class.getName(),
- java.lang.Double.class.getName(),
- java.lang.Float.class.getName(),
- java.lang.Integer.class.getName(),
- java.lang.Long.class.getName(),
- java.lang.Short.class.getName(),
- java.lang.Boolean.class.getName(),
- };
-
- /**
- * Return whether the specified type is among the various other types
- * that default to a Basic mapping.
- */
- private static boolean typeIsOtherSupportedType(String typeName) {
- return CollectionTools.contains(OTHER_SUPPORTED_TYPE_NAMES, typeName);
- }
-
- private static final String[] OTHER_SUPPORTED_TYPE_NAMES = {
- java.lang.String.class.getName(),
- java.math.BigInteger.class.getName(),
- java.math.BigDecimal.class.getName(),
- java.util.Date.class.getName(),
- java.util.Calendar.class.getName(),
- java.sql.Date.class.getName(),
- java.sql.Time.class.getName(),
- java.sql.Timestamp.class.getName(),
- };
-
- /**
- * Return whether the specified type is an enum.
- */
- private static boolean typeIsEnum(IType type) {
- try {
- return type.isEnum();
- } catch (JavaModelException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- /**
- * Return whether the specified type implements java.io.Serializable.
- */
- // TODO should we be using IType.getSuperInterfaceTypeSignatures() instead?
- // would this be less of a performance hog??
- private static boolean typeImplementsSerializable(IType type) {
- ITypeHierarchy hierarchy = typeHierarchy(type);
- IType[] interfaces = hierarchy.getAllSuperInterfaces(type);
- for (int i = interfaces.length; i-- > 0; ) {
- if (interfaces[i].getFullyQualifiedName().equals(SERIALIZABLE_TYPE_NAME)) {
- return true;
- }
- }
- return false;
- }
-
- private static final String SERIALIZABLE_TYPE_NAME = java.io.Serializable.class.getName();
-
- private static ITypeHierarchy typeHierarchy(IType type) {
- // TODO hmm... what to do about the working copy, probably shouldn't pass in null;
- // also, this looks like a performance hog, other ways to do this?
- try {
- return type.newSupertypeHierarchy((WorkingCopyOwner) null, null);
- } catch (JavaModelException ex) {
- throw new RuntimeException(ex);
- }
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaCascade.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaCascade.java
deleted file mode 100644
index d5998f5f61..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaCascade.java
+++ /dev/null
@@ -1,583 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.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.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitArrayAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.mappings.CascadeType;
-import org.eclipse.jpt.core.internal.mappings.ICascade;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.utility.internal.CollectionTools;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Cascade</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaCascade()
- * @model kind="class"
- * @generated
- */
-public class JavaCascade extends JavaEObject implements ICascade
-{
- /**
- * The default value of the '{@link #isAll() <em>All</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isAll()
- * @generated
- * @ordered
- */
- protected static final boolean ALL_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isAll() <em>All</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isAll()
- * @generated
- * @ordered
- */
- protected boolean all = ALL_EDEFAULT;
-
- /**
- * The default value of the '{@link #isPersist() <em>Persist</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isPersist()
- * @generated
- * @ordered
- */
- protected static final boolean PERSIST_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isPersist() <em>Persist</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isPersist()
- * @generated
- * @ordered
- */
- protected boolean persist = PERSIST_EDEFAULT;
-
- /**
- * The default value of the '{@link #isMerge() <em>Merge</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isMerge()
- * @generated
- * @ordered
- */
- protected static final boolean MERGE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isMerge() <em>Merge</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isMerge()
- * @generated
- * @ordered
- */
- protected boolean merge = MERGE_EDEFAULT;
-
- /**
- * The default value of the '{@link #isRemove() <em>Remove</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isRemove()
- * @generated
- * @ordered
- */
- protected static final boolean REMOVE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isRemove() <em>Remove</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isRemove()
- * @generated
- * @ordered
- */
- protected boolean remove = REMOVE_EDEFAULT;
-
- /**
- * The default value of the '{@link #isRefresh() <em>Refresh</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isRefresh()
- * @generated
- * @ordered
- */
- protected static final boolean REFRESH_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isRefresh() <em>Refresh</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isRefresh()
- * @generated
- * @ordered
- */
- protected boolean refresh = REFRESH_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected JavaCascade() {
- super();
- }
-
- private Attribute attribute;
-
- private AnnotationElementAdapter<String[]> cascadeAdapter;
-
- private DeclarationAnnotationElementAdapter<String[]> cascadeDeclarationAdapter;
-
- protected JavaCascade(Attribute attribute, DeclarationAnnotationElementAdapter<String[]> cascadeAdapter) {
- super();
- this.attribute = attribute;
- this.cascadeDeclarationAdapter = cascadeAdapter;
- this.cascadeAdapter = new ShortCircuitArrayAnnotationElementAdapter<String>(this.attribute, cascadeAdapter);
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(ICascade.class)) {
- case JpaJavaMappingsPackage.JAVA_CASCADE__ALL :
- updateJavaAnnotation(isAll(), CascadeType.ALL);
- break;
- case JpaJavaMappingsPackage.JAVA_CASCADE__MERGE :
- updateJavaAnnotation(isMerge(), CascadeType.MERGE);
- break;
- case JpaJavaMappingsPackage.JAVA_CASCADE__PERSIST :
- updateJavaAnnotation(isPersist(), CascadeType.PERSIST);
- break;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REMOVE :
- updateJavaAnnotation(isRemove(), CascadeType.REMOVE);
- break;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REFRESH :
- updateJavaAnnotation(isRefresh(), CascadeType.REFRESH);
- break;
- default :
- break;
- }
- }
-
- private void updateJavaAnnotation(boolean isSet, CascadeType cascadeType) {
- String[] javaValue = this.cascadeAdapter.getValue();
- CascadeType[] cascadeTypes = CascadeType.fromJavaAnnotationValue(javaValue);
- List<CascadeType> cascadeCollection = CollectionTools.list(cascadeTypes);
- if (cascadeCollection.contains(cascadeType)) {
- if (!isSet) {
- if (javaValue.length == 1) {
- this.cascadeAdapter.setValue(null);
- }
- else {
- cascadeCollection.remove(cascadeType);
- String[] newJavaValue = CascadeType.toJavaAnnotationValue(cascadeCollection.toArray(new CascadeType[cascadeCollection.size()]));
- this.cascadeAdapter.setValue(newJavaValue);
- }
- }
- }
- else {
- if (isSet) {
- cascadeCollection.add(cascadeType);
- String[] newJavaValue = CascadeType.toJavaAnnotationValue(cascadeCollection.toArray(new CascadeType[cascadeCollection.size()]));
- this.cascadeAdapter.setValue(newJavaValue);
- }
- }
- }
-
- protected AnnotationElementAdapter<String[]> getCascadeAdapter() {
- return this.cascadeAdapter;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_CASCADE;
- }
-
- /**
- * Returns the value of the '<em><b>All</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>All</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>All</em>' attribute.
- * @see #setAll(boolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getICascade_All()
- * @model
- * @generated
- */
- public boolean isAll() {
- return all;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade#isAll <em>All</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>All</em>' attribute.
- * @see #isAll()
- * @generated
- */
- public void setAll(boolean newAll) {
- boolean oldAll = all;
- all = newAll;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_CASCADE__ALL, oldAll, all));
- }
-
- /**
- * Returns the value of the '<em><b>Persist</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Persist</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Persist</em>' attribute.
- * @see #setPersist(boolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getICascade_Persist()
- * @model
- * @generated
- */
- public boolean isPersist() {
- return persist;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade#isPersist <em>Persist</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Persist</em>' attribute.
- * @see #isPersist()
- * @generated
- */
- public void setPersist(boolean newPersist) {
- boolean oldPersist = persist;
- persist = newPersist;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_CASCADE__PERSIST, oldPersist, persist));
- }
-
- /**
- * Returns the value of the '<em><b>Merge</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Merge</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Merge</em>' attribute.
- * @see #setMerge(boolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getICascade_Merge()
- * @model
- * @generated
- */
- public boolean isMerge() {
- return merge;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade#isMerge <em>Merge</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Merge</em>' attribute.
- * @see #isMerge()
- * @generated
- */
- public void setMerge(boolean newMerge) {
- boolean oldMerge = merge;
- merge = newMerge;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_CASCADE__MERGE, oldMerge, merge));
- }
-
- /**
- * Returns the value of the '<em><b>Remove</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Remove</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Remove</em>' attribute.
- * @see #setRemove(boolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getICascade_Remove()
- * @model
- * @generated
- */
- public boolean isRemove() {
- return remove;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade#isRemove <em>Remove</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Remove</em>' attribute.
- * @see #isRemove()
- * @generated
- */
- public void setRemove(boolean newRemove) {
- boolean oldRemove = remove;
- remove = newRemove;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_CASCADE__REMOVE, oldRemove, remove));
- }
-
- /**
- * Returns the value of the '<em><b>Refresh</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Refresh</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Refresh</em>' attribute.
- * @see #setRefresh(boolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getICascade_Refresh()
- * @model
- * @generated
- */
- public boolean isRefresh() {
- return refresh;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade#isRefresh <em>Refresh</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Refresh</em>' attribute.
- * @see #isRefresh()
- * @generated
- */
- public void setRefresh(boolean newRefresh) {
- boolean oldRefresh = refresh;
- refresh = newRefresh;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_CASCADE__REFRESH, oldRefresh, refresh));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_CASCADE__ALL :
- return isAll() ? Boolean.TRUE : Boolean.FALSE;
- case JpaJavaMappingsPackage.JAVA_CASCADE__PERSIST :
- return isPersist() ? Boolean.TRUE : Boolean.FALSE;
- case JpaJavaMappingsPackage.JAVA_CASCADE__MERGE :
- return isMerge() ? Boolean.TRUE : Boolean.FALSE;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REMOVE :
- return isRemove() ? Boolean.TRUE : Boolean.FALSE;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REFRESH :
- return isRefresh() ? Boolean.TRUE : Boolean.FALSE;
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_CASCADE__ALL :
- setAll(((Boolean) newValue).booleanValue());
- return;
- case JpaJavaMappingsPackage.JAVA_CASCADE__PERSIST :
- setPersist(((Boolean) newValue).booleanValue());
- return;
- case JpaJavaMappingsPackage.JAVA_CASCADE__MERGE :
- setMerge(((Boolean) newValue).booleanValue());
- return;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REMOVE :
- setRemove(((Boolean) newValue).booleanValue());
- return;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REFRESH :
- setRefresh(((Boolean) newValue).booleanValue());
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_CASCADE__ALL :
- setAll(ALL_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_CASCADE__PERSIST :
- setPersist(PERSIST_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_CASCADE__MERGE :
- setMerge(MERGE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REMOVE :
- setRemove(REMOVE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REFRESH :
- setRefresh(REFRESH_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_CASCADE__ALL :
- return all != ALL_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_CASCADE__PERSIST :
- return persist != PERSIST_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_CASCADE__MERGE :
- return merge != MERGE_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REMOVE :
- return remove != REMOVE_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REFRESH :
- return refresh != REFRESH_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == ICascade.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_CASCADE__ALL :
- return JpaCoreMappingsPackage.ICASCADE__ALL;
- case JpaJavaMappingsPackage.JAVA_CASCADE__PERSIST :
- return JpaCoreMappingsPackage.ICASCADE__PERSIST;
- case JpaJavaMappingsPackage.JAVA_CASCADE__MERGE :
- return JpaCoreMappingsPackage.ICASCADE__MERGE;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REMOVE :
- return JpaCoreMappingsPackage.ICASCADE__REMOVE;
- case JpaJavaMappingsPackage.JAVA_CASCADE__REFRESH :
- return JpaCoreMappingsPackage.ICASCADE__REFRESH;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == ICascade.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.ICASCADE__ALL :
- return JpaJavaMappingsPackage.JAVA_CASCADE__ALL;
- case JpaCoreMappingsPackage.ICASCADE__PERSIST :
- return JpaJavaMappingsPackage.JAVA_CASCADE__PERSIST;
- case JpaCoreMappingsPackage.ICASCADE__MERGE :
- return JpaJavaMappingsPackage.JAVA_CASCADE__MERGE;
- case JpaCoreMappingsPackage.ICASCADE__REMOVE :
- return JpaJavaMappingsPackage.JAVA_CASCADE__REMOVE;
- case JpaCoreMappingsPackage.ICASCADE__REFRESH :
- return JpaJavaMappingsPackage.JAVA_CASCADE__REFRESH;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (all: ");
- result.append(all);
- result.append(", persist: ");
- result.append(persist);
- result.append(", merge: ");
- result.append(merge);
- result.append(", remove: ");
- result.append(remove);
- result.append(", refresh: ");
- result.append(refresh);
- result.append(')');
- return result.toString();
- }
-
- public Attribute getAttribute() {
- return this.attribute;
- }
-
- public ITextRange validationTextRange() {
- return getAttribute().annotationElementTextRange(this.cascadeDeclarationAdapter);
- }
-
- public void updateFromJava(CompilationUnit astRoot) {
- String[] javaValue = this.cascadeAdapter.getValue(astRoot);
- CascadeType[] cascadeTypes = CascadeType.fromJavaAnnotationValue(javaValue);
- Collection<CascadeType> cascadeCollection = CollectionTools.collection(cascadeTypes);
- setAll(cascadeCollection.contains(CascadeType.ALL));
- setPersist(cascadeCollection.contains(CascadeType.PERSIST));
- setMerge(cascadeCollection.contains(CascadeType.MERGE));
- setRemove(cascadeCollection.contains(CascadeType.REMOVE));
- setRefresh(cascadeCollection.contains(CascadeType.REFRESH));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaColumn.java
deleted file mode 100644
index 6fd3bdb728..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaColumn.java
+++ /dev/null
@@ -1,453 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.NestedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IColumn;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.platform.BaseJpaPlatform;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Column</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaColumn()
- * @model kind="class"
- * @generated
- */
-public class JavaColumn extends AbstractJavaColumn implements IColumn
-{
- /**
- * The default value of the '{@link #getLength() <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLength()
- * @generated
- * @ordered
- */
- protected static final int LENGTH_EDEFAULT = 255;
-
- /**
- * The cached value of the '{@link #getLength() <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLength()
- * @generated
- * @ordered
- */
- protected int length = LENGTH_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPrecision() <em>Precision</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrecision()
- * @generated
- * @ordered
- */
- protected static final int PRECISION_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getPrecision() <em>Precision</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrecision()
- * @generated
- * @ordered
- */
- protected int precision = PRECISION_EDEFAULT;
-
- /**
- * The default value of the '{@link #getScale() <em>Scale</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getScale()
- * @generated
- * @ordered
- */
- protected static final int SCALE_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getScale() <em>Scale</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getScale()
- * @generated
- * @ordered
- */
- protected int scale = SCALE_EDEFAULT;
-
- private final IntAnnotationElementAdapter lengthAdapter;
-
- private final IntAnnotationElementAdapter precisionAdapter;
-
- private final IntAnnotationElementAdapter scaleAdapter;
-
- // this adapter is only used by a Column annotation associated with a mapping annotation (e.g. Basic)
- public static final SimpleDeclarationAnnotationAdapter MAPPING_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.COLUMN);
-
- protected JavaColumn() {
- super();
- throw new UnsupportedOperationException("Use JavaColumn(Owner, Member, DeclarationAnnotationAdapter) instead");
- }
-
- protected JavaColumn(Owner owner, Member member, DeclarationAnnotationAdapter daa) {
- super(owner, member, daa);
- this.lengthAdapter = this.buildShortCircuitIntElementAdapter(JPA.COLUMN__LENGTH);
- this.precisionAdapter = this.buildShortCircuitIntElementAdapter(JPA.COLUMN__PRECISION);
- this.scaleAdapter = this.buildShortCircuitIntElementAdapter(JPA.COLUMN__SCALE);
- }
-
- @Override
- protected String nameElementName() {
- return JPA.COLUMN__NAME;
- }
-
- @Override
- protected String columnDefinitionElementName() {
- return JPA.COLUMN__COLUMN_DEFINITION;
- }
-
- @Override
- protected String tableElementName() {
- return JPA.COLUMN__TABLE;
- }
-
- @Override
- protected String uniqueElementName() {
- return JPA.COLUMN__UNIQUE;
- }
-
- @Override
- protected String nullableElementName() {
- return JPA.COLUMN__NULLABLE;
- }
-
- @Override
- protected String insertableElementName() {
- return JPA.COLUMN__INSERTABLE;
- }
-
- @Override
- protected String updatableElementName() {
- return JPA.COLUMN__UPDATABLE;
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IColumn.class)) {
- case JpaJavaMappingsPackage.JAVA_COLUMN__LENGTH :
- this.lengthAdapter.setValue(notification.getNewIntValue());
- break;
- case JpaJavaMappingsPackage.JAVA_COLUMN__PRECISION :
- this.precisionAdapter.setValue(notification.getNewIntValue());
- break;
- case JpaJavaMappingsPackage.JAVA_COLUMN__SCALE :
- this.scaleAdapter.setValue(notification.getNewIntValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Length</b></em>' attribute.
- * The default value is <code>"255"</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Length</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Length</em>' attribute.
- * @see #setLength(int)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIColumn_Length()
- * @model default="255"
- * @generated
- */
- public int getLength() {
- return length;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn#getLength <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Length</em>' attribute.
- * @see #getLength()
- * @generated
- */
- public void setLength(int newLength) {
- int oldLength = length;
- length = newLength;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_COLUMN__LENGTH, oldLength, length));
- }
-
- /**
- * Returns the value of the '<em><b>Precision</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Precision</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Precision</em>' attribute.
- * @see #setPrecision(int)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIColumn_Precision()
- * @model
- * @generated
- */
- public int getPrecision() {
- return precision;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn#getPrecision <em>Precision</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Precision</em>' attribute.
- * @see #getPrecision()
- * @generated
- */
- public void setPrecision(int newPrecision) {
- int oldPrecision = precision;
- precision = newPrecision;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_COLUMN__PRECISION, oldPrecision, precision));
- }
-
- /**
- * Returns the value of the '<em><b>Scale</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Scale</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Scale</em>' attribute.
- * @see #setScale(int)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIColumn_Scale()
- * @model
- * @generated
- */
- public int getScale() {
- return scale;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn#getScale <em>Scale</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Scale</em>' attribute.
- * @see #getScale()
- * @generated
- */
- public void setScale(int newScale) {
- int oldScale = scale;
- scale = newScale;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_COLUMN__SCALE, oldScale, scale));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_COLUMN__LENGTH :
- return new Integer(getLength());
- case JpaJavaMappingsPackage.JAVA_COLUMN__PRECISION :
- return new Integer(getPrecision());
- case JpaJavaMappingsPackage.JAVA_COLUMN__SCALE :
- return new Integer(getScale());
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_COLUMN__LENGTH :
- setLength(((Integer) newValue).intValue());
- return;
- case JpaJavaMappingsPackage.JAVA_COLUMN__PRECISION :
- setPrecision(((Integer) newValue).intValue());
- return;
- case JpaJavaMappingsPackage.JAVA_COLUMN__SCALE :
- setScale(((Integer) newValue).intValue());
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_COLUMN__LENGTH :
- setLength(LENGTH_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_COLUMN__PRECISION :
- setPrecision(PRECISION_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_COLUMN__SCALE :
- setScale(SCALE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_COLUMN__LENGTH :
- return length != LENGTH_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_COLUMN__PRECISION :
- return precision != PRECISION_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_COLUMN__SCALE :
- return scale != SCALE_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IColumn.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_COLUMN__LENGTH :
- return JpaCoreMappingsPackage.ICOLUMN__LENGTH;
- case JpaJavaMappingsPackage.JAVA_COLUMN__PRECISION :
- return JpaCoreMappingsPackage.ICOLUMN__PRECISION;
- case JpaJavaMappingsPackage.JAVA_COLUMN__SCALE :
- return JpaCoreMappingsPackage.ICOLUMN__SCALE;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IColumn.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.ICOLUMN__LENGTH :
- return JpaJavaMappingsPackage.JAVA_COLUMN__LENGTH;
- case JpaCoreMappingsPackage.ICOLUMN__PRECISION :
- return JpaJavaMappingsPackage.JAVA_COLUMN__PRECISION;
- case JpaCoreMappingsPackage.ICOLUMN__SCALE :
- return JpaJavaMappingsPackage.JAVA_COLUMN__SCALE;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (length: ");
- result.append(length);
- result.append(", precision: ");
- result.append(precision);
- result.append(", scale: ");
- result.append(scale);
- result.append(')');
- return result.toString();
- }
-
- @Override
- public boolean tableIsAllowed() {
- return true;
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.setLength(this.lengthAdapter.getValue(astRoot));
- this.setPrecision(this.precisionAdapter.getValue(astRoot));
- this.setScale(this.scaleAdapter.getValue(astRoot));
- }
-
- public void refreshDefaults(DefaultsContext defaultsContext) {
- this.setDefaultTable((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_COLUMN_TABLE_KEY));
- this.setDefaultName((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_COLUMN_NAME_KEY));
- }
-
- // ********** static methods **********
- static JavaColumn createColumnMappingColumn(Owner owner, Member member) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaColumn(owner, member, MAPPING_DECLARATION_ANNOTATION_ADAPTER);
- }
-
- static JavaColumn createAttributeOverrideColumn(Owner owner, Member member, DeclarationAnnotationAdapter attributeOverrideAnnotationAdapter) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaColumn(owner, member, buildAttributeOverrideAnnotationAdapter(attributeOverrideAnnotationAdapter));
- }
-
- private static DeclarationAnnotationAdapter buildAttributeOverrideAnnotationAdapter(DeclarationAnnotationAdapter attributeOverrideAnnotationAdapter) {
- return new NestedDeclarationAnnotationAdapter(attributeOverrideAnnotationAdapter, JPA.ATTRIBUTE_OVERRIDE__COLUMN, JPA.COLUMN);
- }
-} // JavaColumn
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java
deleted file mode 100644
index e1735f7ae3..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0, which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-import org.eclipse.jpt.core.internal.mappings.DiscriminatorType;
-import org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn;
-import org.eclipse.jpt.core.internal.mappings.INamedColumn;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Discriminator Column</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaDiscriminatorColumn()
- * @model kind="class"
- * @generated
- */
-public class JavaDiscriminatorColumn extends JavaNamedColumn
- implements IDiscriminatorColumn
-{
- private AnnotationElementAdapter<String> discriminatorTypeAdapter;
-
- private IntAnnotationElementAdapter lengthAdapter;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.DISCRIMINATOR_COLUMN);
-
- private static final DeclarationAnnotationElementAdapter<String> DISCRIMINATOR_TYPE_ADAPTER = buildDiscriminatorTypeAdapter();
-
- /**
- * The default value of the '{@link #getDiscriminatorType() <em>Discriminator Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDiscriminatorType()
- * @generated
- * @ordered
- */
- protected static final DiscriminatorType DISCRIMINATOR_TYPE_EDEFAULT = DiscriminatorType.DEFAULT;
-
- /**
- * The cached value of the '{@link #getDiscriminatorType() <em>Discriminator Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDiscriminatorType()
- * @generated
- * @ordered
- */
- protected DiscriminatorType discriminatorType = DISCRIMINATOR_TYPE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultLength() <em>Default Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultLength()
- * @generated
- * @ordered
- */
- protected static final int DEFAULT_LENGTH_EDEFAULT = 31;
-
- /**
- * The cached value of the '{@link #getDefaultLength() <em>Default Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultLength()
- * @generated
- * @ordered
- */
- protected int defaultLength = DEFAULT_LENGTH_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSpecifiedLength() <em>Specified Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedLength()
- * @generated
- * @ordered
- */
- protected static final int SPECIFIED_LENGTH_EDEFAULT = -1;
-
- /**
- * The cached value of the '{@link #getSpecifiedLength() <em>Specified Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedLength()
- * @generated
- * @ordered
- */
- protected int specifiedLength = SPECIFIED_LENGTH_EDEFAULT;
-
- /**
- * The default value of the '{@link #getLength() <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLength()
- * @generated
- * @ordered
- */
- protected static final int LENGTH_EDEFAULT = 0;
-
- protected JavaDiscriminatorColumn() {
- throw new UnsupportedOperationException();
- }
-
- protected JavaDiscriminatorColumn(INamedColumn.Owner owner, Type type, DeclarationAnnotationAdapter daa) {
- super(owner, type, daa);
- this.discriminatorTypeAdapter = this.buildShortCircuitElementAdapter(DISCRIMINATOR_TYPE_ADAPTER);
- this.lengthAdapter = this.buildShortCircuitIntElementAdapter(JPA.DISCRIMINATOR_COLUMN__LENGTH);
- }
-
- @Override
- protected String nameElementName() {
- return JPA.DISCRIMINATOR_COLUMN__NAME;
- }
-
- @Override
- protected String columnDefinitionElementName() {
- return JPA.DISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IDiscriminatorColumn.class)) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
- this.discriminatorTypeAdapter.setValue(((DiscriminatorType) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
- this.lengthAdapter.setValue(notification.getNewIntValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_DISCRIMINATOR_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Discriminator Type</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DiscriminatorType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Discriminator Type</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Discriminator Type</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DiscriminatorType
- * @see #setDiscriminatorType(DiscriminatorType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIDiscriminatorColumn_DiscriminatorType()
- * @model
- * @generated
- */
- public DiscriminatorType getDiscriminatorType() {
- return discriminatorType;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn#getDiscriminatorType <em>Discriminator Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Discriminator Type</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DiscriminatorType
- * @see #getDiscriminatorType()
- * @generated
- */
- public void setDiscriminatorType(DiscriminatorType newDiscriminatorType) {
- DiscriminatorType oldDiscriminatorType = discriminatorType;
- discriminatorType = newDiscriminatorType == null ? DISCRIMINATOR_TYPE_EDEFAULT : newDiscriminatorType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE, oldDiscriminatorType, discriminatorType));
- }
-
- /**
- * Returns the value of the '<em><b>Default Length</b></em>' attribute.
- * The default value is <code>"31"</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Length</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 Length</em>' attribute.
- * @see #setDefaultLength(int)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIDiscriminatorColumn_DefaultLength()
- * @model default="31"
- * @generated
- */
- public int getDefaultLength() {
- return defaultLength;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn#getDefaultLength <em>Default Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Default Length</em>' attribute.
- * @see #getDefaultLength()
- * @generated
- */
- public void setDefaultLength(int newDefaultLength) {
- int oldDefaultLength = defaultLength;
- defaultLength = newDefaultLength;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH, oldDefaultLength, defaultLength));
- }
-
- /**
- * Returns the value of the '<em><b>Specified Length</b></em>' attribute.
- * The default value is <code>"-1"</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Length</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 Length</em>' attribute.
- * @see #setSpecifiedLength(int)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIDiscriminatorColumn_SpecifiedLength()
- * @model default="-1"
- * @generated
- */
- public int getSpecifiedLength() {
- return specifiedLength;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn#getSpecifiedLength <em>Specified Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Length</em>' attribute.
- * @see #getSpecifiedLength()
- * @generated
- */
- public void setSpecifiedLength(int newSpecifiedLength) {
- int oldSpecifiedLength = specifiedLength;
- specifiedLength = newSpecifiedLength;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH, oldSpecifiedLength, specifiedLength));
- }
-
- /**
- * Returns the value of the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Length</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Length</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIDiscriminatorColumn_Length()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * @generated NOT
- */
- public int getLength() {
- return (this.getSpecifiedLength() == -1) ? this.getDefaultLength() : this.getSpecifiedLength();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
- return getDiscriminatorType();
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
- return new Integer(getDefaultLength());
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
- return new Integer(getSpecifiedLength());
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__LENGTH :
- return new Integer(getLength());
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
- setDiscriminatorType((DiscriminatorType) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
- setDefaultLength(((Integer) newValue).intValue());
- return;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
- setSpecifiedLength(((Integer) newValue).intValue());
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
- setDiscriminatorType(DISCRIMINATOR_TYPE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
- setDefaultLength(DEFAULT_LENGTH_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
- setSpecifiedLength(SPECIFIED_LENGTH_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
- return discriminatorType != DISCRIMINATOR_TYPE_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
- return defaultLength != DEFAULT_LENGTH_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
- return specifiedLength != SPECIFIED_LENGTH_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__LENGTH :
- return getLength() != LENGTH_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IDiscriminatorColumn.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DEFAULT_LENGTH;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__SPECIFIED_LENGTH;
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__LENGTH :
- return JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__LENGTH;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IDiscriminatorColumn.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE :
- return JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE;
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__DEFAULT_LENGTH :
- return JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH;
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__SPECIFIED_LENGTH :
- return JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH;
- case JpaCoreMappingsPackage.IDISCRIMINATOR_COLUMN__LENGTH :
- return JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN__LENGTH;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (discriminatorType: ");
- result.append(discriminatorType);
- result.append(", defaultLength: ");
- result.append(defaultLength);
- result.append(", specifiedLength: ");
- result.append(specifiedLength);
- result.append(')');
- return result.toString();
- }
-
- @Override
- protected String tableName() {
- return this.getOwner().getTypeMapping().getTableName();
- }
-
- // ********** java annotations -> persistence model **********
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- setDiscriminatorType(DiscriminatorType.fromJavaAnnotationValue(this.discriminatorTypeAdapter.getValue(astRoot)));
- setSpecifiedLength(this.lengthAdapter.getValue(astRoot));
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildDiscriminatorTypeAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE);
- }
-} // JavaDiscriminatorColumn
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddable.java
deleted file mode 100644
index 08b8a3c239..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddable.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-import org.eclipse.jpt.core.internal.mappings.IEmbeddable;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Embeddable</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEmbeddable()
- * @model kind="class"
- * @generated
- */
-public class JavaEmbeddable extends JavaTypeMapping implements IEmbeddable
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.EMBEDDABLE);
-
- protected JavaEmbeddable() {
- throw new UnsupportedOperationException("Use JavaEmbeddable(Type) instead");
- }
-
- protected JavaEmbeddable(Type type) {
- super(type);
- }
-
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_EMBEDDABLE;
- }
-
- public String getKey() {
- return IMappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
- }
-
- @Override
- public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
- return attributeMappingKey == IMappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY || attributeMappingKey == IMappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddableProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddableProvider.java
deleted file mode 100644
index 714a815a6c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddableProvider.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-
-/**
- *
- */
-public class JavaEmbeddableProvider
- implements IJavaTypeMappingProvider
-{
-
- // singleton
- private static final JavaEmbeddableProvider INSTANCE = new JavaEmbeddableProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaTypeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaEmbeddableProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
- }
-
- public IJavaTypeMapping buildMapping(Type type) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaEmbeddable(type);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaEmbeddable.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbedded.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbedded.java
deleted file mode 100644
index b92f7a893c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbedded.java
+++ /dev/null
@@ -1,577 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.IPersistentAttribute;
-import org.eclipse.jpt.core.internal.IPersistentType;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IAttributeOverride;
-import org.eclipse.jpt.core.internal.mappings.IEmbeddable;
-import org.eclipse.jpt.core.internal.mappings.IEmbedded;
-import org.eclipse.jpt.core.internal.mappings.IEntity;
-import org.eclipse.jpt.core.internal.mappings.IOverride;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Embedded</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEmbedded()
- * @model kind="class"
- * @generated
- */
-public class JavaEmbedded extends JavaAttributeMapping implements IEmbedded
-{
- /**
- * The cached value of the '{@link #getSpecifiedAttributeOverrides() <em>Specified Attribute Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedAttributeOverrides()
- * @generated
- * @ordered
- */
- protected EList<IAttributeOverride> specifiedAttributeOverrides;
-
- /**
- * The cached value of the '{@link #getDefaultAttributeOverrides() <em>Default Attribute Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultAttributeOverrides()
- * @generated
- * @ordered
- */
- protected EList<IAttributeOverride> defaultAttributeOverrides;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.EMBEDDED);
-
- private IEmbeddable embeddable;
-
- protected JavaEmbedded() {
- throw new UnsupportedOperationException("Use JavaEmbedded(Attribute) instead");
- }
-
- protected JavaEmbedded(Attribute attribute) {
- super(attribute);
- }
-
- /**
- * check for changes to the 'specifiedJoinColumns' and
- * 'specifiedInverseJoinColumns' lists so we can notify the
- * model adapter of any changes;
- * also listen for changes to the 'defaultJoinColumns' and
- * 'defaultInverseJoinColumns' lists so we can spank the developer
- */
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IEntity.class)) {
- case JpaCoreMappingsPackage.IEMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES :
- attributeOverridesChanged(notification);
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void attributeOverridesChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- attributeOverrideAdded(notification.getPosition(), (JavaAttributeOverride) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- attributeOverridesAdded(notification.getPosition(), (List<JavaAttributeOverride>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- attributeOverrideRemoved(notification.getPosition(), (JavaAttributeOverride) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- attributeOverridesCleared((List<JavaAttributeOverride>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- attributeOverridesRemoved((int[]) notification.getNewValue(), (List<JavaAttributeOverride>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- attributeOverrideSet(notification.getPosition(), (JavaAttributeOverride) notification.getOldValue(), (JavaAttributeOverride) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- attributeOverrideMoved(notification.getOldIntValue(), notification.getPosition(), (JavaAttributeOverride) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- // ********** jpa model -> java annotations **********
- /**
- * slide over all the annotations that follow the new join column
- */
- public void attributeOverrideAdded(int index, JavaAttributeOverride attributeOverride) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (attributeOverride.annotation(getAttribute().astRoot()) == null) {
- this.synchAttributeOverrideAnnotationsAfterAdd(index + 1);
- attributeOverride.newAnnotation();
- }
- }
-
- public void attributeOverridesAdded(int index, List<JavaAttributeOverride> attributeOverrides) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!attributeOverrides.isEmpty() && (attributeOverrides.get(0).annotation(getAttribute().astRoot()) == null)) {
- this.synchAttributeOverrideAnnotationsAfterAdd(index + attributeOverrides.size());
- for (JavaAttributeOverride attributeOverride : attributeOverrides) {
- attributeOverride.newAnnotation();
- }
- }
- }
-
- public void attributeOverrideRemoved(int index, JavaAttributeOverride attributeOverride) {
- attributeOverride.removeAnnotation();
- this.synchAttributeOverrideAnnotationsAfterRemove(index);
- }
-
- public void attributeOverridesRemoved(int[] indexes, List<JavaAttributeOverride> attributeOverrides) {
- for (JavaAttributeOverride attributeOverride : attributeOverrides) {
- attributeOverride.removeAnnotation();
- }
- this.synchAttributeOverrideAnnotationsAfterRemove(indexes[0]);
- }
-
- public void attributeOverridesCleared(List<JavaAttributeOverride> attributeOverrides) {
- for (JavaAttributeOverride attributeOverride : attributeOverrides) {
- attributeOverride.removeAnnotation();
- }
- }
-
- public void attributeOverrideSet(int index, JavaAttributeOverride oldAttributeOverride, JavaAttributeOverride newAttributeOverride) {
- newAttributeOverride.newAnnotation();
- }
-
- public void attributeOverrideMoved(int sourceIndex, int targetIndex, JavaAttributeOverride attributeOverride) {
- List<IAttributeOverride> attributeOverrides = getSpecifiedAttributeOverrides();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch((JavaAttributeOverride) attributeOverrides.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchAttributeOverrideAnnotationsAfterAdd(int index) {
- List<IAttributeOverride> attributeOverrides = getSpecifiedAttributeOverrides();
- for (int i = attributeOverrides.size(); i-- > index;) {
- this.synch((JavaAttributeOverride) attributeOverrides.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchAttributeOverrideAnnotationsAfterRemove(int index) {
- List<IAttributeOverride> attributeOverrides = getSpecifiedAttributeOverrides();
- for (int i = index; i < attributeOverrides.size(); i++) {
- this.synch((JavaAttributeOverride) attributeOverrides.get(i), i);
- }
- }
-
- private void synch(JavaAttributeOverride attributeOverride, int index) {
- attributeOverride.moveAnnotation(index);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_EMBEDDED;
- }
-
- public EList<IAttributeOverride> getAttributeOverrides() {
- EList<IAttributeOverride> list = new EObjectEList<IAttributeOverride>(IAttributeOverride.class, this, JpaJavaMappingsPackage.JAVA_EMBEDDED__ATTRIBUTE_OVERRIDES);
- list.addAll(getSpecifiedAttributeOverrides());
- list.addAll(getDefaultAttributeOverrides());
- return list;
- }
-
- /**
- * Returns the value of the '<em><b>Specified Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Attribute Overrides</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 Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEmbedded_SpecifiedAttributeOverrides()
- * @model type="org.eclipse.jpt.core.internal.mappings.IAttributeOverride" containment="true"
- * @generated
- */
- public EList<IAttributeOverride> getSpecifiedAttributeOverrides() {
- if (specifiedAttributeOverrides == null) {
- specifiedAttributeOverrides = new EObjectContainmentEList<IAttributeOverride>(IAttributeOverride.class, this, JpaJavaMappingsPackage.JAVA_EMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES);
- }
- return specifiedAttributeOverrides;
- }
-
- /**
- * Returns the value of the '<em><b>Default Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Attribute Overrides</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 Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEmbedded_DefaultAttributeOverrides()
- * @model type="org.eclipse.jpt.core.internal.mappings.IAttributeOverride" containment="true"
- * @generated
- */
- public EList<IAttributeOverride> getDefaultAttributeOverrides() {
- if (defaultAttributeOverrides == null) {
- defaultAttributeOverrides = new EObjectContainmentEList<IAttributeOverride>(IAttributeOverride.class, this, JpaJavaMappingsPackage.JAVA_EMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES);
- }
- return defaultAttributeOverrides;
- }
-
- public IEmbeddable embeddable() {
- return this.embeddable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__ATTRIBUTE_OVERRIDES :
- return ((InternalEList<?>) getAttributeOverrides()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES :
- return ((InternalEList<?>) getSpecifiedAttributeOverrides()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES :
- return ((InternalEList<?>) getDefaultAttributeOverrides()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__ATTRIBUTE_OVERRIDES :
- return getAttributeOverrides();
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES :
- return getSpecifiedAttributeOverrides();
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES :
- return getDefaultAttributeOverrides();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES :
- getSpecifiedAttributeOverrides().clear();
- getSpecifiedAttributeOverrides().addAll((Collection<? extends IAttributeOverride>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES :
- getDefaultAttributeOverrides().clear();
- getDefaultAttributeOverrides().addAll((Collection<? extends IAttributeOverride>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES :
- getSpecifiedAttributeOverrides().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES :
- getDefaultAttributeOverrides().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__ATTRIBUTE_OVERRIDES :
- return !getAttributeOverrides().isEmpty();
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES :
- return specifiedAttributeOverrides != null && !specifiedAttributeOverrides.isEmpty();
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES :
- return defaultAttributeOverrides != null && !defaultAttributeOverrides.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IEmbedded.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__ATTRIBUTE_OVERRIDES :
- return JpaCoreMappingsPackage.IEMBEDDED__ATTRIBUTE_OVERRIDES;
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES :
- return JpaCoreMappingsPackage.IEMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES;
- case JpaJavaMappingsPackage.JAVA_EMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES :
- return JpaCoreMappingsPackage.IEMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IEmbedded.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IEMBEDDED__ATTRIBUTE_OVERRIDES :
- return JpaJavaMappingsPackage.JAVA_EMBEDDED__ATTRIBUTE_OVERRIDES;
- case JpaCoreMappingsPackage.IEMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES :
- return JpaJavaMappingsPackage.JAVA_EMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES;
- case JpaCoreMappingsPackage.IEMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES :
- return JpaJavaMappingsPackage.JAVA_EMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- public String getKey() {
- return IMappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- public void refreshDefaults(DefaultsContext defaultsContext) {
- super.refreshDefaults(defaultsContext);
- refreshEmbeddable(defaultsContext);
- }
-
- private void refreshEmbeddable(DefaultsContext defaultsContext) {
- this.embeddable = embeddableFor(getAttribute(), defaultsContext);
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- updateAttributeOverridesFromJava(astRoot);
- }
-
- /**
- * here we just worry about getting the attribute override lists the same size;
- * then we delegate to the attribute overrides to synch themselves up
- */
- private void updateAttributeOverridesFromJava(CompilationUnit astRoot) {
- // synchronize the model attribute overrides with the Java source
- List<IAttributeOverride> attributeOverrides = getSpecifiedAttributeOverrides();
- int persSize = attributeOverrides.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaAttributeOverride attributeOverride = (JavaAttributeOverride) attributeOverrides.get(i);
- if (attributeOverride.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- attributeOverride.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model attribute overrides beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- attributeOverrides.remove(persSize);
- }
- }
- else {
- // add new model attribute overrides until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaAttributeOverride attributeOverride = this.createJavaAttributeOverride(javaSize);
- if (attributeOverride.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getSpecifiedAttributeOverrides().add(attributeOverride);
- attributeOverride.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- public IAttributeOverride attributeOverrideNamed(String name) {
- return (IAttributeOverride) overrideNamed(name, getAttributeOverrides());
- }
-
- public boolean containsAttributeOverride(String name) {
- return containsOverride(name, getAttributeOverrides());
- }
-
- public boolean containsSpecifiedAttributeOverride(String name) {
- return containsOverride(name, getSpecifiedAttributeOverrides());
- }
-
- private IOverride overrideNamed(String name, List<? extends IOverride> overrides) {
- for (IOverride override : overrides) {
- String overrideName = override.getName();
- if (overrideName == null && name == null) {
- return override;
- }
- if (overrideName != null && overrideName.equals(name)) {
- return override;
- }
- }
- return null;
- }
-
- private boolean containsOverride(String name, List<? extends IOverride> overrides) {
- return overrideNamed(name, overrides) != null;
- }
-
- public Iterator<String> allOverridableAttributeNames() {
- return new TransformationIterator<IPersistentAttribute, String>(this.allOverridableAttributes()) {
- @Override
- protected String transform(IPersistentAttribute attribute) {
- return attribute.getName();
- }
- };
- }
-
- public Iterator<IPersistentAttribute> allOverridableAttributes() {
- if (this.embeddable() == null) {
- return EmptyIterator.instance();
- }
- return new FilteringIterator<IPersistentAttribute>(this.embeddable().getPersistentType().attributes()) {
- @Override
- protected boolean accept(Object o) {
- return ((IPersistentAttribute) o).isOverridableAttribute();
- }
- };
- }
-
- public IAttributeOverride createAttributeOverride(int index) {
- return createJavaAttributeOverride(index);
- }
-
- private JavaAttributeOverride createJavaAttributeOverride(int index) {
- return JavaAttributeOverride.createAttributeOverride(new AttributeOverrideOwner(this), this.getAttribute(), index);
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (IAttributeOverride override : this.getAttributeOverrides()) {
- result = ((JavaAttributeOverride) override).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- //******* static methods *********
- public static IEmbeddable embeddableFor(Attribute attribute, DefaultsContext defaultsContext) {
- String resolvedTypeName = attribute.resolvedTypeName();
- if (resolvedTypeName == null) {
- return null;
- }
- IPersistentType persistentType = defaultsContext.persistentType(resolvedTypeName);
- if (persistentType != null) {
- if (persistentType.getMapping() instanceof IEmbeddable) {
- return (IEmbeddable) persistentType.getMapping();
- }
- }
- return null;
- }
-} // JavaEmbedded
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedId.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedId.java
deleted file mode 100644
index a904f9316f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedId.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IEmbeddedId;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Embedded Id</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEmbeddedId()
- * @model kind="class"
- * @generated
- */
-public class JavaEmbeddedId extends JavaAttributeMapping implements IEmbeddedId
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.EMBEDDED_ID);
-
- protected JavaEmbeddedId() {
- throw new UnsupportedOperationException("Use JavaEmbeddedId(Attribute) instead");
- }
-
- protected JavaEmbeddedId(Attribute attribute) {
- super(attribute);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_EMBEDDED_ID;
- }
-
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- public String getKey() {
- return IMappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- public boolean isIdMapping() {
- return true;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedIdProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedIdProvider.java
deleted file mode 100644
index 470cc40f0e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedIdProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- */
-public class JavaEmbeddedIdProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaEmbeddedIdProvider INSTANCE = new JavaEmbeddedIdProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaEmbeddedIdProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return false;
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaEmbeddedId(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaEmbeddedId.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedProvider.java
deleted file mode 100644
index 6e39f23352..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEmbeddedProvider.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.IPersistentType;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IEmbeddable;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- */
-public class JavaEmbeddedProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaEmbeddedProvider INSTANCE = new JavaEmbeddedProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaEmbeddedProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return embeddableFor(attribute, defaultsContext) != null;
- }
-
- private IEmbeddable embeddableFor(Attribute attribute, DefaultsContext defaultsContext) {
- String resolvedTypeName = attribute.resolvedTypeName();
- if (resolvedTypeName == null) {
- return null;
- }
- IPersistentType persistentType = defaultsContext.persistentType(resolvedTypeName);
- if (persistentType != null && persistentType.getMappingKey() == IMappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY) {
- return (IEmbeddable) persistentType.getMapping();
- }
- return null;
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaEmbedded(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaEmbedded.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
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
deleted file mode 100644
index ac151354e5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntity.java
+++ /dev/null
@@ -1,3000 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.TypeLiteral;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.IPersistentAttribute;
-import org.eclipse.jpt.core.internal.IPersistentType;
-import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.ITypeMapping;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleTypeStringExpressionConverter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-import org.eclipse.jpt.core.internal.mappings.DiscriminatorType;
-import org.eclipse.jpt.core.internal.mappings.IAbstractJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IAssociationOverride;
-import org.eclipse.jpt.core.internal.mappings.IAttributeOverride;
-import org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn;
-import org.eclipse.jpt.core.internal.mappings.IEntity;
-import org.eclipse.jpt.core.internal.mappings.INamedNativeQuery;
-import org.eclipse.jpt.core.internal.mappings.INamedQuery;
-import org.eclipse.jpt.core.internal.mappings.IOverride;
-import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.ISecondaryTable;
-import org.eclipse.jpt.core.internal.mappings.ISequenceGenerator;
-import org.eclipse.jpt.core.internal.mappings.ITable;
-import org.eclipse.jpt.core.internal.mappings.ITableGenerator;
-import org.eclipse.jpt.core.internal.mappings.InheritanceType;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.db.internal.Schema;
-import org.eclipse.jpt.db.internal.Table;
-import org.eclipse.jpt.utility.internal.CollectionTools;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Entity</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEntity()
- * @model kind="class"
- * @generated
- */
-public class JavaEntity extends JavaTypeMapping implements IEntity
-{
- /**
- * 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 cached value of the '{@link #getTable() <em>Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTable()
- * @generated
- * @ordered
- */
- 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 -->
- * @see #getSpecifiedPrimaryKeyJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns;
-
- /**
- * The cached value of the '{@link #getDefaultPrimaryKeyJoinColumns() <em>Default Primary Key Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultPrimaryKeyJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IPrimaryKeyJoinColumn> defaultPrimaryKeyJoinColumns;
-
- /**
- * The default value of the '{@link #getInheritanceStrategy() <em>Inheritance Strategy</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInheritanceStrategy()
- * @generated
- * @ordered
- */
- protected static final InheritanceType INHERITANCE_STRATEGY_EDEFAULT = InheritanceType.DEFAULT;
-
- /**
- * The cached value of the '{@link #getInheritanceStrategy() <em>Inheritance Strategy</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInheritanceStrategy()
- * @generated
- * @ordered
- */
- protected InheritanceType inheritanceStrategy = INHERITANCE_STRATEGY_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultDiscriminatorValue() <em>Default Discriminator Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultDiscriminatorValue()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_DISCRIMINATOR_VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultDiscriminatorValue() <em>Default Discriminator Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultDiscriminatorValue()
- * @generated
- * @ordered
- */
- protected String defaultDiscriminatorValue = DEFAULT_DISCRIMINATOR_VALUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSpecifiedDiscriminatorValue() <em>Specified Discriminator Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedDiscriminatorValue()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_DISCRIMINATOR_VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedDiscriminatorValue() <em>Specified Discriminator Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedDiscriminatorValue()
- * @generated
- * @ordered
- */
- protected String specifiedDiscriminatorValue = SPECIFIED_DISCRIMINATOR_VALUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDiscriminatorValue() <em>Discriminator Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDiscriminatorValue()
- * @generated
- * @ordered
- */
- protected static final String DISCRIMINATOR_VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDiscriminatorColumn() <em>Discriminator Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDiscriminatorColumn()
- * @generated
- * @ordered
- */
- protected IDiscriminatorColumn discriminatorColumn;
-
- /**
- * The cached value of the '{@link #getSequenceGenerator() <em>Sequence Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSequenceGenerator()
- * @generated
- * @ordered
- */
- protected ISequenceGenerator sequenceGenerator;
-
- /**
- * The cached value of the '{@link #getTableGenerator() <em>Table Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTableGenerator()
- * @generated
- * @ordered
- */
- protected ITableGenerator tableGenerator;
-
- /**
- * The cached value of the '{@link #getSpecifiedAttributeOverrides() <em>Specified Attribute Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedAttributeOverrides()
- * @generated
- * @ordered
- */
- protected EList<IAttributeOverride> specifiedAttributeOverrides;
-
- /**
- * The cached value of the '{@link #getDefaultAttributeOverrides() <em>Default Attribute Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultAttributeOverrides()
- * @generated
- * @ordered
- */
- protected EList<IAttributeOverride> defaultAttributeOverrides;
-
- /**
- * The cached value of the '{@link #getSpecifiedAssociationOverrides() <em>Specified Association Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedAssociationOverrides()
- * @generated
- * @ordered
- */
- protected EList<IAssociationOverride> specifiedAssociationOverrides;
-
- /**
- * The cached value of the '{@link #getDefaultAssociationOverrides() <em>Default Association Overrides</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultAssociationOverrides()
- * @generated
- * @ordered
- */
- protected EList<IAssociationOverride> defaultAssociationOverrides;
-
- /**
- * The cached value of the '{@link #getNamedQueries() <em>Named Queries</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNamedQueries()
- * @generated
- * @ordered
- */
- protected EList<INamedQuery> namedQueries;
-
- /**
- * The cached value of the '{@link #getNamedNativeQueries() <em>Named Native Queries</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNamedNativeQueries()
- * @generated
- * @ordered
- */
- protected EList<INamedNativeQuery> namedNativeQueries;
-
- /**
- * The default value of the '{@link #getIdClass() <em>Id Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIdClass()
- * @generated
- * @ordered
- */
- protected static final String ID_CLASS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getIdClass() <em>Id Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIdClass()
- * @generated
- * @ordered
- */
- protected String idClass = ID_CLASS_EDEFAULT;
-
- private AnnotationElementAdapter<String> nameAdapter;
-
- private AnnotationElementAdapter<String> inheritanceStrategyAdapter;
-
- private final AnnotationElementAdapter<String> discriminatorValueAdapter;
-
- private AnnotationAdapter tableGeneratorAnnotationAdapter;
-
- private AnnotationAdapter sequenceGeneratorAnnotationAdapter;
-
- private final AnnotationAdapter idClassAnnotationAdapter;
-
- private final AnnotationElementAdapter<String> idClassValueAdapter;
-
- public static final DeclarationAnnotationAdapter ID_CLASS_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ID_CLASS);
-
- private static final DeclarationAnnotationElementAdapter<String> ID_CLASS_VALUE_ADAPTER = buildIdClassValueAdapter();
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ENTITY);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildNameAdapter();
-
- private static final DeclarationAnnotationAdapter INHERITANCE_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.INHERITANCE);
-
- private static final DeclarationAnnotationElementAdapter<String> INHERITANCE_STRATEGY_ADAPTER = buildStrategyAdapter();
-
- private static final DeclarationAnnotationAdapter DISCRIMINATOR_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.DISCRIMINATOR_VALUE);
-
- private static final DeclarationAnnotationElementAdapter<String> DISCRIMINATOR_VALUE_ADAPTER = buildDiscriminatorValueAdapter();
-
- protected JavaEntity() {
- this(null);
- }
-
- protected JavaEntity(Type type) {
- super(type);
- this.table = JpaJavaMappingsFactory.eINSTANCE.createJavaTable(buildTableOwner(), getType());
- ((InternalEObject) this.table).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ENTITY__TABLE, null, null);
- this.discriminatorColumn = JpaJavaMappingsFactory.eINSTANCE.createJavaDiscriminatorColumn(new IDiscriminatorColumn.Owner(this), type, JavaDiscriminatorColumn.DECLARATION_ANNOTATION_ADAPTER);
- ((InternalEObject) this.discriminatorColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_COLUMN, null, null);
- // this.getDefaultPrimaryKeyJoinColumns().add(this.createPrimaryKeyJoinColumn(IPrimaryKeyJoinColumnModelAdapter.DEFAULT));
- // this.eAdapters().add(this.buildListener());
- this.nameAdapter = new ShortCircuitAnnotationElementAdapter<String>(getType(), NAME_ADAPTER);
- this.inheritanceStrategyAdapter = new ShortCircuitAnnotationElementAdapter<String>(type, INHERITANCE_STRATEGY_ADAPTER);
- this.discriminatorValueAdapter = new ShortCircuitAnnotationElementAdapter<String>(type, DISCRIMINATOR_VALUE_ADAPTER);
- this.idClassAnnotationAdapter = new MemberAnnotationAdapter(this.getType(), ID_CLASS_ADAPTER);
- this.idClassValueAdapter = new ShortCircuitAnnotationElementAdapter<String>(this.getType(), ID_CLASS_VALUE_ADAPTER);
- this.getDefaultPrimaryKeyJoinColumns().add(this.createPrimaryKeyJoinColumn(0));
- this.tableGeneratorAnnotationAdapter = new MemberAnnotationAdapter(getType(), JavaTableGenerator.DECLARATION_ANNOTATION_ADAPTER);
- this.sequenceGeneratorAnnotationAdapter = new MemberAnnotationAdapter(getType(), JavaSequenceGenerator.DECLARATION_ANNOTATION_ADAPTER);
- }
-
- private ITable.Owner buildTableOwner() {
- return new ITable.Owner() {
- public ITextRange validationTextRange() {
- return JavaEntity.this.validationTextRange();
- }
-
- public ITypeMapping getTypeMapping() {
- return JavaEntity.this;
- }
- };
- }
-
- @Override
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildNameAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.ENTITY__NAME, false); // false = do not remove annotation when empty
- }
-
- /**
- * check for changes to the 'specifiedJoinColumns' and
- * 'specifiedInverseJoinColumns' lists so we can notify the
- * model adapter of any changes;
- * also listen for changes to the 'defaultJoinColumns' and
- * 'defaultInverseJoinColumns' lists so we can spank the developer
- */
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IEntity.class)) {
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_NAME :
- this.nameAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.JAVA_ENTITY__INHERITANCE_STRATEGY :
- this.inheritanceStrategyAdapter.setValue(((InheritanceType) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_DISCRIMINATOR_VALUE :
- this.discriminatorValueAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaCoreMappingsPackage.IENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES :
- this.attributeOverridesChanged(notification);
- break;
- case JpaCoreMappingsPackage.IENTITY__SPECIFIED_ASSOCIATION_OVERRIDES :
- this.associationOverridesChanged(notification);
- break;
- case JpaCoreMappingsPackage.IENTITY__SPECIFIED_SECONDARY_TABLES :
- this.secondaryTablesChanged(notification);
- break;
- case JpaCoreMappingsPackage.IENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
- this.specifiedPrimaryKeyJoinColumnsChanged(notification);
- break;
- case JpaCoreMappingsPackage.IENTITY__NAMED_QUERIES :
- this.namedQueriesChanged(notification);
- break;
- case JpaCoreMappingsPackage.IENTITY__NAMED_NATIVE_QUERIES :
- this.namedNativeQueriesChanged(notification);
- break;
- case JpaCoreMappingsPackage.IENTITY__TABLE_GENERATOR :
- attributeChanged(notification.getNewValue(), this.tableGeneratorAnnotationAdapter);
- break;
- case JpaCoreMappingsPackage.IENTITY__SEQUENCE_GENERATOR :
- attributeChanged(notification.getNewValue(), this.sequenceGeneratorAnnotationAdapter);
- break;
- case JpaCoreMappingsPackage.IENTITY__ID_CLASS :
- String newIdClass = (String) notification.getNewValue();
- if (newIdClass == null) {
- this.idClassAnnotationAdapter.removeAnnotation();
- }
- else {
- this.idClassValueAdapter.setValue(newIdClass);
- }
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void attributeOverridesChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- attributeOverrideAdded(notification.getPosition(), (JavaAttributeOverride) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- attributeOverridesAdded(notification.getPosition(), (List<JavaAttributeOverride>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- attributeOverrideRemoved(notification.getPosition(), (JavaAttributeOverride) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- attributeOverridesCleared((List<JavaAttributeOverride>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- attributeOverridesRemoved((int[]) notification.getNewValue(), (List<JavaAttributeOverride>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- attributeOverrideSet(notification.getPosition(), (JavaAttributeOverride) notification.getOldValue(), (JavaAttributeOverride) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- attributeOverrideMoved(notification.getOldIntValue(), notification.getPosition(), (JavaAttributeOverride) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void associationOverridesChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- associationOverrideAdded(notification.getPosition(), (JavaAssociationOverride) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- associationOverridesAdded(notification.getPosition(), (List<JavaAssociationOverride>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- associationOverrideRemoved(notification.getPosition(), (JavaAssociationOverride) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- associationOverridesCleared((List<JavaAssociationOverride>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- associationOverridesRemoved((int[]) notification.getNewValue(), (List<JavaAssociationOverride>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- associationOverrideSet(notification.getPosition(), (JavaAssociationOverride) notification.getOldValue(), (JavaAssociationOverride) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- associationOverrideMoved(notification.getOldIntValue(), notification.getPosition(), (JavaAssociationOverride) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- void defaultJoinColumnsChanged(Notification notification) {
- throw new IllegalStateException("'defaultJoinColumns' cannot be changed");
- }
-
- @SuppressWarnings("unchecked")
- void secondaryTablesChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- secondaryTableAdded(notification.getPosition(), (JavaSecondaryTable) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- secondaryTablesAdded(notification.getPosition(), (List<ISecondaryTable>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- secondaryTableRemoved(notification.getPosition(), (JavaSecondaryTable) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- secondaryTablesCleared((List<ISecondaryTable>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- secondaryTablesRemoved((int[]) notification.getNewValue(), (List<ISecondaryTable>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- secondaryTableSet(notification.getPosition(), (JavaSecondaryTable) notification.getOldValue(), (JavaSecondaryTable) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- secondaryTableMoved(notification.getOldIntValue(), notification.getPosition(), (ISecondaryTable) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void specifiedPrimaryKeyJoinColumnsChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- specifiedPrimaryKeyJoinColumnAdded(notification.getPosition(), (JavaPrimaryKeyJoinColumn) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- specifiedPrimaryKeyJoinColumnsAdded(notification.getPosition(), (List<IPrimaryKeyJoinColumn>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- specifiedPrimaryKeyJoinColumnRemoved(notification.getPosition(), (JavaPrimaryKeyJoinColumn) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- specifiedPrimaryKeyJoinColumnsCleared((List<IPrimaryKeyJoinColumn>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- specifiedPrimaryKeyJoinColumnsRemoved((int[]) notification.getNewValue(), (List<IPrimaryKeyJoinColumn>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- specifiedPrimaryKeyJoinColumnSet(notification.getPosition(), (JavaPrimaryKeyJoinColumn) notification.getOldValue(), (JavaPrimaryKeyJoinColumn) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- specifiedPrimaryKeyJoinColumnMoved(notification.getOldIntValue(), notification.getPosition(), (JavaPrimaryKeyJoinColumn) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void namedQueriesChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- namedQueryAdded(notification.getPosition(), (JavaNamedQuery) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- namedQueriesAdded(notification.getPosition(), (List<JavaNamedQuery>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- namedQueryRemoved(notification.getPosition(), (JavaNamedQuery) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- namedQueriesCleared((List<JavaNamedQuery>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- namedQueriesRemoved((int[]) notification.getNewValue(), (List<JavaNamedQuery>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- namedQuerySet(notification.getPosition(), (JavaNamedQuery) notification.getOldValue(), (JavaNamedQuery) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- namedQueryMoved(notification.getOldIntValue(), notification.getPosition(), (JavaNamedQuery) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void namedNativeQueriesChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- namedNativeQueryAdded(notification.getPosition(), (JavaNamedNativeQuery) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- namedNativeQueriesAdded(notification.getPosition(), (List<JavaNamedNativeQuery>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- namedNativeQueryRemoved(notification.getPosition(), (JavaNamedNativeQuery) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- namedNativeQueriesCleared((List<JavaNamedNativeQuery>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- namedNativeQueriesRemoved((int[]) notification.getNewValue(), (List<JavaNamedNativeQuery>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- namedNativeQuerySet(notification.getPosition(), (JavaNamedNativeQuery) notification.getOldValue(), (JavaNamedNativeQuery) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- namedNativeQueryMoved(notification.getOldIntValue(), notification.getPosition(), (JavaNamedNativeQuery) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- // ********** jpa model -> java annotations **********
- /**
- * slide over all the annotations that follow the new attribute override
- */
- public void attributeOverrideAdded(int index, JavaAttributeOverride attributeOverride) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (attributeOverride.annotation(getType().astRoot()) == null) {
- this.synchAttributeOverrideAnnotationsAfterAdd(index + 1);
- attributeOverride.newAnnotation();
- }
- }
-
- public void attributeOverridesAdded(int index, List<JavaAttributeOverride> attributeOverrides) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!attributeOverrides.isEmpty() && (attributeOverrides.get(0).annotation(getType().astRoot()) == null)) {
- this.synchAttributeOverrideAnnotationsAfterAdd(index + attributeOverrides.size());
- for (JavaAttributeOverride attributeOverride : attributeOverrides) {
- attributeOverride.newAnnotation();
- }
- }
- }
-
- public void attributeOverrideRemoved(int index, JavaAttributeOverride attributeOverride) {
- attributeOverride.removeAnnotation();
- this.synchAttributeOverrideAnnotationsAfterRemove(index);
- }
-
- public void attributeOverridesRemoved(int[] indexes, List<JavaAttributeOverride> attributeOverrides) {
- for (JavaAttributeOverride attributeOverride : attributeOverrides) {
- attributeOverride.removeAnnotation();
- }
- this.synchAttributeOverrideAnnotationsAfterRemove(indexes[0]);
- }
-
- public void attributeOverridesCleared(List<JavaAttributeOverride> attributeOverrides) {
- for (JavaAttributeOverride attributeOverride : attributeOverrides) {
- attributeOverride.removeAnnotation();
- }
- }
-
- public void attributeOverrideSet(int index, JavaAttributeOverride oldAttributeOverride, JavaAttributeOverride newAttributeOverride) {
- newAttributeOverride.newAnnotation();
- }
-
- public void attributeOverrideMoved(int sourceIndex, int targetIndex, JavaAttributeOverride attributeOverride) {
- List<IAttributeOverride> attributeOverrides = getSpecifiedAttributeOverrides();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch((JavaAttributeOverride) attributeOverrides.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchAttributeOverrideAnnotationsAfterAdd(int index) {
- List<IAttributeOverride> attributeOverrides = getSpecifiedAttributeOverrides();
- for (int i = attributeOverrides.size(); i-- > index;) {
- this.synch((JavaAttributeOverride) attributeOverrides.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchAttributeOverrideAnnotationsAfterRemove(int index) {
- List<IAttributeOverride> attributeOverrides = getSpecifiedAttributeOverrides();
- for (int i = index; i < attributeOverrides.size(); i++) {
- this.synch((JavaAttributeOverride) attributeOverrides.get(i), i);
- }
- }
-
- private void synch(JavaAttributeOverride attributeOverride, int index) {
- attributeOverride.moveAnnotation(index);
- }
-
- /**
- * slide over all the annotations that follow the new association override
- */
- public void associationOverrideAdded(int index, JavaAssociationOverride associationOverride) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (associationOverride.annotation(getType().astRoot()) == null) {
- this.synchAssociationOverrideAnnotationsAfterAdd(index + 1);
- associationOverride.newAnnotation();
- }
- }
-
- public void associationOverridesAdded(int index, List<JavaAssociationOverride> associationOverrides) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!associationOverrides.isEmpty() && (associationOverrides.get(0).annotation(getType().astRoot()) == null)) {
- this.synchAssociationOverrideAnnotationsAfterAdd(index + associationOverrides.size());
- for (JavaAssociationOverride associationOverride : associationOverrides) {
- associationOverride.newAnnotation();
- }
- }
- }
-
- public void associationOverrideRemoved(int index, JavaAssociationOverride associationOverride) {
- associationOverride.removeAnnotation();
- this.synchAssociationOverrideAnnotationsAfterRemove(index);
- }
-
- public void associationOverridesRemoved(int[] indexes, List<JavaAssociationOverride> associationOverrides) {
- for (JavaAssociationOverride associationOverride : associationOverrides) {
- associationOverride.removeAnnotation();
- }
- this.synchAssociationOverrideAnnotationsAfterRemove(indexes[0]);
- }
-
- public void associationOverridesCleared(List<JavaAssociationOverride> associationOverrides) {
- for (JavaAssociationOverride associationOverride : associationOverrides) {
- associationOverride.removeAnnotation();
- }
- }
-
- public void associationOverrideSet(int index, JavaAssociationOverride oldAssociationOverride, JavaAssociationOverride newAssociationOverride) {
- newAssociationOverride.newAnnotation();
- }
-
- public void associationOverrideMoved(int sourceIndex, int targetIndex, JavaAssociationOverride associationOverride) {
- List<IAssociationOverride> assocationOverrides = getSpecifiedAssociationOverrides();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch((JavaAssociationOverride) assocationOverrides.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchAssociationOverrideAnnotationsAfterAdd(int index) {
- List<IAssociationOverride> associationOverrides = getSpecifiedAssociationOverrides();
- for (int i = associationOverrides.size(); i-- > index;) {
- this.synch((JavaAssociationOverride) associationOverrides.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchAssociationOverrideAnnotationsAfterRemove(int index) {
- List<IAssociationOverride> assocationOverrides = getSpecifiedAssociationOverrides();
- for (int i = index; i < assocationOverrides.size(); i++) {
- this.synch((JavaAssociationOverride) assocationOverrides.get(i), i);
- }
- }
-
- private void synch(JavaAssociationOverride associationOverride, int index) {
- associationOverride.moveAnnotation(index);
- }
-
- /**
- * slide over all the annotations that follow the new secondary table
- */
- // bjv look at this
- public void secondaryTableAdded(int index, JavaSecondaryTable secondaryTable) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (secondaryTable.annotation(getType().astRoot()) == null) {
- this.synchSecondaryTableAnnotationsAfterAdd(index + 1);
- secondaryTable.newAnnotation();
- }
- }
-
- public void secondaryTablesAdded(int index, List<ISecondaryTable> secondaryTables) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!secondaryTables.isEmpty() && ((JavaSecondaryTable) secondaryTables.get(0)).annotation(getType().astRoot()) == null) {
- this.synchSecondaryTableAnnotationsAfterAdd(index + secondaryTables.size());
- for (Iterator<ISecondaryTable> stream = secondaryTables.iterator(); stream.hasNext();) {
- JavaSecondaryTable secondaryTable = (JavaSecondaryTable) stream.next();
- secondaryTable.newAnnotation();
- }
- }
- }
-
- public void secondaryTableRemoved(int index, JavaSecondaryTable secondaryTable) {
- secondaryTable.removeAnnotation();
- this.synchSecondaryTableAnnotationsAfterRemove(index);
- }
-
- public void secondaryTablesRemoved(int[] indexes, List<ISecondaryTable> secondaryTables) {
- for (Iterator<ISecondaryTable> stream = secondaryTables.iterator(); stream.hasNext();) {
- JavaSecondaryTable secondaryTable = (JavaSecondaryTable) stream.next();
- secondaryTable.removeAnnotation();
- }
- this.synchSecondaryTableAnnotationsAfterRemove(indexes[0]);
- }
-
- public void secondaryTablesCleared(List<ISecondaryTable> secondaryTables) {
- for (Iterator<ISecondaryTable> stream = secondaryTables.iterator(); stream.hasNext();) {
- JavaSecondaryTable secondaryTable = (JavaSecondaryTable) stream.next();
- secondaryTable.removeAnnotation();
- }
- }
-
- public void secondaryTableSet(int index, JavaSecondaryTable oldSecondaryTable, JavaSecondaryTable newSecondaryTable) {
- newSecondaryTable.newAnnotation();
- }
-
- public void secondaryTableMoved(int sourceIndex, int targetIndex, ISecondaryTable secondaryTable) {
- List<ISecondaryTable> secondaryTables = getSecondaryTables();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch((JavaSecondaryTable) secondaryTables.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchSecondaryTableAnnotationsAfterAdd(int index) {
- List<ISecondaryTable> secondaryTables = getSecondaryTables();
- for (int i = secondaryTables.size(); i-- > index;) {
- this.synch((JavaSecondaryTable) secondaryTables.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchSecondaryTableAnnotationsAfterRemove(int index) {
- List<ISecondaryTable> secondaryTables = getSecondaryTables();
- for (int i = index; i < secondaryTables.size(); i++) {
- this.synch((JavaSecondaryTable) secondaryTables.get(i), i);
- }
- }
-
- private void synch(JavaSecondaryTable secondaryTable, int index) {
- secondaryTable.moveAnnotation(index);
- }
-
- /**
- * slide over all the annotations that follow the new
- * primary key join column
- */
- // bjv look at this
- public void specifiedPrimaryKeyJoinColumnAdded(int index, JavaPrimaryKeyJoinColumn primaryKeyJoinColumn) {
- if (primaryKeyJoinColumn.annotation(getType().astRoot()) == null) {
- this.synchPKJCAnnotationsAfterAdd(index + 1);
- primaryKeyJoinColumn.newAnnotation();
- }
- }
-
- public void specifiedPrimaryKeyJoinColumnsAdded(int index, List<IPrimaryKeyJoinColumn> primaryKeyJoinColumns) {
- if (!primaryKeyJoinColumns.isEmpty() && ((JavaPrimaryKeyJoinColumn) primaryKeyJoinColumns.get(0)).annotation(getType().astRoot()) == null) {
- this.synchPKJCAnnotationsAfterAdd(index + primaryKeyJoinColumns.size());
- for (Iterator<IPrimaryKeyJoinColumn> stream = primaryKeyJoinColumns.iterator(); stream.hasNext();) {
- JavaPrimaryKeyJoinColumn primaryKeyJoinColumn = (JavaPrimaryKeyJoinColumn) stream.next();
- primaryKeyJoinColumn.newAnnotation();
- }
- }
- }
-
- public void specifiedPrimaryKeyJoinColumnRemoved(int index, JavaPrimaryKeyJoinColumn primaryKeyJoinColumn) {
- primaryKeyJoinColumn.removeAnnotation();
- this.synchPKJCAnnotationsAfterRemove(index);
- }
-
- public void specifiedPrimaryKeyJoinColumnsRemoved(int[] indexes, List<IPrimaryKeyJoinColumn> primaryKeyJoinColumns) {
- for (Iterator<IPrimaryKeyJoinColumn> stream = primaryKeyJoinColumns.iterator(); stream.hasNext();) {
- JavaPrimaryKeyJoinColumn primaryKeyJoinColumn = (JavaPrimaryKeyJoinColumn) stream.next();
- primaryKeyJoinColumn.removeAnnotation();
- }
- this.synchPKJCAnnotationsAfterRemove(indexes[0]);
- }
-
- public void specifiedPrimaryKeyJoinColumnsCleared(List<IPrimaryKeyJoinColumn> primaryKeyJoinColumns) {
- for (Iterator<IPrimaryKeyJoinColumn> stream = primaryKeyJoinColumns.iterator(); stream.hasNext();) {
- JavaPrimaryKeyJoinColumn primaryKeyJoinColumn = (JavaPrimaryKeyJoinColumn) stream.next();
- primaryKeyJoinColumn.removeAnnotation();
- }
- }
-
- public void specifiedPrimaryKeyJoinColumnSet(int index, JavaPrimaryKeyJoinColumn oldPrimaryKeyJoinColumn, JavaPrimaryKeyJoinColumn newPrimaryKeyJoinColumn) {
- newPrimaryKeyJoinColumn.newAnnotation();
- }
-
- public void specifiedPrimaryKeyJoinColumnMoved(int sourceIndex, int targetIndex, JavaPrimaryKeyJoinColumn primaryKeyJoinColumn) {
- List<IPrimaryKeyJoinColumn> primaryKeyJoinColumns = getSpecifiedPrimaryKeyJoinColumns();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch((JavaPrimaryKeyJoinColumn) primaryKeyJoinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchPKJCAnnotationsAfterAdd(int index) {
- List<IPrimaryKeyJoinColumn> primaryKeyJoinColumns = getSpecifiedPrimaryKeyJoinColumns();
- for (int i = primaryKeyJoinColumns.size(); i-- > index;) {
- this.synch((JavaPrimaryKeyJoinColumn) primaryKeyJoinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchPKJCAnnotationsAfterRemove(int index) {
- List<IPrimaryKeyJoinColumn> primaryKeyJoinColumns = getSpecifiedPrimaryKeyJoinColumns();
- for (int i = index; i < primaryKeyJoinColumns.size(); i++) {
- this.synch((JavaPrimaryKeyJoinColumn) primaryKeyJoinColumns.get(i), i);
- }
- }
-
- private void synch(JavaPrimaryKeyJoinColumn primaryKeyJoinColumn, int index) {
- primaryKeyJoinColumn.moveAnnotation(index);
- }
-
- /**
- * slide over all the annotations that follow the new secondary table
- */
- // bjv look at this
- public void namedQueryAdded(int index, JavaNamedQuery namedQuery) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (namedQuery.annotation(getType().astRoot()) == null) {
- this.synchNamedQueryAnnotationsAfterAdd(index + 1);
- namedQuery.newAnnotation();
- }
- }
-
- public void namedQueriesAdded(int index, List<JavaNamedQuery> queries) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!queries.isEmpty() && queries.get(0).annotation(getType().astRoot()) == null) {
- this.synchNamedQueryAnnotationsAfterAdd(index + queries.size());
- for (JavaNamedQuery namedQuery : queries) {
- namedQuery.newAnnotation();
- }
- }
- }
-
- public void namedQueryRemoved(int index, JavaNamedQuery namedQuery) {
- namedQuery.removeAnnotation();
- this.synchNamedQueryAnnotationsAfterRemove(index);
- }
-
- public void namedQueriesRemoved(int[] indexes, List<JavaNamedQuery> queries) {
- for (JavaNamedQuery namedQuery : queries) {
- namedQuery.removeAnnotation();
- }
- this.synchNamedQueryAnnotationsAfterRemove(indexes[0]);
- }
-
- public void namedQueriesCleared(List<JavaNamedQuery> queries) {
- for (JavaNamedQuery namedQuery : queries) {
- namedQuery.removeAnnotation();
- }
- }
-
- public void namedQuerySet(int index, JavaNamedQuery oldNamedQuery, JavaNamedQuery newNamedQuery) {
- newNamedQuery.newAnnotation();
- }
-
- public void namedQueryMoved(int sourceIndex, int targetIndex, JavaNamedQuery namedQuery) {
- List<INamedQuery> queries = getNamedQueries();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch((JavaNamedQuery) queries.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchNamedQueryAnnotationsAfterAdd(int index) {
- List<INamedQuery> queries = getNamedQueries();
- for (int i = queries.size(); i-- > index;) {
- this.synch((JavaNamedQuery) queries.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchNamedQueryAnnotationsAfterRemove(int index) {
- List<INamedQuery> queries = getNamedQueries();
- for (int i = index; i < queries.size(); i++) {
- this.synch((JavaNamedQuery) queries.get(i), i);
- }
- }
-
- private void synch(JavaNamedQuery namedQuery, int index) {
- namedQuery.moveAnnotation(index);
- }
-
- /**
- * slide over all the annotations that follow the new secondary table
- */
- // bjv look at this
- public void namedNativeQueryAdded(int index, JavaNamedNativeQuery namedQuery) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (namedQuery.annotation(getType().astRoot()) == null) {
- this.synchNamedNativeQueryAnnotationsAfterAdd(index + 1);
- namedQuery.newAnnotation();
- }
- }
-
- public void namedNativeQueriesAdded(int index, List<JavaNamedNativeQuery> queries) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!queries.isEmpty() && queries.get(0).annotation(getType().astRoot()) == null) {
- this.synchNamedNativeQueryAnnotationsAfterAdd(index + queries.size());
- for (JavaNamedNativeQuery namedQuery : queries) {
- namedQuery.newAnnotation();
- }
- }
- }
-
- public void namedNativeQueryRemoved(int index, JavaNamedNativeQuery namedQuery) {
- namedQuery.removeAnnotation();
- this.synchNamedNativeQueryAnnotationsAfterRemove(index);
- }
-
- public void namedNativeQueriesRemoved(int[] indexes, List<JavaNamedNativeQuery> queries) {
- for (JavaNamedNativeQuery namedQuery : queries) {
- namedQuery.removeAnnotation();
- }
- this.synchNamedNativeQueryAnnotationsAfterRemove(indexes[0]);
- }
-
- public void namedNativeQueriesCleared(List<JavaNamedNativeQuery> queries) {
- for (JavaNamedNativeQuery namedQuery : queries) {
- namedQuery.removeAnnotation();
- }
- }
-
- public void namedNativeQuerySet(int index, JavaNamedNativeQuery oldNamedQuery, JavaNamedNativeQuery newNamedQuery) {
- newNamedQuery.newAnnotation();
- }
-
- public void namedNativeQueryMoved(int sourceIndex, int targetIndex, JavaNamedNativeQuery namedQuery) {
- List<INamedNativeQuery> queries = getNamedNativeQueries();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch((JavaNamedNativeQuery) queries.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchNamedNativeQueryAnnotationsAfterAdd(int index) {
- List<INamedNativeQuery> queries = getNamedNativeQueries();
- for (int i = queries.size(); i-- > index;) {
- this.synch((JavaNamedNativeQuery) queries.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchNamedNativeQueryAnnotationsAfterRemove(int index) {
- List<INamedNativeQuery> queries = getNamedNativeQueries();
- for (int i = index; i < queries.size(); i++) {
- this.synch((JavaNamedNativeQuery) queries.get(i), i);
- }
- }
-
- private void synch(JavaNamedNativeQuery namedQuery, int index) {
- namedQuery.moveAnnotation(index);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_ENTITY;
- }
-
- @Override
- public String getName() {
- return (this.getSpecifiedName() == null) ? this.getDefaultName() : this.getSpecifiedName();
- }
-
- /**
- * 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#getIEntity_SpecifiedName()
- * @model
- * @generated
- */
- public String getSpecifiedName() {
- return specifiedName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity#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 setSpecifiedName(String newSpecifiedName) {
- String oldSpecifiedName = specifiedName;
- specifiedName = newSpecifiedName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_NAME, oldSpecifiedName, specifiedName));
- }
-
- /**
- * 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#getIEntity_DefaultName()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultName() {
- return defaultName;
- }
-
- /**
- * Returns the value of the '<em><b>Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table</em>' containment reference.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_Table()
- * @model containment="true" required="true" changeable="false"
- * @generated
- */
- public ITable getTable() {
- return table;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetTable(ITable newTable, NotificationChain msgs) {
- ITable oldTable = table;
- table = newTable;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__TABLE, oldTable, newTable);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * 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.content.java.mappings.JpaJavaMappingsPackage#getIEntity_SpecifiedSecondaryTables()
- * @model type="org.eclipse.jpt.core.internal.mappings.ISecondaryTable" containment="true"
- * @generated
- */
- public EList<ISecondaryTable> getSpecifiedSecondaryTables() {
- if (specifiedSecondaryTables == null) {
- specifiedSecondaryTables = new EObjectContainmentEList<ISecondaryTable>(ISecondaryTable.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_SECONDARY_TABLES);
- }
- return specifiedSecondaryTables;
- }
-
- public EList<ISecondaryTable> getSecondaryTables() {
- return getSpecifiedSecondaryTables();
- }
-
- public boolean containsSecondaryTable(String name) {
- return containsSecondaryTable(name, getSecondaryTables());
- }
-
- public boolean containsSpecifiedSecondaryTable(String name) {
- return containsSecondaryTable(name, getSpecifiedSecondaryTables());
- }
-
- private boolean containsSecondaryTable(String name, List<ISecondaryTable> secondaryTables) {
- for (ISecondaryTable secondaryTable : secondaryTables) {
- String secondaryTableName = secondaryTable.getName();
- if (secondaryTableName != null && secondaryTableName.equals(name)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * 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 -->
- * <p>
- * If the meaning of the '<em>Inheritance Strategy</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Inheritance Strategy</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.InheritanceType
- * @see #setInheritanceStrategy(InheritanceType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_InheritanceStrategy()
- * @model
- * @generated
- */
- public InheritanceType getInheritanceStrategy() {
- return inheritanceStrategy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity#getInheritanceStrategy <em>Inheritance Strategy</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Inheritance Strategy</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.InheritanceType
- * @see #getInheritanceStrategy()
- * @generated
- */
- public void setInheritanceStrategy(InheritanceType newInheritanceStrategy) {
- InheritanceType oldInheritanceStrategy = inheritanceStrategy;
- inheritanceStrategy = newInheritanceStrategy == null ? INHERITANCE_STRATEGY_EDEFAULT : newInheritanceStrategy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__INHERITANCE_STRATEGY, oldInheritanceStrategy, inheritanceStrategy));
- }
-
- /**
- * Returns the value of the '<em><b>Discriminator Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Discriminator Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Discriminator Column</em>' containment reference.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_DiscriminatorColumn()
- * @model containment="true" changeable="false"
- * @generated
- */
- public IDiscriminatorColumn getDiscriminatorColumn() {
- return discriminatorColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetDiscriminatorColumn(IDiscriminatorColumn newDiscriminatorColumn, NotificationChain msgs) {
- IDiscriminatorColumn oldDiscriminatorColumn = discriminatorColumn;
- discriminatorColumn = newDiscriminatorColumn;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_COLUMN, oldDiscriminatorColumn, newDiscriminatorColumn);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Returns the value of the '<em><b>Sequence Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sequence Generator</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sequence Generator</em>' containment reference.
- * @see #setSequenceGenerator(ISequenceGenerator)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_SequenceGenerator()
- * @model containment="true"
- * @generated
- */
- public ISequenceGenerator getSequenceGenerator() {
- return sequenceGenerator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetSequenceGenerator(ISequenceGenerator newSequenceGenerator, NotificationChain msgs) {
- ISequenceGenerator oldSequenceGenerator = sequenceGenerator;
- sequenceGenerator = newSequenceGenerator;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR, oldSequenceGenerator, newSequenceGenerator);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity#getSequenceGenerator <em>Sequence Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Sequence Generator</em>' containment reference.
- * @see #getSequenceGenerator()
- * @generated
- */
- public void setSequenceGenerator(ISequenceGenerator newSequenceGenerator) {
- if (newSequenceGenerator != sequenceGenerator) {
- NotificationChain msgs = null;
- if (sequenceGenerator != null)
- msgs = ((InternalEObject) sequenceGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR, null, msgs);
- if (newSequenceGenerator != null)
- msgs = ((InternalEObject) newSequenceGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR, null, msgs);
- msgs = basicSetSequenceGenerator(newSequenceGenerator, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR, newSequenceGenerator, newSequenceGenerator));
- }
-
- /**
- * Returns the value of the '<em><b>Table Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table Generator</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table Generator</em>' containment reference.
- * @see #setTableGenerator(ITableGenerator)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_TableGenerator()
- * @model containment="true"
- * @generated
- */
- public ITableGenerator getTableGenerator() {
- return tableGenerator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetTableGenerator(ITableGenerator newTableGenerator, NotificationChain msgs) {
- ITableGenerator oldTableGenerator = tableGenerator;
- tableGenerator = newTableGenerator;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR, oldTableGenerator, newTableGenerator);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity#getTableGenerator <em>Table Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Table Generator</em>' containment reference.
- * @see #getTableGenerator()
- * @generated
- */
- public void setTableGenerator(ITableGenerator newTableGenerator) {
- if (newTableGenerator != tableGenerator) {
- NotificationChain msgs = null;
- if (tableGenerator != null)
- msgs = ((InternalEObject) tableGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR, null, msgs);
- if (newTableGenerator != null)
- msgs = ((InternalEObject) newTableGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR, null, msgs);
- msgs = basicSetTableGenerator(newTableGenerator, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR, newTableGenerator, newTableGenerator));
- }
-
- /**
- * Returns the value of the '<em><b>Default Discriminator Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Discriminator Value</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 Discriminator Value</em>' attribute.
- * @see #setDefaultDiscriminatorValue(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_DefaultDiscriminatorValue()
- * @model
- * @generated
- */
- public String getDefaultDiscriminatorValue() {
- return defaultDiscriminatorValue;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity#getDefaultDiscriminatorValue <em>Default Discriminator Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Default Discriminator Value</em>' attribute.
- * @see #getDefaultDiscriminatorValue()
- * @generated
- */
- public void setDefaultDiscriminatorValue(String newDefaultDiscriminatorValue) {
- String oldDefaultDiscriminatorValue = defaultDiscriminatorValue;
- defaultDiscriminatorValue = newDefaultDiscriminatorValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_DISCRIMINATOR_VALUE, oldDefaultDiscriminatorValue, defaultDiscriminatorValue));
- }
-
- /**
- * Returns the value of the '<em><b>Specified Discriminator Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Discriminator Value</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 Discriminator Value</em>' attribute.
- * @see #setSpecifiedDiscriminatorValue(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_SpecifiedDiscriminatorValue()
- * @model
- * @generated
- */
- public String getSpecifiedDiscriminatorValue() {
- return specifiedDiscriminatorValue;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity#getSpecifiedDiscriminatorValue <em>Specified Discriminator Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Discriminator Value</em>' attribute.
- * @see #getSpecifiedDiscriminatorValue()
- * @generated
- */
- public void setSpecifiedDiscriminatorValue(String newSpecifiedDiscriminatorValue) {
- String oldSpecifiedDiscriminatorValue = specifiedDiscriminatorValue;
- specifiedDiscriminatorValue = newSpecifiedDiscriminatorValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_DISCRIMINATOR_VALUE, oldSpecifiedDiscriminatorValue, specifiedDiscriminatorValue));
- }
-
- /**
- * Returns the value of the '<em><b>Discriminator Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Discriminator Value</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Discriminator Value</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_DiscriminatorValue()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * @generated NOT
- */
- public String getDiscriminatorValue() {
- return (this.getSpecifiedDiscriminatorValue() == null) ? getDefaultDiscriminatorValue() : this.getSpecifiedDiscriminatorValue();
- }
-
- public EList<IPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
- return this.getSpecifiedPrimaryKeyJoinColumns().isEmpty() ? this.getDefaultPrimaryKeyJoinColumns() : this.getSpecifiedPrimaryKeyJoinColumns();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Primary Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Primary Key Join Columns</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 Primary Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_SpecifiedPrimaryKeyJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn" containment="true"
- * @generated
- */
- public EList<IPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns() {
- if (specifiedPrimaryKeyJoinColumns == null) {
- specifiedPrimaryKeyJoinColumns = new EObjectContainmentEList<IPrimaryKeyJoinColumn>(IPrimaryKeyJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS);
- }
- return specifiedPrimaryKeyJoinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Default Primary Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Primary Key Join Columns</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 Primary Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_DefaultPrimaryKeyJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn" containment="true"
- * @generated
- */
- public EList<IPrimaryKeyJoinColumn> getDefaultPrimaryKeyJoinColumns() {
- if (defaultPrimaryKeyJoinColumns == null) {
- defaultPrimaryKeyJoinColumns = new EObjectContainmentEList<IPrimaryKeyJoinColumn>(IPrimaryKeyJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS);
- }
- return defaultPrimaryKeyJoinColumns;
- }
-
- public EList<IAttributeOverride> getAttributeOverrides() {
- EList<IAttributeOverride> list = new EObjectEList<IAttributeOverride>(IAttributeOverride.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__ATTRIBUTE_OVERRIDES);
- list.addAll(getSpecifiedAttributeOverrides());
- list.addAll(getDefaultAttributeOverrides());
- return list;
- }
-
- public IAttributeOverride attributeOverrideNamed(String name) {
- return (IAttributeOverride) overrideNamed(name, getAttributeOverrides());
- }
-
- public boolean containsAttributeOverride(String name) {
- return containsOverride(name, getAttributeOverrides());
- }
-
- public boolean containsDefaultAttributeOverride(String name) {
- return containsOverride(name, getDefaultAttributeOverrides());
- }
-
- public boolean containsSpecifiedAttributeOverride(String name) {
- return containsOverride(name, getSpecifiedAttributeOverrides());
- }
-
- public boolean containsAssociationOverride(String name) {
- return containsOverride(name, getAssociationOverrides());
- }
-
- public boolean containsSpecifiedAssociationOverride(String name) {
- return containsOverride(name, getSpecifiedAssociationOverrides());
- }
-
- public boolean containsDefaultAssociationOverride(String name) {
- return containsOverride(name, getDefaultAssociationOverrides());
- }
-
-
- private IOverride overrideNamed(String name, List<? extends IOverride> overrides) {
- for (IOverride override : overrides) {
- String overrideName = override.getName();
- if (overrideName == null && name == null) {
- return override;
- }
- if (overrideName != null && overrideName.equals(name)) {
- return override;
- }
- }
- return null;
- }
-
- private boolean containsOverride(String name, List<? extends IOverride> overrides) {
- return overrideNamed(name, overrides) != null;
- }
-
- /**
- * Returns the value of the '<em><b>Specified Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Attribute Overrides</em>' 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 Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_SpecifiedAttributeOverrides()
- * @model type="org.eclipse.jpt.core.internal.mappings.IAttributeOverride" containment="true"
- * @generated
- */
- public EList<IAttributeOverride> getSpecifiedAttributeOverrides() {
- if (specifiedAttributeOverrides == null) {
- specifiedAttributeOverrides = new EObjectContainmentEList<IAttributeOverride>(IAttributeOverride.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES);
- }
- return specifiedAttributeOverrides;
- }
-
- /**
- * Returns the value of the '<em><b>Default Attribute Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IAttributeOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Attribute Overrides</em>' 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 Attribute Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_DefaultAttributeOverrides()
- * @model type="org.eclipse.jpt.core.internal.mappings.IAttributeOverride" containment="true"
- * @generated
- */
- public EList<IAttributeOverride> getDefaultAttributeOverrides() {
- if (defaultAttributeOverrides == null) {
- defaultAttributeOverrides = new EObjectContainmentEList<IAttributeOverride>(IAttributeOverride.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ATTRIBUTE_OVERRIDES);
- }
- return defaultAttributeOverrides;
- }
-
- public EList<IAssociationOverride> getAssociationOverrides() {
- EList<IAssociationOverride> list = new EObjectEList<IAssociationOverride>(IAssociationOverride.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__ASSOCIATION_OVERRIDES);
- list.addAll(getSpecifiedAssociationOverrides());
- list.addAll(getDefaultAssociationOverrides());
- return list;
- }
-
- /**
- * Returns the value of the '<em><b>Specified Association Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IAssociationOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Association Overrides</em>' 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 Association Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_SpecifiedAssociationOverrides()
- * @model type="org.eclipse.jpt.core.internal.mappings.IAssociationOverride" containment="true"
- * @generated
- */
- public EList<IAssociationOverride> getSpecifiedAssociationOverrides() {
- if (specifiedAssociationOverrides == null) {
- specifiedAssociationOverrides = new EObjectContainmentEList<IAssociationOverride>(IAssociationOverride.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ASSOCIATION_OVERRIDES);
- }
- return specifiedAssociationOverrides;
- }
-
- /**
- * Returns the value of the '<em><b>Default Association Overrides</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IAssociationOverride}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Association Overrides</em>' 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 Association Overrides</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_DefaultAssociationOverrides()
- * @model type="org.eclipse.jpt.core.internal.mappings.IAssociationOverride" containment="true"
- * @generated
- */
- public EList<IAssociationOverride> getDefaultAssociationOverrides() {
- if (defaultAssociationOverrides == null) {
- defaultAssociationOverrides = new EObjectContainmentEList<IAssociationOverride>(IAssociationOverride.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ASSOCIATION_OVERRIDES);
- }
- return defaultAssociationOverrides;
- }
-
- /**
- * Returns the value of the '<em><b>Named Queries</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.INamedQuery}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Named Queries</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>Named Queries</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_NamedQueries()
- * @model type="org.eclipse.jpt.core.internal.mappings.INamedQuery" containment="true"
- * @generated
- */
- public EList<INamedQuery> getNamedQueries() {
- if (namedQueries == null) {
- namedQueries = new EObjectContainmentEList<INamedQuery>(INamedQuery.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_QUERIES);
- }
- return namedQueries;
- }
-
- /**
- * Returns the value of the '<em><b>Named Native Queries</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.INamedNativeQuery}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Named Native Queries</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>Named Native Queries</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_NamedNativeQueries()
- * @model type="org.eclipse.jpt.core.internal.mappings.INamedNativeQuery" containment="true"
- * @generated
- */
- public EList<INamedNativeQuery> getNamedNativeQueries() {
- if (namedNativeQueries == null) {
- namedNativeQueries = new EObjectContainmentEList<INamedNativeQuery>(INamedNativeQuery.class, this, JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES);
- }
- return namedNativeQueries;
- }
-
- /**
- * Returns the value of the '<em><b>Id Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id Class</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id Class</em>' attribute.
- * @see #setIdClass(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIEntity_IdClass()
- * @model
- * @generated
- */
- public String getIdClass() {
- return idClass;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity#getIdClass <em>Id Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id Class</em>' attribute.
- * @see #getIdClass()
- * @generated
- */
- public void setIdClass(String newIdClass) {
- String oldIdClass = idClass;
- idClass = newIdClass;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__ID_CLASS, oldIdClass, idClass));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated NOT
- */
- public boolean discriminatorValueIsAllowed() {
- return !getType().isAbstract();
- }
-
- public IEntity parentEntity() {
- for (Iterator<IPersistentType> i = getPersistentType().inheritanceHierarchy(); i.hasNext();) {
- ITypeMapping typeMapping = i.next().getMapping();
- if (typeMapping != this && typeMapping instanceof IEntity) {
- return (IEntity) typeMapping;
- }
- }
- return this;
- }
-
- public IEntity rootEntity() {
- IEntity rootEntity = null;
- for (Iterator<IPersistentType> i = getPersistentType().inheritanceHierarchy(); i.hasNext();) {
- IPersistentType persistentType = i.next();
- if (persistentType.getMapping() instanceof IEntity) {
- rootEntity = (IEntity) persistentType.getMapping();
- }
- }
- return rootEntity;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- 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 :
- return ((InternalEList<?>) getSpecifiedPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- return ((InternalEList<?>) getDefaultPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_COLUMN :
- return basicSetDiscriminatorColumn(null, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR :
- return basicSetSequenceGenerator(null, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR :
- return basicSetTableGenerator(null, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__ATTRIBUTE_OVERRIDES :
- return ((InternalEList<?>) getAttributeOverrides()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES :
- return ((InternalEList<?>) getSpecifiedAttributeOverrides()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ATTRIBUTE_OVERRIDES :
- return ((InternalEList<?>) getDefaultAttributeOverrides()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__ASSOCIATION_OVERRIDES :
- return ((InternalEList<?>) getAssociationOverrides()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ASSOCIATION_OVERRIDES :
- return ((InternalEList<?>) getSpecifiedAssociationOverrides()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ASSOCIATION_OVERRIDES :
- return ((InternalEList<?>) getDefaultAssociationOverrides()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_QUERIES :
- return ((InternalEList<?>) getNamedQueries()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES :
- return ((InternalEList<?>) getNamedNativeQueries()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- protected void setDefaultName(String newDefaultName) {
- String oldDefaultName = defaultName;
- defaultName = newDefaultName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_NAME, oldDefaultName, defaultName));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_NAME :
- return getSpecifiedName();
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_NAME :
- 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 :
- return getSpecifiedPrimaryKeyJoinColumns();
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- return getDefaultPrimaryKeyJoinColumns();
- case JpaJavaMappingsPackage.JAVA_ENTITY__INHERITANCE_STRATEGY :
- return getInheritanceStrategy();
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_DISCRIMINATOR_VALUE :
- return getDefaultDiscriminatorValue();
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_DISCRIMINATOR_VALUE :
- return getSpecifiedDiscriminatorValue();
- case JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_VALUE :
- return getDiscriminatorValue();
- case JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_COLUMN :
- return getDiscriminatorColumn();
- case JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR :
- return getSequenceGenerator();
- case JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR :
- return getTableGenerator();
- case JpaJavaMappingsPackage.JAVA_ENTITY__ATTRIBUTE_OVERRIDES :
- return getAttributeOverrides();
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES :
- return getSpecifiedAttributeOverrides();
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ATTRIBUTE_OVERRIDES :
- return getDefaultAttributeOverrides();
- case JpaJavaMappingsPackage.JAVA_ENTITY__ASSOCIATION_OVERRIDES :
- return getAssociationOverrides();
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ASSOCIATION_OVERRIDES :
- return getSpecifiedAssociationOverrides();
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ASSOCIATION_OVERRIDES :
- return getDefaultAssociationOverrides();
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_QUERIES :
- return getNamedQueries();
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES :
- return getNamedNativeQueries();
- case JpaJavaMappingsPackage.JAVA_ENTITY__ID_CLASS :
- return getIdClass();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- 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);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- getDefaultPrimaryKeyJoinColumns().clear();
- getDefaultPrimaryKeyJoinColumns().addAll((Collection<? extends IPrimaryKeyJoinColumn>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__INHERITANCE_STRATEGY :
- setInheritanceStrategy((InheritanceType) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_DISCRIMINATOR_VALUE :
- setDefaultDiscriminatorValue((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_DISCRIMINATOR_VALUE :
- setSpecifiedDiscriminatorValue((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR :
- setSequenceGenerator((ISequenceGenerator) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR :
- setTableGenerator((ITableGenerator) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES :
- getSpecifiedAttributeOverrides().clear();
- getSpecifiedAttributeOverrides().addAll((Collection<? extends IAttributeOverride>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ATTRIBUTE_OVERRIDES :
- getDefaultAttributeOverrides().clear();
- getDefaultAttributeOverrides().addAll((Collection<? extends IAttributeOverride>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ASSOCIATION_OVERRIDES :
- getSpecifiedAssociationOverrides().clear();
- getSpecifiedAssociationOverrides().addAll((Collection<? extends IAssociationOverride>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ASSOCIATION_OVERRIDES :
- getDefaultAssociationOverrides().clear();
- getDefaultAssociationOverrides().addAll((Collection<? extends IAssociationOverride>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_QUERIES :
- getNamedQueries().clear();
- getNamedQueries().addAll((Collection<? extends INamedQuery>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES :
- getNamedNativeQueries().clear();
- getNamedNativeQueries().addAll((Collection<? extends INamedNativeQuery>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__ID_CLASS :
- setIdClass((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- 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;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- getDefaultPrimaryKeyJoinColumns().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__INHERITANCE_STRATEGY :
- setInheritanceStrategy(INHERITANCE_STRATEGY_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_DISCRIMINATOR_VALUE :
- setDefaultDiscriminatorValue(DEFAULT_DISCRIMINATOR_VALUE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_DISCRIMINATOR_VALUE :
- setSpecifiedDiscriminatorValue(SPECIFIED_DISCRIMINATOR_VALUE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR :
- setSequenceGenerator((ISequenceGenerator) null);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR :
- setTableGenerator((ITableGenerator) null);
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES :
- getSpecifiedAttributeOverrides().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ATTRIBUTE_OVERRIDES :
- getDefaultAttributeOverrides().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ASSOCIATION_OVERRIDES :
- getSpecifiedAssociationOverrides().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ASSOCIATION_OVERRIDES :
- getDefaultAssociationOverrides().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_QUERIES :
- getNamedQueries().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES :
- getNamedNativeQueries().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_ENTITY__ID_CLASS :
- setIdClass(ID_CLASS_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_NAME :
- return SPECIFIED_NAME_EDEFAULT == null ? specifiedName != null : !SPECIFIED_NAME_EDEFAULT.equals(specifiedName);
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_NAME :
- 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 :
- return specifiedPrimaryKeyJoinColumns != null && !specifiedPrimaryKeyJoinColumns.isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- return defaultPrimaryKeyJoinColumns != null && !defaultPrimaryKeyJoinColumns.isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__INHERITANCE_STRATEGY :
- return inheritanceStrategy != INHERITANCE_STRATEGY_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_DISCRIMINATOR_VALUE :
- return DEFAULT_DISCRIMINATOR_VALUE_EDEFAULT == null ? defaultDiscriminatorValue != null : !DEFAULT_DISCRIMINATOR_VALUE_EDEFAULT.equals(defaultDiscriminatorValue);
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_DISCRIMINATOR_VALUE :
- return SPECIFIED_DISCRIMINATOR_VALUE_EDEFAULT == null ? specifiedDiscriminatorValue != null : !SPECIFIED_DISCRIMINATOR_VALUE_EDEFAULT.equals(specifiedDiscriminatorValue);
- case JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_VALUE :
- return DISCRIMINATOR_VALUE_EDEFAULT == null ? getDiscriminatorValue() != null : !DISCRIMINATOR_VALUE_EDEFAULT.equals(getDiscriminatorValue());
- case JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_COLUMN :
- return discriminatorColumn != null;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR :
- return sequenceGenerator != null;
- case JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR :
- return tableGenerator != null;
- case JpaJavaMappingsPackage.JAVA_ENTITY__ATTRIBUTE_OVERRIDES :
- return !getAttributeOverrides().isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES :
- return specifiedAttributeOverrides != null && !specifiedAttributeOverrides.isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ATTRIBUTE_OVERRIDES :
- return defaultAttributeOverrides != null && !defaultAttributeOverrides.isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__ASSOCIATION_OVERRIDES :
- return !getAssociationOverrides().isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ASSOCIATION_OVERRIDES :
- return specifiedAssociationOverrides != null && !specifiedAssociationOverrides.isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ASSOCIATION_OVERRIDES :
- return defaultAssociationOverrides != null && !defaultAssociationOverrides.isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_QUERIES :
- return namedQueries != null && !namedQueries.isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES :
- return namedNativeQueries != null && !namedNativeQueries.isEmpty();
- case JpaJavaMappingsPackage.JAVA_ENTITY__ID_CLASS :
- return ID_CLASS_EDEFAULT == null ? idClass != null : !ID_CLASS_EDEFAULT.equals(idClass);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IEntity.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_NAME :
- return JpaCoreMappingsPackage.IENTITY__SPECIFIED_NAME;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_NAME :
- 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 :
- return JpaCoreMappingsPackage.IENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.IENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_ENTITY__INHERITANCE_STRATEGY :
- return JpaCoreMappingsPackage.IENTITY__INHERITANCE_STRATEGY;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_DISCRIMINATOR_VALUE :
- return JpaCoreMappingsPackage.IENTITY__DEFAULT_DISCRIMINATOR_VALUE;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_DISCRIMINATOR_VALUE :
- return JpaCoreMappingsPackage.IENTITY__SPECIFIED_DISCRIMINATOR_VALUE;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_VALUE :
- return JpaCoreMappingsPackage.IENTITY__DISCRIMINATOR_VALUE;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_COLUMN :
- return JpaCoreMappingsPackage.IENTITY__DISCRIMINATOR_COLUMN;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR :
- return JpaCoreMappingsPackage.IENTITY__SEQUENCE_GENERATOR;
- case JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR :
- return JpaCoreMappingsPackage.IENTITY__TABLE_GENERATOR;
- case JpaJavaMappingsPackage.JAVA_ENTITY__ATTRIBUTE_OVERRIDES :
- return JpaCoreMappingsPackage.IENTITY__ATTRIBUTE_OVERRIDES;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES :
- return JpaCoreMappingsPackage.IENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ATTRIBUTE_OVERRIDES :
- return JpaCoreMappingsPackage.IENTITY__DEFAULT_ATTRIBUTE_OVERRIDES;
- case JpaJavaMappingsPackage.JAVA_ENTITY__ASSOCIATION_OVERRIDES :
- return JpaCoreMappingsPackage.IENTITY__ASSOCIATION_OVERRIDES;
- case JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ASSOCIATION_OVERRIDES :
- return JpaCoreMappingsPackage.IENTITY__SPECIFIED_ASSOCIATION_OVERRIDES;
- case JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ASSOCIATION_OVERRIDES :
- return JpaCoreMappingsPackage.IENTITY__DEFAULT_ASSOCIATION_OVERRIDES;
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_QUERIES :
- return JpaCoreMappingsPackage.IENTITY__NAMED_QUERIES;
- case JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES :
- return JpaCoreMappingsPackage.IENTITY__NAMED_NATIVE_QUERIES;
- case JpaJavaMappingsPackage.JAVA_ENTITY__ID_CLASS :
- return JpaCoreMappingsPackage.IENTITY__ID_CLASS;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IEntity.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IENTITY__SPECIFIED_NAME :
- return JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_NAME;
- case JpaCoreMappingsPackage.IENTITY__DEFAULT_NAME :
- 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 :
- return JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.IENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.IENTITY__INHERITANCE_STRATEGY :
- return JpaJavaMappingsPackage.JAVA_ENTITY__INHERITANCE_STRATEGY;
- case JpaCoreMappingsPackage.IENTITY__DEFAULT_DISCRIMINATOR_VALUE :
- return JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_DISCRIMINATOR_VALUE;
- case JpaCoreMappingsPackage.IENTITY__SPECIFIED_DISCRIMINATOR_VALUE :
- return JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_DISCRIMINATOR_VALUE;
- case JpaCoreMappingsPackage.IENTITY__DISCRIMINATOR_VALUE :
- return JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_VALUE;
- case JpaCoreMappingsPackage.IENTITY__DISCRIMINATOR_COLUMN :
- return JpaJavaMappingsPackage.JAVA_ENTITY__DISCRIMINATOR_COLUMN;
- case JpaCoreMappingsPackage.IENTITY__SEQUENCE_GENERATOR :
- return JpaJavaMappingsPackage.JAVA_ENTITY__SEQUENCE_GENERATOR;
- case JpaCoreMappingsPackage.IENTITY__TABLE_GENERATOR :
- return JpaJavaMappingsPackage.JAVA_ENTITY__TABLE_GENERATOR;
- case JpaCoreMappingsPackage.IENTITY__ATTRIBUTE_OVERRIDES :
- return JpaJavaMappingsPackage.JAVA_ENTITY__ATTRIBUTE_OVERRIDES;
- case JpaCoreMappingsPackage.IENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES :
- return JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ATTRIBUTE_OVERRIDES;
- case JpaCoreMappingsPackage.IENTITY__DEFAULT_ATTRIBUTE_OVERRIDES :
- return JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ATTRIBUTE_OVERRIDES;
- case JpaCoreMappingsPackage.IENTITY__ASSOCIATION_OVERRIDES :
- return JpaJavaMappingsPackage.JAVA_ENTITY__ASSOCIATION_OVERRIDES;
- case JpaCoreMappingsPackage.IENTITY__SPECIFIED_ASSOCIATION_OVERRIDES :
- return JpaJavaMappingsPackage.JAVA_ENTITY__SPECIFIED_ASSOCIATION_OVERRIDES;
- case JpaCoreMappingsPackage.IENTITY__DEFAULT_ASSOCIATION_OVERRIDES :
- return JpaJavaMappingsPackage.JAVA_ENTITY__DEFAULT_ASSOCIATION_OVERRIDES;
- case JpaCoreMappingsPackage.IENTITY__NAMED_QUERIES :
- return JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_QUERIES;
- case JpaCoreMappingsPackage.IENTITY__NAMED_NATIVE_QUERIES :
- return JpaJavaMappingsPackage.JAVA_ENTITY__NAMED_NATIVE_QUERIES;
- case JpaCoreMappingsPackage.IENTITY__ID_CLASS :
- return JpaJavaMappingsPackage.JAVA_ENTITY__ID_CLASS;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- 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(", inheritanceStrategy: ");
- result.append(inheritanceStrategy);
- result.append(", defaultDiscriminatorValue: ");
- result.append(defaultDiscriminatorValue);
- result.append(", specifiedDiscriminatorValue: ");
- result.append(specifiedDiscriminatorValue);
- result.append(", idClass: ");
- result.append(idClass);
- result.append(')');
- return result.toString();
- }
-
- public String getKey() {
- return IMappingKeys.ENTITY_TYPE_MAPPING_KEY;
- }
-
- @Override
- public String getTableName() {
- return getTable().getName();
- }
-
- @Override
- public Table primaryDbTable() {
- return getTable().dbTable();
- }
-
- @Override
- public Table dbTable(String tableName) {
- for (Iterator<ITable> stream = this.associatedTablesIncludingInherited(); stream.hasNext();) {
- Table dbTable = stream.next().dbTable();
- if (dbTable != null && dbTable.matchesShortJavaClassName(tableName)) {
- return dbTable;
- }
- }
- return null;
- }
-
- @Override
- public Schema dbSchema() {
- return getTable().dbSchema();
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- this.setSpecifiedName(this.getType().annotationElementValue(NAME_ADAPTER, astRoot));
- this.setDefaultName(this.getType().getName());
- this.getJavaTable().updateFromJava(astRoot);
- this.updateSecondaryTablesFromJava(astRoot);
- this.updateNamedQueriesFromJava(astRoot);
- this.updateNamedNativeQueriesFromJava(astRoot);
- this.updateSpecifiedPrimaryKeyJoinColumnsFromJava(astRoot);
- this.updateAttributeOverridesFromJava(astRoot);
- this.updateAssociationOverridesFromJava(astRoot);
- this.setInheritanceStrategy(InheritanceType.fromJavaAnnotationValue(this.inheritanceStrategyAdapter.getValue(astRoot)));
- this.getJavaDiscriminatorColumn().updateFromJava(astRoot);
- this.setSpecifiedDiscriminatorValue(this.discriminatorValueAdapter.getValue(astRoot));
- this.setDefaultDiscriminatorValue(this.javaDefaultDiscriminatorValue());
- this.updateTableGeneratorFromJava(astRoot);
- this.updateSequenceGeneratorFromJava(astRoot);
- this.updateIdClassFromJava(astRoot);
- }
-
- private void updateIdClassFromJava(CompilationUnit astRoot) {
- if (this.idClassAnnotationAdapter.getAnnotation(astRoot) == null) {
- this.setIdClass(null);
- }
- else {
- this.setIdClass(this.idClassValueAdapter.getValue(astRoot));
- }
- }
-
- private JavaTable getJavaTable() {
- return (JavaTable) this.table;
- }
-
- private JavaDiscriminatorColumn getJavaDiscriminatorColumn() {
- return (JavaDiscriminatorColumn) this.discriminatorColumn;
- }
-
- private void updateTableGeneratorFromJava(CompilationUnit astRoot) {
- if (this.tableGeneratorAnnotationAdapter.getAnnotation(astRoot) == null) {
- if (this.tableGenerator != null) {
- setTableGenerator(null);
- }
- }
- else {
- if (this.tableGenerator == null) {
- setTableGenerator(createTableGenerator());
- }
- this.getJavaTableGenerator().updateFromJava(astRoot);
- }
- }
-
- private JavaTableGenerator getJavaTableGenerator() {
- return (JavaTableGenerator) this.tableGenerator;
- }
-
- private void updateSequenceGeneratorFromJava(CompilationUnit astRoot) {
- if (this.sequenceGeneratorAnnotationAdapter.getAnnotation(astRoot) == null) {
- if (this.sequenceGenerator != null) {
- setSequenceGenerator(null);
- }
- }
- else {
- if (this.sequenceGenerator == null) {
- setSequenceGenerator(createSequenceGenerator());
- }
- this.getJavaSequenceGenerator().updateFromJava(astRoot);
- }
- }
-
- private JavaSequenceGenerator getJavaSequenceGenerator() {
- return (JavaSequenceGenerator) this.sequenceGenerator;
- }
-
- /**
- * From the Spec:
- * If the DiscriminatorValue annotation is not specified, a
- * provider-specific function to generate a value representing
- * the entity type is used for the value of the discriminator
- * column. If the DiscriminatorType is STRING, the discriminator
- * value default is the entity name.
- *
- * TODO extension point for provider-specific function?
- */
- private String javaDefaultDiscriminatorValue() {
- if (this.getType().isAbstract()) {
- return null;
- }
- if (!this.discriminatorType().isString()) {
- return null;
- }
- return this.getName();
- }
-
- private DiscriminatorType discriminatorType() {
- return this.getDiscriminatorColumn().getDiscriminatorType();
- }
-
- /**
- * here we just worry about getting the attribute override lists the same size;
- * then we delegate to the attribute overrides to synch themselves up
- */
- private void updateAttributeOverridesFromJava(CompilationUnit astRoot) {
- // synchronize the model attribute overrides with the Java source
- List<IAttributeOverride> attributeOverrides = getSpecifiedAttributeOverrides();
- int persSize = attributeOverrides.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaAttributeOverride attributeOverride = (JavaAttributeOverride) attributeOverrides.get(i);
- if (attributeOverride.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- attributeOverride.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model attribute overrides beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- attributeOverrides.remove(persSize);
- }
- }
- else {
- // add new model attribute overrides until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaAttributeOverride attributeOverride = this.createJavaAttributeOverride(javaSize);
- if (attributeOverride.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getSpecifiedAttributeOverrides().add(attributeOverride);
- attributeOverride.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- /**
- * here we just worry about getting the attribute override lists the same size;
- * then we delegate to the attribute overrides to synch themselves up
- */
- private void updateAssociationOverridesFromJava(CompilationUnit astRoot) {
- // synchronize the model attribute overrides with the Java source
- List<IAssociationOverride> associationOverrides = getSpecifiedAssociationOverrides();
- int persSize = associationOverrides.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaAssociationOverride associationOverride = (JavaAssociationOverride) associationOverrides.get(i);
- if (associationOverride.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- associationOverride.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model attribute overrides beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- associationOverrides.remove(persSize);
- }
- }
- else {
- // add new model attribute overrides until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaAssociationOverride associationOverride = this.createJavaAssociationOverride(javaSize);
- if (associationOverride.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getSpecifiedAssociationOverrides().add(associationOverride);
- associationOverride.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- /**
- * here we just worry about getting the secondary table lists the same size;
- * then we delegate to the secondary tables to synch themselves up
- */
- private void updateSecondaryTablesFromJava(CompilationUnit astRoot) {
- // synchronize the model secondary tables with the Java source
- List<ISecondaryTable> sTables = this.getSecondaryTables();
- int persSize = sTables.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaSecondaryTable secondaryTable = (JavaSecondaryTable) sTables.get(i);
- if (secondaryTable.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- secondaryTable.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model secondary tables beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- sTables.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaSecondaryTable secondaryTable = this.createJavaSecondaryTable(javaSize);
- if (secondaryTable.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getSecondaryTables().add(secondaryTable);
- secondaryTable.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- /**
- * here we just worry about getting the named query lists the same size;
- * then we delegate to the named queries to synch themselves up
- */
- private void updateNamedQueriesFromJava(CompilationUnit astRoot) {
- // synchronize the model named queries with the Java source
- List<INamedQuery> queries = this.getNamedQueries();
- int persSize = queries.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaNamedQuery namedQuery = (JavaNamedQuery) queries.get(i);
- if (namedQuery.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- namedQuery.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model named queries beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- queries.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaNamedQuery javaNamedQuery = this.createJavaNamedQuery(javaSize);
- if (javaNamedQuery.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getNamedQueries().add(javaNamedQuery);
- javaNamedQuery.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- /**
- * here we just worry about getting the named native query lists the same size;
- * then we delegate to the named native queries to synch themselves up
- */
- private void updateNamedNativeQueriesFromJava(CompilationUnit astRoot) {
- // synchronize the model named queries with the Java source
- List<INamedNativeQuery> queries = this.getNamedNativeQueries();
- int persSize = queries.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaNamedNativeQuery namedQuery = (JavaNamedNativeQuery) queries.get(i);
- if (namedQuery.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- namedQuery.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model named queries beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- queries.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaNamedNativeQuery javaNamedQuery = this.createJavaNamedNativeQuery(javaSize);
- if (javaNamedQuery.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getNamedNativeQueries().add(javaNamedQuery);
- javaNamedQuery.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- /**
- * here we just worry about getting the primary key join column lists
- * the same size; then we delegate to the join columns to synch
- * themselves up
- */
- private void updateSpecifiedPrimaryKeyJoinColumnsFromJava(CompilationUnit astRoot) {
- // synchronize the model primary key join columns with the Java source
- List<IPrimaryKeyJoinColumn> pkJoinColumns = getSpecifiedPrimaryKeyJoinColumns();
- int persSize = pkJoinColumns.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaPrimaryKeyJoinColumn pkJoinColumn = (JavaPrimaryKeyJoinColumn) pkJoinColumns.get(i);
- if (pkJoinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- pkJoinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model primary key join columns beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- pkJoinColumns.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaPrimaryKeyJoinColumn jpkjc = this.createJavaPrimaryKeyJoinColumn(javaSize);
- if (jpkjc.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getSpecifiedPrimaryKeyJoinColumns().add(jpkjc);
- jpkjc.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- public String primaryKeyColumnName() {
- String pkColumnName = null;
- for (Iterator<IPersistentAttribute> stream = getPersistentType().allAttributes(); stream.hasNext();) {
- IPersistentAttribute attribute = stream.next();
- String name = attribute.primaryKeyColumnName();
- if (pkColumnName == null) {
- pkColumnName = name;
- }
- else if (name != null) {
- // if we encounter a composite primary key, return null
- return null;
- }
- }
- // if we encounter only a single primary key column name, return it
- return pkColumnName;
- }
-
- public String primaryKeyAttributeName() {
- String pkColumnName = null;
- String pkAttributeName = null;
- for (Iterator<IPersistentAttribute> stream = getPersistentType().allAttributes(); stream.hasNext();) {
- IPersistentAttribute attribute = stream.next();
- String name = attribute.primaryKeyColumnName();
- if (pkColumnName == null) {
- pkColumnName = name;
- pkAttributeName = attribute.getName();
- }
- else if (name != null) {
- // if we encounter a composite primary key, return null
- return null;
- }
- }
- // if we encounter only a single primary key column name, return it
- return pkAttributeName;
- }
-
- @Override
- public boolean tableNameIsInvalid(String tableName) {
- return !CollectionTools.contains(this.associatedTableNamesIncludingInherited(), tableName);
- }
-
- @Override
- public Iterator<ITable> associatedTables() {
- return new CompositeIterator<ITable>(this.getTable(), this.getSecondaryTables().iterator());
- }
-
- @Override
- public Iterator<ITable> associatedTablesIncludingInherited() {
- return new CompositeIterator<ITable>(new TransformationIterator<ITypeMapping, Iterator<ITable>>(this.inheritanceHierarchy()) {
- @Override
- protected Iterator<ITable> transform(ITypeMapping mapping) {
- return new FilteringIterator<ITable>(mapping.associatedTables()) {
- @Override
- protected boolean accept(Object o) {
- return true;
- //TODO
- //filtering these out so as to avoid the duplicate table, root and children share the same table
- //return !(o instanceof SingleTableInheritanceChildTableImpl);
- }
- };
- }
- });
- }
-
- @Override
- public Iterator<String> associatedTableNamesIncludingInherited() {
- return this.nonNullTableNames(this.associatedTablesIncludingInherited());
- }
-
- private Iterator<String> nonNullTableNames(Iterator<ITable> tables) {
- return new FilteringIterator<String>(this.tableNames(tables)) {
- @Override
- protected boolean accept(Object o) {
- return o != null;
- }
- };
- }
-
- private Iterator<String> tableNames(Iterator<ITable> tables) {
- return new TransformationIterator<ITable, String>(tables) {
- @Override
- protected String transform(ITable t) {
- return t.getName();
- }
- };
- }
-
- /**
- * Return an iterator of Entities, each which inherits from the one before,
- * and terminates at the root entity (or at the point of cyclicity).
- */
- private Iterator<ITypeMapping> inheritanceHierarchy() {
- return new TransformationIterator<IPersistentType, ITypeMapping>(getPersistentType().inheritanceHierarchy()) {
- @Override
- protected ITypeMapping transform(IPersistentType type) {
- return type.getMapping();
- }
- };
- //TODO once we support inheritance, which of these should we use??
- //return this.getInheritance().typeMappingLineage();
- }
-
- public Iterator<String> allOverridableAttributeNames() {
- return new CompositeIterator<String>(new TransformationIterator<ITypeMapping, Iterator<String>>(this.inheritanceHierarchy()) {
- @Override
- protected Iterator<String> transform(ITypeMapping mapping) {
- return mapping.overridableAttributeNames();
- }
- });
- }
-
- public Iterator<String> allOverridableAssociationNames() {
- return new CompositeIterator<String>(new TransformationIterator<ITypeMapping, Iterator<String>>(this.inheritanceHierarchy()) {
- @Override
- protected Iterator<String> transform(ITypeMapping mapping) {
- return mapping.overridableAssociationNames();
- }
- });
- }
-
- public IAttributeOverride createAttributeOverride(int index) {
- return createJavaAttributeOverride(index);
- }
-
- private JavaAttributeOverride createJavaAttributeOverride(int index) {
- return JavaAttributeOverride.createAttributeOverride(new AttributeOverrideOwner(this), this.getType(), index);
- }
-
- public IAssociationOverride createAssociationOverride(int index) {
- return createJavaAssociationOverride(index);
- }
-
- private JavaAssociationOverride createJavaAssociationOverride(int index) {
- return JavaAssociationOverride.createAssociationOverride(new AssociationOverrideOwner(this), this.getType(), index);
- }
-
- public JavaSecondaryTable createSecondaryTable(int index) {
- return createJavaSecondaryTable(index);
- }
-
- private JavaSecondaryTable createJavaSecondaryTable(int index) {
- return JavaSecondaryTable.createJavaSecondaryTable(buildSecondaryTableOwner(), this.getType(), index);
- }
-
- private ITable.Owner buildSecondaryTableOwner() {
- return new ITable.Owner() {
- public ITextRange validationTextRange() {
- return JavaEntity.this.validationTextRange();
- }
-
- public ITypeMapping getTypeMapping() {
- return JavaEntity.this;
- }
- };
- }
-
- public boolean containsSpecifiedPrimaryKeyJoinColumns() {
- return !this.getSpecifiedPrimaryKeyJoinColumns().isEmpty();
- }
-
- public IPrimaryKeyJoinColumn createPrimaryKeyJoinColumn(int index) {
- return this.createJavaPrimaryKeyJoinColumn(index);
- }
-
- private JavaPrimaryKeyJoinColumn createJavaPrimaryKeyJoinColumn(int index) {
- return JavaPrimaryKeyJoinColumn.createEntityPrimaryKeyJoinColumn(buildPkJoinColumnOwner(), this.getType(), index);
- }
-
- protected IAbstractJoinColumn.Owner buildPkJoinColumnOwner() {
- return new IEntity.PrimaryKeyJoinColumnOwner(this);
- }
-
- public JavaNamedQuery createNamedQuery(int index) {
- return createJavaNamedQuery(index);
- }
-
- private JavaNamedQuery createJavaNamedQuery(int index) {
- return JavaNamedQuery.createJavaNamedQuery(this.getType(), index);
- }
-
- public JavaNamedNativeQuery createNamedNativeQuery(int index) {
- return createJavaNamedNativeQuery(index);
- }
-
- private JavaNamedNativeQuery createJavaNamedNativeQuery(int index) {
- return JavaNamedNativeQuery.createJavaNamedNativeQuery(this.getType(), index);
- }
-
- public ISequenceGenerator createSequenceGenerator() {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaSequenceGenerator(getType());
- }
-
- public ITableGenerator createTableGenerator() {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaTableGenerator(getType());
- }
-
- // ********** misc **********
- private static void attributeChanged(Object value, AnnotationAdapter annotationAdapter) {
- Annotation annotation = annotationAdapter.getAnnotation();
- if (value == null) {
- if (annotation != null) {
- annotationAdapter.removeAnnotation();
- }
- }
- else {
- if (annotation == null) {
- annotationAdapter.newMarkerAnnotation();
- }
- }
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.getJavaTable().candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (ISecondaryTable sTable : this.getSecondaryTables()) {
- result = ((JavaSecondaryTable) sTable).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- for (IPrimaryKeyJoinColumn column : this.getPrimaryKeyJoinColumns()) {
- result = ((JavaPrimaryKeyJoinColumn) column).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- for (IAttributeOverride override : this.getAttributeOverrides()) {
- result = ((JavaAttributeOverride) override).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- for (IAssociationOverride override : this.getAssociationOverrides()) {
- result = ((JavaAssociationOverride) override).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- result = this.getJavaDiscriminatorColumn().candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- JavaTableGenerator jtg = this.getJavaTableGenerator();
- if (jtg != null) {
- result = jtg.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- JavaSequenceGenerator jsg = this.getJavaSequenceGenerator();
- if (jsg != null) {
- result = jsg.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- // ********** static methods **********
- protected static DeclarationAnnotationElementAdapter<String> buildStrategyAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(INHERITANCE_ANNOTATION_ADAPTER, JPA.INHERITANCE__STRATEGY);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildDiscriminatorValueAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DISCRIMINATOR_ANNOTATION_ADAPTER, JPA.DISCRIMINATOR_VALUE__VALUE);
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildIdClassValueAdapter() {
- return new ConversionDeclarationAnnotationElementAdapter<String, TypeLiteral>(ID_CLASS_ADAPTER, JPA.ID_CLASS__VALUE, false, SimpleTypeStringExpressionConverter.instance());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntityProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntityProvider.java
deleted file mode 100644
index fe3796d8b5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaEntityProvider.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-
-/**
- *
- */
-public class JavaEntityProvider
- implements IJavaTypeMappingProvider
-{
-
- // singleton
- private static final JavaEntityProvider INSTANCE = new JavaEntityProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaTypeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaEntityProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.ENTITY_TYPE_MAPPING_KEY;
- }
-
- public IJavaTypeMapping buildMapping(Type type) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaEntity(type);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaEntity.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaGeneratedValue.java
deleted file mode 100644
index 17cd499080..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaGeneratedValue.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.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.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.GenerationType;
-import org.eclipse.jpt.core.internal.mappings.IGeneratedValue;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Generated Value</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaGeneratedValue()
- * @model kind="class"
- * @generated
- */
-public class JavaGeneratedValue extends JavaEObject implements IGeneratedValue
-{
- private Member member;
-
- private final AnnotationElementAdapter<String> strategyAdapter;
-
- private final AnnotationElementAdapter<String> generatorAdapter;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.GENERATED_VALUE);
-
- private static final DeclarationAnnotationElementAdapter<String> STRATEGY_ADAPTER = buildStrategyAdapter();
-
- private static final DeclarationAnnotationElementAdapter<String> GENERATOR_ADAPTER = buildGeneratorAdapter();
-
- /**
- * The default value of the '{@link #getStrategy() <em>Strategy</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getStrategy()
- * @generated
- * @ordered
- */
- protected static final GenerationType STRATEGY_EDEFAULT = GenerationType.DEFAULT;
-
- /**
- * The cached value of the '{@link #getStrategy() <em>Strategy</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getStrategy()
- * @generated
- * @ordered
- */
- protected GenerationType strategy = STRATEGY_EDEFAULT;
-
- /**
- * The default value of the '{@link #getGenerator() <em>Generator</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGenerator()
- * @generated
- * @ordered
- */
- protected static final String GENERATOR_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getGenerator() <em>Generator</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGenerator()
- * @generated
- * @ordered
- */
- protected String generator = GENERATOR_EDEFAULT;
-
- protected JavaGeneratedValue() {
- throw new UnsupportedOperationException("Use JavaGeneratedValue(Member) instead");
- }
-
- protected JavaGeneratedValue(Member member) {
- super();
- this.member = member;
- this.strategyAdapter = new ShortCircuitAnnotationElementAdapter<String>(this.member, STRATEGY_ADAPTER);
- this.generatorAdapter = new ShortCircuitAnnotationElementAdapter<String>(this.member, GENERATOR_ADAPTER);
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IGeneratedValue.class)) {
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__GENERATOR :
- this.generatorAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__STRATEGY :
- this.strategyAdapter.setValue(((GenerationType) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_GENERATED_VALUE;
- }
-
- /**
- * Returns the value of the '<em><b>Strategy</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.GenerationType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Strategy</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Strategy</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.GenerationType
- * @see #setStrategy(GenerationType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIGeneratedValue_Strategy()
- * @model
- * @generated
- */
- public GenerationType getStrategy() {
- return strategy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue#getStrategy <em>Strategy</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Strategy</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.GenerationType
- * @see #getStrategy()
- * @generated
- */
- public void setStrategy(GenerationType newStrategy) {
- GenerationType oldStrategy = strategy;
- strategy = newStrategy == null ? STRATEGY_EDEFAULT : newStrategy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__STRATEGY, oldStrategy, strategy));
- }
-
- /**
- * Returns the value of the '<em><b>Generator</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Generator</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Generator</em>' attribute.
- * @see #setGenerator(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIGeneratedValue_Generator()
- * @model
- * @generated
- */
- public String getGenerator() {
- return generator;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue#getGenerator <em>Generator</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Generator</em>' attribute.
- * @see #getGenerator()
- * @generated
- */
- public void setGenerator(String newGenerator) {
- String oldGenerator = generator;
- generator = newGenerator;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__GENERATOR, oldGenerator, generator));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__STRATEGY :
- return getStrategy();
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__GENERATOR :
- return getGenerator();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__STRATEGY :
- setStrategy((GenerationType) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__GENERATOR :
- setGenerator((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__STRATEGY :
- setStrategy(STRATEGY_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__GENERATOR :
- setGenerator(GENERATOR_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__STRATEGY :
- return strategy != STRATEGY_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__GENERATOR :
- return GENERATOR_EDEFAULT == null ? generator != null : !GENERATOR_EDEFAULT.equals(generator);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IGeneratedValue.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__STRATEGY :
- return JpaCoreMappingsPackage.IGENERATED_VALUE__STRATEGY;
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__GENERATOR :
- return JpaCoreMappingsPackage.IGENERATED_VALUE__GENERATOR;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IGeneratedValue.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IGENERATED_VALUE__STRATEGY :
- return JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__STRATEGY;
- case JpaCoreMappingsPackage.IGENERATED_VALUE__GENERATOR :
- return JpaJavaMappingsPackage.JAVA_GENERATED_VALUE__GENERATOR;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (strategy: ");
- result.append(strategy);
- result.append(", generator: ");
- result.append(generator);
- result.append(')');
- return result.toString();
- }
-
- public ITextRange validationTextRange() {
- return this.member.annotationTextRange(DECLARATION_ANNOTATION_ADAPTER);
- }
-
- public ITextRange generatorTextRange() {
- return elementTextRange(this.member.annotationElementTextRange(GENERATOR_ADAPTER));
- }
-
- // ********** java annotations -> persistence model **********
- public void updateFromJava(CompilationUnit astRoot) {
- setStrategy(GenerationType.fromJavaAnnotationValue(this.strategyAdapter.getValue(astRoot)));
- setGenerator(this.generatorAdapter.getValue(astRoot));
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildStrategyAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.GENERATED_VALUE__STRATEGY, false);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildGeneratorAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.GENERATED_VALUE__GENERATOR, false);
- }
-} // JavaGeneratedValue
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaGenerator.java
deleted file mode 100644
index 8066e5356c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaGenerator.java
+++ /dev/null
@@ -1,570 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.NumberLiteral;
-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.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.NumberStringExpressionConverter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.mappings.IGenerator;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Generator</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaGenerator()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class JavaGenerator extends JavaEObject implements IGenerator
-{
- private final Member member;
-
- private final AnnotationElementAdapter<String> nameAdapter;
-
- private final IntAnnotationElementAdapter initialValueAdapter;
-
- private final IntAnnotationElementAdapter allocationSizeAdapter;
-
- /**
- * 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 cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getInitialValue() <em>Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInitialValue()
- * @generated
- * @ordered
- */
- protected static final int INITIAL_VALUE_EDEFAULT = 0;
-
- /**
- * The default value of the '{@link #getSpecifiedInitialValue() <em>Specified Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedInitialValue()
- * @generated
- * @ordered
- */
- protected static final int SPECIFIED_INITIAL_VALUE_EDEFAULT = -1;
-
- /**
- * The cached value of the '{@link #getSpecifiedInitialValue() <em>Specified Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedInitialValue()
- * @generated
- * @ordered
- */
- protected int specifiedInitialValue = SPECIFIED_INITIAL_VALUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultInitialValue() <em>Default Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultInitialValue()
- * @generated
- * @ordered
- */
- protected static final int DEFAULT_INITIAL_VALUE_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getDefaultInitialValue() <em>Default Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultInitialValue()
- * @generated
- * @ordered
- */
- protected int defaultInitialValue = DEFAULT_INITIAL_VALUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getAllocationSize() <em>Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAllocationSize()
- * @generated
- * @ordered
- */
- protected static final int ALLOCATION_SIZE_EDEFAULT = 0;
-
- /**
- * The default value of the '{@link #getSpecifiedAllocationSize() <em>Specified Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedAllocationSize()
- * @generated
- * @ordered
- */
- protected static final int SPECIFIED_ALLOCATION_SIZE_EDEFAULT = -1;
-
- /**
- * The cached value of the '{@link #getSpecifiedAllocationSize() <em>Specified Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedAllocationSize()
- * @generated
- * @ordered
- */
- protected int specifiedAllocationSize = SPECIFIED_ALLOCATION_SIZE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultAllocationSize() <em>Default Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultAllocationSize()
- * @generated
- * @ordered
- */
- protected static final int DEFAULT_ALLOCATION_SIZE_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getDefaultAllocationSize() <em>Default Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultAllocationSize()
- * @generated
- * @ordered
- */
- protected int defaultAllocationSize = DEFAULT_ALLOCATION_SIZE_EDEFAULT;
-
- protected JavaGenerator() {
- throw new UnsupportedOperationException("Use JavaGenerator(Member) instead");
- }
-
- protected JavaGenerator(Member member) {
- super();
- this.member = member;
- this.nameAdapter = this.buildAdapter(this.nameAdapter());
- this.initialValueAdapter = this.buildIntAdapter(this.initialValueAdapter());
- this.allocationSizeAdapter = this.buildIntAdapter(this.allocationSizeAdapter());
- }
-
- protected Member getMember() {
- return this.member;
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IGenerator.class)) {
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE :
- this.allocationSizeAdapter.setValue(notification.getNewIntValue());
- break;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE :
- this.initialValueAdapter.setValue(notification.getNewIntValue());
- break;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__NAME :
- this.nameAdapter.setValue((String) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- // ********** initialization **********
- protected AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new ShortCircuitAnnotationElementAdapter<String>(this.member, daea);
- }
-
- protected IntAnnotationElementAdapter buildIntAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new IntAnnotationElementAdapter(this.buildAdapter(daea));
- }
-
- protected abstract DeclarationAnnotationAdapter annotationAdapter();
-
- protected abstract DeclarationAnnotationElementAdapter<String> nameAdapter();
-
- protected abstract DeclarationAnnotationElementAdapter<String> initialValueAdapter();
-
- protected abstract DeclarationAnnotationElementAdapter<String> allocationSizeAdapter();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_GENERATOR;
- }
-
- /**
- * 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 #setName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIGenerator_Name()
- * @model
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_GENERATOR__NAME, oldName, name));
- }
-
- public int getInitialValue() {
- return (this.getSpecifiedInitialValue() == -1) ? this.getDefaultInitialValue() : this.getSpecifiedInitialValue();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Initial Value</b></em>' attribute.
- * The default value is <code>"-1"</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Initial Value</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 Initial Value</em>' attribute.
- * @see #setSpecifiedInitialValue(int)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIGenerator_SpecifiedInitialValue()
- * @model default="-1"
- * @generated
- */
- public int getSpecifiedInitialValue() {
- return specifiedInitialValue;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator#getSpecifiedInitialValue <em>Specified Initial Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Initial Value</em>' attribute.
- * @see #getSpecifiedInitialValue()
- * @generated
- */
- public void setSpecifiedInitialValue(int newSpecifiedInitialValue) {
- int oldSpecifiedInitialValue = specifiedInitialValue;
- specifiedInitialValue = newSpecifiedInitialValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE, oldSpecifiedInitialValue, specifiedInitialValue));
- }
-
- /**
- * Returns the value of the '<em><b>Default Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Initial Value</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 Initial Value</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIGenerator_DefaultInitialValue()
- * @model changeable="false"
- * @generated
- */
- public int getDefaultInitialValue() {
- return defaultInitialValue;
- }
-
- public int getAllocationSize() {
- return (this.getSpecifiedAllocationSize() == -1) ? this.getDefaultAllocationSize() : this.getSpecifiedAllocationSize();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Allocation Size</b></em>' attribute.
- * The default value is <code>"-1"</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Allocation Size</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 Allocation Size</em>' attribute.
- * @see #setSpecifiedAllocationSize(int)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIGenerator_SpecifiedAllocationSize()
- * @model default="-1"
- * @generated
- */
- public int getSpecifiedAllocationSize() {
- return specifiedAllocationSize;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator#getSpecifiedAllocationSize <em>Specified Allocation Size</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Allocation Size</em>' attribute.
- * @see #getSpecifiedAllocationSize()
- * @generated
- */
- public void setSpecifiedAllocationSize(int newSpecifiedAllocationSize) {
- int oldSpecifiedAllocationSize = specifiedAllocationSize;
- specifiedAllocationSize = newSpecifiedAllocationSize;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE, oldSpecifiedAllocationSize, specifiedAllocationSize));
- }
-
- /**
- * Returns the value of the '<em><b>Default Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Allocation Size</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 Allocation Size</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIGenerator_DefaultAllocationSize()
- * @model changeable="false"
- * @generated
- */
- public int getDefaultAllocationSize() {
- return defaultAllocationSize;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_GENERATOR__NAME :
- return getName();
- case JpaJavaMappingsPackage.JAVA_GENERATOR__INITIAL_VALUE :
- return new Integer(getInitialValue());
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE :
- return new Integer(getSpecifiedInitialValue());
- case JpaJavaMappingsPackage.JAVA_GENERATOR__DEFAULT_INITIAL_VALUE :
- return new Integer(getDefaultInitialValue());
- case JpaJavaMappingsPackage.JAVA_GENERATOR__ALLOCATION_SIZE :
- return new Integer(getAllocationSize());
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE :
- return new Integer(getSpecifiedAllocationSize());
- case JpaJavaMappingsPackage.JAVA_GENERATOR__DEFAULT_ALLOCATION_SIZE :
- return new Integer(getDefaultAllocationSize());
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_GENERATOR__NAME :
- setName((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE :
- setSpecifiedInitialValue(((Integer) newValue).intValue());
- return;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE :
- setSpecifiedAllocationSize(((Integer) newValue).intValue());
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_GENERATOR__NAME :
- setName(NAME_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE :
- setSpecifiedInitialValue(SPECIFIED_INITIAL_VALUE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE :
- setSpecifiedAllocationSize(SPECIFIED_ALLOCATION_SIZE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_GENERATOR__NAME :
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case JpaJavaMappingsPackage.JAVA_GENERATOR__INITIAL_VALUE :
- return getInitialValue() != INITIAL_VALUE_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE :
- return specifiedInitialValue != SPECIFIED_INITIAL_VALUE_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__DEFAULT_INITIAL_VALUE :
- return defaultInitialValue != DEFAULT_INITIAL_VALUE_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__ALLOCATION_SIZE :
- return getAllocationSize() != ALLOCATION_SIZE_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE :
- return specifiedAllocationSize != SPECIFIED_ALLOCATION_SIZE_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__DEFAULT_ALLOCATION_SIZE :
- return defaultAllocationSize != DEFAULT_ALLOCATION_SIZE_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IGenerator.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_GENERATOR__NAME :
- return JpaCoreMappingsPackage.IGENERATOR__NAME;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__INITIAL_VALUE :
- return JpaCoreMappingsPackage.IGENERATOR__INITIAL_VALUE;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE :
- return JpaCoreMappingsPackage.IGENERATOR__SPECIFIED_INITIAL_VALUE;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__DEFAULT_INITIAL_VALUE :
- return JpaCoreMappingsPackage.IGENERATOR__DEFAULT_INITIAL_VALUE;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__ALLOCATION_SIZE :
- return JpaCoreMappingsPackage.IGENERATOR__ALLOCATION_SIZE;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE :
- return JpaCoreMappingsPackage.IGENERATOR__SPECIFIED_ALLOCATION_SIZE;
- case JpaJavaMappingsPackage.JAVA_GENERATOR__DEFAULT_ALLOCATION_SIZE :
- return JpaCoreMappingsPackage.IGENERATOR__DEFAULT_ALLOCATION_SIZE;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IGenerator.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IGENERATOR__NAME :
- return JpaJavaMappingsPackage.JAVA_GENERATOR__NAME;
- case JpaCoreMappingsPackage.IGENERATOR__INITIAL_VALUE :
- return JpaJavaMappingsPackage.JAVA_GENERATOR__INITIAL_VALUE;
- case JpaCoreMappingsPackage.IGENERATOR__SPECIFIED_INITIAL_VALUE :
- return JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE;
- case JpaCoreMappingsPackage.IGENERATOR__DEFAULT_INITIAL_VALUE :
- return JpaJavaMappingsPackage.JAVA_GENERATOR__DEFAULT_INITIAL_VALUE;
- case JpaCoreMappingsPackage.IGENERATOR__ALLOCATION_SIZE :
- return JpaJavaMappingsPackage.JAVA_GENERATOR__ALLOCATION_SIZE;
- case JpaCoreMappingsPackage.IGENERATOR__SPECIFIED_ALLOCATION_SIZE :
- return JpaJavaMappingsPackage.JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE;
- case JpaCoreMappingsPackage.IGENERATOR__DEFAULT_ALLOCATION_SIZE :
- return JpaJavaMappingsPackage.JAVA_GENERATOR__DEFAULT_ALLOCATION_SIZE;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", specifiedInitialValue: ");
- result.append(specifiedInitialValue);
- result.append(", defaultInitialValue: ");
- result.append(defaultInitialValue);
- result.append(", specifiedAllocationSize: ");
- result.append(specifiedAllocationSize);
- result.append(", defaultAllocationSize: ");
- result.append(defaultAllocationSize);
- result.append(')');
- return result.toString();
- }
-
- public ITextRange validationTextRange() {
- return this.member.annotationTextRange(this.annotationAdapter());
- }
-
- // ********** java annotations -> persistence model **********
- public void updateFromJava(CompilationUnit astRoot) {
- setName(this.nameAdapter.getValue(astRoot));
- setSpecifiedInitialValue(this.initialValueAdapter.getValue(astRoot));
- setSpecifiedAllocationSize(this.allocationSizeAdapter.getValue(astRoot));
- }
-
- // ********** static methods **********
- protected static DeclarationAnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(annotationAdapter, elementName);
- }
-
- protected static DeclarationAnnotationElementAdapter<String> buildNumberAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new ConversionDeclarationAnnotationElementAdapter<String, NumberLiteral>(annotationAdapter, elementName, NumberStringExpressionConverter.instance());
- }
-} // JavaGenerator
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaId.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaId.java
deleted file mode 100644
index f0b7e4ed76..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaId.java
+++ /dev/null
@@ -1,767 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-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.IMappingKeys;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IColumn;
-import org.eclipse.jpt.core.internal.mappings.IColumnMapping;
-import org.eclipse.jpt.core.internal.mappings.IGeneratedValue;
-import org.eclipse.jpt.core.internal.mappings.IId;
-import org.eclipse.jpt.core.internal.mappings.ISequenceGenerator;
-import org.eclipse.jpt.core.internal.mappings.ITableGenerator;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.mappings.TemporalType;
-import org.eclipse.jpt.utility.internal.Filter;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Id</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaId()
- * @model kind="class"
- * @generated
- */
-public class JavaId extends JavaAttributeMapping implements IId
-{
- private AnnotationAdapter generatedValueAnnotationAdapter;
-
- private AnnotationAdapter tableGeneratorAnnotationAdapter;
-
- private AnnotationAdapter sequenceGeneratorAnnotationAdapter;
-
- private final AnnotationAdapter temporalAnnotationAdapter;
-
- private final AnnotationElementAdapter<String> temporalValueAdapter;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ID);
-
- private static final DeclarationAnnotationAdapter TEMPORAL_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.TEMPORAL);
-
- private static final DeclarationAnnotationElementAdapter<String> TEMPORAL_VALUE_ADAPTER = buildTemporalValueAdapter();
-
- /**
- * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected IColumn column;
-
- /**
- * The cached value of the '{@link #getGeneratedValue() <em>Generated Value</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGeneratedValue()
- * @generated
- * @ordered
- */
- protected IGeneratedValue generatedValue;
-
- /**
- * The default value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTemporal()
- * @generated
- * @ordered
- */
- protected static final TemporalType TEMPORAL_EDEFAULT = TemporalType.NULL;
-
- /**
- * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTemporal()
- * @generated
- * @ordered
- */
- protected TemporalType temporal = TEMPORAL_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getTableGenerator() <em>Table Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTableGenerator()
- * @generated
- * @ordered
- */
- protected ITableGenerator tableGenerator;
-
- /**
- * The cached value of the '{@link #getSequenceGenerator() <em>Sequence Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSequenceGenerator()
- * @generated
- * @ordered
- */
- protected ISequenceGenerator sequenceGenerator;
-
- protected JavaId() {
- throw new UnsupportedOperationException("Use JavaId(Attribute) instead");
- }
-
- protected JavaId(Attribute attribute) {
- super(attribute);
- this.column = JavaColumn.createColumnMappingColumn(buildColumnOwner(), getAttribute());
- ((InternalEObject) this.column).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ID__COLUMN, null, null);
- this.temporalAnnotationAdapter = new MemberAnnotationAdapter(this.getAttribute(), TEMPORAL_ADAPTER);
- this.temporalValueAdapter = new ShortCircuitAnnotationElementAdapter<String>(attribute, TEMPORAL_VALUE_ADAPTER);
- this.generatedValueAnnotationAdapter = this.buildAnnotationAdapter(JavaGeneratedValue.DECLARATION_ANNOTATION_ADAPTER);
- this.tableGeneratorAnnotationAdapter = this.buildAnnotationAdapter(JavaTableGenerator.DECLARATION_ANNOTATION_ADAPTER);
- this.sequenceGeneratorAnnotationAdapter = this.buildAnnotationAdapter(JavaSequenceGenerator.DECLARATION_ANNOTATION_ADAPTER);
- }
-
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IId.class)) {
- case JpaCoreMappingsPackage.IID__TABLE_GENERATOR :
- attributeChanged(notification.getNewValue(), this.tableGeneratorAnnotationAdapter);
- break;
- case JpaCoreMappingsPackage.IID__SEQUENCE_GENERATOR :
- attributeChanged(notification.getNewValue(), this.sequenceGeneratorAnnotationAdapter);
- break;
- case JpaCoreMappingsPackage.IID__GENERATED_VALUE :
- attributeChanged(notification.getNewValue(), this.generatedValueAnnotationAdapter);
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_ID;
- }
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIId_Column()
- * @model containment="true" required="true" changeable="false"
- * @generated
- */
- public IColumn getColumn() {
- return column;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetColumn(IColumn newColumn, NotificationChain msgs) {
- IColumn oldColumn = column;
- column = newColumn;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ID__COLUMN, oldColumn, newColumn);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Returns the value of the '<em><b>Generated Value</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Generated Value</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Generated Value</em>' containment reference.
- * @see #setGeneratedValue(IGeneratedValue)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIId_GeneratedValue()
- * @model containment="true"
- * @generated
- */
- public IGeneratedValue getGeneratedValue() {
- return generatedValue;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetGeneratedValue(IGeneratedValue newGeneratedValue, NotificationChain msgs) {
- IGeneratedValue oldGeneratedValue = generatedValue;
- generatedValue = newGeneratedValue;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE, oldGeneratedValue, newGeneratedValue);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaId#getGeneratedValue <em>Generated Value</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Generated Value</em>' containment reference.
- * @see #getGeneratedValue()
- * @generated
- */
- public void setGeneratedValue(IGeneratedValue newGeneratedValue) {
- if (newGeneratedValue != generatedValue) {
- NotificationChain msgs = null;
- if (generatedValue != null)
- msgs = ((InternalEObject) generatedValue).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE, null, msgs);
- if (newGeneratedValue != null)
- msgs = ((InternalEObject) newGeneratedValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE, null, msgs);
- msgs = basicSetGeneratedValue(newGeneratedValue, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE, newGeneratedValue, newGeneratedValue));
- }
-
- private static void attributeChanged(Object value, AnnotationAdapter annotationAdapter) {
- Annotation annotation = annotationAdapter.getAnnotation();
- if (value == null) {
- if (annotation != null) {
- annotationAdapter.removeAnnotation();
- }
- }
- else {
- if (annotation == null) {
- annotationAdapter.newMarkerAnnotation();
- }
- }
- }
-
- /**
- * Returns the value of the '<em><b>Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.TemporalType
- * @see #setTemporal(TemporalType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIId_Temporal()
- * @model
- * @generated
- */
- public TemporalType getTemporal() {
- return temporal;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaId#getTemporal <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.TemporalType
- * @see #getTemporal()
- * @generated
- */
- public void setTemporalGen(TemporalType newTemporal) {
- TemporalType oldTemporal = temporal;
- temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ID__TEMPORAL, oldTemporal, temporal));
- }
-
- public void setTemporal(TemporalType newTemporal) {
- if (newTemporal != TemporalType.NULL) {
- if (this.temporalAnnotationAdapter.getAnnotation() == null) {
- this.temporalAnnotationAdapter.newMarkerAnnotation();
- }
- this.temporalValueAdapter.setValue(newTemporal.convertToJavaAnnotationValue());
- }
- else if (this.temporalAnnotationAdapter.getAnnotation() != null) {
- this.temporalAnnotationAdapter.removeAnnotation();
- }
- setTemporalGen(newTemporal);
- }
-
- /**
- * Returns the value of the '<em><b>Table Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Table Generator</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Table Generator</em>' containment reference.
- * @see #setTableGenerator(ITableGenerator)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIId_TableGenerator()
- * @model containment="true"
- * @generated
- */
- public ITableGenerator getTableGenerator() {
- return tableGenerator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetTableGenerator(ITableGenerator newTableGenerator, NotificationChain msgs) {
- ITableGenerator oldTableGenerator = tableGenerator;
- tableGenerator = newTableGenerator;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR, oldTableGenerator, newTableGenerator);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaId#getTableGenerator <em>Table Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Table Generator</em>' containment reference.
- * @see #getTableGenerator()
- * @generated
- */
- public void setTableGenerator(ITableGenerator newTableGenerator) {
- if (newTableGenerator != tableGenerator) {
- NotificationChain msgs = null;
- if (tableGenerator != null)
- msgs = ((InternalEObject) tableGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR, null, msgs);
- if (newTableGenerator != null)
- msgs = ((InternalEObject) newTableGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR, null, msgs);
- msgs = basicSetTableGenerator(newTableGenerator, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR, newTableGenerator, newTableGenerator));
- }
-
- /**
- * Returns the value of the '<em><b>Sequence Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sequence Generator</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sequence Generator</em>' containment reference.
- * @see #setSequenceGenerator(ISequenceGenerator)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIId_SequenceGenerator()
- * @model containment="true"
- * @generated
- */
- public ISequenceGenerator getSequenceGenerator() {
- return sequenceGenerator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetSequenceGenerator(ISequenceGenerator newSequenceGenerator, NotificationChain msgs) {
- ISequenceGenerator oldSequenceGenerator = sequenceGenerator;
- sequenceGenerator = newSequenceGenerator;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR, oldSequenceGenerator, newSequenceGenerator);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaId#getSequenceGenerator <em>Sequence Generator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Sequence Generator</em>' containment reference.
- * @see #getSequenceGenerator()
- * @generated
- */
- public void setSequenceGenerator(ISequenceGenerator newSequenceGenerator) {
- if (newSequenceGenerator != sequenceGenerator) {
- NotificationChain msgs = null;
- if (sequenceGenerator != null)
- msgs = ((InternalEObject) sequenceGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR, null, msgs);
- if (newSequenceGenerator != null)
- msgs = ((InternalEObject) newSequenceGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR, null, msgs);
- msgs = basicSetSequenceGenerator(newSequenceGenerator, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR, newSequenceGenerator, newSequenceGenerator));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ID__COLUMN :
- return basicSetColumn(null, msgs);
- case JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE :
- return basicSetGeneratedValue(null, msgs);
- case JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR :
- return basicSetTableGenerator(null, msgs);
- case JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR :
- return basicSetSequenceGenerator(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ID__COLUMN :
- return getColumn();
- case JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE :
- return getGeneratedValue();
- case JpaJavaMappingsPackage.JAVA_ID__TEMPORAL :
- return getTemporal();
- case JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR :
- return getTableGenerator();
- case JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR :
- return getSequenceGenerator();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE :
- setGeneratedValue((IGeneratedValue) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ID__TEMPORAL :
- setTemporal((TemporalType) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR :
- setTableGenerator((ITableGenerator) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR :
- setSequenceGenerator((ISequenceGenerator) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE :
- setGeneratedValue((IGeneratedValue) null);
- return;
- case JpaJavaMappingsPackage.JAVA_ID__TEMPORAL :
- setTemporal(TEMPORAL_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR :
- setTableGenerator((ITableGenerator) null);
- return;
- case JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR :
- setSequenceGenerator((ISequenceGenerator) null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ID__COLUMN :
- return column != null;
- case JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE :
- return generatedValue != null;
- case JpaJavaMappingsPackage.JAVA_ID__TEMPORAL :
- return temporal != TEMPORAL_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR :
- return tableGenerator != null;
- case JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR :
- return sequenceGenerator != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IColumnMapping.class) {
- switch (derivedFeatureID) {
- default :
- return -1;
- }
- }
- if (baseClass == IId.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_ID__COLUMN :
- return JpaCoreMappingsPackage.IID__COLUMN;
- case JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE :
- return JpaCoreMappingsPackage.IID__GENERATED_VALUE;
- case JpaJavaMappingsPackage.JAVA_ID__TEMPORAL :
- return JpaCoreMappingsPackage.IID__TEMPORAL;
- case JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR :
- return JpaCoreMappingsPackage.IID__TABLE_GENERATOR;
- case JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR :
- return JpaCoreMappingsPackage.IID__SEQUENCE_GENERATOR;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IColumnMapping.class) {
- switch (baseFeatureID) {
- default :
- return -1;
- }
- }
- if (baseClass == IId.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IID__COLUMN :
- return JpaJavaMappingsPackage.JAVA_ID__COLUMN;
- case JpaCoreMappingsPackage.IID__GENERATED_VALUE :
- return JpaJavaMappingsPackage.JAVA_ID__GENERATED_VALUE;
- case JpaCoreMappingsPackage.IID__TEMPORAL :
- return JpaJavaMappingsPackage.JAVA_ID__TEMPORAL;
- case JpaCoreMappingsPackage.IID__TABLE_GENERATOR :
- return JpaJavaMappingsPackage.JAVA_ID__TABLE_GENERATOR;
- case JpaCoreMappingsPackage.IID__SEQUENCE_GENERATOR :
- return JpaJavaMappingsPackage.JAVA_ID__SEQUENCE_GENERATOR;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (temporal: ");
- result.append(temporal);
- result.append(')');
- return result.toString();
- }
-
- public String getKey() {
- return IMappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.updateTemporalFromJava(astRoot);
- this.getJavaColumn().updateFromJava(astRoot);
- this.updateGeneratedValueFromJava(astRoot);
- this.updateTableGeneratorFromJava(astRoot);
- this.updateSequenceGeneratorFromJava(astRoot);
- }
-
- private void updateGeneratedValueFromJava(CompilationUnit astRoot) {
- if (this.generatedValueAnnotationAdapter.getAnnotation(astRoot) == null) {
- if (getGeneratedValue() != null) {
- setGeneratedValue(null);
- }
- }
- else {
- if (getGeneratedValue() == null) {
- setGeneratedValue(createGeneratedValue());
- }
- ((JavaGeneratedValue) getGeneratedValue()).updateFromJava(astRoot);
- }
- }
-
- private void updateTableGeneratorFromJava(CompilationUnit astRoot) {
- if (this.tableGeneratorAnnotationAdapter.getAnnotation(astRoot) == null) {
- if (getTableGenerator() != null) {
- setTableGenerator(null);
- }
- }
- else {
- if (getTableGenerator() == null) {
- setTableGenerator(createTableGenerator());
- }
- ((JavaTableGenerator) getTableGenerator()).updateFromJava(astRoot);
- }
- }
-
- private void updateSequenceGeneratorFromJava(CompilationUnit astRoot) {
- if (this.sequenceGeneratorAnnotationAdapter.getAnnotation(astRoot) == null) {
- if (getSequenceGenerator() != null) {
- setSequenceGenerator(null);
- }
- }
- else {
- if (getSequenceGenerator() == null) {
- setSequenceGenerator(createSequenceGenerator());
- }
- ((JavaSequenceGenerator) getSequenceGenerator()).updateFromJava(astRoot);
- }
- }
-
- /*
- * The @Temporal annotation is a bit different than most JPA annotations.
- * For some indecipherable reason it has no default value (e.g. TIMESTAMP).
- * Also, it is *required* for any attribute declared with a type of
- * java.util.Date or java.util.Calendar; otherwise, it is *prohibited*.
- * As a result we allow a Basic mapping to have a null 'temporal',
- * indicating that the annotation is completely missing, as opposed
- * to the annotation being present but its value is invalid (e.g.
- * @Temporal(FRIDAY)).
- *
- * TODO this comment is wrong now, revisit this with Brian at some point
- */
- private void updateTemporalFromJava(CompilationUnit astRoot) {
- if (this.temporalAnnotationAdapter.getAnnotation(astRoot) == null) {
- setTemporalGen(TemporalType.NULL);
- }
- else {
- setTemporalGen(TemporalType.fromJavaAnnotationValue(this.temporalValueAdapter.getValue(astRoot)));
- }
- }
-
- private JavaColumn getJavaColumn() {
- return (JavaColumn) this.column;
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.getJavaColumn().candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- @Override
- public String primaryKeyColumnName() {
- return this.getColumn().getName();
- }
-
- public IGeneratedValue createGeneratedValue() {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaGeneratedValue(getAttribute());
- }
-
- public ISequenceGenerator createSequenceGenerator() {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaSequenceGenerator(getAttribute());
- }
-
- public ITableGenerator createTableGenerator() {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaTableGenerator(getAttribute());
- }
-
- @Override
- public boolean isOverridableAttributeMapping() {
- return true;
- }
-
- @Override
- public boolean isIdMapping() {
- return true;
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildTemporalValueAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(TEMPORAL_ADAPTER, JPA.TEMPORAL__VALUE, false);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaIdProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaIdProvider.java
deleted file mode 100644
index 7b77578c86..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaIdProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- */
-public class JavaIdProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaIdProvider INSTANCE = new JavaIdProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaIdProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return false;
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaId(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaId.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaJoinColumn.java
deleted file mode 100644
index 76b27dce41..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaJoinColumn.java
+++ /dev/null
@@ -1,517 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-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.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IAbstractJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.platform.BaseJpaPlatform;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-import org.eclipse.jpt.db.internal.Column;
-import org.eclipse.jpt.db.internal.Table;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.StringTools;
-import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Join Column</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaJoinColumn()
- * @model kind="class"
- * @generated
- */
-public class JavaJoinColumn extends AbstractJavaColumn implements IJoinColumn
-{
- /**
- * The default value of the '{@link #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getReferencedColumnName()
- * @generated
- * @ordered
- */
- protected static final String REFERENCED_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedReferencedColumnName() <em>Specified Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedReferencedColumnName()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedReferencedColumnName() <em>Specified Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedReferencedColumnName()
- * @generated
- * @ordered
- */
- protected String specifiedReferencedColumnName = SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultReferencedColumnName() <em>Default Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultReferencedColumnName()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_REFERENCED_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultReferencedColumnName() <em>Default Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultReferencedColumnName()
- * @generated
- * @ordered
- */
- protected String defaultReferencedColumnName = DEFAULT_REFERENCED_COLUMN_NAME_EDEFAULT;
-
- private final IndexedAnnotationAdapter annotationAdapter;
-
- // hold this so we can get the 'referenced column name' text range
- private final DeclarationAnnotationElementAdapter<String> referencedColumnNameDeclarationAdapter;
-
- private final AnnotationElementAdapter<String> referencedColumnNameAdapter;
-
- public static final SimpleDeclarationAnnotationAdapter SINGLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.JOIN_COLUMN);
-
- public static final SimpleDeclarationAnnotationAdapter MULTIPLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.JOIN_COLUMNS);
-
- protected JavaJoinColumn() {
- super();
- throw new UnsupportedOperationException("Use JavaJoinColumn(Owner, Member, IndexedDeclarationAnnotationAdapter) instead");
- }
-
- protected JavaJoinColumn(IJoinColumn.Owner owner, Member member, IndexedDeclarationAnnotationAdapter daa) {
- super(owner, member, daa);
- this.annotationAdapter = new MemberIndexedAnnotationAdapter(member, daa);
- this.referencedColumnNameDeclarationAdapter = this.buildStringElementAdapter(JPA.JOIN_COLUMN__REFERENCED_COLUMN_NAME);
- this.referencedColumnNameAdapter = this.buildShortCircuitElementAdapter(this.referencedColumnNameDeclarationAdapter);
- }
-
- @Override
- protected String nameElementName() {
- return JPA.JOIN_COLUMN__NAME;
- }
-
- @Override
- protected String columnDefinitionElementName() {
- return JPA.JOIN_COLUMN__COLUMN_DEFINITION;
- }
-
- @Override
- protected String tableElementName() {
- return JPA.JOIN_COLUMN__TABLE;
- }
-
- @Override
- protected String uniqueElementName() {
- return JPA.JOIN_COLUMN__UNIQUE;
- }
-
- @Override
- protected String nullableElementName() {
- return JPA.JOIN_COLUMN__NULLABLE;
- }
-
- @Override
- protected String insertableElementName() {
- return JPA.JOIN_COLUMN__INSERTABLE;
- }
-
- @Override
- protected String updatableElementName() {
- return JPA.JOIN_COLUMN__UPDATABLE;
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IAbstractJoinColumn.class)) {
- case JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- this.referencedColumnNameAdapter.setValue((String) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_JOIN_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Referenced Column 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>Referenced Column Name</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIJoinColumn_ReferencedColumnName()
- * @model changeable="false" volatile="true" derived="true"
- * @generated NOT
- */
- public String getReferencedColumnName() {
- return (this.specifiedReferencedColumnName == null) ? this.defaultReferencedColumnName : this.specifiedReferencedColumnName;
- }
-
- /**
- * Returns the value of the '<em><b>Specified Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Referenced Column 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 Referenced Column Name</em>' attribute.
- * @see #setSpecifiedReferencedColumnName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAbstractJoinColumn_SpecifiedReferencedColumnName()
- * @model
- * @generated
- */
- public String getSpecifiedReferencedColumnName() {
- return specifiedReferencedColumnName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn#getSpecifiedReferencedColumnName <em>Specified Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Referenced Column Name</em>' attribute.
- * @see #getSpecifiedReferencedColumnName()
- * @generated
- */
- public void setSpecifiedReferencedColumnName(String newSpecifiedReferencedColumnName) {
- String oldSpecifiedReferencedColumnName = specifiedReferencedColumnName;
- specifiedReferencedColumnName = newSpecifiedReferencedColumnName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME, oldSpecifiedReferencedColumnName, specifiedReferencedColumnName));
- }
-
- /**
- * Returns the value of the '<em><b>Default Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Referenced Column 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 Referenced Column Name</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAbstractJoinColumn_DefaultReferencedColumnName()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultReferencedColumnName() {
- return defaultReferencedColumnName;
- }
-
- protected void setDefaultReferencedColumnName(String newDefaultReferencedColumnName) {
- String oldDefaultReferencedColumnName = this.defaultReferencedColumnName;
- this.defaultReferencedColumnName = newDefaultReferencedColumnName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME, oldDefaultReferencedColumnName, newDefaultReferencedColumnName));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__REFERENCED_COLUMN_NAME :
- return getReferencedColumnName();
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- return getSpecifiedReferencedColumnName();
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME :
- return getDefaultReferencedColumnName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- setSpecifiedReferencedColumnName((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- setSpecifiedReferencedColumnName(SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__REFERENCED_COLUMN_NAME :
- return REFERENCED_COLUMN_NAME_EDEFAULT == null ? getReferencedColumnName() != null : !REFERENCED_COLUMN_NAME_EDEFAULT.equals(getReferencedColumnName());
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- return SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT == null ? specifiedReferencedColumnName != null : !SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT.equals(specifiedReferencedColumnName);
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME :
- return DEFAULT_REFERENCED_COLUMN_NAME_EDEFAULT == null ? defaultReferencedColumnName != null : !DEFAULT_REFERENCED_COLUMN_NAME_EDEFAULT.equals(defaultReferencedColumnName);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IAbstractJoinColumn.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__REFERENCED_COLUMN_NAME :
- return JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- return JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME;
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME :
- return JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME;
- default :
- return -1;
- }
- }
- if (baseClass == IJoinColumn.class) {
- switch (derivedFeatureID) {
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IAbstractJoinColumn.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__REFERENCED_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- case JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME;
- case JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME;
- default :
- return -1;
- }
- }
- if (baseClass == IJoinColumn.class) {
- switch (baseFeatureID) {
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (specifiedReferencedColumnName: ");
- result.append(specifiedReferencedColumnName);
- result.append(", defaultReferencedColumnName: ");
- result.append(defaultReferencedColumnName);
- result.append(')');
- return result.toString();
- }
-
- @Override
- public IJoinColumn.Owner getOwner() {
- return (IJoinColumn.Owner) super.getOwner();
- }
-
- public Table dbReferencedColumnTable() {
- return getOwner().dbReferencedColumnTable();
- }
-
- public Column dbReferencedColumn() {
- Table table = this.dbReferencedColumnTable();
- return (table == null) ? null : table.columnNamed(this.getReferencedColumnName());
- }
-
- @Override
- public boolean tableIsAllowed() {
- return this.getOwner().tableIsAllowed();
- }
-
- public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.referencedColumnNameDeclarationAdapter, pos, astRoot);
- }
-
- private Iterator<String> candidateReferencedColumnNames() {
- Table table = this.getOwner().dbReferencedColumnTable();
- return (table != null) ? table.columnNames() : EmptyIterator.<String> instance();
- }
-
- private Iterator<String> candidateReferencedColumnNames(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateReferencedColumnNames(), filter);
- }
-
- private Iterator<String> quotedCandidateReferencedColumnNames(Filter<String> filter) {
- return StringTools.quote(this.candidateReferencedColumnNames(filter));
- }
-
- @Override
- public Iterator<String> connectedCandidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.connectedCandidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.referencedColumnNameTouches(pos, astRoot)) {
- return this.quotedCandidateReferencedColumnNames(filter);
- }
- return null;
- }
-
- public boolean isReferencedColumnResolved() {
- return dbReferencedColumn() != null;
- }
-
- public ITextRange referencedColumnNameTextRange() {
- return elementTextRange(this.referencedColumnNameDeclarationAdapter);
- }
-
- /**
- * allow owners to verify the annotation
- */
- public Annotation annotation(CompilationUnit astRoot) {
- return this.annotationAdapter.getAnnotation(astRoot);
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.setSpecifiedReferencedColumnName(this.referencedColumnNameAdapter.getValue(astRoot));
- }
-
- public void refreshDefaults(DefaultsContext defaultsContext) {
- this.setDefaultReferencedColumnName((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_JOIN_COLUMN_REFERENCED_COLUMN_NAME_KEY));
- this.setDefaultName((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_JOIN_COLUMN_NAME_KEY));
- this.setDefaultTable((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_JOIN_COLUMN_TABLE_KEY));
- }
-
- // ********** persistence model -> java annotations **********
- void moveAnnotation(int newIndex) {
- this.annotationAdapter.moveAnnotation(newIndex);
- }
-
- void newAnnotation() {
- this.annotationAdapter.newMarkerAnnotation();
- }
-
- void removeAnnotation() {
- this.annotationAdapter.removeAnnotation();
- }
-
- // ********** static methods **********
- static JavaJoinColumn createSingleRelationshipMappingJoinColumn(IJoinColumn.Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaJoinColumn(owner, member, buildSingleRelationshipMappingAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildSingleRelationshipMappingAnnotationAdapter(int index) {
- return new CombinationIndexedDeclarationAnnotationAdapter(SINGLE_DECLARATION_ANNOTATION_ADAPTER, MULTIPLE_DECLARATION_ANNOTATION_ADAPTER, index, JPA.JOIN_COLUMN);
- }
-
- static JavaJoinColumn createAssociationOverrideJoinColumn(DeclarationAnnotationAdapter associationOverrideAdapter, IJoinColumn.Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaJoinColumn(owner, member, buildAssociationOverrideAnnotationAdapter(associationOverrideAdapter, index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildAssociationOverrideAnnotationAdapter(DeclarationAnnotationAdapter associationOverrideAdapter, int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(associationOverrideAdapter, JPA.ASSOCIATION_OVERRIDE__JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
- }
-
- static JavaJoinColumn createJoinTableJoinColumn(IJoinColumn.Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaJoinColumn(owner, member, buildJoinTableAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildJoinTableAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(JavaJoinTable.DECLARATION_ANNOTATION_ADAPTER, JPA.JOIN_TABLE__JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
- }
-
- static JavaJoinColumn createJoinTableInverseJoinColumn(IJoinColumn.Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaJoinColumn(owner, member, buildJoinTableInverseAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildJoinTableInverseAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(JavaJoinTable.DECLARATION_ANNOTATION_ADAPTER, JPA.JOIN_TABLE__INVERSE_JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaJoinTable.java
deleted file mode 100644
index 60bbfddf6c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaJoinTable.java
+++ /dev/null
@@ -1,822 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IJoinTable;
-import org.eclipse.jpt.core.internal.mappings.IRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.platform.BaseJpaPlatform;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-import org.eclipse.jpt.utility.internal.Filter;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Join Table</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaJoinTable()
- * @model kind="class"
- * @generated
- */
-public class JavaJoinTable extends AbstractJavaTable implements IJoinTable
-{
- /**
- * The cached value of the '{@link #getSpecifiedJoinColumns() <em>Specified Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IJoinColumn> specifiedJoinColumns;
-
- /**
- * The cached value of the '{@link #getDefaultJoinColumns() <em>Default Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IJoinColumn> defaultJoinColumns;
-
- /**
- * The cached value of the '{@link #getSpecifiedInverseJoinColumns() <em>Specified Inverse Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedInverseJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IJoinColumn> specifiedInverseJoinColumns;
-
- /**
- * The cached value of the '{@link #getDefaultInverseJoinColumns() <em>Default Inverse Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultInverseJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IJoinColumn> defaultInverseJoinColumns;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.JOIN_TABLE);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.JOIN_TABLE__NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.JOIN_TABLE__SCHEMA);
-
- private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.JOIN_TABLE__CATALOG);
-
- protected JavaJoinTable() {
- super();
- throw new UnsupportedOperationException("Use JavaJoinTable(Owner, Member) instead");
- }
-
- protected JavaJoinTable(Owner owner, Member member) {
- super(owner, member, DECLARATION_ANNOTATION_ADAPTER);
- this.getDefaultJoinColumns().add(this.createJoinColumn(new JoinColumnOwner(this), member));
- this.getDefaultInverseJoinColumns().add(this.createJoinColumn(new InverseJoinColumnOwner(this), member));
- }
-
- // ********** AbstractJavaTable implementation **********
- @Override
- protected DeclarationAnnotationElementAdapter<String> nameAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
- // ignore the daa passed in, @JoinTable is never nested
- return NAME_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> schemaAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
- // ignore the daa passed in, @JoinTable is never nested
- return SCHEMA_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> catalogAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
- // ignore the daa passed in, @JoinTable is never nested
- return CATALOG_ADAPTER;
- }
-
- private IJoinColumn createJoinColumn(IJoinColumn.Owner joinColumnOwner, Member joinColumnMember) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaJoinColumn(joinColumnOwner, joinColumnMember);
- }
-
- /**
- * check for changes to the 'specifiedJoinColumns' and
- * 'specifiedInverseJoinColumns' lists so we can notify the
- * model adapter of any changes;
- * also listen for changes to the 'defaultJoinColumns' and
- * 'defaultInverseJoinColumns' lists so we can spank the developer
- */
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IJoinTable.class)) {
- case JpaCoreMappingsPackage.IJOIN_TABLE__SPECIFIED_JOIN_COLUMNS :
- specifiedJoinColumnsChanged(notification);
- break;
- case JpaCoreMappingsPackage.IJOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS :
- specifiedInverseJoinColumnsChanged(notification);
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void specifiedJoinColumnsChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- specifiedJoinColumnAdded(notification.getPosition(), (IJoinColumn) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- specifiedJoinColumnsAdded(notification.getPosition(), (List<IJoinColumn>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- specifiedJoinColumnRemoved(notification.getPosition(), (IJoinColumn) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- specifiedJoinColumnsCleared((List<IJoinColumn>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- specifiedJoinColumnsRemoved((int[]) notification.getNewValue(), (List<IJoinColumn>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- specifiedJoinColumnSet(notification.getPosition(), (IJoinColumn) notification.getOldValue(), (IJoinColumn) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- specifiedJoinColumnMoved(notification.getOldIntValue(), notification.getPosition(), (IJoinColumn) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void specifiedInverseJoinColumnsChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- specifiedInverseJoinColumnAdded(notification.getPosition(), (IJoinColumn) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- specifiedInverseJoinColumnsAdded(notification.getPosition(), (List<IJoinColumn>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- specifiedInverseJoinColumnRemoved(notification.getPosition(), (IJoinColumn) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- specifiedInverseJoinColumnsCleared((List<IJoinColumn>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- specifiedInverseJoinColumnsRemoved((int[]) notification.getNewValue(), (List<IJoinColumn>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- specifiedInverseJoinColumnSet(notification.getPosition(), (IJoinColumn) notification.getOldValue(), (IJoinColumn) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- specifiedInverseJoinColumnMoved(notification.getOldIntValue(), notification.getPosition(), (IJoinColumn) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_JOIN_TABLE;
- }
-
- public EList<IJoinColumn> getJoinColumns() {
- return this.getSpecifiedJoinColumns().isEmpty() ? this.getDefaultJoinColumns() : this.getSpecifiedJoinColumns();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Join Columns</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 Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIJoinTable_SpecifiedJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IJoinColumn" containment="true"
- * @generated
- */
- public EList<IJoinColumn> getSpecifiedJoinColumns() {
- if (specifiedJoinColumns == null) {
- specifiedJoinColumns = new EObjectContainmentEList<IJoinColumn>(IJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_JOIN_COLUMNS);
- }
- return specifiedJoinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Default Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Join Columns</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 Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIJoinTable_DefaultJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IJoinColumn" containment="true"
- * @generated
- */
- public EList<IJoinColumn> getDefaultJoinColumns() {
- if (defaultJoinColumns == null) {
- defaultJoinColumns = new EObjectContainmentEList<IJoinColumn>(IJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_JOIN_COLUMNS);
- }
- return defaultJoinColumns;
- }
-
- public EList<IJoinColumn> getInverseJoinColumns() {
- return this.getSpecifiedInverseJoinColumns().isEmpty() ? this.getDefaultInverseJoinColumns() : this.getSpecifiedInverseJoinColumns();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Inverse Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Inverse Join Columns</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 Inverse Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIJoinTable_SpecifiedInverseJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IJoinColumn" containment="true"
- * @generated
- */
- public EList<IJoinColumn> getSpecifiedInverseJoinColumns() {
- if (specifiedInverseJoinColumns == null) {
- specifiedInverseJoinColumns = new EObjectContainmentEList<IJoinColumn>(IJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS);
- }
- return specifiedInverseJoinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Default Inverse Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Inverse Join Columns</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 Inverse Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIJoinTable_DefaultInverseJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IJoinColumn" containment="true"
- * @generated
- */
- public EList<IJoinColumn> getDefaultInverseJoinColumns() {
- if (defaultInverseJoinColumns == null) {
- defaultInverseJoinColumns = new EObjectContainmentEList<IJoinColumn>(IJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS);
- }
- return defaultInverseJoinColumns;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__JOIN_COLUMNS :
- return ((InternalEList<?>) getJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_JOIN_COLUMNS :
- return ((InternalEList<?>) getSpecifiedJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_JOIN_COLUMNS :
- return ((InternalEList<?>) getDefaultJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__INVERSE_JOIN_COLUMNS :
- return ((InternalEList<?>) getInverseJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS :
- return ((InternalEList<?>) getSpecifiedInverseJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS :
- return ((InternalEList<?>) getDefaultInverseJoinColumns()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__JOIN_COLUMNS :
- return getJoinColumns();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_JOIN_COLUMNS :
- return getSpecifiedJoinColumns();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_JOIN_COLUMNS :
- return getDefaultJoinColumns();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__INVERSE_JOIN_COLUMNS :
- return getInverseJoinColumns();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS :
- return getSpecifiedInverseJoinColumns();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS :
- return getDefaultInverseJoinColumns();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_JOIN_COLUMNS :
- getSpecifiedJoinColumns().clear();
- getSpecifiedJoinColumns().addAll((Collection<? extends IJoinColumn>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_JOIN_COLUMNS :
- getDefaultJoinColumns().clear();
- getDefaultJoinColumns().addAll((Collection<? extends IJoinColumn>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS :
- getSpecifiedInverseJoinColumns().clear();
- getSpecifiedInverseJoinColumns().addAll((Collection<? extends IJoinColumn>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS :
- getDefaultInverseJoinColumns().clear();
- getDefaultInverseJoinColumns().addAll((Collection<? extends IJoinColumn>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_JOIN_COLUMNS :
- getSpecifiedJoinColumns().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_JOIN_COLUMNS :
- getDefaultJoinColumns().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS :
- getSpecifiedInverseJoinColumns().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS :
- getDefaultInverseJoinColumns().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__JOIN_COLUMNS :
- return !getJoinColumns().isEmpty();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_JOIN_COLUMNS :
- return specifiedJoinColumns != null && !specifiedJoinColumns.isEmpty();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_JOIN_COLUMNS :
- return defaultJoinColumns != null && !defaultJoinColumns.isEmpty();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__INVERSE_JOIN_COLUMNS :
- return !getInverseJoinColumns().isEmpty();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS :
- return specifiedInverseJoinColumns != null && !specifiedInverseJoinColumns.isEmpty();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS :
- return defaultInverseJoinColumns != null && !defaultInverseJoinColumns.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IJoinTable.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__JOIN_COLUMNS :
- return JpaCoreMappingsPackage.IJOIN_TABLE__JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.IJOIN_TABLE__SPECIFIED_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.IJOIN_TABLE__DEFAULT_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__INVERSE_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.IJOIN_TABLE__INVERSE_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.IJOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.IJOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IJoinTable.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IJOIN_TABLE__JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_JOIN_TABLE__JOIN_COLUMNS;
- case JpaCoreMappingsPackage.IJOIN_TABLE__SPECIFIED_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.IJOIN_TABLE__DEFAULT_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.IJOIN_TABLE__INVERSE_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_JOIN_TABLE__INVERSE_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.IJOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_JOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.IJOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_JOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- public IRelationshipMapping relationshipMapping() {
- return (IRelationshipMapping) this.eContainer();
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.updateSpecifiedJoinColumnsFromJava(astRoot);
- this.updateSpecifiedInverseJoinColumnsFromJava(astRoot);
- }
-
- @Override
- public void refreshDefaults(DefaultsContext defaultsContext) {
- super.refreshDefaults(defaultsContext);
- this.setDefaultName((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_JOIN_TABLE_NAME_KEY));
- }
-
- public boolean isSpecified() {
- return getMember().containsAnnotation(DECLARATION_ANNOTATION_ADAPTER);
- }
-
- /**
- * here we just worry about getting the join column lists the same size;
- * then we delegate to the join columns to synch themselves up
- */
- private void updateSpecifiedJoinColumnsFromJava(CompilationUnit astRoot) {
- // synchronize the model join columns with the Java source
- List<IJoinColumn> joinColumns = this.getSpecifiedJoinColumns();
- int persSize = joinColumns.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaJoinColumn joinColumn = (JavaJoinColumn) joinColumns.get(i);
- if (joinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- joinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model join columns beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- joinColumns.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaJoinColumn joinColumn = this.createJavaJoinColumn(javaSize);
- if (joinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- this.getSpecifiedJoinColumns().add(joinColumn);
- joinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- /**
- * here we just worry about getting the inverse join column lists the same size;
- * then we delegate to the join columns to synch themselves up
- */
- private void updateSpecifiedInverseJoinColumnsFromJava(CompilationUnit astRoot) {
- // synchronize the model join columns with the Java source
- List<IJoinColumn> inverseJoinColumns = this.getSpecifiedInverseJoinColumns();
- int persSize = inverseJoinColumns.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaJoinColumn inverseJoinColumn = (JavaJoinColumn) inverseJoinColumns.get(i);
- if (inverseJoinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- inverseJoinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model join columns beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- inverseJoinColumns.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaJoinColumn inverseJoinColumn = this.createJavaInverseJoinColumn(javaSize);
- if (inverseJoinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- this.getSpecifiedInverseJoinColumns().add(inverseJoinColumn);
- inverseJoinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- // ********** jpa model -> java annotations **********
- ////////////////////////////////////////////////////////
- /**
- * slide over all the annotations that follow the new join column
- */
- public void specifiedJoinColumnAdded(int index, IJoinColumn joinColumn) {
- // JoinColumn was added to jpa model when updating from java, do not need
- // to edit the java in this case. TODO is there a better way to handle this??
- if (((JavaJoinColumn) joinColumn).annotation(getMember().astRoot()) == null) {
- this.synchJoinColumnAnnotationsAfterAdd(index + 1);
- ((JavaJoinColumn) joinColumn).newAnnotation();
- }
- }
-
- // bjv look at this
- public void specifiedJoinColumnsAdded(int index, List<IJoinColumn> joinColumns) {
- // JoinColumn was added to jpa model when updating from java, do not need
- // to edit the java in this case. TODO is there a better way to handle this??
- if (!joinColumns.isEmpty() && ((JavaJoinColumn) joinColumns.get(0)).annotation(getMember().astRoot()) == null) {
- this.synchJoinColumnAnnotationsAfterAdd(index + joinColumns.size());
- for (IJoinColumn joinColumn : joinColumns) {
- ((JavaJoinColumn) joinColumn).newAnnotation();
- }
- }
- }
-
- public void specifiedJoinColumnRemoved(int index, IJoinColumn joinColumn) {
- ((JavaJoinColumn) joinColumn).removeAnnotation();
- this.synchJoinColumnAnnotationsAfterRemove(index);
- }
-
- public void specifiedJoinColumnsRemoved(int[] indexes, List<IJoinColumn> joinColumns) {
- for (IJoinColumn joinColumn : joinColumns) {
- ((JavaJoinColumn) joinColumn).removeAnnotation();
- }
- this.synchJoinColumnAnnotationsAfterRemove(indexes[0]);
- }
-
- public void specifiedJoinColumnsCleared(List<IJoinColumn> joinColumns) {
- for (IJoinColumn joinColumn : joinColumns) {
- ((JavaJoinColumn) joinColumn).removeAnnotation();
- }
- }
-
- public void specifiedJoinColumnSet(int index, IJoinColumn oldJoinColumn, IJoinColumn newJoinColumn) {
- ((JavaJoinColumn) newJoinColumn).newAnnotation();
- }
-
- public void specifiedJoinColumnMoved(int sourceIndex, int targetIndex, IJoinColumn joinColumn) {
- List<IJoinColumn> joinColumns = this.getSpecifiedJoinColumns();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchJoinColumnAnnotationsAfterAdd(int index) {
- List<IJoinColumn> joinColumns = this.getSpecifiedJoinColumns();
- for (int i = joinColumns.size(); i-- > index;) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchJoinColumnAnnotationsAfterRemove(int index) {
- List<IJoinColumn> joinColumns = this.getSpecifiedJoinColumns();
- for (int i = index; i < joinColumns.size(); i++) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- ////////////////////////////////////////////////////////
- /**
- * slide over all the annotations that follow the new inverse join column
- */
- public void specifiedInverseJoinColumnAdded(int index, IJoinColumn inverseJoinColumn) {
- if (((JavaJoinColumn) inverseJoinColumn).annotation(getMember().astRoot()) == null) {
- this.synchInverseJoinColumnAnnotationsAfterAdd(index + 1);
- ((JavaJoinColumn) inverseJoinColumn).newAnnotation();
- }
- }
-
- public void specifiedInverseJoinColumnsAdded(int index, List<IJoinColumn> inverseJoinColumns) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!inverseJoinColumns.isEmpty() && ((JavaJoinColumn) inverseJoinColumns.get(0)).annotation(getMember().astRoot()) == null) {
- this.synchInverseJoinColumnAnnotationsAfterAdd(index + inverseJoinColumns.size());
- for (IJoinColumn inverseJoinColumn : inverseJoinColumns) {
- ((JavaJoinColumn) inverseJoinColumn).newAnnotation();
- }
- }
- }
-
- public void specifiedInverseJoinColumnRemoved(int index, IJoinColumn inverseJoinColumn) {
- ((JavaJoinColumn) inverseJoinColumn).removeAnnotation();
- this.synchInverseJoinColumnAnnotationsAfterRemove(index);
- }
-
- public void specifiedInverseJoinColumnsRemoved(int[] indexes, List<IJoinColumn> inverseJoinColumns) {
- for (IJoinColumn inverseJoinColumn : inverseJoinColumns) {
- ((JavaJoinColumn) inverseJoinColumn).removeAnnotation();
- }
- this.synchInverseJoinColumnAnnotationsAfterRemove(indexes[0]);
- }
-
- public void specifiedInverseJoinColumnsCleared(List<IJoinColumn> inverseJoinColumns) {
- for (IJoinColumn inverseJoinColumn : inverseJoinColumns) {
- ((JavaJoinColumn) inverseJoinColumn).removeAnnotation();
- }
- }
-
- public void specifiedInverseJoinColumnSet(int index, IJoinColumn oldInverseJoinColumn, IJoinColumn newInverseJoinColumn) {
- ((JavaJoinColumn) newInverseJoinColumn).newAnnotation();
- }
-
- public void specifiedInverseJoinColumnMoved(int sourceIndex, int targetIndex, IJoinColumn inverseJoinColumn) {
- List<IJoinColumn> inverseJoinColumns = this.getSpecifiedInverseJoinColumns();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch(inverseJoinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model inverse join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchInverseJoinColumnAnnotationsAfterAdd(int index) {
- List<IJoinColumn> inverseJoinColumns = this.getSpecifiedInverseJoinColumns();
- for (int i = inverseJoinColumns.size(); i-- > index;) {
- this.synch(inverseJoinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model inverse join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchInverseJoinColumnAnnotationsAfterRemove(int index) {
- List<IJoinColumn> inverseJoinColumns = this.getSpecifiedInverseJoinColumns();
- for (int i = index; i < inverseJoinColumns.size(); i++) {
- this.synch(inverseJoinColumns.get(i), i);
- }
- }
-
- private void synch(IJoinColumn joinColumn, int index) {
- ((JavaJoinColumn) joinColumn).moveAnnotation(index);
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (IJoinColumn column : this.getJoinColumns()) {
- result = ((JavaJoinColumn) column).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- for (IJoinColumn column : this.getInverseJoinColumns()) {
- result = ((JavaJoinColumn) column).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- @Override
- protected JavaUniqueConstraint createJavaUniqueConstraint(int index) {
- return JavaUniqueConstraint.createJoinTableUniqueConstraint(new UniqueConstraintOwner(this), this.getMember(), index);
- }
-
- // ********** IJoinTable implementation **********
- public IJoinColumn createJoinColumn(int index) {
- return this.createJavaJoinColumn(index);
- }
-
- private JavaJoinColumn createJavaJoinColumn(int index) {
- return JavaJoinColumn.createJoinTableJoinColumn(new JoinColumnOwner(this), this.getMember(), index);
- }
-
- public IJoinColumn createInverseJoinColumn(int index) {
- return this.createJavaInverseJoinColumn(index);
- }
-
- private JavaJoinColumn createJavaInverseJoinColumn(int index) {
- return JavaJoinColumn.createJoinTableInverseJoinColumn(new InverseJoinColumnOwner(this), this.getMember(), index);
- }
-
- public boolean containsSpecifiedJoinColumns() {
- return !this.getSpecifiedJoinColumns().isEmpty();
- }
-
- public boolean containsSpecifiedInverseJoinColumns() {
- return !this.getSpecifiedInverseJoinColumns().isEmpty();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToMany.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToMany.java
deleted file mode 100644
index 28f5a1e604..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToMany.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.core.internal.IAttributeMapping;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IManyToMany;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Many To Many</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaManyToMany()
- * @model kind="class"
- * @generated
- */
-public class JavaManyToMany extends JavaMultiRelationshipMapping
- implements IManyToMany
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.MANY_TO_MANY);
-
- private static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__TARGET_ENTITY);
-
- private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__CASCADE);
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildEnumAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__FETCH);
-
- private static final DeclarationAnnotationElementAdapter<String> MAPPED_BY_ADAPTER = buildAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__MAPPED_BY);
-
- protected JavaManyToMany() {
- throw new UnsupportedOperationException("Use JavaManyToMany(Attribute) instead");
- }
-
- protected JavaManyToMany(Attribute attribute) {
- super(attribute);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_MANY_TO_MANY;
- }
-
- public String getKey() {
- return IMappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- // ********** JavaRelationshipMappingModelAdapter implementation **********
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> targetEntityAdapter() {
- return TARGET_ENTITY_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String[]> cascadeAdapter() {
- return CASCADE_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> fetchAdapter() {
- return FETCH_ADAPTER;
- }
-
- // ********** JavaMultiRelationshipMappingModelAdapter implementation **********
- @Override
- protected DeclarationAnnotationElementAdapter<String> mappedByAdapter() {
- return MAPPED_BY_ADAPTER;
- }
-
- // ********** INonOwningMapping implementation **********
- public boolean mappedByIsValid(IAttributeMapping mappedByMapping) {
- String mappedByKey = mappedByMapping.getKey();
- return (mappedByKey == IMappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY);
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToManyProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToManyProvider.java
deleted file mode 100644
index 783f54e186..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToManyProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- */
-public class JavaManyToManyProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaManyToManyProvider INSTANCE = new JavaManyToManyProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaManyToManyProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return false;
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaManyToMany(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaManyToMany.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToOne.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToOne.java
deleted file mode 100644
index e54bf3f6fc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToOne.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IManyToOne;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Many To One</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaManyToOne()
- * @model kind="class"
- * @generated
- */
-public class JavaManyToOne extends JavaSingleRelationshipMapping
- implements IManyToOne
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.MANY_TO_ONE);
-
- private static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__TARGET_ENTITY);
-
- private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__CASCADE);
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildEnumAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__FETCH);
-
- private static final DeclarationAnnotationElementAdapter<String> OPTIONAL_ADAPTER = buildOptionalAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__OPTIONAL);
-
- protected JavaManyToOne() {
- throw new UnsupportedOperationException("Use JavaManyToOne(Attribute) instead");
- }
-
- protected JavaManyToOne(Attribute attribute) {
- super(attribute);
- }
-
- // ********** initialization **********
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> targetEntityAdapter() {
- return TARGET_ENTITY_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String[]> cascadeAdapter() {
- return CASCADE_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> fetchAdapter() {
- return FETCH_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> optionalAdapter() {
- return OPTIONAL_ADAPTER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_MANY_TO_ONE;
- }
-
- public String getKey() {
- return IMappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- public boolean isOverridableAssociationMapping() {
- return true;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToOneProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToOneProvider.java
deleted file mode 100644
index 52e0ab4aa9..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaManyToOneProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- */
-public class JavaManyToOneProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaManyToOneProvider INSTANCE = new JavaManyToOneProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaManyToOneProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return false;
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaManyToOne(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaManyToOne.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMappedSuperclass.java
deleted file mode 100644
index ec505b2f52..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMappedSuperclass.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.TypeLiteral;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.IPersistentAttribute;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleTypeStringExpressionConverter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-import org.eclipse.jpt.core.internal.mappings.IMappedSuperclass;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Mapped Superclass</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaMappedSuperclass()
- * @model kind="class"
- * @generated
- */
-public class JavaMappedSuperclass extends JavaTypeMapping
- implements IMappedSuperclass
-{
- /**
- * The default value of the '{@link #getIdClass() <em>Id Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIdClass()
- * @generated
- * @ordered
- */
- protected static final String ID_CLASS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getIdClass() <em>Id Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIdClass()
- * @generated
- * @ordered
- */
- protected String idClass = ID_CLASS_EDEFAULT;
-
- private final AnnotationAdapter idClassAnnotationAdapter;
-
- private final AnnotationElementAdapter<String> idClassValueAdapter;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.MAPPED_SUPERCLASS);
-
- public static final DeclarationAnnotationAdapter ID_CLASS_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ID_CLASS);
-
- private static final DeclarationAnnotationElementAdapter<String> ID_CLASS_VALUE_ADAPTER = buildIdClassValueAdapter();
-
- protected JavaMappedSuperclass() {
- throw new UnsupportedOperationException("Use JavaMappedSuperclass(Type) instead");
- }
-
- protected JavaMappedSuperclass(Type type) {
- super(type);
- this.idClassAnnotationAdapter = new MemberAnnotationAdapter(this.getType(), ID_CLASS_ADAPTER);
- this.idClassValueAdapter = new ShortCircuitAnnotationElementAdapter<String>(this.getType(), ID_CLASS_VALUE_ADAPTER);
- }
-
- @Override
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- /**
- * check for changes to the 'specifiedJoinColumns' and
- * 'specifiedInverseJoinColumns' lists so we can notify the
- * model adapter of any changes;
- * also listen for changes to the 'defaultJoinColumns' and
- * 'defaultInverseJoinColumns' lists so we can spank the developer
- */
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IMappedSuperclass.class)) {
- case JpaCoreMappingsPackage.IMAPPED_SUPERCLASS__ID_CLASS :
- String newIdClass = (String) notification.getNewValue();
- if (newIdClass == null) {
- this.idClassAnnotationAdapter.removeAnnotation();
- }
- else {
- this.idClassValueAdapter.setValue(newIdClass);
- }
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_MAPPED_SUPERCLASS;
- }
-
- /**
- * Returns the value of the '<em><b>Id Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id Class</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id Class</em>' attribute.
- * @see #setIdClass(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIMappedSuperclass_IdClass()
- * @model
- * @generated
- */
- public String getIdClass() {
- return idClass;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass#getIdClass <em>Id Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id Class</em>' attribute.
- * @see #getIdClass()
- * @generated
- */
- public void setIdClass(String newIdClass) {
- String oldIdClass = idClass;
- idClass = newIdClass;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_MAPPED_SUPERCLASS__ID_CLASS, oldIdClass, idClass));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_MAPPED_SUPERCLASS__ID_CLASS :
- return getIdClass();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_MAPPED_SUPERCLASS__ID_CLASS :
- setIdClass((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_MAPPED_SUPERCLASS__ID_CLASS :
- setIdClass(ID_CLASS_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_MAPPED_SUPERCLASS__ID_CLASS :
- return ID_CLASS_EDEFAULT == null ? idClass != null : !ID_CLASS_EDEFAULT.equals(idClass);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IMappedSuperclass.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_MAPPED_SUPERCLASS__ID_CLASS :
- return JpaCoreMappingsPackage.IMAPPED_SUPERCLASS__ID_CLASS;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IMappedSuperclass.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IMAPPED_SUPERCLASS__ID_CLASS :
- return JpaJavaMappingsPackage.JAVA_MAPPED_SUPERCLASS__ID_CLASS;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (idClass: ");
- result.append(idClass);
- result.append(')');
- return result.toString();
- }
-
- public String getKey() {
- return IMappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
- }
-
- @Override
- public Iterator<String> overridableAttributeNames() {
- return this.namesOf(this.overridableAttributes());
- }
-
- private Iterator<IPersistentAttribute> overridableAttributes() {
- return new FilteringIterator<IPersistentAttribute>(this.getPersistentType().attributes()) {
- @Override
- protected boolean accept(Object o) {
- return ((IPersistentAttribute) o).isOverridableAttribute();
- }
- };
- }
-
- @Override
- public Iterator<String> overridableAssociationNames() {
- return this.namesOf(this.overridableAssociations());
- }
-
- private Iterator<IPersistentAttribute> overridableAssociations() {
- return new FilteringIterator<IPersistentAttribute>(this.getPersistentType().attributes()) {
- @Override
- protected boolean accept(Object o) {
- return ((IPersistentAttribute) o).isOverridableAssociation();
- }
- };
- }
-
- private Iterator<String> namesOf(Iterator<IPersistentAttribute> attributes) {
- return new TransformationIterator<IPersistentAttribute, String>(attributes) {
- @Override
- protected String transform(IPersistentAttribute attribute) {
- return attribute.getName();
- }
- };
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.updateIdClassFromJava(astRoot);
- }
-
- private void updateIdClassFromJava(CompilationUnit astRoot) {
- if (this.idClassAnnotationAdapter.getAnnotation(astRoot) == null) {
- this.setIdClass(null);
- }
- else {
- this.setIdClass(this.idClassValueAdapter.getValue(astRoot));
- }
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildIdClassValueAdapter() {
- return new ConversionDeclarationAnnotationElementAdapter<String, TypeLiteral>(ID_CLASS_ADAPTER, JPA.ID_CLASS__VALUE, false, SimpleTypeStringExpressionConverter.instance());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMappedSuperclassProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMappedSuperclassProvider.java
deleted file mode 100644
index b149fcabc7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMappedSuperclassProvider.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-
-/**
- *
- */
-public class JavaMappedSuperclassProvider
- implements IJavaTypeMappingProvider
-{
-
- // singleton
- private static final JavaMappedSuperclassProvider INSTANCE = new JavaMappedSuperclassProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaTypeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaMappedSuperclassProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
- }
-
- public IJavaTypeMapping buildMapping(Type type) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaMappedSuperclass(type);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaMappedSuperclass.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMultiRelationshipMapping.java
deleted file mode 100644
index c843c474e6..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaMultiRelationshipMapping.java
+++ /dev/null
@@ -1,811 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.ITypeMapping;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType;
-import org.eclipse.jpt.core.internal.mappings.IEntity;
-import org.eclipse.jpt.core.internal.mappings.IJoinTable;
-import org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
-import org.eclipse.jpt.core.internal.mappings.ITable;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.StringTools;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Multi Relationship Mapping</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaMultiRelationshipMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class JavaMultiRelationshipMapping
- extends JavaRelationshipMapping implements IMultiRelationshipMapping
-{
- /**
- * The default value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMappedBy()
- * @generated
- * @ordered
- */
- protected static final String MAPPED_BY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMappedBy()
- * @generated
- * @ordered
- */
- protected String mappedBy = MAPPED_BY_EDEFAULT;
-
- /**
- * The default value of the '{@link #getOrderBy() <em>Order By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrderBy()
- * @generated
- * @ordered
- */
- protected static final String ORDER_BY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getOrderBy() <em>Order By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOrderBy()
- * @generated
- * @ordered
- */
- protected String orderBy = ORDER_BY_EDEFAULT;
-
- /**
- * The default value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFetch()
- * @generated
- * @ordered
- */
- protected static final DefaultLazyFetchType FETCH_EDEFAULT = DefaultLazyFetchType.DEFAULT;
-
- /**
- * The cached value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFetch()
- * @generated
- * @ordered
- */
- protected DefaultLazyFetchType fetch = FETCH_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getJoinTable() <em>Join Table</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getJoinTable()
- * @generated
- * @ordered
- */
- protected IJoinTable joinTable;
-
- /**
- * The default value of the '{@link #getMapKey() <em>Map Key</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKey()
- * @generated
- * @ordered
- */
- protected static final String MAP_KEY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getMapKey() <em>Map Key</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMapKey()
- * @generated
- * @ordered
- */
- protected String mapKey = MAP_KEY_EDEFAULT;
-
- private final AnnotationElementAdapter<String> mappedByAdapter;
-
- /*
- * The @OrderBy annotation is a bit wack:
- * - no annotation at all means "no ordering"
- * - an annotation with no 'value' means "order by ascending primary key"
- * - an annotation with a 'value' means "order by the settings in the 'value' string"
- */
- private final AnnotationAdapter orderByAnnotationAdapter;
-
- private final AnnotationElementAdapter<String> orderByValueAdapter;
-
- public static final DeclarationAnnotationAdapter ORDER_BY_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ORDER_BY);
-
- private static final DeclarationAnnotationElementAdapter<String> ORDER_BY_VALUE_ADAPTER = buildOrderByValueAdapter();
-
- private final AnnotationAdapter mapKeyAnnotationAdapter;
-
- private final AnnotationElementAdapter<String> mapKeyNameAdapter;
-
- public static final DeclarationAnnotationAdapter MAP_KEY_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.MAP_KEY);
-
- private static final DeclarationAnnotationElementAdapter<String> MAP_KEY_NAME_ADAPTER = buildMapKeyNameAdapter();
-
- protected JavaMultiRelationshipMapping() {
- throw new UnsupportedOperationException("Use JavaMultiRelationshipMapping(Attribute) instead");
- }
-
- protected JavaMultiRelationshipMapping(Attribute attribute) {
- super(attribute);
- this.mappedByAdapter = this.buildAnnotationElementAdapter(this.mappedByAdapter());
- this.orderByAnnotationAdapter = new MemberAnnotationAdapter(attribute, ORDER_BY_ADAPTER);
- this.orderByValueAdapter = new ShortCircuitAnnotationElementAdapter<String>(attribute, ORDER_BY_VALUE_ADAPTER);
- this.mapKeyAnnotationAdapter = new MemberAnnotationAdapter(attribute, MAP_KEY_ADAPTER);
- this.mapKeyNameAdapter = new ShortCircuitAnnotationElementAdapter<String>(attribute, MAP_KEY_NAME_ADAPTER);
- this.joinTable = JpaJavaMappingsFactory.eINSTANCE.createJavaJoinTable(buildOwner(), attribute);
- ((InternalEObject) this.joinTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, null, null);
- }
-
- /**
- * return the Java adapter's 'mappedBy' element adapter config
- */
- protected abstract DeclarationAnnotationElementAdapter<String> mappedByAdapter();
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(INonOwningMapping.class)) {
- case JpaCoreMappingsPackage.INON_OWNING_MAPPING__MAPPED_BY :
- this.mappedByAdapter.setValue((String) notification.getNewValue());
- break;
- default :
- break;
- }
- switch (notification.getFeatureID(IMultiRelationshipMapping.class)) {
- case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- String orderBy = (String) notification.getNewValue();
- if (orderBy == null) {
- this.orderByAnnotationAdapter.removeAnnotation();
- }
- else if ("".equals(orderBy)) {
- Annotation orderByAnnotation = this.orderByAnnotationAdapter.getAnnotation();
- if (orderByAnnotation != null) {
- // if the value is already "", then leave it alone (short circuit java change cycle)
- if (!"".equals(orderByValueAdapter.getValue())) {
- this.orderByValueAdapter.setValue(null);
- }
- }
- else {
- this.orderByAnnotationAdapter.newMarkerAnnotation();
- }
- }
- else {
- this.orderByValueAdapter.setValue(orderBy);
- }
- break;
- case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__MAP_KEY :
- String mk = (String) notification.getNewValue();
- if (mk == null) {
- this.mapKeyAnnotationAdapter.removeAnnotation();
- }
- else {
- this.mapKeyNameAdapter.setValue(mk);
- }
- break;
- case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__FETCH :
- this.getFetchAdapter().setValue(((DefaultLazyFetchType) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- default :
- break;
- }
- }
-
- private ITable.Owner buildOwner() {
- return new ITable.Owner() {
- public ITextRange validationTextRange() {
- return JavaMultiRelationshipMapping.this.validationTextRange();
- }
-
- public ITypeMapping getTypeMapping() {
- return JavaMultiRelationshipMapping.this.typeMapping();
- }
- };
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_MULTI_RELATIONSHIP_MAPPING;
- }
-
- /**
- * Returns the value of the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mapped By</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mapped By</em>' attribute.
- * @see #setMappedBy(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getINonOwningMapping_MappedBy()
- * @model
- * @generated
- */
- public String getMappedBy() {
- return mappedBy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping#getMappedBy <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Mapped By</em>' attribute.
- * @see #getMappedBy()
- * @generated
- */
- public void setMappedBy(String newMappedBy) {
- String oldMappedBy = mappedBy;
- mappedBy = newMappedBy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY, oldMappedBy, mappedBy));
- }
-
- /**
- * Returns the value of the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Order By</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Order By</em>' attribute.
- * @see #setOrderBy(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIMultiRelationshipMapping_OrderBy()
- * @model unique="false" ordered="false"
- * @generated
- */
- public String getOrderBy() {
- return orderBy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping#getOrderBy <em>Order By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Order By</em>' attribute.
- * @see #getOrderBy()
- * @generated
- */
- public void setOrderBy(String newOrderBy) {
- String oldOrderBy = orderBy;
- orderBy = newOrderBy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY, oldOrderBy, orderBy));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation" unique="false" required="true" ordered="false"
- * @generated NOT
- */
- public boolean isNoOrdering() {
- return getOrderBy() == null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated NOT
- */
- public void setNoOrdering() {
- setOrderBy(null);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation" unique="false" required="true" ordered="false"
- * @generated NOT
- */
- public boolean isOrderByPk() {
- return "".equals(getOrderBy());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated NOT
- */
- public void setOrderByPk() {
- setOrderBy("");
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation" unique="false" required="true" ordered="false"
- * @generated NOT
- */
- public boolean isCustomOrdering() {
- return ! StringTools.stringIsEmpty(getOrderBy());
- }
-
- public ITextRange mappedByTextRange() {
- return this.elementTextRange(this.mappedByAdapter());
- }
-
- /**
- * Returns the value of the '<em><b>Fetch</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType
- * @see #setFetch(DefaultLazyFetchType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIMultiRelationshipMapping_Fetch()
- * @model
- * @generated
- */
- public DefaultLazyFetchType getFetch() {
- return fetch;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping#getFetch <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultLazyFetchType
- * @see #getFetch()
- * @generated
- */
- public void setFetch(DefaultLazyFetchType newFetch) {
- DefaultLazyFetchType oldFetch = fetch;
- fetch = newFetch == null ? FETCH_EDEFAULT : newFetch;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH, oldFetch, fetch));
- }
-
- /**
- * Returns the value of the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Join Table</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Join Table</em>' containment reference.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIMultiRelationshipMapping_JoinTable()
- * @model containment="true" required="true" changeable="false"
- * @generated
- */
- public IJoinTable getJoinTable() {
- return joinTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetJoinTable(IJoinTable newJoinTable, NotificationChain msgs) {
- IJoinTable oldJoinTable = joinTable;
- joinTable = newJoinTable;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, oldJoinTable, newJoinTable);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- public boolean isJoinTableSpecified() {
- return getJavaJoinTable().isSpecified();
- }
-
- /**
- * Returns the value of the '<em><b>Map Key</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map Key</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map Key</em>' attribute.
- * @see #setMapKey(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIMultiRelationshipMapping_MapKey()
- * @model
- * @generated
- */
- public String getMapKey() {
- return mapKey;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping#getMapKey <em>Map Key</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map Key</em>' attribute.
- * @see #getMapKey()
- * @generated
- */
- public void setMapKey(String newMapKey) {
- String oldMapKey = mapKey;
- mapKey = newMapKey;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY, oldMapKey, mapKey));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
- return basicSetJoinTable(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY :
- return getMappedBy();
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- return getOrderBy();
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH :
- return getFetch();
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
- return getJoinTable();
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY :
- return getMapKey();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY :
- setMappedBy((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- setOrderBy((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH :
- setFetch((DefaultLazyFetchType) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY :
- setMapKey((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY :
- setMappedBy(MAPPED_BY_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- setOrderBy(ORDER_BY_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH :
- setFetch(FETCH_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY :
- setMapKey(MAP_KEY_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY :
- return MAPPED_BY_EDEFAULT == null ? mappedBy != null : !MAPPED_BY_EDEFAULT.equals(mappedBy);
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- return ORDER_BY_EDEFAULT == null ? orderBy != null : !ORDER_BY_EDEFAULT.equals(orderBy);
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH :
- return fetch != FETCH_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
- return joinTable != null;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY :
- return MAP_KEY_EDEFAULT == null ? mapKey != null : !MAP_KEY_EDEFAULT.equals(mapKey);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == INonOwningMapping.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY :
- return JpaCoreMappingsPackage.INON_OWNING_MAPPING__MAPPED_BY;
- default :
- return -1;
- }
- }
- if (baseClass == IMultiRelationshipMapping.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH :
- return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__FETCH;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
- return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY :
- return JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__MAP_KEY;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == INonOwningMapping.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.INON_OWNING_MAPPING__MAPPED_BY :
- return JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
- default :
- return -1;
- }
- }
- if (baseClass == IMultiRelationshipMapping.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__ORDER_BY :
- return JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
- case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__FETCH :
- return JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH;
- case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__JOIN_TABLE :
- return JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
- case JpaCoreMappingsPackage.IMULTI_RELATIONSHIP_MAPPING__MAP_KEY :
- return JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (mappedBy: ");
- result.append(mappedBy);
- result.append(", orderBy: ");
- result.append(orderBy);
- result.append(", fetch: ");
- result.append(fetch);
- result.append(", mapKey: ");
- result.append(mapKey);
- result.append(')');
- return result.toString();
- }
-
- public void refreshDefaults(DefaultsContext defaultsContext) {
- super.refreshDefaults(defaultsContext);
- // TODO
- // if (isOrderByPk()) {
- // refreshDefaultOrderBy(defaultsContext);
- // }
- }
-
- //primary key ordering when just the @OrderBy annotation is present
- protected void refreshDefaultOrderBy(DefaultsContext defaultsContext) {
- IEntity targetEntity = getResolvedTargetEntity();
- if (targetEntity != null) {
- setOrderBy(targetEntity.primaryKeyAttributeName() + " ASC");
- }
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- setMappedBy(this.mappedByAdapter.getValue(astRoot));
- updateOrderByFromJava(astRoot);
- this.getJavaJoinTable().updateFromJava(astRoot);
- updateMapKeyFromJava(astRoot);
- }
-
- private void updateOrderByFromJava(CompilationUnit astRoot) {
- String orderBy = this.orderByValueAdapter.getValue(astRoot);
- if (orderBy == null) {
- if (orderByAnnotation(astRoot) == null) {
- this.setNoOrdering();
- }
- else {
- this.setOrderByPk();
- }
- }
- else if ("".equals(orderBy)) {
- this.setOrderByPk();
- }
- else {
- this.setOrderBy(orderBy);
- }
- }
-
- private Annotation orderByAnnotation(CompilationUnit astRoot) {
- return this.orderByAnnotationAdapter.getAnnotation(astRoot);
- }
-
- private void updateMapKeyFromJava(CompilationUnit astRoot) {
- this.setMapKey(this.mapKeyNameAdapter.getValue(astRoot));
- }
-
- private JavaJoinTable getJavaJoinTable() {
- return (JavaJoinTable) this.joinTable;
- }
-
- @Override
- protected void updateFetchFromJava(CompilationUnit astRoot) {
- setFetch(DefaultLazyFetchType.fromJavaAnnotationValue(this.getFetchAdapter().getValue(astRoot)));
- }
-
- private boolean mappedByTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.mappedByAdapter(), pos, astRoot);
- }
-
- private boolean mapKeyNameTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(MAP_KEY_NAME_ADAPTER, pos, astRoot);
- }
-
- public Iterator<String> candidateMapKeyNames() {
- return this.allTargetEntityAttributeNames();
- }
-
- protected Iterator<String> candidateMapKeyNames(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateMapKeyNames(), filter);
- }
-
- protected Iterator<String> quotedCandidateMapKeyNames(Filter<String> filter) {
- return StringTools.quote(this.candidateMapKeyNames(filter));
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.getJavaJoinTable().candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.mappedByTouches(pos, astRoot)) {
- return this.quotedCandidateMappedByAttributeNames(filter);
- }
- if (this.mapKeyNameTouches(pos, astRoot)) {
- return this.quotedCandidateMapKeyNames(filter);
- }
- return null;
- }
-
- /**
- * extract the element type from the specified container signature and
- * convert it into a reference entity type name;
- * return null if the type is not a valid reference entity type (e.g. it's
- * another container or an array or a primitive or other Basic type)
- */
- @Override
- protected String javaDefaultTargetEntity(String signature) {
- String typeName = super.javaDefaultTargetEntity(signature);
- return typeNamedIsContainer(typeName) ? this.javaDefaultTargetEntityFromContainer(signature) : null;
- }
-
- protected String javaDefaultTargetEntityFromContainer(String signature) {
- String[] parmSignatures = Signature.getTypeArguments(signature);
- if ((parmSignatures == null) || (parmSignatures.length != 1)) {
- return null;
- }
- String elementSignature = parmSignatures[0];
- String elementTypeName = buildReferenceEntityTypeName(elementSignature, jdtType());
- return typeNamedIsContainer(elementTypeName) ? null : elementTypeName;
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildOrderByValueAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(ORDER_BY_ADAPTER, JPA.ORDER_BY__VALUE, false);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildMapKeyNameAdapter() {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(MAP_KEY_ADAPTER, JPA.MAP_KEY__NAME, false);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedColumn.java
deleted file mode 100644
index 61b7da6e2d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedColumn.java
+++ /dev/null
@@ -1,528 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.BooleanLiteral;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.NumberLiteral;
-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.BooleanStringExpressionConverter;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.NumberStringExpressionConverter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.mappings.INamedColumn;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.db.internal.Column;
-import org.eclipse.jpt.db.internal.Table;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.StringTools;
-import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Named Column</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedColumn()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class JavaNamedColumn extends JavaEObject
- implements INamedColumn
-{
- /**
- * 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;
-
- private final Owner owner;
-
- private final Member member;
-
- // hold this so we can get the annotation's text range
- private final DeclarationAnnotationAdapter daa;
-
- // hold this so we can get the 'name' text range
- private final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
-
- private final AnnotationElementAdapter<String> nameAdapter;
-
- private final AnnotationElementAdapter<String> columnDefinitionAdapter;
-
- protected JavaNamedColumn() {
- super();
- throw new UnsupportedOperationException("Use JavaNamedColumn(Owner, Member, DeclarationAnnotationAdapter) instead");
- }
-
- protected JavaNamedColumn(Owner owner, Member member, DeclarationAnnotationAdapter daa) {
- super();
- this.owner = owner;
- this.member = member;
- this.daa = daa;
- this.nameDeclarationAdapter = this.buildStringElementAdapter(this.nameElementName());
- this.nameAdapter = this.buildShortCircuitElementAdapter(this.nameDeclarationAdapter);
- this.columnDefinitionAdapter = this.buildShortCircuitStringElementAdapter(this.columnDefinitionElementName());
- }
-
- protected DeclarationAnnotationElementAdapter<String> buildStringElementAdapter(String elementName) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, elementName);
- }
-
- protected DeclarationAnnotationElementAdapter<String> buildBooleanElementAdapter(String elementName) {
- return new ConversionDeclarationAnnotationElementAdapter<String, BooleanLiteral>(this.daa, elementName, BooleanStringExpressionConverter.instance());
- }
-
- protected DeclarationAnnotationElementAdapter<String> buildIntElementAdapter(String elementName) {
- return new ConversionDeclarationAnnotationElementAdapter<String, NumberLiteral>(this.daa, elementName, NumberStringExpressionConverter.instance());
- }
-
- protected AnnotationElementAdapter<String> buildShortCircuitElementAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new ShortCircuitAnnotationElementAdapter<String>(this.member, daea);
- }
-
- protected AnnotationElementAdapter<String> buildShortCircuitStringElementAdapter(String elementName) {
- return this.buildShortCircuitElementAdapter(this.buildStringElementAdapter(elementName));
- }
-
- protected AnnotationElementAdapter<String> buildShortCircuitBooleanElementAdapter(String elementName) {
- return this.buildShortCircuitElementAdapter(this.buildBooleanElementAdapter(elementName));
- }
-
- protected IntAnnotationElementAdapter buildShortCircuitIntElementAdapter(String elementName) {
- return new IntAnnotationElementAdapter(this.buildShortCircuitElementAdapter(this.buildIntElementAdapter(elementName)));
- }
-
- protected abstract String nameElementName();
-
- protected abstract String columnDefinitionElementName();
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(INamedColumn.class)) {
- case JpaJavaMappingsPackage.JAVA_COLUMN__SPECIFIED_NAME :
- this.nameAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.JAVA_COLUMN__COLUMN_DEFINITION :
- this.columnDefinitionAdapter.setValue((String) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_NAMED_COLUMN;
- }
-
- public String getName() {
- return (this.getSpecifiedName() == null) ? getDefaultName() : this.getSpecifiedName();
- }
-
- /**
- * 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.JavaNamedColumn#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 setSpecifiedName(String newSpecifiedName) {
- String oldSpecifiedName = specifiedName;
- specifiedName = newSpecifiedName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__SPECIFIED_NAME, oldSpecifiedName, specifiedName));
- }
-
- //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_NAMED_COLUMN__DEFAULT_NAME, oldDefaultName, this.defaultName));
- }
-
- /**
- * 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;
- }
-
- /**
- * 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.JavaNamedColumn#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 setColumnDefinition(String newColumnDefinition) {
- String oldColumnDefinition = columnDefinition;
- columnDefinition = newColumnDefinition;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__COLUMN_DEFINITION, oldColumnDefinition, columnDefinition));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__NAME :
- return getName();
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__SPECIFIED_NAME :
- return getSpecifiedName();
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__DEFAULT_NAME :
- return getDefaultName();
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__COLUMN_DEFINITION :
- return getColumnDefinition();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__SPECIFIED_NAME :
- setSpecifiedName((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__COLUMN_DEFINITION :
- setColumnDefinition((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__SPECIFIED_NAME :
- setSpecifiedName(SPECIFIED_NAME_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__COLUMN_DEFINITION :
- setColumnDefinition(COLUMN_DEFINITION_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__NAME :
- return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName());
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__SPECIFIED_NAME :
- return SPECIFIED_NAME_EDEFAULT == null ? specifiedName != null : !SPECIFIED_NAME_EDEFAULT.equals(specifiedName);
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__DEFAULT_NAME :
- return DEFAULT_NAME_EDEFAULT == null ? defaultName != null : !DEFAULT_NAME_EDEFAULT.equals(defaultName);
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__COLUMN_DEFINITION :
- return COLUMN_DEFINITION_EDEFAULT == null ? columnDefinition != null : !COLUMN_DEFINITION_EDEFAULT.equals(columnDefinition);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == INamedColumn.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__NAME :
- return JpaCoreMappingsPackage.INAMED_COLUMN__NAME;
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__SPECIFIED_NAME :
- return JpaCoreMappingsPackage.INAMED_COLUMN__SPECIFIED_NAME;
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__DEFAULT_NAME :
- return JpaCoreMappingsPackage.INAMED_COLUMN__DEFAULT_NAME;
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__COLUMN_DEFINITION :
- return JpaCoreMappingsPackage.INAMED_COLUMN__COLUMN_DEFINITION;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == INamedColumn.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.INAMED_COLUMN__NAME :
- return JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__NAME;
- case JpaCoreMappingsPackage.INAMED_COLUMN__SPECIFIED_NAME :
- return JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__SPECIFIED_NAME;
- case JpaCoreMappingsPackage.INAMED_COLUMN__DEFAULT_NAME :
- return JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__DEFAULT_NAME;
- case JpaCoreMappingsPackage.INAMED_COLUMN__COLUMN_DEFINITION :
- return JpaJavaMappingsPackage.JAVA_NAMED_COLUMN__COLUMN_DEFINITION;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- 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(')');
- return result.toString();
- }
-
- public Owner getOwner() {
- return this.owner;
- }
-
- public ITextRange validationTextRange() {
- ITextRange textRange = this.member.annotationTextRange(this.daa);
- return (textRange != null) ? textRange : this.owner.validationTextRange();
- }
-
- protected ITextRange elementTextRange(DeclarationAnnotationElementAdapter<?> elementAdapter) {
- return this.elementTextRange(this.member.annotationElementTextRange(elementAdapter));
- }
-
- protected ITextRange elementTextRange(DeclarationAnnotationElementAdapter<?> elementAdapter, CompilationUnit astRoot) {
- return this.elementTextRange(this.member.annotationElementTextRange(elementAdapter, astRoot));
- }
-
- public ITextRange nameTextRange() {
- return this.elementTextRange(this.nameDeclarationAdapter);
- }
-
- public ITextRange nameTextRange(CompilationUnit astRoot) {
- return this.elementTextRange(this.nameDeclarationAdapter, astRoot);
- }
-
- public boolean nameTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.nameDeclarationAdapter, pos, astRoot);
- }
-
- protected boolean elementTouches(DeclarationAnnotationElementAdapter<?> elementAdapter, int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.member.annotationElementTextRange(elementAdapter, astRoot), pos);
- }
-
- public void updateFromJava(CompilationUnit astRoot) {
- this.setSpecifiedName(this.nameAdapter.getValue(astRoot));
- this.setColumnDefinition(this.columnDefinitionAdapter.getValue(astRoot));
- }
-
- public Column dbColumn() {
- Table table = this.dbTable();
- return (table == null) ? null : table.columnNamed(this.getName());
- }
-
- public Table dbTable() {
- return this.owner.dbTable(this.tableName());
- }
-
- /**
- * Return the name of the column's table.
- */
- protected abstract String tableName();
-
- public boolean isResolved() {
- return this.dbColumn() != null;
- }
-
- @Override
- public Iterator<String> connectedCandidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.connectedCandidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.nameTouches(pos, astRoot)) {
- return this.quotedCandidateNames(filter);
- }
- return null;
- }
-
- private Iterator<String> candidateNames() {
- Table dbTable = this.dbTable();
- return (dbTable != null) ? dbTable.columnNames() : EmptyIterator.<String> instance();
- }
-
- private Iterator<String> candidateNames(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateNames(), filter);
- }
-
- private Iterator<String> quotedCandidateNames(Filter<String> filter) {
- return StringTools.quote(this.candidateNames(filter));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedNativeQuery.java
deleted file mode 100644
index e34850a2cd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedNativeQuery.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-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.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.INamedNativeQuery;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Named Native Query</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedNativeQuery()
- * @model kind="class"
- * @generated
- */
-public class JavaNamedNativeQuery extends JavaAbstractQuery
- implements INamedNativeQuery
-{
- /**
- * The default value of the '{@link #getResultClass() <em>Result Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getResultClass()
- * @generated
- * @ordered
- */
- protected static final String RESULT_CLASS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getResultClass() <em>Result Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getResultClass()
- * @generated
- * @ordered
- */
- protected String resultClass = RESULT_CLASS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getResultSetMapping() <em>Result Set Mapping</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getResultSetMapping()
- * @generated
- * @ordered
- */
- protected static final String RESULT_SET_MAPPING_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getResultSetMapping() <em>Result Set Mapping</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getResultSetMapping()
- * @generated
- * @ordered
- */
- protected String resultSetMapping = RESULT_SET_MAPPING_EDEFAULT;
-
- public static final SimpleDeclarationAnnotationAdapter SINGLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.NAMED_NATIVE_QUERY);
-
- public static final SimpleDeclarationAnnotationAdapter MULTIPLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.NAMED_NATIVE_QUERIES);
-
- private final AnnotationElementAdapter<String> resultClassAdapter;
-
- private final AnnotationElementAdapter<String> resultSetMappingAdapter;
-
- protected JavaNamedNativeQuery() {
- throw new UnsupportedOperationException("Use JavaNamedNativeQuery(Member) instead");
- }
-
- protected JavaNamedNativeQuery(Member member, IndexedDeclarationAnnotationAdapter idaa) {
- super(member, idaa);
- this.resultClassAdapter = this.buildAdapter(resultClassAdapter(idaa));
- this.resultSetMappingAdapter = this.buildAdapter(resultSetMappingAdapter(idaa));
- }
-
- // ********** initialization **********
- protected DeclarationAnnotationElementAdapter<String> resultClassAdapter(DeclarationAnnotationAdapter daa) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(daa, JPA.NAMED_NATIVE_QUERY__RESULT_CLASS);
- }
-
- protected DeclarationAnnotationElementAdapter<String> resultSetMappingAdapter(DeclarationAnnotationAdapter daa) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(daa, JPA.NAMED_NATIVE_QUERY__RESULT_SET_MAPPING);
- }
-
- @Override
- protected String nameElementName() {
- return JPA.NAMED_NATIVE_QUERY__NAME;
- }
-
- @Override
- protected String queryElementName() {
- return JPA.NAMED_NATIVE_QUERY__QUERY;
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(INamedNativeQuery.class)) {
- case JpaCoreMappingsPackage.INAMED_NATIVE_QUERY__RESULT_CLASS :
- this.resultClassAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaCoreMappingsPackage.INAMED_NATIVE_QUERY__RESULT_SET_MAPPING :
- this.resultSetMappingAdapter.setValue((String) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_NAMED_NATIVE_QUERY;
- }
-
- /**
- * Returns the value of the '<em><b>Result Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Result Class</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Result Class</em>' attribute.
- * @see #setResultClass(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getINamedNativeQuery_ResultClass()
- * @model
- * @generated
- */
- public String getResultClass() {
- return resultClass;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery#getResultClass <em>Result Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Result Class</em>' attribute.
- * @see #getResultClass()
- * @generated
- */
- public void setResultClass(String newResultClass) {
- String oldResultClass = resultClass;
- resultClass = newResultClass;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_CLASS, oldResultClass, resultClass));
- }
-
- /**
- * Returns the value of the '<em><b>Result Set Mapping</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Result Set Mapping</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Result Set Mapping</em>' attribute.
- * @see #setResultSetMapping(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getINamedNativeQuery_ResultSetMapping()
- * @model
- * @generated
- */
- public String getResultSetMapping() {
- return resultSetMapping;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery#getResultSetMapping <em>Result Set Mapping</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Result Set Mapping</em>' attribute.
- * @see #getResultSetMapping()
- * @generated
- */
- public void setResultSetMapping(String newResultSetMapping) {
- String oldResultSetMapping = resultSetMapping;
- resultSetMapping = newResultSetMapping;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING, oldResultSetMapping, resultSetMapping));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_CLASS :
- return getResultClass();
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING :
- return getResultSetMapping();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_CLASS :
- setResultClass((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING :
- setResultSetMapping((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_CLASS :
- setResultClass(RESULT_CLASS_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING :
- setResultSetMapping(RESULT_SET_MAPPING_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_CLASS :
- return RESULT_CLASS_EDEFAULT == null ? resultClass != null : !RESULT_CLASS_EDEFAULT.equals(resultClass);
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING :
- return RESULT_SET_MAPPING_EDEFAULT == null ? resultSetMapping != null : !RESULT_SET_MAPPING_EDEFAULT.equals(resultSetMapping);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == INamedNativeQuery.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_CLASS :
- return JpaCoreMappingsPackage.INAMED_NATIVE_QUERY__RESULT_CLASS;
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING :
- return JpaCoreMappingsPackage.INAMED_NATIVE_QUERY__RESULT_SET_MAPPING;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == INamedNativeQuery.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.INAMED_NATIVE_QUERY__RESULT_CLASS :
- return JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_CLASS;
- case JpaCoreMappingsPackage.INAMED_NATIVE_QUERY__RESULT_SET_MAPPING :
- return JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (resultClass: ");
- result.append(resultClass);
- result.append(", resultSetMapping: ");
- result.append(resultSetMapping);
- result.append(')');
- return result.toString();
- }
-
- @Override
- protected void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.setResultClass(this.resultClassAdapter.getValue(astRoot));
- this.setResultSetMapping(this.resultSetMappingAdapter.getValue(astRoot));
- }
-
- @Override
- protected JavaQueryHint createJavaQueryHint(int index) {
- return JavaQueryHint.createNamedNativeQueryQueryHint(this.getDeclarationAnnotationAdapter(), this.getMember(), index);
- }
-
- // ********** static methods **********
- static JavaNamedNativeQuery createJavaNamedNativeQuery(Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaNamedNativeQuery(member, buildAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildAnnotationAdapter(int index) {
- return new CombinationIndexedDeclarationAnnotationAdapter(SINGLE_DECLARATION_ANNOTATION_ADAPTER, MULTIPLE_DECLARATION_ANNOTATION_ADAPTER, index, JPA.NAMED_NATIVE_QUERY);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedQuery.java
deleted file mode 100644
index e7dd0a260a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNamedQuery.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.core.internal.jdtutility.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.INamedQuery;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Named Query</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedQuery()
- * @model kind="class"
- * @generated
- */
-public class JavaNamedQuery extends JavaAbstractQuery implements INamedQuery
-{
- public static final SimpleDeclarationAnnotationAdapter SINGLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.NAMED_QUERY);
-
- public static final SimpleDeclarationAnnotationAdapter MULTIPLE_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.NAMED_QUERIES);
-
- protected JavaNamedQuery() {
- throw new UnsupportedOperationException("Use JavaNamedQuery(Member) instead");
- }
-
- protected JavaNamedQuery(Member member, IndexedDeclarationAnnotationAdapter idaa) {
- super(member, idaa);
- }
-
- @Override
- protected String nameElementName() {
- return JPA.NAMED_QUERY__NAME;
- }
-
- @Override
- protected String queryElementName() {
- return JPA.NAMED_QUERY__QUERY;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_NAMED_QUERY;
- }
-
- @Override
- protected JavaQueryHint createJavaQueryHint(int index) {
- return JavaQueryHint.createNamedQueryQueryHint(this.getDeclarationAnnotationAdapter(), this.getMember(), index);
- }
-
- // ********** static methods **********
- static JavaNamedQuery createJavaNamedQuery(Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaNamedQuery(member, buildAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildAnnotationAdapter(int index) {
- return new CombinationIndexedDeclarationAnnotationAdapter(SINGLE_DECLARATION_ANNOTATION_ADAPTER, MULTIPLE_DECLARATION_ANNOTATION_ADAPTER, index, JPA.NAMED_QUERY);
- }
-} // JavaNamedQuery
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullAttributeMapping.java
deleted file mode 100644
index b9552c7ed5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullAttributeMapping.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.NullDeclarationAnnotationAdapter;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Null Attribute Mapping</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNullAttributeMapping()
- * @model kind="class"
- * @generated
- */
-public class JavaNullAttributeMapping extends JavaAttributeMapping
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = NullDeclarationAnnotationAdapter.instance();
-
- protected JavaNullAttributeMapping() {
- throw new UnsupportedOperationException("Use JavaNullAttributeMapping(Attribute) instead");
- }
-
- protected JavaNullAttributeMapping(Attribute attribute) {
- super(attribute);
- }
-
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_NULL_ATTRIBUTE_MAPPING;
- }
-
- public String getKey() {
- return null;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullAttributeMappingProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullAttributeMappingProvider.java
deleted file mode 100644
index 0c35b5f466..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullAttributeMappingProvider.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- * This mapping provider implementation is used to create a JavaNullAttributeMapping.
- * A JavaNullAttributeMapping should be used when no "mapping" annotation
- * exists on a Java attribute *and* no default mapping applies.
- */
-public class JavaNullAttributeMappingProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaNullAttributeMappingProvider INSTANCE = new JavaNullAttributeMappingProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaNullAttributeMappingProvider() {
- super();
- }
-
- public String key() {
- return null;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return false;
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaNullAttributeMapping(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaNullAttributeMapping.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullTypeMapping.java
deleted file mode 100644
index aa20d185bd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullTypeMapping.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.NullDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Null Type Mapping</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNullTypeMapping()
- * @model kind="class"
- * @generated
- */
-public class JavaNullTypeMapping extends JavaTypeMapping
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = NullDeclarationAnnotationAdapter.instance();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected JavaNullTypeMapping() {
- super();
- }
-
- protected JavaNullTypeMapping(Type type) {
- super(type);
- }
-
- @Override
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_NULL_TYPE_MAPPING;
- }
-
- public String getKey() {
- return null;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullTypeMappingProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullTypeMappingProvider.java
deleted file mode 100644
index 3e12a969f2..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaNullTypeMappingProvider.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-
-/**
- * This mapping provider implementation is used to create a JavaNullAttributeMapping.
- * A JavaNullAttributeMapping should be used when no "mapping" annotation
- * exists on a Java type.
- */
-public class JavaNullTypeMappingProvider
- implements IJavaTypeMappingProvider
-{
-
- // singleton
- private static final JavaNullTypeMappingProvider INSTANCE = new JavaNullTypeMappingProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaTypeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaNullTypeMappingProvider() {
- super();
- }
-
- public String key() {
- return null;
- }
-
- public IJavaTypeMapping buildMapping(Type type) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaNullTypeMapping(type);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaNullTypeMapping.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToMany.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToMany.java
deleted file mode 100644
index 83359ca2f4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToMany.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.core.internal.IAttributeMapping;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IOneToMany;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java One To Many</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOneToMany()
- * @model kind="class"
- * @generated
- */
-public class JavaOneToMany extends JavaMultiRelationshipMapping
- implements IOneToMany
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ONE_TO_MANY);
-
- private static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__TARGET_ENTITY);
-
- private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__CASCADE);
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildEnumAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__FETCH);
-
- private static final DeclarationAnnotationElementAdapter<String> MAPPED_BY_ADAPTER = buildAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__MAPPED_BY);
-
- protected JavaOneToMany() {
- throw new UnsupportedOperationException("Use JavaOneToMany(Attribute) instead");
- }
-
- protected JavaOneToMany(Attribute attribute) {
- super(attribute);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_ONE_TO_MANY;
- }
-
- public String getKey() {
- return IMappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- // ********** JavaRelationshipMappingModelAdapter implementation **********
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> targetEntityAdapter() {
- return TARGET_ENTITY_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String[]> cascadeAdapter() {
- return CASCADE_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> fetchAdapter() {
- return FETCH_ADAPTER;
- }
-
- // ********** JavaMultiRelationshipMappingModelAdapter implementation **********
- @Override
- protected DeclarationAnnotationElementAdapter<String> mappedByAdapter() {
- return MAPPED_BY_ADAPTER;
- }
-
- // ********** INonOwningMapping implementation **********
- public boolean mappedByIsValid(IAttributeMapping mappedByMapping) {
- String mappedByKey = mappedByMapping.getKey();
- return (mappedByKey == IMappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY);
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToManyProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToManyProvider.java
deleted file mode 100644
index c817ce8638..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToManyProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- */
-public class JavaOneToManyProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaOneToManyProvider INSTANCE = new JavaOneToManyProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaOneToManyProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return false;
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaOneToMany(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaOneToMany.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToOne.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToOne.java
deleted file mode 100644
index 7c21f6d8fd..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToOne.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.IAttributeMapping;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
-import org.eclipse.jpt.core.internal.mappings.IOneToOne;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.utility.internal.Filter;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java One To One</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOneToOne()
- * @model kind="class"
- * @generated
- */
-public class JavaOneToOne extends JavaSingleRelationshipMapping
- implements IOneToOne
-{
- /**
- * The default value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMappedBy()
- * @generated
- * @ordered
- */
- protected static final String MAPPED_BY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMappedBy()
- * @generated
- * @ordered
- */
- protected String mappedBy = MAPPED_BY_EDEFAULT;
-
- private AnnotationElementAdapter<String> mappedByAdapter;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.ONE_TO_ONE);
-
- private static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__TARGET_ENTITY);
-
- private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__CASCADE);
-
- private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildEnumAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__FETCH);
-
- private static final DeclarationAnnotationElementAdapter<String> OPTIONAL_ADAPTER = buildOptionalAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__OPTIONAL);
-
- private static final DeclarationAnnotationElementAdapter<String> MAPPED_BY_ADAPTER = buildAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__MAPPED_BY);
-
- protected JavaOneToOne() {
- throw new UnsupportedOperationException("Use JavaOneToOne(Attribute) instead");
- }
-
- protected JavaOneToOne(Attribute attribute) {
- super(attribute);
- this.mappedByAdapter = this.buildAnnotationElementAdapter(MAPPED_BY_ADAPTER);
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(INonOwningMapping.class)) {
- case JpaCoreMappingsPackage.INON_OWNING_MAPPING__MAPPED_BY :
- this.mappedByAdapter.setValue((String) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- // ********** initialization **********
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> targetEntityAdapter() {
- return TARGET_ENTITY_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String[]> cascadeAdapter() {
- return CASCADE_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> fetchAdapter() {
- return FETCH_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> optionalAdapter() {
- return OPTIONAL_ADAPTER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_ONE_TO_ONE;
- }
-
- /**
- * Returns the value of the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mapped By</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mapped By</em>' attribute.
- * @see #setMappedBy(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getINonOwningMapping_MappedBy()
- * @model
- * @generated
- */
- public String getMappedBy() {
- return mappedBy;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne#getMappedBy <em>Mapped By</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Mapped By</em>' attribute.
- * @see #getMappedBy()
- * @generated
- */
- public void setMappedBy(String newMappedBy) {
- String oldMappedBy = mappedBy;
- mappedBy = newMappedBy;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_ONE_TO_ONE__MAPPED_BY, oldMappedBy, mappedBy));
- }
-
- public boolean mappedByIsValid(IAttributeMapping mappedByMapping) {
- String mappedByKey = mappedByMapping.getKey();
- return (mappedByKey == IMappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY);
- }
-
- public ITextRange mappedByTextRange() {
- return this.elementTextRange(MAPPED_BY_ADAPTER);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ONE_TO_ONE__MAPPED_BY :
- return getMappedBy();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ONE_TO_ONE__MAPPED_BY :
- setMappedBy((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ONE_TO_ONE__MAPPED_BY :
- setMappedBy(MAPPED_BY_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_ONE_TO_ONE__MAPPED_BY :
- return MAPPED_BY_EDEFAULT == null ? mappedBy != null : !MAPPED_BY_EDEFAULT.equals(mappedBy);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == INonOwningMapping.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_ONE_TO_ONE__MAPPED_BY :
- return JpaCoreMappingsPackage.INON_OWNING_MAPPING__MAPPED_BY;
- default :
- return -1;
- }
- }
- if (baseClass == IOneToOne.class) {
- switch (derivedFeatureID) {
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == INonOwningMapping.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.INON_OWNING_MAPPING__MAPPED_BY :
- return JpaJavaMappingsPackage.JAVA_ONE_TO_ONE__MAPPED_BY;
- default :
- return -1;
- }
- }
- if (baseClass == IOneToOne.class) {
- switch (baseFeatureID) {
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (mappedBy: ");
- result.append(mappedBy);
- result.append(')');
- return result.toString();
- }
-
- public String getKey() {
- return IMappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- setMappedBy(this.mappedByAdapter.getValue(astRoot));
- }
-
- public boolean mappedByTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(MAPPED_BY_ADAPTER, pos, astRoot);
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.mappedByTouches(pos, astRoot)) {
- return this.quotedCandidateMappedByAttributeNames(filter);
- }
- return null;
- }
-
- @Override
- public boolean isOverridableAssociationMapping() {
- return true;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToOneProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToOneProvider.java
deleted file mode 100644
index e6ddbd7123..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOneToOneProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- */
-public class JavaOneToOneProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaOneToOneProvider INSTANCE = new JavaOneToOneProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaOneToOneProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return false;
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaOneToOne(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaOneToOne.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOverride.java
deleted file mode 100644
index 56c394de6c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaOverride.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Oracle. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.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.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.mappings.IOverride;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.StringTools;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Override</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOverride()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class JavaOverride extends JavaEObject implements IOverride
-{
- /**
- * 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 cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- private final Owner owner;
-
- private final Member member;
-
- private final IndexedDeclarationAnnotationAdapter daa;
-
- private final IndexedAnnotationAdapter annotationAdapter;
-
- private final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
-
- private final AnnotationElementAdapter<String> nameAdapter;
-
- protected JavaOverride() {
- throw new UnsupportedOperationException("use JavaAttributeOverride(Owner, Member, IndexedDeclarationAnnotationAdapter)");
- }
-
- protected JavaOverride(Owner owner, Member member, IndexedDeclarationAnnotationAdapter daa) {
- super();
- this.owner = owner;
- this.member = member;
- this.daa = daa;
- this.annotationAdapter = new MemberIndexedAnnotationAdapter(member, daa);
- this.nameDeclarationAdapter = ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, this.nameElementName());
- this.nameAdapter = new ShortCircuitAnnotationElementAdapter<String>(this.member, this.nameDeclarationAdapter);
- }
-
- protected abstract String nameElementName();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_OVERRIDE;
- }
-
- /**
- * 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 #setName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIOverride_Name()
- * @model
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setNameGen(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_OVERRIDE__NAME, oldName, name));
- }
-
- public void setName(String newName) {
- setNameGen(newName);
- if (!this.isVirtual()) {
- setNameInJava(newName);
- }
- }
-
- private void setNameInJava(String newName) {
- this.nameAdapter.setValue(newName);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_OVERRIDE__NAME :
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_OVERRIDE__NAME :
- setName((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_OVERRIDE__NAME :
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_OVERRIDE__NAME :
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IOverride.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_OVERRIDE__NAME :
- return JpaCoreMappingsPackage.IOVERRIDE__NAME;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IOverride.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IOVERRIDE__NAME :
- return JpaJavaMappingsPackage.JAVA_OVERRIDE__NAME;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
- public boolean isVirtual() {
- return getOwner().isVirtual(this);
- }
-
- public Owner getOwner() {
- return this.owner;
- }
-
- protected Member getMember() {
- return this.member;
- }
-
- /**
- * allow owners to verify the annotation
- */
- public Annotation annotation(CompilationUnit astRoot) {
- return this.annotationAdapter.getAnnotation(astRoot);
- }
-
- protected boolean elementTouches(DeclarationAnnotationElementAdapter<?> elementAdapter, int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.member.annotationElementTextRange(elementAdapter, astRoot), pos);
- }
-
- public boolean nameTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.nameDeclarationAdapter, pos, astRoot);
- }
-
- protected abstract Iterator<String> candidateNames();
-
- private Iterator<String> candidateNames(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateNames(), filter);
- }
-
- private Iterator<String> quotedCandidateNames(Filter<String> filter) {
- return StringTools.quote(this.candidateNames(filter));
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.nameTouches(pos, astRoot)) {
- return this.quotedCandidateNames(filter);
- }
- return null;
- }
-
- public void updateFromJava(CompilationUnit astRoot) {
- setName(this.nameAdapter.getValue(astRoot));
- }
-
- // ********** persistence model -> java annotations **********
- void moveAnnotation(int newIndex) {
- this.annotationAdapter.moveAnnotation(newIndex);
- }
-
- void newAnnotation() {
- this.annotationAdapter.newMarkerAnnotation();
- }
-
- void removeAnnotation() {
- this.annotationAdapter.removeAnnotation();
- }
-
- public ITextRange validationTextRange() {
- ITextRange textRange = this.member.annotationTextRange(this.daa);
- return (textRange == null) ? getOwner().validationTextRange() : textRange;
- }
-
- protected IndexedDeclarationAnnotationAdapter getDeclarationAnnotationAdapter() {
- return this.daa;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 3232c34b2c..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaPrimaryKeyJoinColumn.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-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.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IAbstractJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.platform.BaseJpaPlatform;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-import org.eclipse.jpt.db.internal.Column;
-import org.eclipse.jpt.db.internal.Table;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.StringTools;
-import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Primary Key Join Column</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaPrimaryKeyJoinColumn()
- * @model kind="class"
- * @generated
- */
-public class JavaPrimaryKeyJoinColumn extends JavaNamedColumn
- implements IPrimaryKeyJoinColumn
-{
- private final IndexedAnnotationAdapter annotationAdapter;
-
- // hold this so we can get the 'referenced column name' text range
- private final DeclarationAnnotationElementAdapter<String> referencedColumnNameDeclarationAdapter;
-
- private final AnnotationElementAdapter<String> referencedColumnNameAdapter;
-
- 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 #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getReferencedColumnName()
- * @generated
- * @ordered
- */
- protected static final String REFERENCED_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedReferencedColumnName() <em>Specified Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedReferencedColumnName()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedReferencedColumnName() <em>Specified Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedReferencedColumnName()
- * @generated
- * @ordered
- */
- protected String specifiedReferencedColumnName = SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultReferencedColumnName() <em>Default Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultReferencedColumnName()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_REFERENCED_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultReferencedColumnName() <em>Default Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultReferencedColumnName()
- * @generated
- * @ordered
- */
- protected String defaultReferencedColumnName = DEFAULT_REFERENCED_COLUMN_NAME_EDEFAULT;
-
- protected JavaPrimaryKeyJoinColumn() {
- throw new UnsupportedOperationException();
- }
-
- 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);
- }
-
- @Override
- protected String nameElementName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMN__NAME;
- }
-
- @Override
- protected String columnDefinitionElementName() {
- return JPA.PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION;
- }
-
- @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((String) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_PRIMARY_KEY_JOIN_COLUMN;
- }
-
- /**
- * Returns the value of the '<em><b>Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Referenced Column 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>Referenced Column Name</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIPrimaryKeyJoinColumn_ReferencedColumnName()
- * @model changeable="false" volatile="true" derived="true"
- * @generated NOT
- */
- public String getReferencedColumnName() {
- return (this.specifiedReferencedColumnName == null) ? this.defaultReferencedColumnName : this.specifiedReferencedColumnName;
- }
-
- /**
- * Returns the value of the '<em><b>Specified Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Referenced Column 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 Referenced Column Name</em>' attribute.
- * @see #setSpecifiedReferencedColumnName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAbstractJoinColumn_SpecifiedReferencedColumnName()
- * @model
- * @generated
- */
- public String getSpecifiedReferencedColumnName() {
- return specifiedReferencedColumnName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn#getSpecifiedReferencedColumnName <em>Specified Referenced Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Referenced Column Name</em>' attribute.
- * @see #getSpecifiedReferencedColumnName()
- * @generated
- */
- 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));
- }
-
- /**
- * Returns the value of the '<em><b>Default Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Referenced Column 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 Referenced Column Name</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIAbstractJoinColumn_DefaultReferencedColumnName()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultReferencedColumnName() {
- return defaultReferencedColumnName;
- }
-
- protected void setDefaultReferencedColumnName(String newDefaultReferencedColumnName) {
- String oldDefaultReferencedColumnName = this.defaultReferencedColumnName;
- this.defaultReferencedColumnName = newDefaultReferencedColumnName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME, oldDefaultReferencedColumnName, newDefaultReferencedColumnName));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME :
- return getReferencedColumnName();
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- return getSpecifiedReferencedColumnName();
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME :
- return getDefaultReferencedColumnName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- setSpecifiedReferencedColumnName((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- setSpecifiedReferencedColumnName(SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- 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 :
- return SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT == null ? specifiedReferencedColumnName != null : !SPECIFIED_REFERENCED_COLUMN_NAME_EDEFAULT.equals(specifiedReferencedColumnName);
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME :
- return DEFAULT_REFERENCED_COLUMN_NAME_EDEFAULT == null ? defaultReferencedColumnName != null : !DEFAULT_REFERENCED_COLUMN_NAME_EDEFAULT.equals(defaultReferencedColumnName);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IAbstractJoinColumn.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME :
- return JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- return JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME;
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME :
- return JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME;
- default :
- return -1;
- }
- }
- if (baseClass == IPrimaryKeyJoinColumn.class) {
- switch (derivedFeatureID) {
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IAbstractJoinColumn.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__REFERENCED_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
- case JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME;
- case JpaCoreMappingsPackage.IABSTRACT_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME;
- default :
- return -1;
- }
- }
- if (baseClass == IPrimaryKeyJoinColumn.class) {
- switch (baseFeatureID) {
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (specifiedReferencedColumnName: ");
- result.append(specifiedReferencedColumnName);
- result.append(", defaultReferencedColumnName: ");
- result.append(defaultReferencedColumnName);
- result.append(')');
- return result.toString();
- }
-
- @Override
- public IAbstractJoinColumn.Owner getOwner() {
- return (IAbstractJoinColumn.Owner) super.getOwner();
- }
-
- @Override
- protected String tableName() {
- return this.getOwner().getTypeMapping().getTableName();
- }
-
- public Column dbReferencedColumn() {
- Table table = this.dbReferencedColumnTable();
- return (table == null) ? null : table.columnNamed(this.getReferencedColumnName());
- }
-
- public Table dbReferencedColumnTable() {
- return getOwner().dbReferencedColumnTable();
- }
-
- public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.referencedColumnNameDeclarationAdapter, pos, astRoot);
- }
-
- private Iterator<String> candidateReferencedColumnNames() {
- Table table = this.getOwner().dbReferencedColumnTable();
- return (table != null) ? table.columnNames() : EmptyIterator.<String> instance();
- }
-
- private Iterator<String> candidateReferencedColumnNames(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateReferencedColumnNames(), filter);
- }
-
- private Iterator<String> quotedCandidateReferencedColumnNames(Filter<String> filter) {
- return StringTools.quote(this.candidateReferencedColumnNames(filter));
- }
-
- @Override
- public Iterator<String> connectedCandidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.connectedCandidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.referencedColumnNameTouches(pos, astRoot)) {
- return this.quotedCandidateReferencedColumnNames(filter);
- }
- return null;
- }
-
- public boolean isReferencedColumnResolved() {
- return dbReferencedColumn() != null;
- }
-
- public ITextRange referencedColumnNameTextRange() {
- return elementTextRange(this.referencedColumnNameDeclarationAdapter);
- }
-
- 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));
- }
-
- /**
- * allow owners to verify the annotation
- */
- public Annotation annotation(CompilationUnit astRoot) {
- return this.annotationAdapter.getAnnotation(astRoot);
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- setSpecifiedReferencedColumnName(this.referencedColumnNameAdapter.getValue(astRoot));
- }
-
- void moveAnnotation(int newIndex) {
- this.annotationAdapter.moveAnnotation(newIndex);
- }
-
- void newAnnotation() {
- this.annotationAdapter.newMarkerAnnotation();
- }
-
- void removeAnnotation() {
- this.annotationAdapter.removeAnnotation();
- }
-
- // ********** static methods **********
- static JavaPrimaryKeyJoinColumn createSecondaryTableJoinColumn(DeclarationAnnotationAdapter secondaryTableAdapter, IAbstractJoinColumn.Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaPrimaryKeyJoinColumn(owner, member, buildSecondaryTableAnnotationAdapter(secondaryTableAdapter, index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildSecondaryTableAnnotationAdapter(DeclarationAnnotationAdapter secondaryTableAdapter, int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(secondaryTableAdapter, 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);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaQueryHint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaQueryHint.java
deleted file mode 100644
index 4e445f2bbc..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaQueryHint.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.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.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-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.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.mappings.IQueryHint;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Query Hint</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaQueryHint()
- * @model kind="class"
- * @generated
- */
-public class JavaQueryHint extends JavaEObject implements IQueryHint
-{
- private final Member member;
-
- // hold this so we can get the annotation's text range
- private final IndexedDeclarationAnnotationAdapter idaa;
-
- private final IndexedAnnotationAdapter annotationAdapter;
-
- private final AnnotationElementAdapter<String> nameAdapter;
-
- private final AnnotationElementAdapter<String> valueAdapter;
-
- /**
- * 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 cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected static final String VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected String value = VALUE_EDEFAULT;
-
- protected JavaQueryHint() {
- throw new UnsupportedOperationException("Use JavaQueryHint(Member, IndexedDeclarationAnnotationAdapter) instead");
- }
-
- protected JavaQueryHint(Member member, IndexedDeclarationAnnotationAdapter idaa) {
- super();
- this.member = member;
- this.idaa = idaa;
- this.annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
- this.nameAdapter = this.buildAdapter(nameAdapter(idaa));
- this.valueAdapter = this.buildAdapter(valueAdapter(idaa));
- }
-
- // ********** initialization **********
- protected AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new ShortCircuitAnnotationElementAdapter<String>(this.member, daea);
- }
-
- protected DeclarationAnnotationElementAdapter<String> nameAdapter(DeclarationAnnotationAdapter daa) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(daa, JPA.QUERY_HINT__NAME);
- }
-
- protected DeclarationAnnotationElementAdapter<String> valueAdapter(DeclarationAnnotationAdapter daa) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(daa, JPA.QUERY_HINT__VALUE);
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IQueryHint.class)) {
- case JpaCoreMappingsPackage.IQUERY_HINT__NAME :
- this.nameAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaCoreMappingsPackage.IQUERY_HINT__VALUE :
- this.valueAdapter.setValue((String) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_QUERY_HINT;
- }
-
- /**
- * 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 #setName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIQueryHint_Name()
- * @model
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_QUERY_HINT__NAME, oldName, name));
- }
-
- /**
- * Returns the value of the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Value</em>' attribute.
- * @see #setValue(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIQueryHint_Value()
- * @model
- * @generated
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint#getValue <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Value</em>' attribute.
- * @see #getValue()
- * @generated
- */
- public void setValue(String newValue) {
- String oldValue = value;
- value = newValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_QUERY_HINT__VALUE, oldValue, value));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT__NAME :
- return getName();
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT__VALUE :
- return getValue();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT__NAME :
- setName((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT__VALUE :
- setValue((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT__NAME :
- setName(NAME_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT__VALUE :
- setValue(VALUE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT__NAME :
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT__VALUE :
- return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IQueryHint.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT__NAME :
- return JpaCoreMappingsPackage.IQUERY_HINT__NAME;
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT__VALUE :
- return JpaCoreMappingsPackage.IQUERY_HINT__VALUE;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IQueryHint.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IQUERY_HINT__NAME :
- return JpaJavaMappingsPackage.JAVA_QUERY_HINT__NAME;
- case JpaCoreMappingsPackage.IQUERY_HINT__VALUE :
- return JpaJavaMappingsPackage.JAVA_QUERY_HINT__VALUE;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", value: ");
- result.append(value);
- result.append(')');
- return result.toString();
- }
-
- // ********* IJpaSourceObject implementation ***********
- public ITextRange validationTextRange() {
- return this.member.annotationTextRange(this.idaa);
- }
-
- protected void updateFromJava(CompilationUnit astRoot) {
- this.setName(this.nameAdapter.getValue(astRoot));
- this.setValue(this.valueAdapter.getValue(astRoot));
- }
-
- /**
- * allow owners to verify the annotation
- */
- public Annotation annotation(CompilationUnit astRoot) {
- return this.annotationAdapter.getAnnotation(astRoot);
- }
-
- // ********** persistence model -> java annotations **********
- void moveAnnotation(int newIndex) {
- this.annotationAdapter.moveAnnotation(newIndex);
- }
-
- void newAnnotation() {
- this.annotationAdapter.newMarkerAnnotation();
- }
-
- void removeAnnotation() {
- this.annotationAdapter.removeAnnotation();
- }
-
- // ********** static methods **********
- static JavaQueryHint createNamedQueryQueryHint(DeclarationAnnotationAdapter namedQueryAdapter, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaQueryHint(member, buildNamedQueryQueryHintAnnotationAdapter(namedQueryAdapter, index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildNamedQueryQueryHintAnnotationAdapter(DeclarationAnnotationAdapter namedQueryAdapter, int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(namedQueryAdapter, JPA.NAMED_QUERY__HINTS, index, JPA.QUERY_HINT);
- }
-
- static JavaQueryHint createNamedNativeQueryQueryHint(DeclarationAnnotationAdapter namedNativeQueryAdapter, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaQueryHint(member, buildNamedNativeQueryQueryHintAnnotationAdapter(namedNativeQueryAdapter, index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildNamedNativeQueryQueryHintAnnotationAdapter(DeclarationAnnotationAdapter namedNativeQueryAdapter, int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(namedNativeQueryAdapter, JPA.NAMED_NATIVE_QUERY__HINTS, index, JPA.QUERY_HINT);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaRelationshipMapping.java
deleted file mode 100644
index 9deacff895..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaRelationshipMapping.java
+++ /dev/null
@@ -1,687 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.Expression;
-import org.eclipse.jpt.core.internal.IPersistentType;
-import org.eclipse.jpt.core.internal.ITypeMapping;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.EnumArrayDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ExpressionConverter;
-import org.eclipse.jpt.core.internal.jdtutility.JDTTools;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleTypeStringExpressionConverter;
-import org.eclipse.jpt.core.internal.jdtutility.StringExpressionConverter;
-import org.eclipse.jpt.core.internal.mappings.ICascade;
-import org.eclipse.jpt.core.internal.mappings.IEntity;
-import org.eclipse.jpt.core.internal.mappings.IRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.mappings.RelationshipMappingTools;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-import org.eclipse.jpt.utility.internal.CollectionTools;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.StringTools;
-import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Relationship Mapping</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaRelationshipMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class JavaRelationshipMapping extends JavaAttributeMapping
- implements IRelationshipMapping
-{
- private AnnotationElementAdapter<String> targetEntityAdapter;
-
- /**
- * all the relationship mappings have a 'fetch' setting;
- * but the 1:1 and m:1 mappings have a default of EAGER,
- * while the 1:m and m:m mappings have a default of LAZY
- */
- private AnnotationElementAdapter<String> fetchAdapter;
-
- /**
- * The default value of the '{@link #getTargetEntity() <em>Target Entity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTargetEntity()
- * @generated
- * @ordered
- */
- protected static final String TARGET_ENTITY_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedTargetEntity() <em>Specified Target Entity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedTargetEntity()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_TARGET_ENTITY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedTargetEntity() <em>Specified Target Entity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedTargetEntity()
- * @generated
- * @ordered
- */
- protected String specifiedTargetEntity = SPECIFIED_TARGET_ENTITY_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultTargetEntity() <em>Default Target Entity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultTargetEntity()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_TARGET_ENTITY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultTargetEntity() <em>Default Target Entity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultTargetEntity()
- * @generated
- * @ordered
- */
- protected String defaultTargetEntity = DEFAULT_TARGET_ENTITY_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getResolvedTargetEntity() <em>Resolved Target Entity</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getResolvedTargetEntity()
- * @generated
- * @ordered
- */
- protected IEntity resolvedTargetEntity;
-
- /**
- * The cached value of the '{@link #getCascade() <em>Cascade</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCascade()
- * @generated
- * @ordered
- */
- protected ICascade cascade;
-
- protected JavaRelationshipMapping() {
- throw new UnsupportedOperationException("Use JavaRelationshipMapping(Attribute) instead");
- }
-
- protected JavaRelationshipMapping(Attribute attribute) {
- super(attribute);
- this.targetEntityAdapter = this.buildAnnotationElementAdapter(this.targetEntityAdapter());
- this.fetchAdapter = this.buildAnnotationElementAdapter(this.fetchAdapter());
- }
-
- protected AnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new ShortCircuitAnnotationElementAdapter<String>(this.getAttribute(), daea);
- }
-
- /**
- * return the Java adapter's 'targetEntity' element adapter config
- */
- protected abstract DeclarationAnnotationElementAdapter<String> targetEntityAdapter();
-
- /**
- * return the Java adapter's 'cascade' element adapter config
- */
- protected abstract DeclarationAnnotationElementAdapter<String[]> cascadeAdapter();
-
- /**
- * return the Java adapter's 'fetch' element adapter config
- */
- protected abstract DeclarationAnnotationElementAdapter<String> fetchAdapter();
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IRelationshipMapping.class)) {
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY :
- this.targetEntityAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE :
- if (notification.getNewValue() == null && notification.getOldValue() != null) {
- ((JavaCascade) notification.getOldValue()).getCascadeAdapter().setValue(null);
- }
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_RELATIONSHIP_MAPPING;
- }
-
- /**
- * Returns the value of the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Target Entity</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Target Entity</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIRelationshipMapping_TargetEntity()
- * @model changeable="false" volatile="true" derived="true"
- * @generated NOT
- */
- public String getTargetEntity() {
- return (this.getSpecifiedTargetEntity() == null) ? getDefaultTargetEntity() : this.getSpecifiedTargetEntity();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Target Entity</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 Target Entity</em>' attribute.
- * @see #setSpecifiedTargetEntity(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIRelationshipMapping_SpecifiedTargetEntity()
- * @model
- * @generated
- */
- public String getSpecifiedTargetEntity() {
- return specifiedTargetEntity;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping#getSpecifiedTargetEntity <em>Specified Target Entity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Target Entity</em>' attribute.
- * @see #getSpecifiedTargetEntity()
- * @generated
- */
- public void setSpecifiedTargetEntity(String newSpecifiedTargetEntity) {
- String oldSpecifiedTargetEntity = specifiedTargetEntity;
- specifiedTargetEntity = newSpecifiedTargetEntity;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY, oldSpecifiedTargetEntity, specifiedTargetEntity));
- }
-
- /**
- * Returns the value of the '<em><b>Default Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Target Entity</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 Target Entity</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIRelationshipMapping_DefaultTargetEntity()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultTargetEntity() {
- return defaultTargetEntity;
- }
-
- protected void setDefaultTargetEntity(String newDefaultTargetEntity) {
- String oldDefaultTargetEntity = this.defaultTargetEntity;
- this.defaultTargetEntity = newDefaultTargetEntity;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY, oldDefaultTargetEntity, this.defaultTargetEntity));
- }
-
- /**
- * Returns the value of the '<em><b>Resolved Target Entity</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Resolved Target Entity</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Resolved Target Entity</em>' reference.
- * @see #setResolvedTargetEntity(IEntity)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIRelationshipMapping_ResolvedTargetEntity()
- * @model
- * @generated
- */
- public IEntity getResolvedTargetEntity() {
- if (resolvedTargetEntity != null && resolvedTargetEntity.eIsProxy()) {
- InternalEObject oldResolvedTargetEntity = (InternalEObject) resolvedTargetEntity;
- resolvedTargetEntity = (IEntity) eResolveProxy(oldResolvedTargetEntity);
- if (resolvedTargetEntity != oldResolvedTargetEntity) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY, oldResolvedTargetEntity, resolvedTargetEntity));
- }
- }
- return resolvedTargetEntity;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IEntity basicGetResolvedTargetEntity() {
- return resolvedTargetEntity;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping#getResolvedTargetEntity <em>Resolved Target Entity</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Resolved Target Entity</em>' reference.
- * @see #getResolvedTargetEntity()
- * @generated
- */
- public void setResolvedTargetEntity(IEntity newResolvedTargetEntity) {
- IEntity oldResolvedTargetEntity = resolvedTargetEntity;
- resolvedTargetEntity = newResolvedTargetEntity;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY, oldResolvedTargetEntity, resolvedTargetEntity));
- }
-
- /**
- * Returns the value of the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cascade</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Cascade</em>' containment reference.
- * @see #setCascade(ICascade)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIRelationshipMapping_Cascade()
- * @model containment="true"
- * @generated
- */
- public ICascade getCascade() {
- return cascade;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetCascade(ICascade newCascade, NotificationChain msgs) {
- ICascade oldCascade = cascade;
- cascade = newCascade;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE, oldCascade, newCascade);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping#getCascade <em>Cascade</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Cascade</em>' containment reference.
- * @see #getCascade()
- * @generated
- */
- public void setCascade(ICascade newCascade) {
- if (newCascade != cascade) {
- NotificationChain msgs = null;
- if (cascade != null)
- msgs = ((InternalEObject) cascade).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE, null, msgs);
- if (newCascade != null)
- msgs = ((InternalEObject) newCascade).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE, null, msgs);
- msgs = basicSetCascade(newCascade, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE, newCascade, newCascade));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE :
- return basicSetCascade(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__TARGET_ENTITY :
- return getTargetEntity();
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY :
- return getSpecifiedTargetEntity();
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY :
- return getDefaultTargetEntity();
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY :
- if (resolve)
- return getResolvedTargetEntity();
- return basicGetResolvedTargetEntity();
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE :
- return getCascade();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY :
- setSpecifiedTargetEntity((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY :
- setResolvedTargetEntity((IEntity) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE :
- setCascade((ICascade) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY :
- setSpecifiedTargetEntity(SPECIFIED_TARGET_ENTITY_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY :
- setResolvedTargetEntity((IEntity) null);
- return;
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE :
- setCascade((ICascade) null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__TARGET_ENTITY :
- return TARGET_ENTITY_EDEFAULT == null ? getTargetEntity() != null : !TARGET_ENTITY_EDEFAULT.equals(getTargetEntity());
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY :
- return SPECIFIED_TARGET_ENTITY_EDEFAULT == null ? specifiedTargetEntity != null : !SPECIFIED_TARGET_ENTITY_EDEFAULT.equals(specifiedTargetEntity);
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY :
- return DEFAULT_TARGET_ENTITY_EDEFAULT == null ? defaultTargetEntity != null : !DEFAULT_TARGET_ENTITY_EDEFAULT.equals(defaultTargetEntity);
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY :
- return resolvedTargetEntity != null;
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE :
- return cascade != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IRelationshipMapping.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__TARGET_ENTITY :
- return JpaCoreMappingsPackage.IRELATIONSHIP_MAPPING__TARGET_ENTITY;
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY :
- return JpaCoreMappingsPackage.IRELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY;
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY :
- return JpaCoreMappingsPackage.IRELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY;
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY :
- return JpaCoreMappingsPackage.IRELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY;
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE :
- return JpaCoreMappingsPackage.IRELATIONSHIP_MAPPING__CASCADE;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IRelationshipMapping.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IRELATIONSHIP_MAPPING__TARGET_ENTITY :
- return JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__TARGET_ENTITY;
- case JpaCoreMappingsPackage.IRELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY :
- return JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY;
- case JpaCoreMappingsPackage.IRELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY :
- return JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY;
- case JpaCoreMappingsPackage.IRELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY :
- return JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY;
- case JpaCoreMappingsPackage.IRELATIONSHIP_MAPPING__CASCADE :
- return JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING__CASCADE;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (specifiedTargetEntity: ");
- result.append(specifiedTargetEntity);
- result.append(", defaultTargetEntity: ");
- result.append(defaultTargetEntity);
- result.append(')');
- return result.toString();
- }
-
- public String fullyQualifiedTargetEntity() {
- return (getTargetEntity() == null) ? null : JDTTools.resolve(getTargetEntity(), this.jdtType());
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- setDefaultTargetEntity(this.javaDefaultTargetEntity());
- setSpecifiedTargetEntity(this.targetEntityAdapter.getValue(astRoot));
- this.updateFetchFromJava(astRoot);
- if (this.cascade != null) {
- ((JavaCascade) this.cascade).updateFromJava(astRoot);
- }
- else if (cascadeAdapter().expression(getAttribute().modifiedDeclaration()) != null) {
- setCascade(createCascade());
- ((JavaCascade) this.cascade).updateFromJava(astRoot);
- }
- }
-
- /**
- * delegate to subclasses because there are different 'fetch'
- * defaults across the subclasses
- */
- protected abstract void updateFetchFromJava(CompilationUnit astRoot);
-
- /**
- * the default 'targetEntity' is calculated from the attribute type;
- * return null if the attribute type cannot possibly be an entity
- */
- protected String javaDefaultTargetEntity() {
- return this.javaDefaultTargetEntity(this.getAttribute().typeSignature());
- }
-
- protected String javaDefaultTargetEntity(String signature) {
- return buildReferenceEntityTypeName(signature, jdtType());
- }
-
- // TODO Embeddable???
- public static String buildReferenceEntityTypeName(String signature, IType jdtType) {
- if (Signature.getArrayCount(signature) > 0) {
- return null; // arrays cannot be entities
- }
- return JDTTools.resolve(Signature.toString(signature), jdtType);
- }
-
- public IEntity getEntity() {
- ITypeMapping typeMapping = typeMapping();
- if (typeMapping instanceof IEntity) {
- return (IEntity) typeMapping;
- }
- return null;
- }
-
- @Override
- public void refreshDefaults(DefaultsContext defaultsContext) {
- super.refreshDefaults(defaultsContext);
- String targetEntityName = fullyQualifiedTargetEntity();
- if (targetEntityName != null) {
- IPersistentType persistentType = defaultsContext.persistentType(targetEntityName);
- if (persistentType != null) {
- if (persistentType.getMapping() instanceof IEntity) {
- setResolvedTargetEntity((IEntity) persistentType.getMapping());
- return;
- }
- }
- }
- setResolvedTargetEntity(null);
- }
-
- public Iterator<String> allTargetEntityAttributeNames() {
- IEntity targetEntity = this.getResolvedTargetEntity();
- return (targetEntity == null) ? EmptyIterator.<String> instance() : targetEntity.getPersistentType().allAttributeNames();
- }
-
- public Iterator<String> candidateMappedByAttributeNames() {
- return this.allTargetEntityAttributeNames();
- }
-
- protected Iterator<String> candidateMappedByAttributeNames(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateMappedByAttributeNames(), filter);
- }
-
- protected Iterator<String> quotedCandidateMappedByAttributeNames(Filter<String> filter) {
- return StringTools.quote(this.candidateMappedByAttributeNames(filter));
- }
-
- public ICascade createCascade() {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaCascade(getAttribute(), cascadeAdapter());
- }
-
- // ********** convenience methods **********
- protected AnnotationElementAdapter<String> getFetchAdapter() {
- return this.fetchAdapter;
- }
-
- // ********** static methods **********
- protected static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- // TODO what about QualifiedType?
- return buildAnnotationElementAdapter(annotationAdapter, elementName, SimpleTypeStringExpressionConverter.instance());
- }
-
- protected static DeclarationAnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return buildAnnotationElementAdapter(annotationAdapter, elementName, StringExpressionConverter.instance());
- }
-
- protected static <T extends Expression> DeclarationAnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<String, T> converter) {
- return new ConversionDeclarationAnnotationElementAdapter<String, T>(annotationAdapter, elementName, false, converter);
- }
-
- protected static DeclarationAnnotationElementAdapter<String> buildEnumAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new EnumDeclarationAnnotationElementAdapter(annotationAdapter, elementName, false);
- }
-
- protected static DeclarationAnnotationElementAdapter<String[]> buildEnumArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new EnumArrayDeclarationAnnotationElementAdapter(annotationAdapter, elementName, false);
- }
-
- public boolean targetEntityIsValid(String targetEntity) {
- return RelationshipMappingTools.targetEntityIsValid(targetEntity);
- }
-
- /**
- * return whether the specified non-array type is one of the container
- * types allowed by the JPA spec
- */
- public static boolean typeNamedIsContainer(String typeName) {
- return CollectionTools.contains(CONTAINER_TYPE_NAMES, typeName);
- }
-
- private static final String[] CONTAINER_TYPE_NAMES = {
- java.util.Collection.class.getName(),
- java.util.Set.class.getName(),
- java.util.List.class.getName(),
- java.util.Map.class.getName()
- };
-} // JavaRelationshipMapping
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
deleted file mode 100644
index ecad438a58..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSecondaryTable.java
+++ /dev/null
@@ -1,553 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.ITypeMapping;
-import org.eclipse.jpt.core.internal.jdtutility.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.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.mappings.IAbstractJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.ISecondaryTable;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.utility.internal.Filter;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Secondary Table</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaSecondaryTable()
- * @model kind="class"
- * @generated
- */
-public class JavaSecondaryTable extends AbstractJavaTable
- implements ISecondaryTable
-{
- /**
- * The cached value of the '{@link #getSpecifiedPrimaryKeyJoinColumns() <em>Specified Primary Key Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedPrimaryKeyJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns;
-
- /**
- * The cached value of the '{@link #getDefaultPrimaryKeyJoinColumns() <em>Default Primary Key Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultPrimaryKeyJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IPrimaryKeyJoinColumn> defaultPrimaryKeyJoinColumns;
-
- private final IndexedAnnotationAdapter annotationAdapter;
-
- protected JavaSecondaryTable() {
- super();
- throw new UnsupportedOperationException("Use JavaSecondaryTable(Owner, Member, int) instead");
- }
-
- public JavaSecondaryTable(Owner owner, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- super(owner, member, idaa);
- this.annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
- this.getDefaultPrimaryKeyJoinColumns().add(this.createPrimaryKeyJoinColumn(0));
- }
-
- /**
- * check for changes to the 'specifiedJoinColumns' and
- * 'specifiedInverseJoinColumns' lists so we can notify the
- * model adapter of any changes;
- * also listen for changes to the 'defaultJoinColumns' and
- * 'defaultInverseJoinColumns' lists so we can spank the developer
- */
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(ISecondaryTable.class)) {
- case JpaCoreMappingsPackage.ISECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
- specifiedPKJoinColumnsChanged(notification);
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void specifiedPKJoinColumnsChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- specifiedPKJoinColumnAdded(notification.getPosition(), (IPrimaryKeyJoinColumn) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- specifiedPKJoinColumnsAdded(notification.getPosition(), (List<IPrimaryKeyJoinColumn>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- specifiedPKJoinColumnRemoved(notification.getPosition(), (IPrimaryKeyJoinColumn) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- specifiedPKJoinColumnsCleared((List<IPrimaryKeyJoinColumn>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- specifiedPKJoinColumnsRemoved((int[]) notification.getNewValue(), (List<IPrimaryKeyJoinColumn>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- specifiedPKJoinColumnSet(notification.getPosition(), (IPrimaryKeyJoinColumn) notification.getOldValue(), (IPrimaryKeyJoinColumn) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- specifiedPKJoinColumnMoved(notification.getOldIntValue(), notification.getPosition(), (IPrimaryKeyJoinColumn) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_SECONDARY_TABLE;
- }
-
- public EList<IPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
- return this.getSpecifiedPrimaryKeyJoinColumns().isEmpty() ? this.getDefaultPrimaryKeyJoinColumns() : this.getSpecifiedPrimaryKeyJoinColumns();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Primary Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Primary Key Join Columns</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 Primary Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getISecondaryTable_SpecifiedPrimaryKeyJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn" containment="true"
- * @generated
- */
- public EList<IPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns() {
- if (specifiedPrimaryKeyJoinColumns == null) {
- specifiedPrimaryKeyJoinColumns = new EObjectContainmentEList<IPrimaryKeyJoinColumn>(IPrimaryKeyJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS);
- }
- return specifiedPrimaryKeyJoinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Default Primary Key Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Primary Key Join Columns</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 Primary Key Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getISecondaryTable_DefaultPrimaryKeyJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn" containment="true"
- * @generated
- */
- public EList<IPrimaryKeyJoinColumn> getDefaultPrimaryKeyJoinColumns() {
- if (defaultPrimaryKeyJoinColumns == null) {
- defaultPrimaryKeyJoinColumns = new EObjectContainmentEList<IPrimaryKeyJoinColumn>(IPrimaryKeyJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS);
- }
- return defaultPrimaryKeyJoinColumns;
- }
-
- public ITypeMapping typeMapping() {
- return (ITypeMapping) eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS :
- return ((InternalEList<?>) getPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
- return ((InternalEList<?>) getSpecifiedPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- return ((InternalEList<?>) getDefaultPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS :
- return getPrimaryKeyJoinColumns();
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
- return getSpecifiedPrimaryKeyJoinColumns();
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- return getDefaultPrimaryKeyJoinColumns();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
- getSpecifiedPrimaryKeyJoinColumns().clear();
- getSpecifiedPrimaryKeyJoinColumns().addAll((Collection<? extends IPrimaryKeyJoinColumn>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- getDefaultPrimaryKeyJoinColumns().clear();
- getDefaultPrimaryKeyJoinColumns().addAll((Collection<? extends IPrimaryKeyJoinColumn>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
- getSpecifiedPrimaryKeyJoinColumns().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- getDefaultPrimaryKeyJoinColumns().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS :
- return !getPrimaryKeyJoinColumns().isEmpty();
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
- return specifiedPrimaryKeyJoinColumns != null && !specifiedPrimaryKeyJoinColumns.isEmpty();
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- return defaultPrimaryKeyJoinColumns != null && !defaultPrimaryKeyJoinColumns.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == ISecondaryTable.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.ISECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.ISECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.ISECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == ISecondaryTable.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.ISECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.ISECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.ISECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- @Override
- protected void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.updateSpecifiedPrimaryKeyJoinColumnsFromJava(astRoot);
- }
-
- /**
- * here we just worry about getting the join column lists the same size;
- * then we delegate to the join columns to synch themselves up
- */
- private void updateSpecifiedPrimaryKeyJoinColumnsFromJava(CompilationUnit astRoot) {
- // synchronize the model join columns with the Java source
- List<IPrimaryKeyJoinColumn> joinColumns = getSpecifiedPrimaryKeyJoinColumns();
- int persSize = joinColumns.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaPrimaryKeyJoinColumn joinColumn = (JavaPrimaryKeyJoinColumn) joinColumns.get(i);
- if (joinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- joinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model join columns beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- joinColumns.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaPrimaryKeyJoinColumn joinColumn = this.createJavaPrimaryKeyJoinColumn(javaSize);
- if (joinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getSpecifiedPrimaryKeyJoinColumns().add(joinColumn);
- joinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- /**
- * allow owners to verify the annotation
- */
- public Annotation annotation(CompilationUnit astRoot) {
- 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<String> nameAdapter(DeclarationAnnotationAdapter daa) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(daa, JPA.SECONDARY_TABLE__NAME);
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> schemaAdapter(DeclarationAnnotationAdapter daa) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(daa, JPA.SECONDARY_TABLE__SCHEMA);
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> catalogAdapter(DeclarationAnnotationAdapter daa) {
- return ConversionDeclarationAnnotationElementAdapter.forStrings(daa, JPA.SECONDARY_TABLE__CATALOG);
- }
-
- public IPrimaryKeyJoinColumn createPrimaryKeyJoinColumn(int index) {
- return this.createJavaPrimaryKeyJoinColumn(index);
- }
-
- private JavaPrimaryKeyJoinColumn createJavaPrimaryKeyJoinColumn(int index) {
- return JavaPrimaryKeyJoinColumn.createSecondaryTableJoinColumn(this.getDeclarationAnnotationAdapter(), buildPkJoinColumnOwner(), this.getMember(), index);
- }
-
- protected IAbstractJoinColumn.Owner buildPkJoinColumnOwner() {
- return new ISecondaryTable.PrimaryKeyJoinColumnOwner(this);
- }
-
- public boolean containsSpecifiedPrimaryKeyJoinColumns() {
- return !this.getSpecifiedPrimaryKeyJoinColumns().isEmpty();
- }
-
- @Override
- protected JavaUniqueConstraint createJavaUniqueConstraint(int index) {
- return JavaUniqueConstraint.createSecondaryTableUniqueConstraint(new UniqueConstraintOwner(this), this.getDeclarationAnnotationAdapter(), getMember(), index);
- }
-
- // ********** persistence model -> java annotations **********
- void moveAnnotation(int newIndex) {
- this.annotationAdapter.moveAnnotation(newIndex);
- }
-
- void newAnnotation() {
- this.annotationAdapter.newMarkerAnnotation();
- }
-
- void removeAnnotation() {
- this.annotationAdapter.removeAnnotation();
- }
-
- // ********** jpa model -> java annotations **********
- /**
- * slide over all the annotations that follow the new join column
- */
- public void specifiedPKJoinColumnAdded(int index, IPrimaryKeyJoinColumn joinColumn) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (((JavaPrimaryKeyJoinColumn) joinColumn).annotation(getMember().astRoot()) == null) {
- this.synchPKJoinColumnAnnotationsAfterAdd(index + 1);
- ((JavaPrimaryKeyJoinColumn) joinColumn).newAnnotation();
- }
- }
-
- // bjv look at this
- public void specifiedPKJoinColumnsAdded(int index, List<IPrimaryKeyJoinColumn> joinColumns) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!joinColumns.isEmpty() && ((JavaPrimaryKeyJoinColumn) joinColumns.get(0)).annotation(getMember().astRoot()) == null) {
- this.synchPKJoinColumnAnnotationsAfterAdd(index + joinColumns.size());
- for (IPrimaryKeyJoinColumn joinColumn : joinColumns) {
- ((JavaPrimaryKeyJoinColumn) joinColumn).newAnnotation();
- }
- }
- }
-
- public void specifiedPKJoinColumnRemoved(int index, IPrimaryKeyJoinColumn joinColumn) {
- ((JavaPrimaryKeyJoinColumn) joinColumn).removeAnnotation();
- this.synchPKJoinColumnAnnotationsAfterRemove(index);
- }
-
- public void specifiedPKJoinColumnsRemoved(int[] indexes, List<IPrimaryKeyJoinColumn> joinColumns) {
- for (IPrimaryKeyJoinColumn joinColumn : joinColumns) {
- ((JavaPrimaryKeyJoinColumn) joinColumn).removeAnnotation();
- }
- this.synchPKJoinColumnAnnotationsAfterRemove(indexes[0]);
- }
-
- public void specifiedPKJoinColumnsCleared(List<IPrimaryKeyJoinColumn> joinColumns) {
- for (IPrimaryKeyJoinColumn joinColumn : joinColumns) {
- ((JavaPrimaryKeyJoinColumn) joinColumn).removeAnnotation();
- }
- }
-
- public void specifiedPKJoinColumnSet(int index, IPrimaryKeyJoinColumn oldJoinColumn, IPrimaryKeyJoinColumn newJoinColumn) {
- ((JavaPrimaryKeyJoinColumn) newJoinColumn).newAnnotation();
- }
-
- public void specifiedPKJoinColumnMoved(int sourceIndex, int targetIndex, IPrimaryKeyJoinColumn joinColumn) {
- List<IPrimaryKeyJoinColumn> joinColumns = this.getSpecifiedPrimaryKeyJoinColumns();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchPKJoinColumnAnnotationsAfterAdd(int index) {
- List<IPrimaryKeyJoinColumn> joinColumns = this.getSpecifiedPrimaryKeyJoinColumns();
- for (int i = joinColumns.size(); i-- > index;) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchPKJoinColumnAnnotationsAfterRemove(int index) {
- List<IPrimaryKeyJoinColumn> joinColumns = this.getSpecifiedPrimaryKeyJoinColumns();
- for (int i = index; i < joinColumns.size(); i++) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- private void synch(IPrimaryKeyJoinColumn joinColumn, int index) {
- ((JavaPrimaryKeyJoinColumn) joinColumn).moveAnnotation(index);
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (IPrimaryKeyJoinColumn column : this.getPrimaryKeyJoinColumns()) {
- result = ((JavaPrimaryKeyJoinColumn) column).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- // ********** static methods **********
- static JavaSecondaryTable createJavaSecondaryTable(Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaSecondaryTable(owner, member, buildDeclarationAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildDeclarationAnnotationAdapter(int index) {
- return new CombinationIndexedDeclarationAnnotationAdapter(JPA.SECONDARY_TABLE, JPA.SECONDARY_TABLES, index);
- }
-} // JavaSecondaryTable
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSequenceGenerator.java
deleted file mode 100644
index 28bce2778d..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSequenceGenerator.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.ISequenceGenerator;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Sequence Generator</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaSequenceGenerator()
- * @model kind="class"
- * @generated
- */
-public class JavaSequenceGenerator extends JavaGenerator
- implements ISequenceGenerator
-{
- private final AnnotationElementAdapter<String> sequenceNameAdapter;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.SEQUENCE_GENERATOR);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildAdapter(JPA.SEQUENCE_GENERATOR__NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> INITIAL_VALUE_ADAPTER = buildNumberAdapter(JPA.SEQUENCE_GENERATOR__INITIAL_VALUE);
-
- private static final DeclarationAnnotationElementAdapter<String> ALLOCATION_SIZE_ADAPTER = buildNumberAdapter(JPA.SEQUENCE_GENERATOR__ALLOCATION_SIZE);
-
- private static final DeclarationAnnotationElementAdapter<String> SEQUENCE_NAME_ADAPTER = buildAdapter(JPA.SEQUENCE_GENERATOR__SEQUENCE_NAME);
-
- /**
- * The default value of the '{@link #getSequenceName() <em>Sequence Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSequenceName()
- * @generated
- * @ordered
- */
- protected static final String SEQUENCE_NAME_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedSequenceName() <em>Specified Sequence Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedSequenceName()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_SEQUENCE_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedSequenceName() <em>Specified Sequence Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedSequenceName()
- * @generated
- * @ordered
- */
- protected String specifiedSequenceName = SPECIFIED_SEQUENCE_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultSequenceName() <em>Default Sequence Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultSequenceName()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_SEQUENCE_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultSequenceName() <em>Default Sequence Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultSequenceName()
- * @generated
- * @ordered
- */
- protected String defaultSequenceName = DEFAULT_SEQUENCE_NAME_EDEFAULT;
-
- protected JavaSequenceGenerator() {
- throw new UnsupportedOperationException("Use JavaSequenceGenerator(Member) instead");
- }
-
- protected JavaSequenceGenerator(Member member) {
- super(member);
- this.sequenceNameAdapter = this.buildAdapter(SEQUENCE_NAME_ADAPTER);
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(ISequenceGenerator.class)) {
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME :
- this.sequenceNameAdapter.setValue((String) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- // ********** initialization **********
- @Override
- protected DeclarationAnnotationAdapter annotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> nameAdapter() {
- return NAME_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> initialValueAdapter() {
- return INITIAL_VALUE_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> allocationSizeAdapter() {
- return ALLOCATION_SIZE_ADAPTER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_SEQUENCE_GENERATOR;
- }
-
- public String getSequenceName() {
- return (this.getSpecifiedSequenceName() == null) ? getDefaultSequenceName() : this.getSpecifiedSequenceName();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Sequence Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Sequence 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 Sequence Name</em>' attribute.
- * @see #setSpecifiedSequenceName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getISequenceGenerator_SpecifiedSequenceName()
- * @model
- * @generated
- */
- public String getSpecifiedSequenceName() {
- return specifiedSequenceName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator#getSpecifiedSequenceName <em>Specified Sequence Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Sequence Name</em>' attribute.
- * @see #getSpecifiedSequenceName()
- * @generated
- */
- public void setSpecifiedSequenceName(String newSpecifiedSequenceName) {
- String oldSpecifiedSequenceName = specifiedSequenceName;
- specifiedSequenceName = newSpecifiedSequenceName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME, oldSpecifiedSequenceName, specifiedSequenceName));
- }
-
- /**
- * Returns the value of the '<em><b>Default Sequence Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Sequence 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 Sequence Name</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getISequenceGenerator_DefaultSequenceName()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultSequenceName() {
- return defaultSequenceName;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SEQUENCE_NAME :
- return getSequenceName();
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME :
- return getSpecifiedSequenceName();
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__DEFAULT_SEQUENCE_NAME :
- return getDefaultSequenceName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME :
- setSpecifiedSequenceName((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME :
- setSpecifiedSequenceName(SPECIFIED_SEQUENCE_NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SEQUENCE_NAME :
- return SEQUENCE_NAME_EDEFAULT == null ? getSequenceName() != null : !SEQUENCE_NAME_EDEFAULT.equals(getSequenceName());
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME :
- return SPECIFIED_SEQUENCE_NAME_EDEFAULT == null ? specifiedSequenceName != null : !SPECIFIED_SEQUENCE_NAME_EDEFAULT.equals(specifiedSequenceName);
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__DEFAULT_SEQUENCE_NAME :
- return DEFAULT_SEQUENCE_NAME_EDEFAULT == null ? defaultSequenceName != null : !DEFAULT_SEQUENCE_NAME_EDEFAULT.equals(defaultSequenceName);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == ISequenceGenerator.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SEQUENCE_NAME :
- return JpaCoreMappingsPackage.ISEQUENCE_GENERATOR__SEQUENCE_NAME;
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME :
- return JpaCoreMappingsPackage.ISEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME;
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__DEFAULT_SEQUENCE_NAME :
- return JpaCoreMappingsPackage.ISEQUENCE_GENERATOR__DEFAULT_SEQUENCE_NAME;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == ISequenceGenerator.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.ISEQUENCE_GENERATOR__SEQUENCE_NAME :
- return JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SEQUENCE_NAME;
- case JpaCoreMappingsPackage.ISEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME :
- return JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME;
- case JpaCoreMappingsPackage.ISEQUENCE_GENERATOR__DEFAULT_SEQUENCE_NAME :
- return JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR__DEFAULT_SEQUENCE_NAME;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (specifiedSequenceName: ");
- result.append(specifiedSequenceName);
- result.append(", defaultSequenceName: ");
- result.append(defaultSequenceName);
- result.append(')');
- return result.toString();
- }
-
- // ********** java annotations -> persistence model **********
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- setSpecifiedSequenceName(this.sequenceNameAdapter.getValue(astRoot));
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildAdapter(String elementName) {
- return buildAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildNumberAdapter(String elementName) {
- return buildNumberAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
- }
-} // JavaSequenceGenerator
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSingleRelationshipMapping.java
deleted file mode 100644
index e6c7239620..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaSingleRelationshipMapping.java
+++ /dev/null
@@ -1,686 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jdt.core.dom.BooleanLiteral;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.BooleanStringExpressionConverter;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType;
-import org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean;
-import org.eclipse.jpt.core.internal.mappings.IJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.ISingleRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.utility.internal.Filter;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Single Relationship Mapping</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaSingleRelationshipMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-public abstract class JavaSingleRelationshipMapping
- extends JavaRelationshipMapping implements ISingleRelationshipMapping
-{
- private AnnotationElementAdapter<String> optionalAdapter;
-
- /**
- * The default value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFetch()
- * @generated
- * @ordered
- */
- protected static final DefaultEagerFetchType FETCH_EDEFAULT = DefaultEagerFetchType.DEFAULT;
-
- /**
- * The cached value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFetch()
- * @generated
- * @ordered
- */
- protected DefaultEagerFetchType fetch = FETCH_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getSpecifiedJoinColumns() <em>Specified Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IJoinColumn> specifiedJoinColumns;
-
- /**
- * The cached value of the '{@link #getDefaultJoinColumns() <em>Default Join Columns</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultJoinColumns()
- * @generated
- * @ordered
- */
- protected EList<IJoinColumn> defaultJoinColumns;
-
- /**
- * The default value of the '{@link #getOptional() <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOptional()
- * @generated
- * @ordered
- */
- protected static final DefaultTrueBoolean OPTIONAL_EDEFAULT = DefaultTrueBoolean.DEFAULT;
-
- /**
- * The cached value of the '{@link #getOptional() <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOptional()
- * @generated
- * @ordered
- */
- protected DefaultTrueBoolean optional = OPTIONAL_EDEFAULT;
-
- protected JavaSingleRelationshipMapping() {
- throw new UnsupportedOperationException("Use JavaSingleRelationshipMapping(Attribute) instead");
- }
-
- protected JavaSingleRelationshipMapping(Attribute attribute) {
- super(attribute);
- this.optionalAdapter = this.buildAnnotationElementAdapter(this.optionalAdapter());
- this.getDefaultJoinColumns().add(this.createJoinColumn(new ISingleRelationshipMapping.JoinColumnOwner(this), attribute));
- }
-
- private IJoinColumn createJoinColumn(IJoinColumn.Owner joinColumnOwner, Member member) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaJoinColumn(joinColumnOwner, member);
- }
-
- /**
- * check for changes to the 'specifiedJoinColumns' and
- * 'specifiedInverseJoinColumns' lists so we can notify the
- * model adapter of any changes;
- * also listen for changes to the 'defaultJoinColumns' and
- * 'defaultInverseJoinColumns' lists so we can spank the developer
- */
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(ISingleRelationshipMapping.class)) {
- case JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__OPTIONAL :
- this.optionalAdapter.setValue(((DefaultTrueBoolean) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- case JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS :
- specifiedJoinColumnsChanged(notification);
- break;
- case JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__FETCH :
- this.getFetchAdapter().setValue(((DefaultEagerFetchType) notification.getNewValue()).convertToJavaAnnotationValue());
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void specifiedJoinColumnsChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- specifiedJoinColumnAdded(notification.getPosition(), (IJoinColumn) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- specifiedJoinColumnsAdded(notification.getPosition(), (List<IJoinColumn>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- specifiedJoinColumnRemoved(notification.getPosition(), (IJoinColumn) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- specifiedJoinColumnsCleared((List<IJoinColumn>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- specifiedJoinColumnsRemoved((int[]) notification.getNewValue(), (List<IJoinColumn>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- specifiedJoinColumnSet(notification.getPosition(), (IJoinColumn) notification.getOldValue(), (IJoinColumn) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- specifiedJoinColumnMoved(notification.getOldIntValue(), notification.getPosition(), (IJoinColumn) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- // ********** jpa model -> java annotations **********
- /**
- * slide over all the annotations that follow the new join column
- */
- public void specifiedJoinColumnAdded(int index, IJoinColumn joinColumn) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (((JavaJoinColumn) joinColumn).annotation(getAttribute().astRoot()) == null) {
- this.synchJoinColumnAnnotationsAfterAdd(index + 1);
- ((JavaJoinColumn) joinColumn).newAnnotation();
- }
- }
-
- public void specifiedJoinColumnsAdded(int index, List<IJoinColumn> joinColumns) {
- //JoinColumn was added to persistence model when udating from java, do not need
- //to edit the java in this case. TODO is there a better way to handle this??
- if (!joinColumns.isEmpty() && ((JavaJoinColumn) joinColumns.get(0)).annotation(getAttribute().astRoot()) == null) {
- this.synchJoinColumnAnnotationsAfterAdd(index + joinColumns.size());
- for (Iterator<IJoinColumn> stream = joinColumns.iterator(); stream.hasNext();) {
- JavaJoinColumn joinColumn = (JavaJoinColumn) stream.next();
- joinColumn.newAnnotation();
- }
- }
- }
-
- public void specifiedJoinColumnRemoved(int index, IJoinColumn joinColumn) {
- ((JavaJoinColumn) joinColumn).removeAnnotation();
- this.synchJoinColumnAnnotationsAfterRemove(index);
- }
-
- public void specifiedJoinColumnsRemoved(int[] indexes, List<IJoinColumn> joinColumns) {
- for (Iterator<IJoinColumn> stream = joinColumns.iterator(); stream.hasNext();) {
- JavaJoinColumn joinColumn = (JavaJoinColumn) stream.next();
- joinColumn.removeAnnotation();
- }
- this.synchJoinColumnAnnotationsAfterRemove(indexes[0]);
- }
-
- public void specifiedJoinColumnsCleared(List<IJoinColumn> joinColumns) {
- for (Iterator<IJoinColumn> stream = joinColumns.iterator(); stream.hasNext();) {
- JavaJoinColumn joinColumn = (JavaJoinColumn) stream.next();
- joinColumn.removeAnnotation();
- }
- }
-
- public void specifiedJoinColumnSet(int index, IJoinColumn oldJoinColumn, IJoinColumn newJoinColumn) {
- ((JavaJoinColumn) newJoinColumn).newAnnotation();
- }
-
- public void specifiedJoinColumnMoved(int sourceIndex, int targetIndex, IJoinColumn joinColumn) {
- List<IJoinColumn> joinColumns = getSpecifiedJoinColumns();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchJoinColumnAnnotationsAfterAdd(int index) {
- List<IJoinColumn> joinColumns = getSpecifiedJoinColumns();
- for (int i = joinColumns.size(); i-- > index;) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchJoinColumnAnnotationsAfterRemove(int index) {
- List<IJoinColumn> joinColumns = getSpecifiedJoinColumns();
- for (int i = index; i < joinColumns.size(); i++) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- private void synch(IJoinColumn joinColumn, int index) {
- ((JavaJoinColumn) joinColumn).moveAnnotation(index);
- }
-
- /**
- * return the Java adapter's 'optional' element adapter config
- */
- protected abstract DeclarationAnnotationElementAdapter<String> optionalAdapter();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_SINGLE_RELATIONSHIP_MAPPING;
- }
-
- /**
- * Returns the value of the '<em><b>Fetch</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType
- * @see #setFetch(DefaultEagerFetchType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getISingleRelationshipMapping_Fetch()
- * @model
- * @generated
- */
- public DefaultEagerFetchType getFetch() {
- return fetch;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping#getFetch <em>Fetch</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Fetch</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultEagerFetchType
- * @see #getFetch()
- * @generated
- */
- public void setFetch(DefaultEagerFetchType newFetch) {
- DefaultEagerFetchType oldFetch = fetch;
- fetch = newFetch == null ? FETCH_EDEFAULT : newFetch;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__FETCH, oldFetch, fetch));
- }
-
- public EList<IJoinColumn> getJoinColumns() {
- return this.getSpecifiedJoinColumns().isEmpty() ? this.getDefaultJoinColumns() : this.getSpecifiedJoinColumns();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Join Columns</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 Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getISingleRelationshipMapping_SpecifiedJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IJoinColumn" containment="true"
- * @generated
- */
- public EList<IJoinColumn> getSpecifiedJoinColumns() {
- if (specifiedJoinColumns == null) {
- specifiedJoinColumns = new EObjectContainmentEList<IJoinColumn>(IJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS);
- }
- return specifiedJoinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Default Join Columns</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IJoinColumn}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Join Columns</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 Join Columns</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getISingleRelationshipMapping_DefaultJoinColumns()
- * @model type="org.eclipse.jpt.core.internal.mappings.IJoinColumn" containment="true"
- * @generated
- */
- public EList<IJoinColumn> getDefaultJoinColumns() {
- if (defaultJoinColumns == null) {
- defaultJoinColumns = new EObjectContainmentEList<IJoinColumn>(IJoinColumn.class, this, JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS);
- }
- return defaultJoinColumns;
- }
-
- /**
- * Returns the value of the '<em><b>Optional</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Optional</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Optional</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean
- * @see #setOptional(DefaultTrueBoolean)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getISingleRelationshipMapping_Optional()
- * @model
- * @generated
- */
- public DefaultTrueBoolean getOptional() {
- return optional;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping#getOptional <em>Optional</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Optional</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.DefaultTrueBoolean
- * @see #getOptional()
- * @generated
- */
- public void setOptional(DefaultTrueBoolean newOptional) {
- DefaultTrueBoolean oldOptional = optional;
- optional = newOptional == null ? OPTIONAL_EDEFAULT : newOptional;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL, oldOptional, optional));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS :
- return ((InternalEList<?>) getJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS :
- return ((InternalEList<?>) getSpecifiedJoinColumns()).basicRemove(otherEnd, msgs);
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS :
- return ((InternalEList<?>) getDefaultJoinColumns()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__FETCH :
- return getFetch();
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS :
- return getJoinColumns();
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS :
- return getSpecifiedJoinColumns();
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS :
- return getDefaultJoinColumns();
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL :
- return getOptional();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__FETCH :
- setFetch((DefaultEagerFetchType) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS :
- getSpecifiedJoinColumns().clear();
- getSpecifiedJoinColumns().addAll((Collection<? extends IJoinColumn>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS :
- getDefaultJoinColumns().clear();
- getDefaultJoinColumns().addAll((Collection<? extends IJoinColumn>) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL :
- setOptional((DefaultTrueBoolean) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__FETCH :
- setFetch(FETCH_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS :
- getSpecifiedJoinColumns().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS :
- getDefaultJoinColumns().clear();
- return;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL :
- setOptional(OPTIONAL_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__FETCH :
- return fetch != FETCH_EDEFAULT;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS :
- return !getJoinColumns().isEmpty();
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS :
- return specifiedJoinColumns != null && !specifiedJoinColumns.isEmpty();
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS :
- return defaultJoinColumns != null && !defaultJoinColumns.isEmpty();
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL :
- return optional != OPTIONAL_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == ISingleRelationshipMapping.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__FETCH :
- return JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__FETCH;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS :
- return JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS :
- return JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS;
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL :
- return JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__OPTIONAL;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == ISingleRelationshipMapping.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__FETCH :
- return JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__FETCH;
- case JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS;
- case JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS :
- return JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS;
- case JpaCoreMappingsPackage.ISINGLE_RELATIONSHIP_MAPPING__OPTIONAL :
- return JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (fetch: ");
- result.append(fetch);
- result.append(", optional: ");
- result.append(optional);
- result.append(')');
- return result.toString();
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.updateFetchFromJava(astRoot);
- this.updateSpecifiedJoinColumnsFromJava(astRoot);
- this.setOptional(DefaultTrueBoolean.fromJavaAnnotationValue(this.optionalAdapter.getValue(astRoot)));
- }
-
- /**
- * here we just worry about getting the join column lists the same size;
- * then we delegate to the join columns to synch themselves up
- */
- private void updateSpecifiedJoinColumnsFromJava(CompilationUnit astRoot) {
- // synchronize the model join columns with the Java source
- List<IJoinColumn> joinColumns = getSpecifiedJoinColumns();
- int persSize = joinColumns.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaJoinColumn joinColumn = (JavaJoinColumn) joinColumns.get(i);
- if (joinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- joinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model join columns beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- joinColumns.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaJoinColumn joinColumn = this.createJavaJoinColumn(javaSize);
- if (joinColumn.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- getSpecifiedJoinColumns().add(joinColumn);
- joinColumn.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- @Override
- protected void updateFetchFromJava(CompilationUnit astRoot) {
- setFetch(DefaultEagerFetchType.fromJavaAnnotationValue(this.getFetchAdapter().getValue(astRoot)));
- }
-
- /**
- * extend to eliminate any "container" types
- */
- @Override
- protected String javaDefaultTargetEntity() {
- String typeName = super.javaDefaultTargetEntity();
- // if the attribute is a container, don't use it
- return typeNamedIsContainer(typeName) ? null : typeName;
- }
-
- public boolean containsSpecifiedJoinColumns() {
- return !this.getSpecifiedJoinColumns().isEmpty();
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- for (IJoinColumn column : this.getJoinColumns()) {
- result = ((JavaJoinColumn) column).candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- public IJoinColumn createJoinColumn(int index) {
- return this.createJavaJoinColumn(index);
- }
-
- private JavaJoinColumn createJavaJoinColumn(int index) {
- return JavaJoinColumn.createSingleRelationshipMappingJoinColumn(new JoinColumnOwner(this), this.getAttribute(), index);
- }
-
- // ********** static methods **********
- protected static DeclarationAnnotationElementAdapter<String> buildOptionalAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return new ConversionDeclarationAnnotationElementAdapter<String, BooleanLiteral>(annotationAdapter, elementName, false, BooleanStringExpressionConverter.instance());
- }
-} // JavaSingleRelationshipMapping
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTable.java
deleted file mode 100644
index 85f8693b50..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTable.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.platform.BaseJpaPlatform;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Table</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTable()
- * @model kind="class"
- * @generated
- */
-public class JavaTable extends AbstractJavaTable
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.TABLE);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE__NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE__SCHEMA);
-
- private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE__CATALOG);
-
- protected JavaTable() {
- super();
- throw new UnsupportedOperationException("Use JavaSecondaryTable(Owner, Member) instead");
- }
-
- protected JavaTable(Owner owner, Member member) {
- super(owner, member, DECLARATION_ANNOTATION_ADAPTER);
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> nameAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
- // ignore the daa passed in, @Table is never nested
- return NAME_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> schemaAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
- // ignore the daa passed in, @Table is never nested
- return SCHEMA_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> catalogAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
- // ignore the daa passed in, @Table is never nested
- return CATALOG_ADAPTER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_TABLE;
- }
-
- @Override
- public void refreshDefaults(DefaultsContext defaultsContext) {
- super.refreshDefaults(defaultsContext);
- this.setDefaultName((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_TABLE_NAME_KEY));
- }
-
- @Override
- protected JavaUniqueConstraint createJavaUniqueConstraint(int index) {
- return JavaUniqueConstraint.createTableUniqueConstraint(new UniqueConstraintOwner(this), this.getMember(), index);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTableGenerator.java
deleted file mode 100644
index d6377e8463..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTableGenerator.java
+++ /dev/null
@@ -1,1350 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.List;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.ITableGenerator;
-import org.eclipse.jpt.core.internal.mappings.IUniqueConstraint;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.platform.BaseJpaPlatform;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-import org.eclipse.jpt.db.internal.Schema;
-import org.eclipse.jpt.db.internal.Table;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Table Generator</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTableGenerator()
- * @model kind="class"
- * @generated
- */
-public class JavaTableGenerator extends JavaGenerator
- implements ITableGenerator
-{
- private final AnnotationElementAdapter<String> tableAdapter;
-
- private final AnnotationElementAdapter<String> catalogAdapter;
-
- private final AnnotationElementAdapter<String> schemaAdapter;
-
- private final AnnotationElementAdapter<String> pkColumnNameAdapter;
-
- private final AnnotationElementAdapter<String> valueColumnNameAdapter;
-
- private final AnnotationElementAdapter<String> pkColumnValueAdapter;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.TABLE_GENERATOR);
-
- private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> INITIAL_VALUE_ADAPTER = buildNumberAdapter(JPA.TABLE_GENERATOR__INITIAL_VALUE);
-
- private static final DeclarationAnnotationElementAdapter<String> ALLOCATION_SIZE_ADAPTER = buildNumberAdapter(JPA.TABLE_GENERATOR__ALLOCATION_SIZE);
-
- private static final DeclarationAnnotationElementAdapter<String> TABLE_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__TABLE);
-
- private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__CATALOG);
-
- private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__SCHEMA);
-
- private static final DeclarationAnnotationElementAdapter<String> PK_COLUMN_NAME_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__PK_COLUMN_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> VALUE_COLUMN_NAME_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__VALUE_COLUMN_NAME);
-
- private static final DeclarationAnnotationElementAdapter<String> PK_COLUMN_VALUE_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__PK_COLUMN_VALUE);
-
- /**
- * The default value of the '{@link #getTable() <em>Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTable()
- * @generated
- * @ordered
- */
- protected static final String TABLE_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedTable() <em>Specified Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedTable()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_TABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedTable() <em>Specified Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedTable()
- * @generated
- * @ordered
- */
- protected String specifiedTable = SPECIFIED_TABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultTable() <em>Default Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultTable()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_TABLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultTable() <em>Default Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultTable()
- * @generated
- * @ordered
- */
- protected String defaultTable = DEFAULT_TABLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCatalog()
- * @generated
- * @ordered
- */
- protected static final String CATALOG_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedCatalog() <em>Specified Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedCatalog()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_CATALOG_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedCatalog() <em>Specified Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedCatalog()
- * @generated
- * @ordered
- */
- protected String specifiedCatalog = SPECIFIED_CATALOG_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultCatalog() <em>Default Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultCatalog()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_CATALOG_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultCatalog() <em>Default Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultCatalog()
- * @generated
- * @ordered
- */
- protected String defaultCatalog = DEFAULT_CATALOG_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSchema()
- * @generated
- * @ordered
- */
- protected static final String SCHEMA_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedSchema() <em>Specified Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedSchema()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_SCHEMA_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedSchema() <em>Specified Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedSchema()
- * @generated
- * @ordered
- */
- protected String specifiedSchema = SPECIFIED_SCHEMA_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultSchema() <em>Default Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultSchema()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_SCHEMA_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultSchema() <em>Default Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultSchema()
- * @generated
- * @ordered
- */
- protected String defaultSchema = DEFAULT_SCHEMA_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPkColumnName() <em>Pk Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPkColumnName()
- * @generated
- * @ordered
- */
- protected static final String PK_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedPkColumnName() <em>Specified Pk Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedPkColumnName()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_PK_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedPkColumnName() <em>Specified Pk Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedPkColumnName()
- * @generated
- * @ordered
- */
- protected String specifiedPkColumnName = SPECIFIED_PK_COLUMN_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultPkColumnName() <em>Default Pk Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultPkColumnName()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_PK_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultPkColumnName() <em>Default Pk Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultPkColumnName()
- * @generated
- * @ordered
- */
- protected String defaultPkColumnName = DEFAULT_PK_COLUMN_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getValueColumnName() <em>Value Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValueColumnName()
- * @generated
- * @ordered
- */
- protected static final String VALUE_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedValueColumnName() <em>Specified Value Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedValueColumnName()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_VALUE_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedValueColumnName() <em>Specified Value Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedValueColumnName()
- * @generated
- * @ordered
- */
- protected String specifiedValueColumnName = SPECIFIED_VALUE_COLUMN_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultValueColumnName() <em>Default Value Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultValueColumnName()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_VALUE_COLUMN_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultValueColumnName() <em>Default Value Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultValueColumnName()
- * @generated
- * @ordered
- */
- protected String defaultValueColumnName = DEFAULT_VALUE_COLUMN_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPkColumnValue() <em>Pk Column Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPkColumnValue()
- * @generated
- * @ordered
- */
- protected static final String PK_COLUMN_VALUE_EDEFAULT = null;
-
- /**
- * The default value of the '{@link #getSpecifiedPkColumnValue() <em>Specified Pk Column Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedPkColumnValue()
- * @generated
- * @ordered
- */
- protected static final String SPECIFIED_PK_COLUMN_VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSpecifiedPkColumnValue() <em>Specified Pk Column Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecifiedPkColumnValue()
- * @generated
- * @ordered
- */
- protected String specifiedPkColumnValue = SPECIFIED_PK_COLUMN_VALUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultPkColumnValue() <em>Default Pk Column Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultPkColumnValue()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_PK_COLUMN_VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultPkColumnValue() <em>Default Pk Column Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultPkColumnValue()
- * @generated
- * @ordered
- */
- protected String defaultPkColumnValue = DEFAULT_PK_COLUMN_VALUE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getUniqueConstraints() <em>Unique Constraints</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUniqueConstraints()
- * @generated
- * @ordered
- */
- protected EList<IUniqueConstraint> uniqueConstraints;
-
- protected JavaTableGenerator() {
- throw new UnsupportedOperationException("Use JavaTableGenerator(Member) instead");
- }
-
- protected JavaTableGenerator(Member member) {
- super(member);
- this.tableAdapter = this.buildAdapter(TABLE_ADAPTER);
- this.catalogAdapter = this.buildAdapter(CATALOG_ADAPTER);
- this.schemaAdapter = this.buildAdapter(SCHEMA_ADAPTER);
- this.pkColumnNameAdapter = this.buildAdapter(PK_COLUMN_NAME_ADAPTER);
- this.valueColumnNameAdapter = this.buildAdapter(VALUE_COLUMN_NAME_ADAPTER);
- this.pkColumnValueAdapter = this.buildAdapter(PK_COLUMN_VALUE_ADAPTER);
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(ITableGenerator.class)) {
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_TABLE :
- this.tableAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_CATALOG :
- this.catalogAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_SCHEMA :
- this.schemaAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME :
- this.valueColumnNameAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME :
- this.pkColumnNameAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE :
- this.pkColumnValueAdapter.setValue((String) notification.getNewValue());
- break;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__UNIQUE_CONSTRAINTS :
- uniqueConstraintsChanged(notification);
- break;
- default :
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- void uniqueConstraintsChanged(Notification notification) {
- switch (notification.getEventType()) {
- case Notification.ADD :
- uniqueConstraintAdded(notification.getPosition(), (IUniqueConstraint) notification.getNewValue());
- break;
- case Notification.ADD_MANY :
- uniqueConstraintsAdded(notification.getPosition(), (List<IUniqueConstraint>) notification.getNewValue());
- break;
- case Notification.REMOVE :
- uniqueConstraintRemoved(notification.getPosition(), (IUniqueConstraint) notification.getOldValue());
- break;
- case Notification.REMOVE_MANY :
- if (notification.getPosition() == Notification.NO_INDEX) {
- uniqueConstraintsCleared((List<IUniqueConstraint>) notification.getOldValue());
- }
- else {
- // Notification.getNewValue() returns an array of the positions of objects that were removed
- uniqueConstraintsRemoved((int[]) notification.getNewValue(), (List<IUniqueConstraint>) notification.getOldValue());
- }
- break;
- case Notification.SET :
- if (!notification.isTouch()) {
- uniqueConstraintSet(notification.getPosition(), (IUniqueConstraint) notification.getOldValue(), (IUniqueConstraint) notification.getNewValue());
- }
- break;
- case Notification.MOVE :
- // Notification.getOldValue() returns the source index
- // Notification.getPositon() returns the target index
- // Notification.getNewValue() returns the moved object
- uniqueConstraintMoved(notification.getOldIntValue(), notification.getPosition(), (IUniqueConstraint) notification.getNewValue());
- break;
- default :
- break;
- }
- }
-
- // ********** initialization **********
- @Override
- protected DeclarationAnnotationAdapter annotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> nameAdapter() {
- return NAME_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> initialValueAdapter() {
- return INITIAL_VALUE_ADAPTER;
- }
-
- @Override
- protected DeclarationAnnotationElementAdapter<String> allocationSizeAdapter() {
- return ALLOCATION_SIZE_ADAPTER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_TABLE_GENERATOR;
- }
-
- public String getTable() {
- return (this.getSpecifiedTable() == null) ? getDefaultTable() : this.getSpecifiedTable();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Table</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 Table</em>' attribute.
- * @see #setSpecifiedTable(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_SpecifiedTable()
- * @model
- * @generated
- */
- public String getSpecifiedTable() {
- return specifiedTable;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator#getSpecifiedTable <em>Specified Table</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Table</em>' attribute.
- * @see #getSpecifiedTable()
- * @generated
- */
- public void setSpecifiedTable(String newSpecifiedTable) {
- String oldSpecifiedTable = specifiedTable;
- specifiedTable = newSpecifiedTable;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_TABLE, oldSpecifiedTable, specifiedTable));
- }
-
- /**
- * Returns the value of the '<em><b>Default Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Table</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 Table</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_DefaultTable()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultTable() {
- return defaultTable;
- }
-
- public String getCatalog() {
- return (this.getSpecifiedCatalog() == null) ? getDefaultCatalog() : this.getSpecifiedCatalog();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Catalog</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 Catalog</em>' attribute.
- * @see #setSpecifiedCatalog(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_SpecifiedCatalog()
- * @model
- * @generated
- */
- public String getSpecifiedCatalog() {
- return specifiedCatalog;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator#getSpecifiedCatalog <em>Specified Catalog</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Catalog</em>' attribute.
- * @see #getSpecifiedCatalog()
- * @generated
- */
- public void setSpecifiedCatalog(String newSpecifiedCatalog) {
- String oldSpecifiedCatalog = specifiedCatalog;
- specifiedCatalog = newSpecifiedCatalog;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_CATALOG, oldSpecifiedCatalog, specifiedCatalog));
- }
-
- /**
- * Returns the value of the '<em><b>Default Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Catalog</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 Catalog</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_DefaultCatalog()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultCatalog() {
- return defaultCatalog;
- }
-
- public String getSchema() {
- return (this.getSpecifiedSchema() == null) ? getDefaultSchema() : this.getSpecifiedSchema();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Schema</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 Schema</em>' attribute.
- * @see #setSpecifiedSchema(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_SpecifiedSchema()
- * @model
- * @generated
- */
- public String getSpecifiedSchema() {
- return specifiedSchema;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator#getSpecifiedSchema <em>Specified Schema</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Schema</em>' attribute.
- * @see #getSpecifiedSchema()
- * @generated
- */
- public void setSpecifiedSchema(String newSpecifiedSchema) {
- String oldSpecifiedSchema = specifiedSchema;
- specifiedSchema = newSpecifiedSchema;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_SCHEMA, oldSpecifiedSchema, specifiedSchema));
- }
-
- /**
- * Returns the value of the '<em><b>Default Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Schema</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 Schema</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_DefaultSchema()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultSchema() {
- return defaultSchema;
- }
-
- protected void setDefaultSchema(String newDefaultSchema) {
- String oldDefaultSchema = this.defaultSchema;
- this.defaultSchema = newDefaultSchema;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_SCHEMA, oldDefaultSchema, this.defaultSchema));
- }
-
- public String getPkColumnName() {
- return (this.getSpecifiedPkColumnName() == null) ? getDefaultPkColumnName() : this.getSpecifiedPkColumnName();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Pk Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Pk Column 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 Pk Column Name</em>' attribute.
- * @see #setSpecifiedPkColumnName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_SpecifiedPkColumnName()
- * @model
- * @generated
- */
- public String getSpecifiedPkColumnName() {
- return specifiedPkColumnName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator#getSpecifiedPkColumnName <em>Specified Pk Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Pk Column Name</em>' attribute.
- * @see #getSpecifiedPkColumnName()
- * @generated
- */
- public void setSpecifiedPkColumnName(String newSpecifiedPkColumnName) {
- String oldSpecifiedPkColumnName = specifiedPkColumnName;
- specifiedPkColumnName = newSpecifiedPkColumnName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME, oldSpecifiedPkColumnName, specifiedPkColumnName));
- }
-
- /**
- * Returns the value of the '<em><b>Default Pk Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Pk Column 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 Pk Column Name</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_DefaultPkColumnName()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultPkColumnName() {
- return defaultPkColumnName;
- }
-
- public String getValueColumnName() {
- return (this.getSpecifiedValueColumnName() == null) ? getDefaultValueColumnName() : this.getSpecifiedValueColumnName();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Value Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Value Column 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 Value Column Name</em>' attribute.
- * @see #setSpecifiedValueColumnName(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_SpecifiedValueColumnName()
- * @model
- * @generated
- */
- public String getSpecifiedValueColumnName() {
- return specifiedValueColumnName;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator#getSpecifiedValueColumnName <em>Specified Value Column Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Value Column Name</em>' attribute.
- * @see #getSpecifiedValueColumnName()
- * @generated
- */
- public void setSpecifiedValueColumnName(String newSpecifiedValueColumnName) {
- String oldSpecifiedValueColumnName = specifiedValueColumnName;
- specifiedValueColumnName = newSpecifiedValueColumnName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME, oldSpecifiedValueColumnName, specifiedValueColumnName));
- }
-
- /**
- * Returns the value of the '<em><b>Default Value Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Value Column 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 Value Column Name</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_DefaultValueColumnName()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultValueColumnName() {
- return defaultValueColumnName;
- }
-
- public String getPkColumnValue() {
- return (this.getSpecifiedPkColumnValue() == null) ? getDefaultPkColumnValue() : this.getSpecifiedPkColumnValue();
- }
-
- /**
- * Returns the value of the '<em><b>Specified Pk Column Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Specified Pk Column Value</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 Pk Column Value</em>' attribute.
- * @see #setSpecifiedPkColumnValue(String)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_SpecifiedPkColumnValue()
- * @model
- * @generated
- */
- public String getSpecifiedPkColumnValue() {
- return specifiedPkColumnValue;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator#getSpecifiedPkColumnValue <em>Specified Pk Column Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Specified Pk Column Value</em>' attribute.
- * @see #getSpecifiedPkColumnValue()
- * @generated
- */
- public void setSpecifiedPkColumnValue(String newSpecifiedPkColumnValue) {
- String oldSpecifiedPkColumnValue = specifiedPkColumnValue;
- specifiedPkColumnValue = newSpecifiedPkColumnValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE, oldSpecifiedPkColumnValue, specifiedPkColumnValue));
- }
-
- /**
- * Returns the value of the '<em><b>Default Pk Column Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Pk Column Value</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 Pk Column Value</em>' attribute.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_DefaultPkColumnValue()
- * @model changeable="false"
- * @generated
- */
- public String getDefaultPkColumnValue() {
- return defaultPkColumnValue;
- }
-
- /**
- * Returns the value of the '<em><b>Unique Constraints</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jpt.core.internal.mappings.IUniqueConstraint}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Unique Constraints</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>Unique Constraints</em>' containment reference list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getITableGenerator_UniqueConstraints()
- * @model type="org.eclipse.jpt.core.internal.mappings.IUniqueConstraint" containment="true"
- * @generated
- */
- public EList<IUniqueConstraint> getUniqueConstraints() {
- if (uniqueConstraints == null) {
- uniqueConstraints = new EObjectContainmentEList<IUniqueConstraint>(IUniqueConstraint.class, this, JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__UNIQUE_CONSTRAINTS);
- }
- return uniqueConstraints;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__UNIQUE_CONSTRAINTS :
- return ((InternalEList<?>) getUniqueConstraints()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__TABLE :
- return getTable();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_TABLE :
- return getSpecifiedTable();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_TABLE :
- return getDefaultTable();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__CATALOG :
- return getCatalog();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_CATALOG :
- return getSpecifiedCatalog();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_CATALOG :
- return getDefaultCatalog();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SCHEMA :
- return getSchema();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_SCHEMA :
- return getSpecifiedSchema();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_SCHEMA :
- return getDefaultSchema();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__PK_COLUMN_NAME :
- return getPkColumnName();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME :
- return getSpecifiedPkColumnName();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_PK_COLUMN_NAME :
- return getDefaultPkColumnName();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__VALUE_COLUMN_NAME :
- return getValueColumnName();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME :
- return getSpecifiedValueColumnName();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_VALUE_COLUMN_NAME :
- return getDefaultValueColumnName();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__PK_COLUMN_VALUE :
- return getPkColumnValue();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE :
- return getSpecifiedPkColumnValue();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_PK_COLUMN_VALUE :
- return getDefaultPkColumnValue();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__UNIQUE_CONSTRAINTS :
- return getUniqueConstraints();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_TABLE :
- setSpecifiedTable((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_CATALOG :
- setSpecifiedCatalog((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_SCHEMA :
- setSpecifiedSchema((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME :
- setSpecifiedPkColumnName((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME :
- setSpecifiedValueColumnName((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE :
- setSpecifiedPkColumnValue((String) newValue);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__UNIQUE_CONSTRAINTS :
- getUniqueConstraints().clear();
- getUniqueConstraints().addAll((Collection<? extends IUniqueConstraint>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_TABLE :
- setSpecifiedTable(SPECIFIED_TABLE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_CATALOG :
- setSpecifiedCatalog(SPECIFIED_CATALOG_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_SCHEMA :
- setSpecifiedSchema(SPECIFIED_SCHEMA_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME :
- setSpecifiedPkColumnName(SPECIFIED_PK_COLUMN_NAME_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME :
- setSpecifiedValueColumnName(SPECIFIED_VALUE_COLUMN_NAME_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE :
- setSpecifiedPkColumnValue(SPECIFIED_PK_COLUMN_VALUE_EDEFAULT);
- return;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__UNIQUE_CONSTRAINTS :
- getUniqueConstraints().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__TABLE :
- return TABLE_EDEFAULT == null ? getTable() != null : !TABLE_EDEFAULT.equals(getTable());
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_TABLE :
- return SPECIFIED_TABLE_EDEFAULT == null ? specifiedTable != null : !SPECIFIED_TABLE_EDEFAULT.equals(specifiedTable);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_TABLE :
- return DEFAULT_TABLE_EDEFAULT == null ? defaultTable != null : !DEFAULT_TABLE_EDEFAULT.equals(defaultTable);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__CATALOG :
- return CATALOG_EDEFAULT == null ? getCatalog() != null : !CATALOG_EDEFAULT.equals(getCatalog());
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_CATALOG :
- return SPECIFIED_CATALOG_EDEFAULT == null ? specifiedCatalog != null : !SPECIFIED_CATALOG_EDEFAULT.equals(specifiedCatalog);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_CATALOG :
- return DEFAULT_CATALOG_EDEFAULT == null ? defaultCatalog != null : !DEFAULT_CATALOG_EDEFAULT.equals(defaultCatalog);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SCHEMA :
- return SCHEMA_EDEFAULT == null ? getSchema() != null : !SCHEMA_EDEFAULT.equals(getSchema());
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_SCHEMA :
- return SPECIFIED_SCHEMA_EDEFAULT == null ? specifiedSchema != null : !SPECIFIED_SCHEMA_EDEFAULT.equals(specifiedSchema);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_SCHEMA :
- return DEFAULT_SCHEMA_EDEFAULT == null ? defaultSchema != null : !DEFAULT_SCHEMA_EDEFAULT.equals(defaultSchema);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__PK_COLUMN_NAME :
- return PK_COLUMN_NAME_EDEFAULT == null ? getPkColumnName() != null : !PK_COLUMN_NAME_EDEFAULT.equals(getPkColumnName());
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME :
- return SPECIFIED_PK_COLUMN_NAME_EDEFAULT == null ? specifiedPkColumnName != null : !SPECIFIED_PK_COLUMN_NAME_EDEFAULT.equals(specifiedPkColumnName);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_PK_COLUMN_NAME :
- return DEFAULT_PK_COLUMN_NAME_EDEFAULT == null ? defaultPkColumnName != null : !DEFAULT_PK_COLUMN_NAME_EDEFAULT.equals(defaultPkColumnName);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__VALUE_COLUMN_NAME :
- return VALUE_COLUMN_NAME_EDEFAULT == null ? getValueColumnName() != null : !VALUE_COLUMN_NAME_EDEFAULT.equals(getValueColumnName());
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME :
- return SPECIFIED_VALUE_COLUMN_NAME_EDEFAULT == null ? specifiedValueColumnName != null : !SPECIFIED_VALUE_COLUMN_NAME_EDEFAULT.equals(specifiedValueColumnName);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_VALUE_COLUMN_NAME :
- return DEFAULT_VALUE_COLUMN_NAME_EDEFAULT == null ? defaultValueColumnName != null : !DEFAULT_VALUE_COLUMN_NAME_EDEFAULT.equals(defaultValueColumnName);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__PK_COLUMN_VALUE :
- return PK_COLUMN_VALUE_EDEFAULT == null ? getPkColumnValue() != null : !PK_COLUMN_VALUE_EDEFAULT.equals(getPkColumnValue());
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE :
- return SPECIFIED_PK_COLUMN_VALUE_EDEFAULT == null ? specifiedPkColumnValue != null : !SPECIFIED_PK_COLUMN_VALUE_EDEFAULT.equals(specifiedPkColumnValue);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_PK_COLUMN_VALUE :
- return DEFAULT_PK_COLUMN_VALUE_EDEFAULT == null ? defaultPkColumnValue != null : !DEFAULT_PK_COLUMN_VALUE_EDEFAULT.equals(defaultPkColumnValue);
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__UNIQUE_CONSTRAINTS :
- return uniqueConstraints != null && !uniqueConstraints.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == ITableGenerator.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__TABLE :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__TABLE;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_TABLE :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_TABLE;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_TABLE :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_TABLE;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__CATALOG :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__CATALOG;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_CATALOG :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_CATALOG;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_CATALOG :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_CATALOG;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SCHEMA :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__SCHEMA;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_SCHEMA :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_SCHEMA;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_SCHEMA :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_SCHEMA;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__PK_COLUMN_NAME :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__PK_COLUMN_NAME;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_PK_COLUMN_NAME :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_PK_COLUMN_NAME;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__VALUE_COLUMN_NAME :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__VALUE_COLUMN_NAME;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_VALUE_COLUMN_NAME :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_VALUE_COLUMN_NAME;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__PK_COLUMN_VALUE :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__PK_COLUMN_VALUE;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_PK_COLUMN_VALUE :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_PK_COLUMN_VALUE;
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__UNIQUE_CONSTRAINTS :
- return JpaCoreMappingsPackage.ITABLE_GENERATOR__UNIQUE_CONSTRAINTS;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == ITableGenerator.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__TABLE :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__TABLE;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_TABLE :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_TABLE;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_TABLE :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_TABLE;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__CATALOG :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__CATALOG;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_CATALOG :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_CATALOG;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_CATALOG :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_CATALOG;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__SCHEMA :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SCHEMA;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_SCHEMA :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_SCHEMA;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_SCHEMA :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_SCHEMA;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__PK_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__PK_COLUMN_NAME;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_PK_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_PK_COLUMN_NAME;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__VALUE_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__VALUE_COLUMN_NAME;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_VALUE_COLUMN_NAME :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_VALUE_COLUMN_NAME;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__PK_COLUMN_VALUE :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__PK_COLUMN_VALUE;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__DEFAULT_PK_COLUMN_VALUE :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__DEFAULT_PK_COLUMN_VALUE;
- case JpaCoreMappingsPackage.ITABLE_GENERATOR__UNIQUE_CONSTRAINTS :
- return JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR__UNIQUE_CONSTRAINTS;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (specifiedTable: ");
- result.append(specifiedTable);
- result.append(", defaultTable: ");
- result.append(defaultTable);
- result.append(", specifiedCatalog: ");
- result.append(specifiedCatalog);
- result.append(", defaultCatalog: ");
- result.append(defaultCatalog);
- result.append(", specifiedSchema: ");
- result.append(specifiedSchema);
- result.append(", defaultSchema: ");
- result.append(defaultSchema);
- result.append(", specifiedPkColumnName: ");
- result.append(specifiedPkColumnName);
- result.append(", defaultPkColumnName: ");
- result.append(defaultPkColumnName);
- result.append(", specifiedValueColumnName: ");
- result.append(specifiedValueColumnName);
- result.append(", defaultValueColumnName: ");
- result.append(defaultValueColumnName);
- result.append(", specifiedPkColumnValue: ");
- result.append(specifiedPkColumnValue);
- result.append(", defaultPkColumnValue: ");
- result.append(defaultPkColumnValue);
- result.append(')');
- return result.toString();
- }
-
- // ********** java annotations -> persistence model **********
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- setSpecifiedTable(this.tableAdapter.getValue(astRoot));
- setSpecifiedCatalog(this.catalogAdapter.getValue(astRoot));
- setSpecifiedSchema(this.schemaAdapter.getValue(astRoot));
- setSpecifiedPkColumnName(this.pkColumnNameAdapter.getValue(astRoot));
- setSpecifiedValueColumnName(this.valueColumnNameAdapter.getValue(astRoot));
- setSpecifiedPkColumnValue(this.pkColumnValueAdapter.getValue(astRoot));
- this.updateUniqueConstraintsFromJava(astRoot);
- }
-
- /**
- * here we just worry about getting the unique constraints lists the same size;
- * then we delegate to the unique constraints to synch themselves up
- */
- private void updateUniqueConstraintsFromJava(CompilationUnit astRoot) {
- // synchronize the model join columns with the Java source
- List<IUniqueConstraint> constraints = this.getUniqueConstraints();
- int persSize = constraints.size();
- int javaSize = 0;
- boolean allJavaAnnotationsFound = false;
- for (int i = 0; i < persSize; i++) {
- JavaUniqueConstraint uniqueConstraint = (JavaUniqueConstraint) constraints.get(i);
- if (uniqueConstraint.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- break; // no need to go any further
- }
- uniqueConstraint.updateFromJava(astRoot);
- javaSize++;
- }
- if (allJavaAnnotationsFound) {
- // remove any model join columns beyond those that correspond to the Java annotations
- while (persSize > javaSize) {
- persSize--;
- constraints.remove(persSize);
- }
- }
- else {
- // add new model join columns until they match the Java annotations
- while (!allJavaAnnotationsFound) {
- JavaUniqueConstraint uniqueConstraint = this.createJavaUniqueConstraint(javaSize);
- if (uniqueConstraint.annotation(astRoot) == null) {
- allJavaAnnotationsFound = true;
- }
- else {
- this.getUniqueConstraints().add(uniqueConstraint);
- uniqueConstraint.updateFromJava(astRoot);
- javaSize++;
- }
- }
- }
- }
-
- public void refreshDefaults(DefaultsContext defaultsContext) {
- setDefaultSchema((String) defaultsContext.getDefault(BaseJpaPlatform.DEFAULT_TABLE_GENERATOR_SCHEMA_KEY));
- }
-
- public IUniqueConstraint createUniqueConstraint(int index) {
- return createJavaUniqueConstraint(index);
- }
-
- protected JavaUniqueConstraint createJavaUniqueConstraint(int index) {
- return JavaUniqueConstraint.createTableGeneratorUniqueConstraint(new UniqueConstraintOwner(this), this.getMember(), index);
- }
-
- public Table dbTable() {
- Schema schema = this.dbSchema();
- return (schema == null) ? null : schema.tableNamed(this.getTable());
- }
-
- public Schema dbSchema() {
- return this.database().schemaNamed(this.getSchema());
- }
-
- // ********** jpa model -> java annotations **********
- ////////////////////////////////////////////////////////
- /**
- * slide over all the annotations that follow the new join column
- */
- public void uniqueConstraintAdded(int index, IUniqueConstraint uniqueConstraint) {
- // JoinColumn was added to jpa model when updating from java, do not need
- // to edit the java in this case. TODO is there a better way to handle this??
- if (((JavaUniqueConstraint) uniqueConstraint).annotation(getMember().astRoot()) == null) {
- this.synchUniqueConstraintAnnotationsAfterAdd(index + 1);
- ((JavaUniqueConstraint) uniqueConstraint).newAnnotation();
- }
- }
-
- // bjv look at this
- public void uniqueConstraintsAdded(int index, List<IUniqueConstraint> constraints) {
- // JoinColumn was added to jpa model when updating from java, do not need
- // to edit the java in this case. TODO is there a better way to handle this??
- if (!constraints.isEmpty() && ((JavaUniqueConstraint) constraints.get(0)).annotation(getMember().astRoot()) == null) {
- this.synchUniqueConstraintAnnotationsAfterAdd(index + constraints.size());
- for (IUniqueConstraint uniqueConstraint : constraints) {
- ((JavaUniqueConstraint) uniqueConstraint).newAnnotation();
- }
- }
- }
-
- public void uniqueConstraintRemoved(int index, IUniqueConstraint uniqueConstraint) {
- ((JavaUniqueConstraint) uniqueConstraint).removeAnnotation();
- this.synchUniqueConstraintAnnotationsAfterRemove(index);
- }
-
- public void uniqueConstraintsRemoved(int[] indexes, List<IUniqueConstraint> constraints) {
- for (IUniqueConstraint uniqueConstraint : constraints) {
- ((JavaUniqueConstraint) uniqueConstraint).removeAnnotation();
- }
- this.synchUniqueConstraintAnnotationsAfterRemove(indexes[0]);
- }
-
- public void uniqueConstraintsCleared(List<IUniqueConstraint> constraints) {
- for (IUniqueConstraint uniqueConstraint : constraints) {
- ((JavaUniqueConstraint) uniqueConstraint).removeAnnotation();
- }
- }
-
- public void uniqueConstraintSet(int index, IUniqueConstraint oldUniqueConstraint, IUniqueConstraint newUniqueConstraint) {
- ((JavaUniqueConstraint) newUniqueConstraint).newAnnotation();
- }
-
- public void uniqueConstraintMoved(int sourceIndex, int targetIndex, IUniqueConstraint uniqueConstraint) {
- List<IUniqueConstraint> constraints = this.getUniqueConstraints();
- int begin = Math.min(sourceIndex, targetIndex);
- int end = Math.max(sourceIndex, targetIndex);
- for (int i = begin; i-- > end;) {
- this.synch(constraints.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the end of the list to prevent overlap
- */
- private void synchUniqueConstraintAnnotationsAfterAdd(int index) {
- List<IUniqueConstraint> constraints = this.getUniqueConstraints();
- for (int i = constraints.size(); i-- > index;) {
- this.synch(constraints.get(i), i);
- }
- }
-
- /**
- * synchronize the annotations with the model join columns,
- * starting at the specified index to prevent overlap
- */
- private void synchUniqueConstraintAnnotationsAfterRemove(int index) {
- List<IUniqueConstraint> joinColumns = this.getUniqueConstraints();
- for (int i = index; i < joinColumns.size(); i++) {
- this.synch(joinColumns.get(i), i);
- }
- }
-
- private void synch(IUniqueConstraint uniqueConstraint, int index) {
- ((JavaUniqueConstraint) uniqueConstraint).moveAnnotation(index);
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildAdapter(String elementName) {
- return buildAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
- }
-
- private static DeclarationAnnotationElementAdapter<String> buildNumberAdapter(String elementName) {
- return buildNumberAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
- }
-} // JavaTableGenerator
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTransient.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTransient.java
deleted file mode 100644
index da9c6501f5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTransient.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.ITransient;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Transient</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTransient()
- * @model kind="class"
- * @generated
- */
-public class JavaTransient extends JavaAttributeMapping implements ITransient
-{
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.TRANSIENT);
-
- protected JavaTransient() {
- throw new UnsupportedOperationException("Use JavaTransient(Attribute) instead");
- }
-
- protected JavaTransient(Attribute attribute) {
- super(attribute);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_TRANSIENT;
- }
-
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- public String getKey() {
- return IMappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
- }
-} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTransientProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTransientProvider.java
deleted file mode 100644
index 79b7de88a7..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTransientProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- */
-public class JavaTransientProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaTransientProvider INSTANCE = new JavaTransientProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaTransientProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return false;
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaTransient(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaTransient.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTypeMapping.java
deleted file mode 100644
index ed2ae488fe..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaTypeMapping.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.IPersistentType;
-import org.eclipse.jpt.core.internal.ITextRange;
-import org.eclipse.jpt.core.internal.ITypeMapping;
-import org.eclipse.jpt.core.internal.JpaCorePackage;
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.JavaEObject;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-import org.eclipse.jpt.core.internal.mappings.ITable;
-import org.eclipse.jpt.db.internal.Schema;
-import org.eclipse.jpt.db.internal.Table;
-import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Type Mapping</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTypeMapping()
- * @model kind="class" abstract="true"
- * @generated
- */
-//TODO need a way to morph between mapping types to save any information that is
-//comming to the different TypeMappings. For java, we do not know the other types
-//of mappings since they are defined in an extension point so we can do this the same
-//way as xml.
-public abstract class JavaTypeMapping extends JavaEObject
- implements IJavaTypeMapping
-{
- /**
- * 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 #getTableName() <em>Table Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTableName()
- * @generated
- * @ordered
- */
- protected static final String TABLE_NAME_EDEFAULT = null;
-
- private Type type;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected JavaTypeMapping() {
- super();
- }
-
- protected JavaTypeMapping(Type type) {
- super();
- this.type = type;
- }
-
- /**
- * Return the declaration adapter for the mapping's annotation.
- */
- protected abstract DeclarationAnnotationAdapter declarationAnnotationAdapter();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_TYPE_MAPPING;
- }
-
- public String getName() {
- return this.getType().getName();
- }
-
- public String getTableName() {
- return this.getType().getName();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- public void initialize() {
- // TODO: implement this method
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
- }
-
- public IPersistentType getPersistentType() {
- return (IPersistentType) this.eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_TYPE_MAPPING__NAME :
- return getName();
- case JpaJavaMappingsPackage.JAVA_TYPE_MAPPING__TABLE_NAME :
- return getTableName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_TYPE_MAPPING__NAME :
- return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName());
- case JpaJavaMappingsPackage.JAVA_TYPE_MAPPING__TABLE_NAME :
- return TABLE_NAME_EDEFAULT == null ? getTableName() != null : !TABLE_NAME_EDEFAULT.equals(getTableName());
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == ITypeMapping.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_TYPE_MAPPING__NAME :
- return JpaCorePackage.ITYPE_MAPPING__NAME;
- case JpaJavaMappingsPackage.JAVA_TYPE_MAPPING__TABLE_NAME :
- return JpaCorePackage.ITYPE_MAPPING__TABLE_NAME;
- default :
- return -1;
- }
- }
- if (baseClass == IJavaTypeMapping.class) {
- switch (derivedFeatureID) {
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == ITypeMapping.class) {
- switch (baseFeatureID) {
- case JpaCorePackage.ITYPE_MAPPING__NAME :
- return JpaJavaMappingsPackage.JAVA_TYPE_MAPPING__NAME;
- case JpaCorePackage.ITYPE_MAPPING__TABLE_NAME :
- return JpaJavaMappingsPackage.JAVA_TYPE_MAPPING__TABLE_NAME;
- default :
- return -1;
- }
- }
- if (baseClass == IJavaTypeMapping.class) {
- switch (baseFeatureID) {
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- public void updateFromJava(CompilationUnit astRoot) {
- // do nothing
- }
-
- public Type getType() {
- return this.type;
- }
-
- public ITextRange validationTextRange() {
- ITextRange textRange = this.type.annotationTextRange(this.declarationAnnotationAdapter());
- return (textRange != null) ? textRange : this.getPersistentType().validationTextRange();
- }
-
- public Table primaryDbTable() {
- return null;
- }
-
- public Table dbTable(String tableName) {
- return null;
- }
-
- public Schema dbSchema() {
- return null;
- }
-
- public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
- return true;
- }
-
- public Iterator<ITable> associatedTables() {
- return EmptyIterator.instance();
- }
-
- public Iterator<String> associatedTableNamesIncludingInherited() {
- return EmptyIterator.instance();
- }
-
- public Iterator<ITable> associatedTablesIncludingInherited() {
- return EmptyIterator.instance();
- }
-
- public Iterator<String> overridableAssociationNames() {
- return EmptyIterator.instance();
- }
-
- public Iterator<String> overridableAttributeNames() {
- return EmptyIterator.instance();
- }
-
- public Iterator<String> allOverridableAttributeNames() {
- return EmptyIterator.instance();
- }
-
- public Iterator<String> allOverridableAssociationNames() {
- return EmptyIterator.instance();
- }
-
- public boolean tableNameIsInvalid(String tableName) {
- return false;
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaUniqueConstraint.java
deleted file mode 100644
index a3cd6e981f..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaUniqueConstraint.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Collection;
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.ArrayInitializer;
-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.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ExpressionConverter;
-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.NestedIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitArrayAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.StringArrayExpressionConverter;
-import org.eclipse.jpt.core.internal.mappings.IUniqueConstraint;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.utility.internal.CollectionTools;
-import org.eclipse.jpt.utility.internal.Filter;
-import org.eclipse.jpt.utility.internal.StringTools;
-import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Unique Constraint</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaUniqueConstraint()
- * @model kind="class"
- * @generated
- */
-public class JavaUniqueConstraint extends JavaEObject
- implements IUniqueConstraint
-{
- /**
- * The cached value of the '{@link #getColumnNames() <em>Column Names</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumnNames()
- * @generated
- * @ordered
- */
- protected EList<String> columnNames;
-
- private final IUniqueConstraint.Owner owner;
-
- private final Member member;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.UNIQUE_CONSTRAINT);
-
- private final IndexedDeclarationAnnotationAdapter idaa;
-
- private final IndexedAnnotationAdapter annotationAdapter;
-
- private final DeclarationAnnotationElementAdapter<String[]> columnNamesDeclarationAdapter;
-
- private final AnnotationElementAdapter<String[]> columnNamesAdapter;
-
- protected JavaUniqueConstraint() {
- super();
- throw new UnsupportedOperationException("Use JavaUniqueConstraint(IUniqueConstraint.Owner, Member, IndexedDeclarationAnnotationAdapter) instead");
- }
-
- protected JavaUniqueConstraint(IUniqueConstraint.Owner owner, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- super();
- this.owner = owner;
- this.member = member;
- this.idaa = idaa;
- this.annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
- this.columnNamesDeclarationAdapter = buildArrayAnnotationElementAdapter(idaa, JPA.UNIQUE_CONSTRAINT__COLUMN_NAMES);
- this.columnNamesAdapter = this.buildAnnotationElementAdapter(this.columnNamesDeclarationAdapter);
- }
-
- protected AnnotationElementAdapter<String[]> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String[]> daea) {
- return new ShortCircuitArrayAnnotationElementAdapter<String>(this.member, daea);
- }
-
- protected static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
- return buildArrayAnnotationElementAdapter(annotationAdapter, elementName, StringArrayExpressionConverter.forStringLiterals());
- }
-
- protected static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<String[], ArrayInitializer> converter) {
- return new ConversionDeclarationAnnotationElementAdapter<String[], ArrayInitializer>(annotationAdapter, elementName, false, converter);
- }
-
- @Override
- protected void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- switch (notification.getFeatureID(IUniqueConstraint.class)) {
- case JpaJavaMappingsPackage.JAVA_UNIQUE_CONSTRAINT__COLUMN_NAMES :
- this.columnNamesAdapter.setValue((String[]) getColumnNames().toArray());
- break;
- default :
- break;
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_UNIQUE_CONSTRAINT;
- }
-
- /**
- * Returns the value of the '<em><b>Column Names</b></em>' attribute list.
- * The list contents are of type {@link java.lang.String}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column Names</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column Names</em>' attribute list.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIUniqueConstraint_ColumnNames()
- * @model type="java.lang.String"
- * @generated
- */
- public EList<String> getColumnNames() {
- if (columnNames == null) {
- columnNames = new EDataTypeUniqueEList<String>(String.class, this, JpaJavaMappingsPackage.JAVA_UNIQUE_CONSTRAINT__COLUMN_NAMES);
- }
- return columnNames;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_UNIQUE_CONSTRAINT__COLUMN_NAMES :
- return getColumnNames();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_UNIQUE_CONSTRAINT__COLUMN_NAMES :
- getColumnNames().clear();
- getColumnNames().addAll((Collection<? extends String>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_UNIQUE_CONSTRAINT__COLUMN_NAMES :
- getColumnNames().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_UNIQUE_CONSTRAINT__COLUMN_NAMES :
- return columnNames != null && !columnNames.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IUniqueConstraint.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_UNIQUE_CONSTRAINT__COLUMN_NAMES :
- return JpaCoreMappingsPackage.IUNIQUE_CONSTRAINT__COLUMN_NAMES;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IUniqueConstraint.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IUNIQUE_CONSTRAINT__COLUMN_NAMES :
- return JpaJavaMappingsPackage.JAVA_UNIQUE_CONSTRAINT__COLUMN_NAMES;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (columnNames: ");
- result.append(columnNames);
- result.append(')');
- return result.toString();
- }
-
- public IUniqueConstraint.Owner getOwner() {
- return this.owner;
- }
-
- public ITextRange validationTextRange() {
- return this.member.annotationTextRange(this.idaa);
- }
-
- protected boolean elementTouches(DeclarationAnnotationElementAdapter<?> elementAdapter, int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.member.annotationElementTextRange(elementAdapter, astRoot), pos);
- }
-
- private boolean columnNamesTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.columnNamesDeclarationAdapter, pos, astRoot);
- }
-
- private Iterator<String> candidateColumnNames() {
- return this.getOwner().candidateUniqueConstraintColumnNames();
- }
-
- private Iterator<String> candidateColumnNames(Filter<String> filter) {
- return new FilteringIterator<String>(this.candidateColumnNames(), filter);
- }
-
- private Iterator<String> quotedCandidateColumnNames(Filter<String> filter) {
- return StringTools.quote(this.candidateColumnNames(filter));
- }
-
- @Override
- public Iterator<String> connectedCandidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.connectedCandidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.columnNamesTouches(pos, astRoot)) {
- return this.quotedCandidateColumnNames(filter);
- }
- return null;
- }
-
- /**
- * allow owners to verify the annotation
- */
- public Annotation annotation(CompilationUnit astRoot) {
- return this.annotationAdapter.getAnnotation(astRoot);
- }
-
- public void updateFromJava(CompilationUnit astRoot) {
- updateColumnNamesFromJava(astRoot);
- }
-
- private void updateColumnNamesFromJava(CompilationUnit astRoot) {
- String[] javaColumnNames = this.columnNamesAdapter.getValue(astRoot);
- CollectionTools.retainAll(getColumnNames(), javaColumnNames);
- for (int i = 0; i < javaColumnNames.length; i++) {
- String columnName = javaColumnNames[i];
- if (!getColumnNames().contains(columnName)) {
- getColumnNames().add(columnName);
- }
- }
- }
-
- // ********** persistence model -> java annotations **********
- void moveAnnotation(int newIndex) {
- this.annotationAdapter.moveAnnotation(newIndex);
- }
-
- void newAnnotation() {
- this.annotationAdapter.newMarkerAnnotation();
- }
-
- void removeAnnotation() {
- this.annotationAdapter.removeAnnotation();
- }
-
- // ********** static methods **********
- static JavaUniqueConstraint createSecondaryTableUniqueConstraint(IUniqueConstraint.Owner owner, DeclarationAnnotationAdapter declarationAnnotationAdapter, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaUniqueConstraint(owner, member, buildSecondaryTableUniqueConstraintAnnotationAdapter(declarationAnnotationAdapter, index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildSecondaryTableUniqueConstraintAnnotationAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter, int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(declarationAnnotationAdapter, JPA.SECONDARY_TABLE__UNIQUE_CONSTRAINTS, index, JPA.UNIQUE_CONSTRAINT);
- }
-
- static JavaUniqueConstraint createJoinTableUniqueConstraint(IUniqueConstraint.Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaUniqueConstraint(owner, member, buildJoinTableUniqueConstraintAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildJoinTableUniqueConstraintAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(JavaJoinTable.DECLARATION_ANNOTATION_ADAPTER, JPA.JOIN_TABLE__UNIQUE_CONSTRAINTS, index, JPA.UNIQUE_CONSTRAINT);
- }
-
- static JavaUniqueConstraint createTableUniqueConstraint(IUniqueConstraint.Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaUniqueConstraint(owner, member, buildTableUniqueConstraintAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildTableUniqueConstraintAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(JavaTable.DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE__UNIQUE_CONSTRAINTS, index, JPA.UNIQUE_CONSTRAINT);
- }
-
- static JavaUniqueConstraint createTableGeneratorUniqueConstraint(IUniqueConstraint.Owner owner, Member member, int index) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaUniqueConstraint(owner, member, buildTableGeneratorUniqueConstraintAnnotationAdapter(index));
- }
-
- private static IndexedDeclarationAnnotationAdapter buildTableGeneratorUniqueConstraintAnnotationAdapter(int index) {
- return new NestedIndexedDeclarationAnnotationAdapter(JavaTableGenerator.DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE_GENERATOR__UNIQUE_CONSTRAINTS, index, JPA.UNIQUE_CONSTRAINT);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaVersion.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaVersion.java
deleted file mode 100644
index 4153281e73..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaVersion.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.AnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.SimpleDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.mappings.IColumn;
-import org.eclipse.jpt.core.internal.mappings.IColumnMapping;
-import org.eclipse.jpt.core.internal.mappings.IVersion;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-import org.eclipse.jpt.core.internal.mappings.TemporalType;
-import org.eclipse.jpt.utility.internal.Filter;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Java Version</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaVersion()
- * @model kind="class"
- * @generated
- */
-public class JavaVersion extends JavaAttributeMapping implements IVersion
-{
- private final AnnotationAdapter temporalAnnotationAdapter;
-
- private final AnnotationElementAdapter<String> temporalValueAdapter;
-
- public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.VERSION);
-
- private static final DeclarationAnnotationAdapter TEMPORAL_ADAPTER = new SimpleDeclarationAnnotationAdapter(JPA.TEMPORAL);
-
- private static final DeclarationAnnotationElementAdapter<String> TEMPORAL_VALUE_ADAPTER = buildTemporalValueAdapter();
-
- /**
- * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getColumn()
- * @generated
- * @ordered
- */
- protected IColumn column;
-
- /**
- * The default value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTemporal()
- * @generated
- * @ordered
- */
- protected static final TemporalType TEMPORAL_EDEFAULT = TemporalType.NULL;
-
- /**
- * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTemporal()
- * @generated
- * @ordered
- */
- protected TemporalType temporal = TEMPORAL_EDEFAULT;
-
- protected JavaVersion() {
- throw new UnsupportedOperationException("Use JavaVersion(Attribute) instead");
- }
-
- protected JavaVersion(Attribute attribute) {
- super(attribute);
- this.column = JavaColumn.createColumnMappingColumn(buildColumnOwner(), getAttribute());
- ((InternalEObject) this.column).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JpaJavaMappingsPackage.JAVA_VERSION__COLUMN, null, null);
- this.temporalAnnotationAdapter = new MemberAnnotationAdapter(this.getAttribute(), TEMPORAL_ADAPTER);
- this.temporalValueAdapter = new ShortCircuitAnnotationElementAdapter<String>(attribute, TEMPORAL_VALUE_ADAPTER);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return JpaJavaMappingsPackage.Literals.JAVA_VERSION;
- }
-
- /**
- * Returns the value of the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Column</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Column</em>' containment reference.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIVersion_Column()
- * @model containment="true" required="true" changeable="false"
- * @generated
- */
- public IColumn getColumn() {
- return column;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetColumn(IColumn newColumn, NotificationChain msgs) {
- IColumn oldColumn = column;
- column = newColumn;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_VERSION__COLUMN, oldColumn, newColumn);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * Returns the value of the '<em><b>Temporal</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jpt.core.internal.mappings.TemporalType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.TemporalType
- * @see #setTemporal(TemporalType)
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getIVersion_Temporal()
- * @model
- * @generated
- */
- public TemporalType getTemporal() {
- return temporal;
- }
-
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion#getTemporal <em>Temporal</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Temporal</em>' attribute.
- * @see org.eclipse.jpt.core.internal.mappings.TemporalType
- * @see #getTemporal()
- * @generated
- */
- public void setTemporalGen(TemporalType newTemporal) {
- TemporalType oldTemporal = temporal;
- temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, JpaJavaMappingsPackage.JAVA_VERSION__TEMPORAL, oldTemporal, temporal));
- }
-
- public void setTemporal(TemporalType newTemporal) {
- if (newTemporal != TemporalType.NULL) {
- if (this.temporalAnnotationAdapter.getAnnotation() == null) {
- this.temporalAnnotationAdapter.newMarkerAnnotation();
- }
- this.temporalValueAdapter.setValue(newTemporal.convertToJavaAnnotationValue());
- }
- else if (this.temporalAnnotationAdapter.getAnnotation() != null) {
- this.temporalAnnotationAdapter.removeAnnotation();
- }
- setTemporalGen(newTemporal);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_VERSION__COLUMN :
- return basicSetColumn(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_VERSION__COLUMN :
- return getColumn();
- case JpaJavaMappingsPackage.JAVA_VERSION__TEMPORAL :
- return getTemporal();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_VERSION__TEMPORAL :
- setTemporal((TemporalType) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_VERSION__TEMPORAL :
- setTemporal(TEMPORAL_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case JpaJavaMappingsPackage.JAVA_VERSION__COLUMN :
- return column != null;
- case JpaJavaMappingsPackage.JAVA_VERSION__TEMPORAL :
- return temporal != TEMPORAL_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == IColumnMapping.class) {
- switch (derivedFeatureID) {
- default :
- return -1;
- }
- }
- if (baseClass == IVersion.class) {
- switch (derivedFeatureID) {
- case JpaJavaMappingsPackage.JAVA_VERSION__COLUMN :
- return JpaCoreMappingsPackage.IVERSION__COLUMN;
- case JpaJavaMappingsPackage.JAVA_VERSION__TEMPORAL :
- return JpaCoreMappingsPackage.IVERSION__TEMPORAL;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == IColumnMapping.class) {
- switch (baseFeatureID) {
- default :
- return -1;
- }
- }
- if (baseClass == IVersion.class) {
- switch (baseFeatureID) {
- case JpaCoreMappingsPackage.IVERSION__COLUMN :
- return JpaJavaMappingsPackage.JAVA_VERSION__COLUMN;
- case JpaCoreMappingsPackage.IVERSION__TEMPORAL :
- return JpaJavaMappingsPackage.JAVA_VERSION__TEMPORAL;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (temporal: ");
- result.append(temporal);
- result.append(')');
- return result.toString();
- }
-
- @Override
- protected DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return DECLARATION_ANNOTATION_ADAPTER;
- }
-
- public String getKey() {
- return IMappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
- }
-
- @Override
- public void updateFromJava(CompilationUnit astRoot) {
- super.updateFromJava(astRoot);
- this.updateTemporalFromJava(astRoot);
- this.getJavaColumn().updateFromJava(astRoot);
- }
-
- /*
- * The @Temporal annotation is a bit different than most JPA annotations.
- * For some indecipherable reason it has no default value (e.g. TIMESTAMP).
- * Also, it is *required* for any attribute declared with a type of
- * java.util.Date or java.util.Calendar; otherwise, it is *prohibited*.
- * As a result we allow a Basic mapping to have a null 'temporal',
- * indicating that the annotation is completely missing, as opposed
- * to the annotation being present but its value is invalid (e.g.
- * @Temporal(FRIDAY)).
- *
- * TODO this comment is wrong now, revisit this with Brian at some point
- */
- private void updateTemporalFromJava(CompilationUnit astRoot) {
- if (this.temporalAnnotationAdapter.getAnnotation(astRoot) == null) {
- setTemporalGen(TemporalType.NULL);
- }
- else {
- setTemporalGen(TemporalType.fromJavaAnnotationValue(this.temporalValueAdapter.getValue(astRoot)));
- }
- }
-
- private JavaColumn getJavaColumn() {
- return (JavaColumn) this.column;
- }
-
- @Override
- public Iterator<String> candidateValuesFor(int pos, Filter<String> filter, CompilationUnit astRoot) {
- Iterator<String> result = super.candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- result = this.getJavaColumn().candidateValuesFor(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- return null;
- }
-
- // ********** static methods **********
- private static DeclarationAnnotationElementAdapter<String> buildTemporalValueAdapter() {
- return new EnumDeclarationAnnotationElementAdapter(TEMPORAL_ADAPTER, JPA.TEMPORAL__VALUE, false);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaVersionProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaVersionProvider.java
deleted file mode 100644
index cd556bb4ce..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaVersionProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.content.java.mappings;
-
-import org.eclipse.jpt.core.internal.IMappingKeys;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMappingProvider;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.platform.DefaultsContext;
-
-/**
- *
- */
-public class JavaVersionProvider
- implements IJavaAttributeMappingProvider
-{
-
- // singleton
- private static final JavaVersionProvider INSTANCE = new JavaVersionProvider();
-
- /**
- * Return the singleton.
- */
- public static IJavaAttributeMappingProvider instance() {
- return INSTANCE;
- }
-
- /**
- * Ensure non-instantiability.
- */
- private JavaVersionProvider() {
- super();
- }
-
- public String key() {
- return IMappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
- }
-
- public boolean defaultApplies(Attribute attribute, DefaultsContext defaultsContext) {
- return false;
- }
-
- public IJavaAttributeMapping buildMapping(Attribute attribute) {
- return JpaJavaMappingsFactory.eINSTANCE.createJavaVersion(attribute);
- }
-
- public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
- return JavaVersion.DECLARATION_ANNOTATION_ADAPTER;
- }
-
-}
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
deleted file mode 100644
index cd845074d4..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsFactory.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-import org.eclipse.jpt.core.internal.jdtutility.Attribute;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Member;
-import org.eclipse.jpt.core.internal.jdtutility.NullDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.jdtutility.Type;
-import org.eclipse.jpt.core.internal.mappings.IAbstractJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IColumn;
-import org.eclipse.jpt.core.internal.mappings.IJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IOverride;
-import org.eclipse.jpt.core.internal.mappings.ITable;
-import org.eclipse.jpt.core.internal.mappings.IUniqueConstraint;
-import org.eclipse.jpt.core.internal.mappings.INamedColumn.Owner;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage
- * @generated
- */
-public class JpaJavaMappingsFactory extends EFactoryImpl
-{
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final JpaJavaMappingsFactory eINSTANCE = init();
-
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static JpaJavaMappingsFactory init() {
- try {
- JpaJavaMappingsFactory theJpaJavaMappingsFactory = (JpaJavaMappingsFactory) EPackage.Registry.INSTANCE.getEFactory("jpt.core.java.mappings.xmi");
- if (theJpaJavaMappingsFactory != null) {
- return theJpaJavaMappingsFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new JpaJavaMappingsFactory();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JpaJavaMappingsFactory() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case JpaJavaMappingsPackage.JAVA_ENTITY :
- return createJavaEntity();
- case JpaJavaMappingsPackage.JAVA_MAPPED_SUPERCLASS :
- return createJavaMappedSuperclass();
- case JpaJavaMappingsPackage.JAVA_EMBEDDABLE :
- return createJavaEmbeddable();
- case JpaJavaMappingsPackage.JAVA_NULL_TYPE_MAPPING :
- return createJavaNullTypeMapping();
- case JpaJavaMappingsPackage.JAVA_BASIC :
- return createJavaBasic();
- case JpaJavaMappingsPackage.JAVA_ID :
- return createJavaId();
- case JpaJavaMappingsPackage.JAVA_TRANSIENT :
- return createJavaTransient();
- case JpaJavaMappingsPackage.JAVA_VERSION :
- return createJavaVersion();
- case JpaJavaMappingsPackage.JAVA_EMBEDDED_ID :
- return createJavaEmbeddedId();
- case JpaJavaMappingsPackage.JAVA_EMBEDDED :
- return createJavaEmbedded();
- case JpaJavaMappingsPackage.JAVA_MANY_TO_ONE :
- return createJavaManyToOne();
- case JpaJavaMappingsPackage.JAVA_ONE_TO_ONE :
- return createJavaOneToOne();
- case JpaJavaMappingsPackage.JAVA_ONE_TO_MANY :
- return createJavaOneToMany();
- case JpaJavaMappingsPackage.JAVA_MANY_TO_MANY :
- return createJavaManyToMany();
- case JpaJavaMappingsPackage.JAVA_NULL_ATTRIBUTE_MAPPING :
- return createJavaNullAttributeMapping();
- case JpaJavaMappingsPackage.JAVA_TABLE :
- return createJavaTable();
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE :
- return createJavaSecondaryTable();
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE :
- return createJavaJoinTable();
- case JpaJavaMappingsPackage.JAVA_COLUMN :
- return createJavaColumn();
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN :
- return createJavaJoinColumn();
- case JpaJavaMappingsPackage.JAVA_ATTRIBUTE_OVERRIDE :
- return createJavaAttributeOverride();
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE :
- return createJavaAssociationOverride();
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN :
- return createJavaDiscriminatorColumn();
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN :
- return createJavaPrimaryKeyJoinColumn();
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE :
- return createJavaGeneratedValue();
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR :
- return createJavaTableGenerator();
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR :
- return createJavaSequenceGenerator();
- case JpaJavaMappingsPackage.JAVA_NAMED_QUERY :
- return createJavaNamedQuery();
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY :
- return createJavaNamedNativeQuery();
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT :
- return createJavaQueryHint();
- case JpaJavaMappingsPackage.JAVA_UNIQUE_CONSTRAINT :
- return createJavaUniqueConstraint();
- case JpaJavaMappingsPackage.JAVA_CASCADE :
- return createJavaCascade();
- default :
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- public JavaEntity createJavaEntity() {
- throw new UnsupportedOperationException("Use createJavaEntity(Type) instead");
- }
-
- public JavaEntity createJavaEntity(Type type) {
- JavaEntity javaEntity = new JavaEntity(type);
- return javaEntity;
- }
-
- public JavaMappedSuperclass createJavaMappedSuperclass() {
- throw new UnsupportedOperationException("Use createJavaMappedSuperclass(Type) instead");
- }
-
- public JavaEmbeddable createJavaEmbeddable() {
- throw new UnsupportedOperationException("Use createJavaEmbeddable(Type) instead");
- }
-
- public JavaEmbeddable createJavaEmbeddable(Type type) {
- JavaEmbeddable javaEmbeddable = new JavaEmbeddable(type);
- return javaEmbeddable;
- }
-
- public JavaMappedSuperclass createJavaMappedSuperclass(Type type) {
- JavaMappedSuperclass javaMappedSuperclass = new JavaMappedSuperclass(type);
- return javaMappedSuperclass;
- }
-
- public JavaNullTypeMapping createJavaNullTypeMapping() {
- throw new UnsupportedOperationException("Use createJavaNullTypeMapping(Type) instead");
- }
-
- public JavaNullTypeMapping createJavaNullTypeMapping(Type type) {
- JavaNullTypeMapping javaNullTypeMapping = new JavaNullTypeMapping(type);
- return javaNullTypeMapping;
- }
-
- public JavaNullAttributeMapping createJavaNullAttributeMapping() {
- throw new UnsupportedOperationException("Use createJavaNullAttributeMapping(Attribute) instead");
- }
-
- public JavaNullAttributeMapping createJavaNullAttributeMapping(Attribute attribute) {
- JavaNullAttributeMapping javaNullAttributeMapping = new JavaNullAttributeMapping(attribute);
- return javaNullAttributeMapping;
- }
-
- public JavaBasic createJavaBasic() {
- throw new UnsupportedOperationException("Use createJavaBasic(Attribute) instead");
- }
-
- public JavaBasic createJavaBasic(Attribute attribute) {
- JavaBasic javaBasic = new JavaBasic(attribute);
- return javaBasic;
- }
-
- public JavaId createJavaId() {
- throw new UnsupportedOperationException("Use createJavaId(Attribute) instead");
- }
-
- public JavaTransient createJavaTransient() {
- throw new UnsupportedOperationException("Use createJavaTransient(Attribute) instead");
- }
-
- public JavaVersion createJavaVersion() {
- throw new UnsupportedOperationException("Use createJavaVersion(Attribute) instead");
- }
-
- public JavaVersion createJavaVersion(Attribute attribute) {
- JavaVersion javaVersion = new JavaVersion(attribute);
- return javaVersion;
- }
-
- public JavaEmbeddedId createJavaEmbeddedId() {
- throw new UnsupportedOperationException("Use createJavaEmbeddedId(Attribute) instead");
- }
-
- public JavaEmbeddedId createJavaEmbeddedId(Attribute attribute) {
- JavaEmbeddedId javaEmbeddedId = new JavaEmbeddedId(attribute);
- return javaEmbeddedId;
- }
-
- public JavaEmbedded createJavaEmbedded() {
- throw new UnsupportedOperationException("Use createJavaEmbedded(Attribute) instead");
- }
-
- public JavaEmbedded createJavaEmbedded(Attribute attribute) {
- JavaEmbedded javaEmbedded = new JavaEmbedded(attribute);
- return javaEmbedded;
- }
-
- public JavaTransient createJavaTransient(Attribute attribute) {
- JavaTransient javaTransient = new JavaTransient(attribute);
- return javaTransient;
- }
-
- public JavaId createJavaId(Attribute attribute) {
- JavaId javaId = new JavaId(attribute);
- return javaId;
- }
-
- public JavaTable createJavaTable() {
- throw new UnsupportedOperationException("Use createJavaTable(ITable.Owner, Member) instead");
- }
-
- public JavaTable createJavaTable(ITable.Owner owner, Member member) {
- JavaTable javaTable = new JavaTable(owner, member);
- return javaTable;
- }
-
- public JavaColumn createJavaColumn() {
- throw new UnsupportedOperationException("Use createJavaColumn(Member ) instead");
- }
-
- public JavaOneToMany createJavaOneToMany() {
- throw new UnsupportedOperationException("Use createJavaOneToMany(Attribute) instead");
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaManyToMany createJavaManyToMany() {
- JavaManyToMany javaManyToMany = new JavaManyToMany();
- return javaManyToMany;
- }
-
- public JavaManyToMany createJavaManyToMany(Attribute attribute) {
- JavaManyToMany javaManyToMany = new JavaManyToMany(attribute);
- return javaManyToMany;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaJoinTable createJavaJoinTable() {
- JavaJoinTable javaJoinTable = new JavaJoinTable();
- return javaJoinTable;
- }
-
- public JavaJoinTable createJavaJoinTable(ITable.Owner owner, Member member) {
- JavaJoinTable javaJoinTable = new JavaJoinTable(owner, member);
- return javaJoinTable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaJoinColumn createJavaJoinColumn() {
- JavaJoinColumn javaJoinColumn = new JavaJoinColumn();
- return javaJoinColumn;
- }
-
- public JavaAttributeOverride createJavaAttributeOverride() {
- throw new UnsupportedOperationException();
- }
-
- public JavaAttributeOverride createJavaAttributeOverride(IOverride.Owner owner, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- JavaAttributeOverride javaAttributeOverride = new JavaAttributeOverride(owner, member, idaa);
- return javaAttributeOverride;
- }
-
- public JavaAttributeOverride createJavaAttributeOverride(IOverride.Owner owner, Member member) {
- return this.createJavaAttributeOverride(owner, member, NullDeclarationAnnotationAdapter.instance());
- }
-
- public JavaAssociationOverride createJavaAssociationOverride() {
- throw new UnsupportedOperationException();
- }
-
- public JavaAssociationOverride createJavaAssociationOverride(IOverride.Owner owner, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- JavaAssociationOverride javaAssociationOverride = new JavaAssociationOverride(owner, member, idaa);
- return javaAssociationOverride;
- }
-
- public JavaAssociationOverride createJavaAssociationOverride(IOverride.Owner owner, Member member) {
- return this.createJavaAssociationOverride(owner, member, NullDeclarationAnnotationAdapter.instance());
- }
-
- public JavaDiscriminatorColumn createJavaDiscriminatorColumn() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaPrimaryKeyJoinColumn createJavaPrimaryKeyJoinColumn() {
- JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn = new JavaPrimaryKeyJoinColumn();
- return javaPrimaryKeyJoinColumn;
- }
-
- public JavaGeneratedValue createJavaGeneratedValue() {
- throw new UnsupportedOperationException("Use createJavaGeneratedValue(Member) instead");
- }
-
- public JavaGeneratedValue createJavaGeneratedValue(Member member) {
- JavaGeneratedValue javaGeneratedValue = new JavaGeneratedValue(member);
- return javaGeneratedValue;
- }
-
- public JavaTableGenerator createJavaTableGenerator() {
- throw new UnsupportedOperationException("Use createJavaTableGenerator(Member) instead");
- }
-
- public JavaTableGenerator createJavaTableGenerator(Member member) {
- JavaTableGenerator javaTableGenerator = new JavaTableGenerator(member);
- return javaTableGenerator;
- }
-
- public JavaSequenceGenerator createJavaSequenceGenerator() {
- throw new UnsupportedOperationException("Use createJavaSequenceGenerator(Member) instead");
- }
-
- public JavaNamedQuery createJavaNamedQuery() {
- throw new UnsupportedOperationException("Use createJavaNamedQuery(Member, IndexedDeclarationAnnotationAdapter) instead");
- }
-
- public JavaNamedQuery createJavaNamedQuery(Member member, IndexedDeclarationAnnotationAdapter idaa) {
- JavaNamedQuery javaNamedQuery = new JavaNamedQuery(member, idaa);
- return javaNamedQuery;
- }
-
- public JavaNamedNativeQuery createJavaNamedNativeQuery() {
- throw new UnsupportedOperationException("Use createJavaNamedNativeQuery(Member, IndexedDeclarationAnnotationAdapter) instead");
- }
-
- public JavaNamedNativeQuery createJavaNamedNativeQuery(Member member, IndexedDeclarationAnnotationAdapter idaa) {
- JavaNamedNativeQuery javaNamedNativeQuery = new JavaNamedNativeQuery(member, idaa);
- return javaNamedNativeQuery;
- }
-
- public JavaQueryHint createJavaQueryHint() {
- throw new UnsupportedOperationException("Use createJavaQueryHint(Member, IndexedDeclarationAnnotationAdapter) instead");
- }
-
- public JavaUniqueConstraint createJavaUniqueConstraint() {
- throw new UnsupportedOperationException("Use createJavaUniqueConstraint(Member, IndexedDeclarationAnnotationAdapter) instead");
- }
-
- public JavaCascade createJavaCascade() {
- throw new UnsupportedOperationException("Use createJavaCascade(Attribute, DeclarationAnnotationElementAdapter) instead");
- }
-
- public JavaCascade createJavaCascade(Attribute attribute, DeclarationAnnotationElementAdapter<String[]> cascadeAdapter) {
- JavaCascade javaCascade = new JavaCascade(attribute, cascadeAdapter);
- return javaCascade;
- }
-
- public JavaUniqueConstraint createJavaUniqueConstraint(IUniqueConstraint.Owner owner, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- JavaUniqueConstraint javaUniqueConstraint = new JavaUniqueConstraint(owner, member, idaa);
- return javaUniqueConstraint;
- }
-
- public JavaQueryHint createJavaQueryHint(Member member, IndexedDeclarationAnnotationAdapter idaa) {
- JavaQueryHint javaQueryHint = new JavaQueryHint(member, idaa);
- return javaQueryHint;
- }
-
- public JavaSequenceGenerator createJavaSequenceGenerator(Member member) {
- JavaSequenceGenerator javaSequenceGenerator = new JavaSequenceGenerator(member);
- return javaSequenceGenerator;
- }
-
- public JavaPrimaryKeyJoinColumn createJavaPrimaryKeyJoinColumn(IAbstractJoinColumn.Owner owner, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn = new JavaPrimaryKeyJoinColumn(owner, member, idaa);
- return javaPrimaryKeyJoinColumn;
- }
-
- public JavaSecondaryTable createJavaSecondaryTable() {
- throw new UnsupportedOperationException();
- }
-
- public JavaSecondaryTable createJavaSecondaryTable(ITable.Owner owner, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- JavaSecondaryTable javaSecondaryTable = new JavaSecondaryTable(owner, member, idaa);
- return javaSecondaryTable;
- }
-
- public JavaDiscriminatorColumn createJavaDiscriminatorColumn(Owner owner, Type type, DeclarationAnnotationAdapter daa) {
- JavaDiscriminatorColumn javaDiscriminatorColumn = new JavaDiscriminatorColumn(owner, type, daa);
- return javaDiscriminatorColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JpaJavaMappingsPackage getJpaJavaMappingsPackage() {
- return (JpaJavaMappingsPackage) getEPackage();
- }
-
- public JavaJoinColumn createJavaJoinColumn(IJoinColumn.Owner joinColumnOwner, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- JavaJoinColumn javaJoinColumn = new JavaJoinColumn(joinColumnOwner, member, idaa);
- return javaJoinColumn;
- }
-
- public JavaJoinColumn createJavaJoinColumn(IJoinColumn.Owner joinColumnOwner, Member member) {
- return this.createJavaJoinColumn(joinColumnOwner, member, NullDeclarationAnnotationAdapter.instance());
- }
-
- public JavaManyToOne createJavaManyToOne() {
- throw new UnsupportedOperationException("Use createJavaManyToOne(Attribute) instead");
- }
-
- public JavaOneToOne createJavaOneToOne() {
- throw new UnsupportedOperationException("Use createJavaOneToOne(Attribute) instead");
- }
-
- public JavaOneToOne createJavaOneToOne(Attribute attribute) {
- JavaOneToOne javaOneToOne = new JavaOneToOne(attribute);
- return javaOneToOne;
- }
-
- public JavaManyToOne createJavaManyToOne(Attribute attribute) {
- JavaManyToOne javaManyToOne = new JavaManyToOne(attribute);
- return javaManyToOne;
- }
-
- public JavaOneToMany createJavaOneToMany(Attribute attribute) {
- JavaOneToMany javaOneToMany = new JavaOneToMany(attribute);
- return javaOneToMany;
- }
-
- public JavaColumn createJavaColumn(IColumn.Owner owner, Member member, DeclarationAnnotationAdapter daa) {
- JavaColumn javaColumn = new JavaColumn(owner, member, daa);
- return javaColumn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static JpaJavaMappingsPackage getPackage() {
- return JpaJavaMappingsPackage.eINSTANCE;
- }
-} //JavaMappingsFactory
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
deleted file mode 100644
index da4c6465bf..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JpaJavaMappingsPackage.java
+++ /dev/null
@@ -1,5109 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.jpt.core.internal.JpaCorePackage;
-import org.eclipse.jpt.core.internal.content.java.JpaJavaPackage;
-import org.eclipse.jpt.core.internal.content.orm.OrmPackage;
-import org.eclipse.jpt.core.internal.content.persistence.PersistencePackage;
-import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsFactory
- * @model kind="package"
- * @generated
- */
-public class JpaJavaMappingsPackage extends EPackageImpl
-{
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNAME = "mappings";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_URI = "jpt.core.java.mappings.xmi";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String eNS_PREFIX = "jpt.core.java.mappings";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final JpaJavaMappingsPackage eINSTANCE = org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTypeMapping <em>Java Type Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTypeMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTypeMapping()
- * @generated
- */
- public static final int JAVA_TYPE_MAPPING = 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TYPE_MAPPING__NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Table Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TYPE_MAPPING__TABLE_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Java Type Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TYPE_MAPPING_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity <em>Java Entity</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEntity()
- * @generated
- */
- public static final int JAVA_ENTITY = 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ENTITY__NAME = JAVA_TYPE_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Table Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ENTITY__TABLE_NAME = JAVA_TYPE_MAPPING__TABLE_NAME;
-
- /**
- * The feature id for the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ENTITY__SPECIFIED_NAME = JAVA_TYPE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ENTITY__DEFAULT_NAME = JAVA_TYPE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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 + 4;
-
- /**
- * The feature id for the '<em><b>Specified Primary Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ENTITY__NAMED_NATIVE_QUERIES = JAVA_TYPE_MAPPING_FEATURE_COUNT + 21;
-
- /**
- * The feature id for the '<em><b>Id Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ENTITY__ID_CLASS = JAVA_TYPE_MAPPING_FEATURE_COUNT + 22;
-
- /**
- * The number of structural features of the '<em>Java Entity</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ENTITY_FEATURE_COUNT = JAVA_TYPE_MAPPING_FEATURE_COUNT + 23;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass <em>Java Mapped Superclass</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaMappedSuperclass()
- * @generated
- */
- public static final int JAVA_MAPPED_SUPERCLASS = 2;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MAPPED_SUPERCLASS__NAME = JAVA_TYPE_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Table Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MAPPED_SUPERCLASS__TABLE_NAME = JAVA_TYPE_MAPPING__TABLE_NAME;
-
- /**
- * The feature id for the '<em><b>Id Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MAPPED_SUPERCLASS__ID_CLASS = JAVA_TYPE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Java Mapped Superclass</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MAPPED_SUPERCLASS_FEATURE_COUNT = JAVA_TYPE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddable <em>Java Embeddable</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddable
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEmbeddable()
- * @generated
- */
- public static final int JAVA_EMBEDDABLE = 3;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_EMBEDDABLE__NAME = JAVA_TYPE_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Table Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_EMBEDDABLE__TABLE_NAME = JAVA_TYPE_MAPPING__TABLE_NAME;
-
- /**
- * The number of structural features of the '<em>Java Embeddable</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_EMBEDDABLE_FEATURE_COUNT = JAVA_TYPE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping <em>Java Null Type Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNullTypeMapping()
- * @generated
- */
- public static final int JAVA_NULL_TYPE_MAPPING = 4;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NULL_TYPE_MAPPING__NAME = JAVA_TYPE_MAPPING__NAME;
-
- /**
- * The feature id for the '<em><b>Table Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NULL_TYPE_MAPPING__TABLE_NAME = JAVA_TYPE_MAPPING__TABLE_NAME;
-
- /**
- * The number of structural features of the '<em>Java Null Type Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NULL_TYPE_MAPPING_FEATURE_COUNT = JAVA_TYPE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeMapping <em>Java Attribute Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAttributeMapping()
- * @generated
- */
- public static final int JAVA_ATTRIBUTE_MAPPING = 5;
-
- /**
- * The number of structural features of the '<em>Java Attribute Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapping <em>Java Null Attribute Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNullAttributeMapping()
- * @generated
- */
- public static final int JAVA_NULL_ATTRIBUTE_MAPPING = 19;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic <em>Java Basic</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaBasic()
- * @generated
- */
- public static final int JAVA_BASIC = 6;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_BASIC__FETCH = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Optional</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_BASIC__OPTIONAL = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_BASIC__COLUMN = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Lob</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_BASIC__LOB = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_BASIC__TEMPORAL = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Enumerated</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_BASIC__ENUMERATED = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The number of structural features of the '<em>Java Basic</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_BASIC_FEATURE_COUNT = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 6;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaId <em>Java Id</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaId
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaId()
- * @generated
- */
- public static final int JAVA_ID = 7;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ID__COLUMN = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Generated Value</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ID__GENERATED_VALUE = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ID__TEMPORAL = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Table Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ID__TABLE_GENERATOR = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ID__SEQUENCE_GENERATOR = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The number of structural features of the '<em>Java Id</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ID_FEATURE_COUNT = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTransient <em>Java Transient</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTransient
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTransient()
- * @generated
- */
- public static final int JAVA_TRANSIENT = 8;
-
- /**
- * The number of structural features of the '<em>Java Transient</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TRANSIENT_FEATURE_COUNT = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion <em>Java Version</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaVersion()
- * @generated
- */
- public static final int JAVA_VERSION = 9;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_VERSION__COLUMN = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Temporal</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_VERSION__TEMPORAL = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Java Version</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_VERSION_FEATURE_COUNT = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddedId <em>Java Embedded Id</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddedId
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEmbeddedId()
- * @generated
- */
- public static final int JAVA_EMBEDDED_ID = 10;
-
- /**
- * The number of structural features of the '<em>Java Embedded Id</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_EMBEDDED_ID_FEATURE_COUNT = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbedded <em>Java Embedded</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbedded
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEmbedded()
- * @generated
- */
- public static final int JAVA_EMBEDDED = 11;
-
- /**
- * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_EMBEDDED__ATTRIBUTE_OVERRIDES = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Specified Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_EMBEDDED__SPECIFIED_ATTRIBUTE_OVERRIDES = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Attribute Overrides</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_EMBEDDED__DEFAULT_ATTRIBUTE_OVERRIDES = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Java Embedded</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_EMBEDDED_FEATURE_COUNT = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping <em>Java Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaRelationshipMapping()
- * @generated
- */
- public static final int JAVA_RELATIONSHIP_MAPPING = 12;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_RELATIONSHIP_MAPPING__TARGET_ENTITY = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Specified Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Resolved Target Entity</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_RELATIONSHIP_MAPPING__CASCADE = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The number of structural features of the '<em>Java Relationship Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping <em>Java Single Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaSingleRelationshipMapping()
- * @generated
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING = 13;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING__TARGET_ENTITY = JAVA_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Specified Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY = JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Default Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY = JAVA_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Resolved Target Entity</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY = JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING__CASCADE = JAVA_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING__FETCH = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Specified Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Default Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Optional</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The number of structural features of the '<em>Java Single Relationship Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToOne <em>Java Many To One</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToOne
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaManyToOne()
- * @generated
- */
- public static final int JAVA_MANY_TO_ONE = 14;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE__TARGET_ENTITY = JAVA_SINGLE_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Specified Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE__SPECIFIED_TARGET_ENTITY = JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Default Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE__DEFAULT_TARGET_ENTITY = JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Resolved Target Entity</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE__RESOLVED_TARGET_ENTITY = JAVA_SINGLE_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE__CASCADE = JAVA_SINGLE_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE__FETCH = JAVA_SINGLE_RELATIONSHIP_MAPPING__FETCH;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE__JOIN_COLUMNS = JAVA_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Specified Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE__SPECIFIED_JOIN_COLUMNS = JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Default Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE__DEFAULT_JOIN_COLUMNS = JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Optional</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE__OPTIONAL = JAVA_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL;
-
- /**
- * The number of structural features of the '<em>Java Many To One</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_ONE_FEATURE_COUNT = JAVA_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne <em>Java One To One</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOneToOne()
- * @generated
- */
- public static final int JAVA_ONE_TO_ONE = 15;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__TARGET_ENTITY = JAVA_SINGLE_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Specified Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__SPECIFIED_TARGET_ENTITY = JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Default Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__DEFAULT_TARGET_ENTITY = JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Resolved Target Entity</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__RESOLVED_TARGET_ENTITY = JAVA_SINGLE_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__CASCADE = JAVA_SINGLE_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__FETCH = JAVA_SINGLE_RELATIONSHIP_MAPPING__FETCH;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__JOIN_COLUMNS = JAVA_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Specified Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__SPECIFIED_JOIN_COLUMNS = JAVA_SINGLE_RELATIONSHIP_MAPPING__SPECIFIED_JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Default Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__DEFAULT_JOIN_COLUMNS = JAVA_SINGLE_RELATIONSHIP_MAPPING__DEFAULT_JOIN_COLUMNS;
-
- /**
- * The feature id for the '<em><b>Optional</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__OPTIONAL = JAVA_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL;
-
- /**
- * The feature id for the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE__MAPPED_BY = JAVA_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Java One To One</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_ONE_FEATURE_COUNT = JAVA_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping <em>Java Multi Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaMultiRelationshipMapping()
- * @generated
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING = 16;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__TARGET_ENTITY = JAVA_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Specified Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY = JAVA_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Default Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY = JAVA_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Resolved Target Entity</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY = JAVA_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__CASCADE = JAVA_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Map Key</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 4;
-
- /**
- * The number of structural features of the '<em>Java Multi Relationship Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT = JAVA_RELATIONSHIP_MAPPING_FEATURE_COUNT + 5;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany <em>Java One To Many</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOneToMany()
- * @generated
- */
- public static final int JAVA_ONE_TO_MANY = 17;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY__TARGET_ENTITY = JAVA_MULTI_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Specified Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY__SPECIFIED_TARGET_ENTITY = JAVA_MULTI_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Default Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY__DEFAULT_TARGET_ENTITY = JAVA_MULTI_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Resolved Target Entity</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY__RESOLVED_TARGET_ENTITY = JAVA_MULTI_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY__CASCADE = JAVA_MULTI_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY__MAPPED_BY = JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
-
- /**
- * The feature id for the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY__ORDER_BY = JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY__FETCH = JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY__JOIN_TABLE = JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
-
- /**
- * The feature id for the '<em><b>Map Key</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY__MAP_KEY = JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY;
-
- /**
- * The number of structural features of the '<em>Java One To Many</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ONE_TO_MANY_FEATURE_COUNT = JAVA_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToMany <em>Java Many To Many</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToMany
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaManyToMany()
- * @generated
- */
- public static final int JAVA_MANY_TO_MANY = 18;
-
- /**
- * The feature id for the '<em><b>Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY__TARGET_ENTITY = JAVA_MULTI_RELATIONSHIP_MAPPING__TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Specified Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY__SPECIFIED_TARGET_ENTITY = JAVA_MULTI_RELATIONSHIP_MAPPING__SPECIFIED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Default Target Entity</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY__DEFAULT_TARGET_ENTITY = JAVA_MULTI_RELATIONSHIP_MAPPING__DEFAULT_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Resolved Target Entity</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY__RESOLVED_TARGET_ENTITY = JAVA_MULTI_RELATIONSHIP_MAPPING__RESOLVED_TARGET_ENTITY;
-
- /**
- * The feature id for the '<em><b>Cascade</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY__CASCADE = JAVA_MULTI_RELATIONSHIP_MAPPING__CASCADE;
-
- /**
- * The feature id for the '<em><b>Mapped By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY__MAPPED_BY = JAVA_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
-
- /**
- * The feature id for the '<em><b>Order By</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY__ORDER_BY = JAVA_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
-
- /**
- * The feature id for the '<em><b>Fetch</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY__FETCH = JAVA_MULTI_RELATIONSHIP_MAPPING__FETCH;
-
- /**
- * The feature id for the '<em><b>Join Table</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY__JOIN_TABLE = JAVA_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
-
- /**
- * The feature id for the '<em><b>Map Key</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY__MAP_KEY = JAVA_MULTI_RELATIONSHIP_MAPPING__MAP_KEY;
-
- /**
- * The number of structural features of the '<em>Java Many To Many</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_MANY_TO_MANY_FEATURE_COUNT = JAVA_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Java Null Attribute Mapping</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NULL_ATTRIBUTE_MAPPING_FEATURE_COUNT = JAVA_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable <em>Abstract Java Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getAbstractJavaTable()
- * @generated
- */
- public static final int ABSTRACT_JAVA_TABLE = 20;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE__NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE__SPECIFIED_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE__DEFAULT_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE__CATALOG = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Specified Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Default Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE__DEFAULT_CATALOG = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE__SCHEMA = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Specified Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Default Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE__DEFAULT_SCHEMA = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 9;
-
- /**
- * The number of structural features of the '<em>Abstract Java Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_TABLE_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 10;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTable <em>Java Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTable
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTable()
- * @generated
- */
- public static final int JAVA_TABLE = 21;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE__NAME = ABSTRACT_JAVA_TABLE__NAME;
-
- /**
- * The feature id for the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE__SPECIFIED_NAME = ABSTRACT_JAVA_TABLE__SPECIFIED_NAME;
-
- /**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE__DEFAULT_NAME = ABSTRACT_JAVA_TABLE__DEFAULT_NAME;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE__CATALOG = ABSTRACT_JAVA_TABLE__CATALOG;
-
- /**
- * The feature id for the '<em><b>Specified Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE__SPECIFIED_CATALOG = ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG;
-
- /**
- * The feature id for the '<em><b>Default Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE__DEFAULT_CATALOG = ABSTRACT_JAVA_TABLE__DEFAULT_CATALOG;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE__SCHEMA = ABSTRACT_JAVA_TABLE__SCHEMA;
-
- /**
- * The feature id for the '<em><b>Specified Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE__SPECIFIED_SCHEMA = ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA;
-
- /**
- * The feature id for the '<em><b>Default Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE__DEFAULT_SCHEMA = ABSTRACT_JAVA_TABLE__DEFAULT_SCHEMA;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS;
-
- /**
- * The number of structural features of the '<em>Java Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_FEATURE_COUNT = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinTable <em>Java Join Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinTable
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaJoinTable()
- * @generated
- */
- public static final int JAVA_JOIN_TABLE = 23;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn <em>Java Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaColumn()
- * @generated
- */
- public static final int JAVA_COLUMN = 26;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn <em>Java Join Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaJoinColumn()
- * @generated
- */
- public static final int JAVA_JOIN_COLUMN = 27;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeOverride <em>Java Attribute Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeOverride
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAttributeOverride()
- * @generated
- */
- public static final int JAVA_ATTRIBUTE_OVERRIDE = 29;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAssociationOverride <em>Java Association Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAssociationOverride
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAssociationOverride()
- * @generated
- */
- public static final int JAVA_ASSOCIATION_OVERRIDE = 30;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn <em>Java Discriminator Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaDiscriminatorColumn()
- * @generated
- */
- public static final int JAVA_DISCRIMINATOR_COLUMN = 31;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn <em>Java Primary Key Join Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaPrimaryKeyJoinColumn()
- * @generated
- */
- public static final int JAVA_PRIMARY_KEY_JOIN_COLUMN = 32;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue <em>Java Generated Value</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaGeneratedValue()
- * @generated
- */
- public static final int JAVA_GENERATED_VALUE = 33;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator <em>Java Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaGenerator()
- * @generated
- */
- public static final int JAVA_GENERATOR = 34;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator <em>Java Table Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTableGenerator()
- * @generated
- */
- public static final int JAVA_TABLE_GENERATOR = 35;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator <em>Java Sequence Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaSequenceGenerator()
- * @generated
- */
- public static final int JAVA_SEQUENCE_GENERATOR = 36;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSecondaryTable <em>Java Secondary Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSecondaryTable
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaSecondaryTable()
- * @generated
- */
- public static final int JAVA_SECONDARY_TABLE = 22;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__NAME = ABSTRACT_JAVA_TABLE__NAME;
-
- /**
- * The feature id for the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__SPECIFIED_NAME = ABSTRACT_JAVA_TABLE__SPECIFIED_NAME;
-
- /**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__DEFAULT_NAME = ABSTRACT_JAVA_TABLE__DEFAULT_NAME;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__CATALOG = ABSTRACT_JAVA_TABLE__CATALOG;
-
- /**
- * The feature id for the '<em><b>Specified Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__SPECIFIED_CATALOG = ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG;
-
- /**
- * The feature id for the '<em><b>Default Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__DEFAULT_CATALOG = ABSTRACT_JAVA_TABLE__DEFAULT_CATALOG;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__SCHEMA = ABSTRACT_JAVA_TABLE__SCHEMA;
-
- /**
- * The feature id for the '<em><b>Specified Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__SPECIFIED_SCHEMA = ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA;
-
- /**
- * The feature id for the '<em><b>Default Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__DEFAULT_SCHEMA = ABSTRACT_JAVA_TABLE__DEFAULT_SCHEMA;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS;
-
- /**
- * 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_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Specified Primary Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Primary Key Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE__DEFAULT_PRIMARY_KEY_JOIN_COLUMNS = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Java Secondary Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SECONDARY_TABLE_FEATURE_COUNT = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__NAME = ABSTRACT_JAVA_TABLE__NAME;
-
- /**
- * The feature id for the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__SPECIFIED_NAME = ABSTRACT_JAVA_TABLE__SPECIFIED_NAME;
-
- /**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__DEFAULT_NAME = ABSTRACT_JAVA_TABLE__DEFAULT_NAME;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__CATALOG = ABSTRACT_JAVA_TABLE__CATALOG;
-
- /**
- * The feature id for the '<em><b>Specified Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__SPECIFIED_CATALOG = ABSTRACT_JAVA_TABLE__SPECIFIED_CATALOG;
-
- /**
- * The feature id for the '<em><b>Default Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__DEFAULT_CATALOG = ABSTRACT_JAVA_TABLE__DEFAULT_CATALOG;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__SCHEMA = ABSTRACT_JAVA_TABLE__SCHEMA;
-
- /**
- * The feature id for the '<em><b>Specified Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__SPECIFIED_SCHEMA = ABSTRACT_JAVA_TABLE__SPECIFIED_SCHEMA;
-
- /**
- * The feature id for the '<em><b>Default Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__DEFAULT_SCHEMA = ABSTRACT_JAVA_TABLE__DEFAULT_SCHEMA;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_JAVA_TABLE__UNIQUE_CONSTRAINTS;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__JOIN_COLUMNS = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Specified Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__SPECIFIED_JOIN_COLUMNS = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__DEFAULT_JOIN_COLUMNS = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Inverse Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__INVERSE_JOIN_COLUMNS = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Specified Inverse Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__SPECIFIED_INVERSE_JOIN_COLUMNS = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Default Inverse Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE__DEFAULT_INVERSE_JOIN_COLUMNS = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 5;
-
- /**
- * The number of structural features of the '<em>Java Join Table</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_TABLE_FEATURE_COUNT = ABSTRACT_JAVA_TABLE_FEATURE_COUNT + 6;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedColumn <em>Java Named Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedColumn()
- * @generated
- */
- public static final int JAVA_NAMED_COLUMN = 24;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_COLUMN__NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_COLUMN__SPECIFIED_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_COLUMN__DEFAULT_NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_COLUMN__COLUMN_DEFINITION = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 3;
-
- /**
- * The number of structural features of the '<em>Java Named Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_COLUMN_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn <em>Abstract Java Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getAbstractJavaColumn()
- * @generated
- */
- public static final int ABSTRACT_JAVA_COLUMN = 25;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__NAME = JAVA_NAMED_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__SPECIFIED_NAME = JAVA_NAMED_COLUMN__SPECIFIED_NAME;
-
- /**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__DEFAULT_NAME = JAVA_NAMED_COLUMN__DEFAULT_NAME;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__COLUMN_DEFINITION = JAVA_NAMED_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Unique</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__UNIQUE = JAVA_NAMED_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__NULLABLE = JAVA_NAMED_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__INSERTABLE = JAVA_NAMED_COLUMN_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__UPDATABLE = JAVA_NAMED_COLUMN_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__TABLE = JAVA_NAMED_COLUMN_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Specified Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE = JAVA_NAMED_COLUMN_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Default Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN__DEFAULT_TABLE = JAVA_NAMED_COLUMN_FEATURE_COUNT + 6;
-
- /**
- * The number of structural features of the '<em>Abstract Java Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int ABSTRACT_JAVA_COLUMN_FEATURE_COUNT = JAVA_NAMED_COLUMN_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__NAME = ABSTRACT_JAVA_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__SPECIFIED_NAME = ABSTRACT_JAVA_COLUMN__SPECIFIED_NAME;
-
- /**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__DEFAULT_NAME = ABSTRACT_JAVA_COLUMN__DEFAULT_NAME;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__COLUMN_DEFINITION = ABSTRACT_JAVA_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Unique</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__UNIQUE = ABSTRACT_JAVA_COLUMN__UNIQUE;
-
- /**
- * The feature id for the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__NULLABLE = ABSTRACT_JAVA_COLUMN__NULLABLE;
-
- /**
- * The feature id for the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__INSERTABLE = ABSTRACT_JAVA_COLUMN__INSERTABLE;
-
- /**
- * The feature id for the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__UPDATABLE = ABSTRACT_JAVA_COLUMN__UPDATABLE;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__TABLE = ABSTRACT_JAVA_COLUMN__TABLE;
-
- /**
- * The feature id for the '<em><b>Specified Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__SPECIFIED_TABLE = ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE;
-
- /**
- * The feature id for the '<em><b>Default Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__DEFAULT_TABLE = ABSTRACT_JAVA_COLUMN__DEFAULT_TABLE;
-
- /**
- * The feature id for the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__LENGTH = ABSTRACT_JAVA_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Precision</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__PRECISION = ABSTRACT_JAVA_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Scale</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN__SCALE = ABSTRACT_JAVA_COLUMN_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Java Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_COLUMN_FEATURE_COUNT = ABSTRACT_JAVA_COLUMN_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__NAME = ABSTRACT_JAVA_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__SPECIFIED_NAME = ABSTRACT_JAVA_COLUMN__SPECIFIED_NAME;
-
- /**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__DEFAULT_NAME = ABSTRACT_JAVA_COLUMN__DEFAULT_NAME;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__COLUMN_DEFINITION = ABSTRACT_JAVA_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Unique</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__UNIQUE = ABSTRACT_JAVA_COLUMN__UNIQUE;
-
- /**
- * The feature id for the '<em><b>Nullable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__NULLABLE = ABSTRACT_JAVA_COLUMN__NULLABLE;
-
- /**
- * The feature id for the '<em><b>Insertable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__INSERTABLE = ABSTRACT_JAVA_COLUMN__INSERTABLE;
-
- /**
- * The feature id for the '<em><b>Updatable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__UPDATABLE = ABSTRACT_JAVA_COLUMN__UPDATABLE;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__TABLE = ABSTRACT_JAVA_COLUMN__TABLE;
-
- /**
- * The feature id for the '<em><b>Specified Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__SPECIFIED_TABLE = ABSTRACT_JAVA_COLUMN__SPECIFIED_TABLE;
-
- /**
- * The feature id for the '<em><b>Default Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__DEFAULT_TABLE = ABSTRACT_JAVA_COLUMN__DEFAULT_TABLE;
-
- /**
- * The feature id for the '<em><b>Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__REFERENCED_COLUMN_NAME = ABSTRACT_JAVA_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Specified Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__SPECIFIED_REFERENCED_COLUMN_NAME = ABSTRACT_JAVA_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Referenced Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN__DEFAULT_REFERENCED_COLUMN_NAME = ABSTRACT_JAVA_COLUMN_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Java Join Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_JOIN_COLUMN_FEATURE_COUNT = ABSTRACT_JAVA_COLUMN_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride <em>Java Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOverride()
- * @generated
- */
- public static final int JAVA_OVERRIDE = 28;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_OVERRIDE__NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Java Override</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_OVERRIDE_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ATTRIBUTE_OVERRIDE__NAME = JAVA_OVERRIDE__NAME;
-
- /**
- * The feature id for the '<em><b>Column</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ATTRIBUTE_OVERRIDE__COLUMN = JAVA_OVERRIDE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Java Attribute Override</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ATTRIBUTE_OVERRIDE_FEATURE_COUNT = JAVA_OVERRIDE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ASSOCIATION_OVERRIDE__NAME = JAVA_OVERRIDE__NAME;
-
- /**
- * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ASSOCIATION_OVERRIDE__JOIN_COLUMNS = JAVA_OVERRIDE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Specified Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ASSOCIATION_OVERRIDE__SPECIFIED_JOIN_COLUMNS = JAVA_OVERRIDE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Join Columns</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ASSOCIATION_OVERRIDE__DEFAULT_JOIN_COLUMNS = JAVA_OVERRIDE_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Java Association Override</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ASSOCIATION_OVERRIDE_FEATURE_COUNT = JAVA_OVERRIDE_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_DISCRIMINATOR_COLUMN__NAME = JAVA_NAMED_COLUMN__NAME;
-
- /**
- * The feature id for the '<em><b>Specified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_NAME = JAVA_NAMED_COLUMN__SPECIFIED_NAME;
-
- /**
- * The feature id for the '<em><b>Default Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_DISCRIMINATOR_COLUMN__DEFAULT_NAME = JAVA_NAMED_COLUMN__DEFAULT_NAME;
-
- /**
- * The feature id for the '<em><b>Column Definition</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = JAVA_NAMED_COLUMN__COLUMN_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = JAVA_NAMED_COLUMN_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Default Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_DISCRIMINATOR_COLUMN__DEFAULT_LENGTH = JAVA_NAMED_COLUMN_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Specified Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_DISCRIMINATOR_COLUMN__SPECIFIED_LENGTH = JAVA_NAMED_COLUMN_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_DISCRIMINATOR_COLUMN__LENGTH = JAVA_NAMED_COLUMN_FEATURE_COUNT + 3;
-
- /**
- * The number of structural features of the '<em>Java Discriminator Column</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_DISCRIMINATOR_COLUMN_FEATURE_COUNT = JAVA_NAMED_COLUMN_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATED_VALUE__STRATEGY = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Generator</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATED_VALUE__GENERATOR = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Java Generated Value</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATED_VALUE_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATOR__NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATOR__INITIAL_VALUE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Specified Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Default Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATOR__DEFAULT_INITIAL_VALUE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATOR__ALLOCATION_SIZE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Specified Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Default Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATOR__DEFAULT_ALLOCATION_SIZE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 6;
-
- /**
- * The number of structural features of the '<em>Java Generator</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_GENERATOR_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__NAME = JAVA_GENERATOR__NAME;
-
- /**
- * The feature id for the '<em><b>Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__INITIAL_VALUE = JAVA_GENERATOR__INITIAL_VALUE;
-
- /**
- * The feature id for the '<em><b>Specified Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__SPECIFIED_INITIAL_VALUE = JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE;
-
- /**
- * The feature id for the '<em><b>Default Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__DEFAULT_INITIAL_VALUE = JAVA_GENERATOR__DEFAULT_INITIAL_VALUE;
-
- /**
- * The feature id for the '<em><b>Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__ALLOCATION_SIZE = JAVA_GENERATOR__ALLOCATION_SIZE;
-
- /**
- * The feature id for the '<em><b>Specified Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__SPECIFIED_ALLOCATION_SIZE = JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE;
-
- /**
- * The feature id for the '<em><b>Default Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__DEFAULT_ALLOCATION_SIZE = JAVA_GENERATOR__DEFAULT_ALLOCATION_SIZE;
-
- /**
- * The feature id for the '<em><b>Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__TABLE = JAVA_GENERATOR_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Specified Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__SPECIFIED_TABLE = JAVA_GENERATOR_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Table</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__DEFAULT_TABLE = JAVA_GENERATOR_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__CATALOG = JAVA_GENERATOR_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Specified Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__SPECIFIED_CATALOG = JAVA_GENERATOR_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Default Catalog</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__DEFAULT_CATALOG = JAVA_GENERATOR_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__SCHEMA = JAVA_GENERATOR_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Specified Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__SPECIFIED_SCHEMA = JAVA_GENERATOR_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Default Schema</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__DEFAULT_SCHEMA = JAVA_GENERATOR_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Pk Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__PK_COLUMN_NAME = JAVA_GENERATOR_FEATURE_COUNT + 9;
-
- /**
- * The feature id for the '<em><b>Specified Pk Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_NAME = JAVA_GENERATOR_FEATURE_COUNT + 10;
-
- /**
- * The feature id for the '<em><b>Default Pk Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__DEFAULT_PK_COLUMN_NAME = JAVA_GENERATOR_FEATURE_COUNT + 11;
-
- /**
- * The feature id for the '<em><b>Value Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__VALUE_COLUMN_NAME = JAVA_GENERATOR_FEATURE_COUNT + 12;
-
- /**
- * The feature id for the '<em><b>Specified Value Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__SPECIFIED_VALUE_COLUMN_NAME = JAVA_GENERATOR_FEATURE_COUNT + 13;
-
- /**
- * The feature id for the '<em><b>Default Value Column Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__DEFAULT_VALUE_COLUMN_NAME = JAVA_GENERATOR_FEATURE_COUNT + 14;
-
- /**
- * The feature id for the '<em><b>Pk Column Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__PK_COLUMN_VALUE = JAVA_GENERATOR_FEATURE_COUNT + 15;
-
- /**
- * The feature id for the '<em><b>Specified Pk Column Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__SPECIFIED_PK_COLUMN_VALUE = JAVA_GENERATOR_FEATURE_COUNT + 16;
-
- /**
- * The feature id for the '<em><b>Default Pk Column Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__DEFAULT_PK_COLUMN_VALUE = JAVA_GENERATOR_FEATURE_COUNT + 17;
-
- /**
- * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR__UNIQUE_CONSTRAINTS = JAVA_GENERATOR_FEATURE_COUNT + 18;
-
- /**
- * The number of structural features of the '<em>Java Table Generator</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_TABLE_GENERATOR_FEATURE_COUNT = JAVA_GENERATOR_FEATURE_COUNT + 19;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR__NAME = JAVA_GENERATOR__NAME;
-
- /**
- * The feature id for the '<em><b>Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR__INITIAL_VALUE = JAVA_GENERATOR__INITIAL_VALUE;
-
- /**
- * The feature id for the '<em><b>Specified Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR__SPECIFIED_INITIAL_VALUE = JAVA_GENERATOR__SPECIFIED_INITIAL_VALUE;
-
- /**
- * The feature id for the '<em><b>Default Initial Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR__DEFAULT_INITIAL_VALUE = JAVA_GENERATOR__DEFAULT_INITIAL_VALUE;
-
- /**
- * The feature id for the '<em><b>Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR__ALLOCATION_SIZE = JAVA_GENERATOR__ALLOCATION_SIZE;
-
- /**
- * The feature id for the '<em><b>Specified Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR__SPECIFIED_ALLOCATION_SIZE = JAVA_GENERATOR__SPECIFIED_ALLOCATION_SIZE;
-
- /**
- * The feature id for the '<em><b>Default Allocation Size</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR__DEFAULT_ALLOCATION_SIZE = JAVA_GENERATOR__DEFAULT_ALLOCATION_SIZE;
-
- /**
- * The feature id for the '<em><b>Sequence Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR__SEQUENCE_NAME = JAVA_GENERATOR_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Specified Sequence Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR__SPECIFIED_SEQUENCE_NAME = JAVA_GENERATOR_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Sequence Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR__DEFAULT_SEQUENCE_NAME = JAVA_GENERATOR_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Java Sequence Generator</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_SEQUENCE_GENERATOR_FEATURE_COUNT = JAVA_GENERATOR_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery <em>Java Abstract Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAbstractQuery()
- * @generated
- */
- public static final int JAVA_ABSTRACT_QUERY = 37;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ABSTRACT_QUERY__NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Query</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ABSTRACT_QUERY__QUERY = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Hints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ABSTRACT_QUERY__HINTS = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Java Abstract Query</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_ABSTRACT_QUERY_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedQuery <em>Java Named Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedQuery
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedQuery()
- * @generated
- */
- public static final int JAVA_NAMED_QUERY = 38;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_QUERY__NAME = JAVA_ABSTRACT_QUERY__NAME;
-
- /**
- * The feature id for the '<em><b>Query</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_QUERY__QUERY = JAVA_ABSTRACT_QUERY__QUERY;
-
- /**
- * The feature id for the '<em><b>Hints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_QUERY__HINTS = JAVA_ABSTRACT_QUERY__HINTS;
-
- /**
- * The number of structural features of the '<em>Java Named Query</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_QUERY_FEATURE_COUNT = JAVA_ABSTRACT_QUERY_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery <em>Java Named Native Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedNativeQuery()
- * @generated
- */
- public static final int JAVA_NAMED_NATIVE_QUERY = 39;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_NATIVE_QUERY__NAME = JAVA_ABSTRACT_QUERY__NAME;
-
- /**
- * The feature id for the '<em><b>Query</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_NATIVE_QUERY__QUERY = JAVA_ABSTRACT_QUERY__QUERY;
-
- /**
- * The feature id for the '<em><b>Hints</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_NATIVE_QUERY__HINTS = JAVA_ABSTRACT_QUERY__HINTS;
-
- /**
- * The feature id for the '<em><b>Result Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_NATIVE_QUERY__RESULT_CLASS = JAVA_ABSTRACT_QUERY_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Result Set Mapping</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING = JAVA_ABSTRACT_QUERY_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Java Named Native Query</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_NAMED_NATIVE_QUERY_FEATURE_COUNT = JAVA_ABSTRACT_QUERY_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint <em>Java Query Hint</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaQueryHint()
- * @generated
- */
- public static final int JAVA_QUERY_HINT = 40;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_QUERY_HINT__NAME = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_QUERY_HINT__VALUE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Java Query Hint</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_QUERY_HINT_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaUniqueConstraint <em>Java Unique Constraint</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaUniqueConstraint
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaUniqueConstraint()
- * @generated
- */
- public static final int JAVA_UNIQUE_CONSTRAINT = 41;
-
- /**
- * The feature id for the '<em><b>Column Names</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_UNIQUE_CONSTRAINT__COLUMN_NAMES = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Java Unique Constraint</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_UNIQUE_CONSTRAINT_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade <em>Java Cascade</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaCascade()
- * @generated
- */
- public static final int JAVA_CASCADE = 42;
-
- /**
- * The feature id for the '<em><b>All</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_CASCADE__ALL = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Persist</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_CASCADE__PERSIST = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Merge</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_CASCADE__MERGE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Remove</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_CASCADE__REMOVE = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Refresh</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_CASCADE__REFRESH = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 4;
-
- /**
- * The number of structural features of the '<em>Java Cascade</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public static final int JAVA_CASCADE_FEATURE_COUNT = JpaJavaPackage.JAVA_EOBJECT_FEATURE_COUNT + 5;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaEntityEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaMappedSuperclassEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaEmbeddableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaNullTypeMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaNullAttributeMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaBasicEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaIdEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaTransientEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaVersionEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaEmbeddedIdEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaEmbeddedEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaAttributeMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaTypeMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractJavaTableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaTableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaRelationshipMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaSingleRelationshipMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaManyToOneEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaOneToOneEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaMultiRelationshipMappingEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaOneToManyEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaManyToManyEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaJoinTableEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaNamedColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractJavaColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaJoinColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaOverrideEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaAttributeOverrideEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaAssociationOverrideEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaDiscriminatorColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaPrimaryKeyJoinColumnEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaGeneratedValueEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaGeneratorEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaTableGeneratorEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaSequenceGeneratorEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaAbstractQueryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaNamedQueryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaNamedNativeQueryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaQueryHintEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaUniqueConstraintEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaCascadeEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass javaSecondaryTableEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private JpaJavaMappingsPackage() {
- super(eNS_URI, JpaJavaMappingsFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * <p>Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- * <p>Invocation of this method will not affect any packages that have
- * already been initialized.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static JpaJavaMappingsPackage init() {
- if (isInited)
- return (JpaJavaMappingsPackage) EPackage.Registry.INSTANCE.getEPackage(JpaJavaMappingsPackage.eNS_URI);
- // Obtain or create and register package
- JpaJavaMappingsPackage theJpaJavaMappingsPackage = (JpaJavaMappingsPackage) (EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof JpaJavaMappingsPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new JpaJavaMappingsPackage());
- isInited = true;
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
- // Obtain or create and register interdependencies
- JpaCorePackage theJpaCorePackage = (JpaCorePackage) (EPackage.Registry.INSTANCE.getEPackage(JpaCorePackage.eNS_URI) instanceof JpaCorePackage ? EPackage.Registry.INSTANCE.getEPackage(JpaCorePackage.eNS_URI) : JpaCorePackage.eINSTANCE);
- JpaCoreMappingsPackage theJpaCoreMappingsPackage = (JpaCoreMappingsPackage) (EPackage.Registry.INSTANCE.getEPackage(JpaCoreMappingsPackage.eNS_URI) instanceof JpaCoreMappingsPackage ? EPackage.Registry.INSTANCE.getEPackage(JpaCoreMappingsPackage.eNS_URI) : JpaCoreMappingsPackage.eINSTANCE);
- JpaJavaPackage theJpaJavaPackage = (JpaJavaPackage) (EPackage.Registry.INSTANCE.getEPackage(JpaJavaPackage.eNS_URI) instanceof JpaJavaPackage ? EPackage.Registry.INSTANCE.getEPackage(JpaJavaPackage.eNS_URI) : JpaJavaPackage.eINSTANCE);
- OrmPackage theOrmPackage = (OrmPackage) (EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) : OrmPackage.eINSTANCE);
- PersistencePackage thePersistencePackage = (PersistencePackage) (EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) : PersistencePackage.eINSTANCE);
- // Create package meta-data objects
- theJpaJavaMappingsPackage.createPackageContents();
- theJpaCorePackage.createPackageContents();
- theJpaCoreMappingsPackage.createPackageContents();
- theJpaJavaPackage.createPackageContents();
- theOrmPackage.createPackageContents();
- thePersistencePackage.createPackageContents();
- // Initialize created meta-data
- theJpaJavaMappingsPackage.initializePackageContents();
- theJpaCorePackage.initializePackageContents();
- theJpaCoreMappingsPackage.initializePackageContents();
- theJpaJavaPackage.initializePackageContents();
- theOrmPackage.initializePackageContents();
- thePersistencePackage.initializePackageContents();
- // Mark meta-data to indicate it can't be changed
- theJpaJavaMappingsPackage.freeze();
- return theJpaJavaMappingsPackage;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity <em>Java Entity</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Entity</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity
- * @generated
- */
- public EClass getJavaEntity() {
- return javaEntityEClass;
- }
-
- /**
- * 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 -->
- * @return the meta object for class '<em>Java Mapped Superclass</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass
- * @generated
- */
- public EClass getJavaMappedSuperclass() {
- return javaMappedSuperclassEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddable <em>Java Embeddable</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Embeddable</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddable
- * @generated
- */
- public EClass getJavaEmbeddable() {
- return javaEmbeddableEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping <em>Java Null Type Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Null Type Mapping</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping
- * @generated
- */
- public EClass getJavaNullTypeMapping() {
- return javaNullTypeMappingEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapping <em>Java Null Attribute Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Null Attribute Mapping</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapping
- * @generated
- */
- public EClass getJavaNullAttributeMapping() {
- return javaNullAttributeMappingEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic <em>Java Basic</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Basic</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic
- * @generated
- */
- public EClass getJavaBasic() {
- return javaBasicEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaId <em>Java Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Id</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaId
- * @generated
- */
- public EClass getJavaId() {
- return javaIdEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTransient <em>Java Transient</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Transient</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTransient
- * @generated
- */
- public EClass getJavaTransient() {
- return javaTransientEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion <em>Java Version</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Version</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion
- * @generated
- */
- public EClass getJavaVersion() {
- return javaVersionEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddedId <em>Java Embedded Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Embedded Id</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddedId
- * @generated
- */
- public EClass getJavaEmbeddedId() {
- return javaEmbeddedIdEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbedded <em>Java Embedded</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Embedded</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbedded
- * @generated
- */
- public EClass getJavaEmbedded() {
- return javaEmbeddedEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeMapping <em>Java Attribute Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Attribute Mapping</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeMapping
- * @generated
- */
- public EClass getJavaAttributeMapping() {
- return javaAttributeMappingEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTypeMapping <em>Java Type Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Type Mapping</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTypeMapping
- * @generated
- */
- public EClass getJavaTypeMapping() {
- return javaTypeMappingEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable <em>Abstract Java Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Java Table</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable
- * @generated
- */
- public EClass getAbstractJavaTable() {
- return abstractJavaTableEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTable <em>Java Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Table</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTable
- * @generated
- */
- public EClass getJavaTable() {
- return javaTableEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn <em>Java Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Column</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn
- * @generated
- */
- public EClass getJavaColumn() {
- return javaColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping <em>Java Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Relationship Mapping</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping
- * @generated
- */
- public EClass getJavaRelationshipMapping() {
- return javaRelationshipMappingEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping <em>Java Single Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Single Relationship Mapping</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping
- * @generated
- */
- public EClass getJavaSingleRelationshipMapping() {
- return javaSingleRelationshipMappingEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToOne <em>Java Many To One</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Many To One</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToOne
- * @generated
- */
- public EClass getJavaManyToOne() {
- return javaManyToOneEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne <em>Java One To One</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java One To One</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne
- * @generated
- */
- public EClass getJavaOneToOne() {
- return javaOneToOneEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping <em>Java Multi Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Multi Relationship Mapping</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping
- * @generated
- */
- public EClass getJavaMultiRelationshipMapping() {
- return javaMultiRelationshipMappingEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany <em>Java One To Many</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java One To Many</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany
- * @generated
- */
- public EClass getJavaOneToMany() {
- return javaOneToManyEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToMany <em>Java Many To Many</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Many To Many</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToMany
- * @generated
- */
- public EClass getJavaManyToMany() {
- return javaManyToManyEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinTable <em>Java Join Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Join Table</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinTable
- * @generated
- */
- public EClass getJavaJoinTable() {
- return javaJoinTableEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedColumn <em>Java Named Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Named Column</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedColumn
- * @generated
- */
- public EClass getJavaNamedColumn() {
- return javaNamedColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn <em>Abstract Java Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Java Column</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn
- * @generated
- */
- public EClass getAbstractJavaColumn() {
- return abstractJavaColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn <em>Java Join Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Join Column</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn
- * @generated
- */
- public EClass getJavaJoinColumn() {
- return javaJoinColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride <em>Java Override</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Override</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride
- * @generated
- */
- public EClass getJavaOverride() {
- return javaOverrideEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeOverride <em>Java Attribute Override</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Attribute Override</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeOverride
- * @generated
- */
- public EClass getJavaAttributeOverride() {
- return javaAttributeOverrideEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAssociationOverride <em>Java Association Override</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Association Override</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAssociationOverride
- * @generated
- */
- public EClass getJavaAssociationOverride() {
- return javaAssociationOverrideEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn <em>Java Discriminator Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Discriminator Column</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn
- * @generated
- */
- public EClass getJavaDiscriminatorColumn() {
- return javaDiscriminatorColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn <em>Java Primary Key Join Column</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Primary Key Join Column</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn
- * @generated
- */
- public EClass getJavaPrimaryKeyJoinColumn() {
- return javaPrimaryKeyJoinColumnEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue <em>Java Generated Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Generated Value</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue
- * @generated
- */
- public EClass getJavaGeneratedValue() {
- return javaGeneratedValueEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator <em>Java Generator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Generator</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator
- * @generated
- */
- public EClass getJavaGenerator() {
- return javaGeneratorEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator <em>Java Table Generator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Table Generator</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator
- * @generated
- */
- public EClass getJavaTableGenerator() {
- return javaTableGeneratorEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator <em>Java Sequence Generator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Sequence Generator</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator
- * @generated
- */
- public EClass getJavaSequenceGenerator() {
- return javaSequenceGeneratorEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery <em>Java Abstract Query</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Abstract Query</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery
- * @generated
- */
- public EClass getJavaAbstractQuery() {
- return javaAbstractQueryEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedQuery <em>Java Named Query</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Named Query</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedQuery
- * @generated
- */
- public EClass getJavaNamedQuery() {
- return javaNamedQueryEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery <em>Java Named Native Query</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Named Native Query</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery
- * @generated
- */
- public EClass getJavaNamedNativeQuery() {
- return javaNamedNativeQueryEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint <em>Java Query Hint</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Query Hint</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint
- * @generated
- */
- public EClass getJavaQueryHint() {
- return javaQueryHintEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaUniqueConstraint <em>Java Unique Constraint</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Unique Constraint</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaUniqueConstraint
- * @generated
- */
- public EClass getJavaUniqueConstraint() {
- return javaUniqueConstraintEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade <em>Java Cascade</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Cascade</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade
- * @generated
- */
- public EClass getJavaCascade() {
- return javaCascadeEClass;
- }
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSecondaryTable <em>Java Secondary Table</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Java Secondary Table</em>'.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSecondaryTable
- * @generated
- */
- public EClass getJavaSecondaryTable() {
- return javaSecondaryTableEClass;
- }
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- public JpaJavaMappingsFactory getJpaJavaMappingsFactory() {
- return (JpaJavaMappingsFactory) getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated)
- return;
- isCreated = true;
- // Create classes and their features
- javaTypeMappingEClass = createEClass(JAVA_TYPE_MAPPING);
- javaEntityEClass = createEClass(JAVA_ENTITY);
- javaMappedSuperclassEClass = createEClass(JAVA_MAPPED_SUPERCLASS);
- javaEmbeddableEClass = createEClass(JAVA_EMBEDDABLE);
- javaNullTypeMappingEClass = createEClass(JAVA_NULL_TYPE_MAPPING);
- javaAttributeMappingEClass = createEClass(JAVA_ATTRIBUTE_MAPPING);
- javaBasicEClass = createEClass(JAVA_BASIC);
- javaIdEClass = createEClass(JAVA_ID);
- javaTransientEClass = createEClass(JAVA_TRANSIENT);
- javaVersionEClass = createEClass(JAVA_VERSION);
- javaEmbeddedIdEClass = createEClass(JAVA_EMBEDDED_ID);
- javaEmbeddedEClass = createEClass(JAVA_EMBEDDED);
- javaRelationshipMappingEClass = createEClass(JAVA_RELATIONSHIP_MAPPING);
- javaSingleRelationshipMappingEClass = createEClass(JAVA_SINGLE_RELATIONSHIP_MAPPING);
- javaManyToOneEClass = createEClass(JAVA_MANY_TO_ONE);
- javaOneToOneEClass = createEClass(JAVA_ONE_TO_ONE);
- javaMultiRelationshipMappingEClass = createEClass(JAVA_MULTI_RELATIONSHIP_MAPPING);
- javaOneToManyEClass = createEClass(JAVA_ONE_TO_MANY);
- javaManyToManyEClass = createEClass(JAVA_MANY_TO_MANY);
- javaNullAttributeMappingEClass = createEClass(JAVA_NULL_ATTRIBUTE_MAPPING);
- abstractJavaTableEClass = createEClass(ABSTRACT_JAVA_TABLE);
- javaTableEClass = createEClass(JAVA_TABLE);
- javaSecondaryTableEClass = createEClass(JAVA_SECONDARY_TABLE);
- javaJoinTableEClass = createEClass(JAVA_JOIN_TABLE);
- javaNamedColumnEClass = createEClass(JAVA_NAMED_COLUMN);
- abstractJavaColumnEClass = createEClass(ABSTRACT_JAVA_COLUMN);
- javaColumnEClass = createEClass(JAVA_COLUMN);
- javaJoinColumnEClass = createEClass(JAVA_JOIN_COLUMN);
- javaOverrideEClass = createEClass(JAVA_OVERRIDE);
- javaAttributeOverrideEClass = createEClass(JAVA_ATTRIBUTE_OVERRIDE);
- javaAssociationOverrideEClass = createEClass(JAVA_ASSOCIATION_OVERRIDE);
- javaDiscriminatorColumnEClass = createEClass(JAVA_DISCRIMINATOR_COLUMN);
- javaPrimaryKeyJoinColumnEClass = createEClass(JAVA_PRIMARY_KEY_JOIN_COLUMN);
- javaGeneratedValueEClass = createEClass(JAVA_GENERATED_VALUE);
- javaGeneratorEClass = createEClass(JAVA_GENERATOR);
- javaTableGeneratorEClass = createEClass(JAVA_TABLE_GENERATOR);
- javaSequenceGeneratorEClass = createEClass(JAVA_SEQUENCE_GENERATOR);
- javaAbstractQueryEClass = createEClass(JAVA_ABSTRACT_QUERY);
- javaNamedQueryEClass = createEClass(JAVA_NAMED_QUERY);
- javaNamedNativeQueryEClass = createEClass(JAVA_NAMED_NATIVE_QUERY);
- javaQueryHintEClass = createEClass(JAVA_QUERY_HINT);
- javaUniqueConstraintEClass = createEClass(JAVA_UNIQUE_CONSTRAINT);
- javaCascadeEClass = createEClass(JAVA_CASCADE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized)
- return;
- isInitialized = true;
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
- // Obtain other dependent packages
- JpaJavaPackage theJpaJavaPackage = (JpaJavaPackage) EPackage.Registry.INSTANCE.getEPackage(JpaJavaPackage.eNS_URI);
- JpaCoreMappingsPackage theJpaCoreMappingsPackage = (JpaCoreMappingsPackage) EPackage.Registry.INSTANCE.getEPackage(JpaCoreMappingsPackage.eNS_URI);
- // Create type parameters
- // Set bounds for type parameters
- // Add supertypes to classes
- javaTypeMappingEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaTypeMappingEClass.getESuperTypes().add(theJpaJavaPackage.getIJavaTypeMapping());
- javaEntityEClass.getESuperTypes().add(this.getJavaTypeMapping());
- javaEntityEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIEntity());
- javaMappedSuperclassEClass.getESuperTypes().add(this.getJavaTypeMapping());
- javaMappedSuperclassEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIMappedSuperclass());
- javaEmbeddableEClass.getESuperTypes().add(this.getJavaTypeMapping());
- javaEmbeddableEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIEmbeddable());
- javaNullTypeMappingEClass.getESuperTypes().add(this.getJavaTypeMapping());
- javaAttributeMappingEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaAttributeMappingEClass.getESuperTypes().add(theJpaJavaPackage.getIJavaAttributeMapping());
- javaBasicEClass.getESuperTypes().add(this.getJavaAttributeMapping());
- javaBasicEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIBasic());
- javaIdEClass.getESuperTypes().add(this.getJavaAttributeMapping());
- javaIdEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIId());
- javaTransientEClass.getESuperTypes().add(this.getJavaAttributeMapping());
- javaTransientEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getITransient());
- javaVersionEClass.getESuperTypes().add(this.getJavaAttributeMapping());
- javaVersionEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIVersion());
- javaEmbeddedIdEClass.getESuperTypes().add(this.getJavaAttributeMapping());
- javaEmbeddedIdEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIEmbeddedId());
- javaEmbeddedEClass.getESuperTypes().add(this.getJavaAttributeMapping());
- javaEmbeddedEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIEmbedded());
- javaRelationshipMappingEClass.getESuperTypes().add(this.getJavaAttributeMapping());
- javaRelationshipMappingEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIRelationshipMapping());
- javaSingleRelationshipMappingEClass.getESuperTypes().add(this.getJavaRelationshipMapping());
- javaSingleRelationshipMappingEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getISingleRelationshipMapping());
- javaManyToOneEClass.getESuperTypes().add(this.getJavaSingleRelationshipMapping());
- javaManyToOneEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIManyToOne());
- javaOneToOneEClass.getESuperTypes().add(this.getJavaSingleRelationshipMapping());
- javaOneToOneEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIOneToOne());
- javaMultiRelationshipMappingEClass.getESuperTypes().add(this.getJavaRelationshipMapping());
- javaMultiRelationshipMappingEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIMultiRelationshipMapping());
- javaOneToManyEClass.getESuperTypes().add(this.getJavaMultiRelationshipMapping());
- javaOneToManyEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIOneToMany());
- javaManyToManyEClass.getESuperTypes().add(this.getJavaMultiRelationshipMapping());
- javaManyToManyEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIManyToMany());
- javaNullAttributeMappingEClass.getESuperTypes().add(this.getJavaAttributeMapping());
- abstractJavaTableEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- abstractJavaTableEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getITable());
- javaTableEClass.getESuperTypes().add(this.getAbstractJavaTable());
- javaSecondaryTableEClass.getESuperTypes().add(this.getAbstractJavaTable());
- javaSecondaryTableEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getISecondaryTable());
- javaJoinTableEClass.getESuperTypes().add(this.getAbstractJavaTable());
- javaJoinTableEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIJoinTable());
- javaNamedColumnEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaNamedColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getINamedColumn());
- abstractJavaColumnEClass.getESuperTypes().add(this.getJavaNamedColumn());
- abstractJavaColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIAbstractColumn());
- javaColumnEClass.getESuperTypes().add(this.getAbstractJavaColumn());
- javaColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIColumn());
- javaJoinColumnEClass.getESuperTypes().add(this.getAbstractJavaColumn());
- javaJoinColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIJoinColumn());
- javaOverrideEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaOverrideEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIOverride());
- javaAttributeOverrideEClass.getESuperTypes().add(this.getJavaOverride());
- javaAttributeOverrideEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIAttributeOverride());
- javaAssociationOverrideEClass.getESuperTypes().add(this.getJavaOverride());
- javaAssociationOverrideEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIAssociationOverride());
- javaDiscriminatorColumnEClass.getESuperTypes().add(this.getJavaNamedColumn());
- javaDiscriminatorColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIDiscriminatorColumn());
- javaPrimaryKeyJoinColumnEClass.getESuperTypes().add(this.getJavaNamedColumn());
- javaPrimaryKeyJoinColumnEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIPrimaryKeyJoinColumn());
- javaGeneratedValueEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaGeneratedValueEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIGeneratedValue());
- javaGeneratorEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaGeneratorEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIGenerator());
- javaTableGeneratorEClass.getESuperTypes().add(this.getJavaGenerator());
- javaTableGeneratorEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getITableGenerator());
- javaSequenceGeneratorEClass.getESuperTypes().add(this.getJavaGenerator());
- javaSequenceGeneratorEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getISequenceGenerator());
- javaAbstractQueryEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaAbstractQueryEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIQuery());
- javaNamedQueryEClass.getESuperTypes().add(this.getJavaAbstractQuery());
- javaNamedQueryEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getINamedQuery());
- javaNamedNativeQueryEClass.getESuperTypes().add(this.getJavaAbstractQuery());
- javaNamedNativeQueryEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getINamedNativeQuery());
- javaQueryHintEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaQueryHintEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIQueryHint());
- javaUniqueConstraintEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaUniqueConstraintEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getIUniqueConstraint());
- javaCascadeEClass.getESuperTypes().add(theJpaJavaPackage.getJavaEObject());
- javaCascadeEClass.getESuperTypes().add(theJpaCoreMappingsPackage.getICascade());
- // 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);
- 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);
- initEClass(javaAttributeMappingEClass, JavaAttributeMapping.class, "JavaAttributeMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaBasicEClass, JavaBasic.class, "JavaBasic", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaIdEClass, JavaId.class, "JavaId", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaTransientEClass, JavaTransient.class, "JavaTransient", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaVersionEClass, JavaVersion.class, "JavaVersion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaEmbeddedIdEClass, JavaEmbeddedId.class, "JavaEmbeddedId", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaEmbeddedEClass, JavaEmbedded.class, "JavaEmbedded", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaRelationshipMappingEClass, JavaRelationshipMapping.class, "JavaRelationshipMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaSingleRelationshipMappingEClass, JavaSingleRelationshipMapping.class, "JavaSingleRelationshipMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaManyToOneEClass, JavaManyToOne.class, "JavaManyToOne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaOneToOneEClass, JavaOneToOne.class, "JavaOneToOne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaMultiRelationshipMappingEClass, JavaMultiRelationshipMapping.class, "JavaMultiRelationshipMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaOneToManyEClass, JavaOneToMany.class, "JavaOneToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaManyToManyEClass, JavaManyToMany.class, "JavaManyToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaNullAttributeMappingEClass, JavaNullAttributeMapping.class, "JavaNullAttributeMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(abstractJavaTableEClass, AbstractJavaTable.class, "AbstractJavaTable", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaTableEClass, JavaTable.class, "JavaTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaSecondaryTableEClass, JavaSecondaryTable.class, "JavaSecondaryTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaJoinTableEClass, JavaJoinTable.class, "JavaJoinTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaNamedColumnEClass, JavaNamedColumn.class, "JavaNamedColumn", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(abstractJavaColumnEClass, AbstractJavaColumn.class, "AbstractJavaColumn", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaColumnEClass, JavaColumn.class, "JavaColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaJoinColumnEClass, JavaJoinColumn.class, "JavaJoinColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaOverrideEClass, JavaOverride.class, "JavaOverride", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaAttributeOverrideEClass, JavaAttributeOverride.class, "JavaAttributeOverride", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaAssociationOverrideEClass, JavaAssociationOverride.class, "JavaAssociationOverride", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaDiscriminatorColumnEClass, JavaDiscriminatorColumn.class, "JavaDiscriminatorColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaPrimaryKeyJoinColumnEClass, JavaPrimaryKeyJoinColumn.class, "JavaPrimaryKeyJoinColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaGeneratedValueEClass, JavaGeneratedValue.class, "JavaGeneratedValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaGeneratorEClass, JavaGenerator.class, "JavaGenerator", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaTableGeneratorEClass, JavaTableGenerator.class, "JavaTableGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaSequenceGeneratorEClass, JavaSequenceGenerator.class, "JavaSequenceGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaAbstractQueryEClass, JavaAbstractQuery.class, "JavaAbstractQuery", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaNamedQueryEClass, JavaNamedQuery.class, "JavaNamedQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaNamedNativeQueryEClass, JavaNamedNativeQuery.class, "JavaNamedNativeQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaQueryHintEClass, JavaQueryHint.class, "JavaQueryHint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaUniqueConstraintEClass, JavaUniqueConstraint.class, "JavaUniqueConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEClass(javaCascadeEClass, JavaCascade.class, "JavaCascade", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- }
-
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- public interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity <em>Java Entity</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEntity()
- * @generated
- */
- public static final EClass JAVA_ENTITY = eINSTANCE.getJavaEntity();
-
- /**
- * 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 -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaMappedSuperclass()
- * @generated
- */
- public static final EClass JAVA_MAPPED_SUPERCLASS = eINSTANCE.getJavaMappedSuperclass();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddable <em>Java Embeddable</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddable
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEmbeddable()
- * @generated
- */
- public static final EClass JAVA_EMBEDDABLE = eINSTANCE.getJavaEmbeddable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping <em>Java Null Type Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNullTypeMapping()
- * @generated
- */
- public static final EClass JAVA_NULL_TYPE_MAPPING = eINSTANCE.getJavaNullTypeMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapping <em>Java Null Attribute Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNullAttributeMapping()
- * @generated
- */
- public static final EClass JAVA_NULL_ATTRIBUTE_MAPPING = eINSTANCE.getJavaNullAttributeMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic <em>Java Basic</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaBasic()
- * @generated
- */
- public static final EClass JAVA_BASIC = eINSTANCE.getJavaBasic();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaId <em>Java Id</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaId
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaId()
- * @generated
- */
- public static final EClass JAVA_ID = eINSTANCE.getJavaId();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTransient <em>Java Transient</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTransient
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTransient()
- * @generated
- */
- public static final EClass JAVA_TRANSIENT = eINSTANCE.getJavaTransient();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion <em>Java Version</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaVersion()
- * @generated
- */
- public static final EClass JAVA_VERSION = eINSTANCE.getJavaVersion();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddedId <em>Java Embedded Id</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddedId
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEmbeddedId()
- * @generated
- */
- public static final EClass JAVA_EMBEDDED_ID = eINSTANCE.getJavaEmbeddedId();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbedded <em>Java Embedded</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbedded
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaEmbedded()
- * @generated
- */
- public static final EClass JAVA_EMBEDDED = eINSTANCE.getJavaEmbedded();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeMapping <em>Java Attribute Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAttributeMapping()
- * @generated
- */
- public static final EClass JAVA_ATTRIBUTE_MAPPING = eINSTANCE.getJavaAttributeMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTypeMapping <em>Java Type Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTypeMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTypeMapping()
- * @generated
- */
- public static final EClass JAVA_TYPE_MAPPING = eINSTANCE.getJavaTypeMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable <em>Abstract Java Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getAbstractJavaTable()
- * @generated
- */
- public static final EClass ABSTRACT_JAVA_TABLE = eINSTANCE.getAbstractJavaTable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTable <em>Java Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTable
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTable()
- * @generated
- */
- public static final EClass JAVA_TABLE = eINSTANCE.getJavaTable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn <em>Java Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaColumn()
- * @generated
- */
- public static final EClass JAVA_COLUMN = eINSTANCE.getJavaColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping <em>Java Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaRelationshipMapping()
- * @generated
- */
- public static final EClass JAVA_RELATIONSHIP_MAPPING = eINSTANCE.getJavaRelationshipMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping <em>Java Single Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaSingleRelationshipMapping()
- * @generated
- */
- public static final EClass JAVA_SINGLE_RELATIONSHIP_MAPPING = eINSTANCE.getJavaSingleRelationshipMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToOne <em>Java Many To One</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToOne
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaManyToOne()
- * @generated
- */
- public static final EClass JAVA_MANY_TO_ONE = eINSTANCE.getJavaManyToOne();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne <em>Java One To One</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOneToOne()
- * @generated
- */
- public static final EClass JAVA_ONE_TO_ONE = eINSTANCE.getJavaOneToOne();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping <em>Java Multi Relationship Mapping</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaMultiRelationshipMapping()
- * @generated
- */
- public static final EClass JAVA_MULTI_RELATIONSHIP_MAPPING = eINSTANCE.getJavaMultiRelationshipMapping();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany <em>Java One To Many</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOneToMany()
- * @generated
- */
- public static final EClass JAVA_ONE_TO_MANY = eINSTANCE.getJavaOneToMany();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToMany <em>Java Many To Many</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToMany
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaManyToMany()
- * @generated
- */
- public static final EClass JAVA_MANY_TO_MANY = eINSTANCE.getJavaManyToMany();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinTable <em>Java Join Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinTable
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaJoinTable()
- * @generated
- */
- public static final EClass JAVA_JOIN_TABLE = eINSTANCE.getJavaJoinTable();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedColumn <em>Java Named Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedColumn()
- * @generated
- */
- public static final EClass JAVA_NAMED_COLUMN = eINSTANCE.getJavaNamedColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn <em>Abstract Java Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getAbstractJavaColumn()
- * @generated
- */
- public static final EClass ABSTRACT_JAVA_COLUMN = eINSTANCE.getAbstractJavaColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn <em>Java Join Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaJoinColumn()
- * @generated
- */
- public static final EClass JAVA_JOIN_COLUMN = eINSTANCE.getJavaJoinColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride <em>Java Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaOverride()
- * @generated
- */
- public static final EClass JAVA_OVERRIDE = eINSTANCE.getJavaOverride();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeOverride <em>Java Attribute Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeOverride
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAttributeOverride()
- * @generated
- */
- public static final EClass JAVA_ATTRIBUTE_OVERRIDE = eINSTANCE.getJavaAttributeOverride();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAssociationOverride <em>Java Association Override</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAssociationOverride
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAssociationOverride()
- * @generated
- */
- public static final EClass JAVA_ASSOCIATION_OVERRIDE = eINSTANCE.getJavaAssociationOverride();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn <em>Java Discriminator Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaDiscriminatorColumn()
- * @generated
- */
- public static final EClass JAVA_DISCRIMINATOR_COLUMN = eINSTANCE.getJavaDiscriminatorColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn <em>Java Primary Key Join Column</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaPrimaryKeyJoinColumn()
- * @generated
- */
- public static final EClass JAVA_PRIMARY_KEY_JOIN_COLUMN = eINSTANCE.getJavaPrimaryKeyJoinColumn();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue <em>Java Generated Value</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaGeneratedValue()
- * @generated
- */
- public static final EClass JAVA_GENERATED_VALUE = eINSTANCE.getJavaGeneratedValue();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator <em>Java Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaGenerator()
- * @generated
- */
- public static final EClass JAVA_GENERATOR = eINSTANCE.getJavaGenerator();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator <em>Java Table Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaTableGenerator()
- * @generated
- */
- public static final EClass JAVA_TABLE_GENERATOR = eINSTANCE.getJavaTableGenerator();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator <em>Java Sequence Generator</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaSequenceGenerator()
- * @generated
- */
- public static final EClass JAVA_SEQUENCE_GENERATOR = eINSTANCE.getJavaSequenceGenerator();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery <em>Java Abstract Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaAbstractQuery()
- * @generated
- */
- public static final EClass JAVA_ABSTRACT_QUERY = eINSTANCE.getJavaAbstractQuery();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedQuery <em>Java Named Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedQuery
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedQuery()
- * @generated
- */
- public static final EClass JAVA_NAMED_QUERY = eINSTANCE.getJavaNamedQuery();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery <em>Java Named Native Query</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaNamedNativeQuery()
- * @generated
- */
- public static final EClass JAVA_NAMED_NATIVE_QUERY = eINSTANCE.getJavaNamedNativeQuery();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint <em>Java Query Hint</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaQueryHint()
- * @generated
- */
- public static final EClass JAVA_QUERY_HINT = eINSTANCE.getJavaQueryHint();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaUniqueConstraint <em>Java Unique Constraint</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaUniqueConstraint
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaUniqueConstraint()
- * @generated
- */
- public static final EClass JAVA_UNIQUE_CONSTRAINT = eINSTANCE.getJavaUniqueConstraint();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade <em>Java Cascade</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaCascade()
- * @generated
- */
- public static final EClass JAVA_CASCADE = eINSTANCE.getJavaCascade();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSecondaryTable <em>Java Secondary Table</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSecondaryTable
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage#getJavaSecondaryTable()
- * @generated
- */
- public static final EClass JAVA_SECONDARY_TABLE = eINSTANCE.getJavaSecondaryTable();
- }
-} //JavaMappingsPackage
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsAdapterFactory.java
deleted file mode 100644
index e4df5bf85b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsAdapterFactory.java
+++ /dev/null
@@ -1,1944 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jpt.core.internal.IAttributeMapping;
-import org.eclipse.jpt.core.internal.IJpaEObject;
-import org.eclipse.jpt.core.internal.IJpaSourceObject;
-import org.eclipse.jpt.core.internal.ITypeMapping;
-import org.eclipse.jpt.core.internal.JpaEObject;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.JavaEObject;
-import org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaAssociationOverride;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeOverride;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddable;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbedded;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddedId;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaId;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinTable;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToMany;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToOne;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedQuery;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaSecondaryTable;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaTable;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaTransient;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaUniqueConstraint;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion;
-import org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage;
-import org.eclipse.jpt.core.internal.mappings.IAbstractColumn;
-import org.eclipse.jpt.core.internal.mappings.IAbstractJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IAssociationOverride;
-import org.eclipse.jpt.core.internal.mappings.IAttributeOverride;
-import org.eclipse.jpt.core.internal.mappings.IBasic;
-import org.eclipse.jpt.core.internal.mappings.ICascade;
-import org.eclipse.jpt.core.internal.mappings.IColumn;
-import org.eclipse.jpt.core.internal.mappings.IColumnMapping;
-import org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn;
-import org.eclipse.jpt.core.internal.mappings.IEmbeddable;
-import org.eclipse.jpt.core.internal.mappings.IEmbedded;
-import org.eclipse.jpt.core.internal.mappings.IEmbeddedId;
-import org.eclipse.jpt.core.internal.mappings.IEntity;
-import org.eclipse.jpt.core.internal.mappings.IGeneratedValue;
-import org.eclipse.jpt.core.internal.mappings.IGenerator;
-import org.eclipse.jpt.core.internal.mappings.IId;
-import org.eclipse.jpt.core.internal.mappings.IJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IJoinTable;
-import org.eclipse.jpt.core.internal.mappings.IManyToMany;
-import org.eclipse.jpt.core.internal.mappings.IManyToOne;
-import org.eclipse.jpt.core.internal.mappings.IMappedSuperclass;
-import org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.INamedColumn;
-import org.eclipse.jpt.core.internal.mappings.INamedNativeQuery;
-import org.eclipse.jpt.core.internal.mappings.INamedQuery;
-import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
-import org.eclipse.jpt.core.internal.mappings.IOneToMany;
-import org.eclipse.jpt.core.internal.mappings.IOneToOne;
-import org.eclipse.jpt.core.internal.mappings.IOverride;
-import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IQuery;
-import org.eclipse.jpt.core.internal.mappings.IQueryHint;
-import org.eclipse.jpt.core.internal.mappings.IRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.ISecondaryTable;
-import org.eclipse.jpt.core.internal.mappings.ISequenceGenerator;
-import org.eclipse.jpt.core.internal.mappings.ISingleRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.ITable;
-import org.eclipse.jpt.core.internal.mappings.ITableGenerator;
-import org.eclipse.jpt.core.internal.mappings.ITransient;
-import org.eclipse.jpt.core.internal.mappings.IUniqueConstraint;
-import org.eclipse.jpt.core.internal.mappings.IVersion;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage
- * @generated
- */
-public class JpaJavaMappingsAdapterFactory extends AdapterFactoryImpl
-{
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static JpaJavaMappingsPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JpaJavaMappingsAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = JpaJavaMappingsPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject) object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch the delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected JpaJavaMappingsSwitch<Adapter> modelSwitch = new JpaJavaMappingsSwitch<Adapter>() {
- @Override
- public Adapter caseJavaTypeMapping(JavaTypeMapping object) {
- return createJavaTypeMappingAdapter();
- }
-
- @Override
- public Adapter caseJavaEntity(JavaEntity object) {
- return createJavaEntityAdapter();
- }
-
- @Override
- public Adapter caseJavaMappedSuperclass(JavaMappedSuperclass object) {
- return createJavaMappedSuperclassAdapter();
- }
-
- @Override
- public Adapter caseJavaEmbeddable(JavaEmbeddable object) {
- return createJavaEmbeddableAdapter();
- }
-
- @Override
- public Adapter caseJavaNullTypeMapping(JavaNullTypeMapping object) {
- return createJavaNullTypeMappingAdapter();
- }
-
- @Override
- public Adapter caseJavaAttributeMapping(JavaAttributeMapping object) {
- return createJavaAttributeMappingAdapter();
- }
-
- @Override
- public Adapter caseJavaBasic(JavaBasic object) {
- return createJavaBasicAdapter();
- }
-
- @Override
- public Adapter caseJavaId(JavaId object) {
- return createJavaIdAdapter();
- }
-
- @Override
- public Adapter caseJavaTransient(JavaTransient object) {
- return createJavaTransientAdapter();
- }
-
- @Override
- public Adapter caseJavaVersion(JavaVersion object) {
- return createJavaVersionAdapter();
- }
-
- @Override
- public Adapter caseJavaEmbeddedId(JavaEmbeddedId object) {
- return createJavaEmbeddedIdAdapter();
- }
-
- @Override
- public Adapter caseJavaEmbedded(JavaEmbedded object) {
- return createJavaEmbeddedAdapter();
- }
-
- @Override
- public Adapter caseJavaRelationshipMapping(JavaRelationshipMapping object) {
- return createJavaRelationshipMappingAdapter();
- }
-
- @Override
- public Adapter caseJavaSingleRelationshipMapping(JavaSingleRelationshipMapping object) {
- return createJavaSingleRelationshipMappingAdapter();
- }
-
- @Override
- public Adapter caseJavaManyToOne(JavaManyToOne object) {
- return createJavaManyToOneAdapter();
- }
-
- @Override
- public Adapter caseJavaOneToOne(JavaOneToOne object) {
- return createJavaOneToOneAdapter();
- }
-
- @Override
- public Adapter caseJavaMultiRelationshipMapping(JavaMultiRelationshipMapping object) {
- return createJavaMultiRelationshipMappingAdapter();
- }
-
- @Override
- public Adapter caseJavaOneToMany(JavaOneToMany object) {
- return createJavaOneToManyAdapter();
- }
-
- @Override
- public Adapter caseJavaManyToMany(JavaManyToMany object) {
- return createJavaManyToManyAdapter();
- }
-
- @Override
- public Adapter caseJavaNullAttributeMapping(JavaNullAttributeMapping object) {
- return createJavaNullAttributeMappingAdapter();
- }
-
- @Override
- public Adapter caseAbstractJavaTable(AbstractJavaTable object) {
- return createAbstractJavaTableAdapter();
- }
-
- @Override
- public Adapter caseJavaTable(JavaTable object) {
- return createJavaTableAdapter();
- }
-
- @Override
- public Adapter caseJavaSecondaryTable(JavaSecondaryTable object) {
- return createJavaSecondaryTableAdapter();
- }
-
- @Override
- public Adapter caseJavaJoinTable(JavaJoinTable object) {
- return createJavaJoinTableAdapter();
- }
-
- @Override
- public Adapter caseJavaNamedColumn(JavaNamedColumn object) {
- return createJavaNamedColumnAdapter();
- }
-
- @Override
- public Adapter caseAbstractJavaColumn(AbstractJavaColumn object) {
- return createAbstractJavaColumnAdapter();
- }
-
- @Override
- public Adapter caseJavaColumn(JavaColumn object) {
- return createJavaColumnAdapter();
- }
-
- @Override
- public Adapter caseJavaJoinColumn(JavaJoinColumn object) {
- return createJavaJoinColumnAdapter();
- }
-
- @Override
- public Adapter caseJavaOverride(JavaOverride object) {
- return createJavaOverrideAdapter();
- }
-
- @Override
- public Adapter caseJavaAttributeOverride(JavaAttributeOverride object) {
- return createJavaAttributeOverrideAdapter();
- }
-
- @Override
- public Adapter caseJavaAssociationOverride(JavaAssociationOverride object) {
- return createJavaAssociationOverrideAdapter();
- }
-
- @Override
- public Adapter caseJavaDiscriminatorColumn(JavaDiscriminatorColumn object) {
- return createJavaDiscriminatorColumnAdapter();
- }
-
- @Override
- public Adapter caseJavaPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn object) {
- return createJavaPrimaryKeyJoinColumnAdapter();
- }
-
- @Override
- public Adapter caseJavaGeneratedValue(JavaGeneratedValue object) {
- return createJavaGeneratedValueAdapter();
- }
-
- @Override
- public Adapter caseJavaGenerator(JavaGenerator object) {
- return createJavaGeneratorAdapter();
- }
-
- @Override
- public Adapter caseJavaTableGenerator(JavaTableGenerator object) {
- return createJavaTableGeneratorAdapter();
- }
-
- @Override
- public Adapter caseJavaSequenceGenerator(JavaSequenceGenerator object) {
- return createJavaSequenceGeneratorAdapter();
- }
-
- @Override
- public Adapter caseJavaAbstractQuery(JavaAbstractQuery object) {
- return createJavaAbstractQueryAdapter();
- }
-
- @Override
- public Adapter caseJavaNamedQuery(JavaNamedQuery object) {
- return createJavaNamedQueryAdapter();
- }
-
- @Override
- public Adapter caseJavaNamedNativeQuery(JavaNamedNativeQuery object) {
- return createJavaNamedNativeQueryAdapter();
- }
-
- @Override
- public Adapter caseJavaQueryHint(JavaQueryHint object) {
- return createJavaQueryHintAdapter();
- }
-
- @Override
- public Adapter caseJavaUniqueConstraint(JavaUniqueConstraint object) {
- return createJavaUniqueConstraintAdapter();
- }
-
- @Override
- public Adapter caseJavaCascade(JavaCascade object) {
- return createJavaCascadeAdapter();
- }
-
- @Override
- public Adapter caseIJpaEObject(IJpaEObject object) {
- return createIJpaEObjectAdapter();
- }
-
- @Override
- public Adapter caseJpaEObject(JpaEObject object) {
- return createJpaEObjectAdapter();
- }
-
- @Override
- public Adapter caseIJpaSourceObject(IJpaSourceObject object) {
- return createIJpaSourceObjectAdapter();
- }
-
- @Override
- public Adapter caseJavaEObject(JavaEObject object) {
- return createJavaEObjectAdapter();
- }
-
- @Override
- public Adapter caseITypeMapping(ITypeMapping object) {
- return createITypeMappingAdapter();
- }
-
- @Override
- public Adapter caseIJavaTypeMapping(IJavaTypeMapping object) {
- return createIJavaTypeMappingAdapter();
- }
-
- @Override
- public Adapter caseIEntity(IEntity object) {
- return createIEntityAdapter();
- }
-
- @Override
- public Adapter caseIMappedSuperclass(IMappedSuperclass object) {
- return createIMappedSuperclassAdapter();
- }
-
- @Override
- public Adapter caseIEmbeddable(IEmbeddable object) {
- return createIEmbeddableAdapter();
- }
-
- @Override
- public Adapter caseIAttributeMapping(IAttributeMapping object) {
- return createIAttributeMappingAdapter();
- }
-
- @Override
- public Adapter caseIJavaAttributeMapping(IJavaAttributeMapping object) {
- return createIJavaAttributeMappingAdapter();
- }
-
- @Override
- public Adapter caseIColumnMapping(IColumnMapping object) {
- return createIColumnMappingAdapter();
- }
-
- @Override
- public Adapter caseIBasic(IBasic object) {
- return createIBasicAdapter();
- }
-
- @Override
- public Adapter caseIId(IId object) {
- return createIIdAdapter();
- }
-
- @Override
- public Adapter caseITransient(ITransient object) {
- return createITransientAdapter();
- }
-
- @Override
- public Adapter caseIVersion(IVersion object) {
- return createIVersionAdapter();
- }
-
- @Override
- public Adapter caseIEmbeddedId(IEmbeddedId object) {
- return createIEmbeddedIdAdapter();
- }
-
- @Override
- public Adapter caseIEmbedded(IEmbedded object) {
- return createIEmbeddedAdapter();
- }
-
- @Override
- public Adapter caseIRelationshipMapping(IRelationshipMapping object) {
- return createIRelationshipMappingAdapter();
- }
-
- @Override
- public Adapter caseISingleRelationshipMapping(ISingleRelationshipMapping object) {
- return createISingleRelationshipMappingAdapter();
- }
-
- @Override
- public Adapter caseIManyToOne(IManyToOne object) {
- return createIManyToOneAdapter();
- }
-
- @Override
- public Adapter caseINonOwningMapping(INonOwningMapping object) {
- return createINonOwningMappingAdapter();
- }
-
- @Override
- public Adapter caseIOneToOne(IOneToOne object) {
- return createIOneToOneAdapter();
- }
-
- @Override
- public Adapter caseIMultiRelationshipMapping(IMultiRelationshipMapping object) {
- return createIMultiRelationshipMappingAdapter();
- }
-
- @Override
- public Adapter caseIOneToMany(IOneToMany object) {
- return createIOneToManyAdapter();
- }
-
- @Override
- public Adapter caseIManyToMany(IManyToMany object) {
- return createIManyToManyAdapter();
- }
-
- @Override
- public Adapter caseITable(ITable object) {
- return createITableAdapter();
- }
-
- @Override
- public Adapter caseISecondaryTable(ISecondaryTable object) {
- return createISecondaryTableAdapter();
- }
-
- @Override
- public Adapter caseIJoinTable(IJoinTable object) {
- return createIJoinTableAdapter();
- }
-
- @Override
- public Adapter caseINamedColumn(INamedColumn object) {
- return createINamedColumnAdapter();
- }
-
- @Override
- public Adapter caseIAbstractColumn(IAbstractColumn object) {
- return createIAbstractColumnAdapter();
- }
-
- @Override
- public Adapter caseIColumn(IColumn object) {
- return createIColumnAdapter();
- }
-
- @Override
- public Adapter caseIAbstractJoinColumn(IAbstractJoinColumn object) {
- return createIAbstractJoinColumnAdapter();
- }
-
- @Override
- public Adapter caseIJoinColumn(IJoinColumn object) {
- return createIJoinColumnAdapter();
- }
-
- @Override
- public Adapter caseIOverride(IOverride object) {
- return createIOverrideAdapter();
- }
-
- @Override
- public Adapter caseIAttributeOverride(IAttributeOverride object) {
- return createIAttributeOverrideAdapter();
- }
-
- @Override
- public Adapter caseIAssociationOverride(IAssociationOverride object) {
- return createIAssociationOverrideAdapter();
- }
-
- @Override
- public Adapter caseIDiscriminatorColumn(IDiscriminatorColumn object) {
- return createIDiscriminatorColumnAdapter();
- }
-
- @Override
- public Adapter caseIPrimaryKeyJoinColumn(IPrimaryKeyJoinColumn object) {
- return createIPrimaryKeyJoinColumnAdapter();
- }
-
- @Override
- public Adapter caseIGeneratedValue(IGeneratedValue object) {
- return createIGeneratedValueAdapter();
- }
-
- @Override
- public Adapter caseIGenerator(IGenerator object) {
- return createIGeneratorAdapter();
- }
-
- @Override
- public Adapter caseITableGenerator(ITableGenerator object) {
- return createITableGeneratorAdapter();
- }
-
- @Override
- public Adapter caseISequenceGenerator(ISequenceGenerator object) {
- return createISequenceGeneratorAdapter();
- }
-
- @Override
- public Adapter caseIQuery(IQuery object) {
- return createIQueryAdapter();
- }
-
- @Override
- public Adapter caseINamedQuery(INamedQuery object) {
- return createINamedQueryAdapter();
- }
-
- @Override
- public Adapter caseINamedNativeQuery(INamedNativeQuery object) {
- return createINamedNativeQueryAdapter();
- }
-
- @Override
- public Adapter caseIQueryHint(IQueryHint object) {
- return createIQueryHintAdapter();
- }
-
- @Override
- public Adapter caseIUniqueConstraint(IUniqueConstraint object) {
- return createIUniqueConstraintAdapter();
- }
-
- @Override
- public Adapter caseICascade(ICascade object) {
- return createICascadeAdapter();
- }
-
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject) target);
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity <em>Java Entity</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity
- * @generated
- */
- public Adapter createJavaEntityAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass <em>Java Mapped Superclass</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass
- * @generated
- */
- public Adapter createJavaMappedSuperclassAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddable <em>Java Embeddable</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddable
- * @generated
- */
- public Adapter createJavaEmbeddableAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping <em>Java Null Type Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping
- * @generated
- */
- public Adapter createJavaNullTypeMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapping <em>Java Null Attribute Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapping
- * @generated
- */
- public Adapter createJavaNullAttributeMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic <em>Java Basic</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic
- * @generated
- */
- public Adapter createJavaBasicAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaId <em>Java Id</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaId
- * @generated
- */
- public Adapter createJavaIdAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTransient <em>Java Transient</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTransient
- * @generated
- */
- public Adapter createJavaTransientAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion <em>Java Version</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion
- * @generated
- */
- public Adapter createJavaVersionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddedId <em>Java Embedded Id</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddedId
- * @generated
- */
- public Adapter createJavaEmbeddedIdAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbedded <em>Java Embedded</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbedded
- * @generated
- */
- public Adapter createJavaEmbeddedAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeMapping <em>Java Attribute Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeMapping
- * @generated
- */
- public Adapter createJavaAttributeMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTypeMapping <em>Java Type Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTypeMapping
- * @generated
- */
- public Adapter createJavaTypeMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable <em>Abstract Java Table</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable
- * @generated
- */
- public Adapter createAbstractJavaTableAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTable <em>Java Table</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTable
- * @generated
- */
- public Adapter createJavaTableAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn <em>Java Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn
- * @generated
- */
- public Adapter createJavaColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping <em>Java Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping
- * @generated
- */
- public Adapter createJavaRelationshipMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping <em>Java Single Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping
- * @generated
- */
- public Adapter createJavaSingleRelationshipMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany <em>Java One To Many</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany
- * @generated
- */
- public Adapter createJavaOneToManyAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToMany <em>Java Many To Many</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToMany
- * @generated
- */
- public Adapter createJavaManyToManyAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinTable <em>Java Join Table</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinTable
- * @generated
- */
- public Adapter createJavaJoinTableAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedColumn <em>Java Named Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedColumn
- * @generated
- */
- public Adapter createJavaNamedColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn <em>Abstract Java Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn
- * @generated
- */
- public Adapter createAbstractJavaColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn <em>Java Join Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn
- * @generated
- */
- public Adapter createJavaJoinColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride <em>Java Override</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride
- * @generated
- */
- public Adapter createJavaOverrideAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeOverride <em>Java Attribute Override</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeOverride
- * @generated
- */
- public Adapter createJavaAttributeOverrideAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAssociationOverride <em>Java Association Override</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAssociationOverride
- * @generated
- */
- public Adapter createJavaAssociationOverrideAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn <em>Java Discriminator Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn
- * @generated
- */
- public Adapter createJavaDiscriminatorColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn <em>Java Primary Key Join Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn
- * @generated
- */
- public Adapter createJavaPrimaryKeyJoinColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue <em>Java Generated Value</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue
- * @generated
- */
- public Adapter createJavaGeneratedValueAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator <em>Java Generator</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator
- * @generated
- */
- public Adapter createJavaGeneratorAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator <em>Java Table Generator</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator
- * @generated
- */
- public Adapter createJavaTableGeneratorAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator <em>Java Sequence Generator</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator
- * @generated
- */
- public Adapter createJavaSequenceGeneratorAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery <em>Java Abstract Query</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery
- * @generated
- */
- public Adapter createJavaAbstractQueryAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedQuery <em>Java Named Query</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedQuery
- * @generated
- */
- public Adapter createJavaNamedQueryAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery <em>Java Named Native Query</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery
- * @generated
- */
- public Adapter createJavaNamedNativeQueryAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint <em>Java Query Hint</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint
- * @generated
- */
- public Adapter createJavaQueryHintAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaUniqueConstraint <em>Java Unique Constraint</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaUniqueConstraint
- * @generated
- */
- public Adapter createJavaUniqueConstraintAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade <em>Java Cascade</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade
- * @generated
- */
- public Adapter createJavaCascadeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaSecondaryTable <em>Java Secondary Table</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaSecondaryTable
- * @generated
- */
- public Adapter createJavaSecondaryTableAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.IJpaEObject <em>IJpa EObject</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.IJpaEObject
- * @generated
- */
- public Adapter createIJpaEObjectAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.JpaEObject <em>Jpa EObject</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.JpaEObject
- * @generated
- */
- public Adapter createJpaEObjectAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.IJpaSourceObject <em>IJpa Source Object</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.IJpaSourceObject
- * @generated
- */
- public Adapter createIJpaSourceObjectAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.JavaEObject <em>Java EObject</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.JavaEObject
- * @generated
- */
- public Adapter createJavaEObjectAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToOne <em>Java Many To One</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToOne
- * @generated
- */
- public Adapter createJavaManyToOneAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne <em>Java One To One</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne
- * @generated
- */
- public Adapter createJavaOneToOneAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping <em>Java Multi Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping
- * @generated
- */
- public Adapter createJavaMultiRelationshipMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.ITypeMapping <em>IType Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.ITypeMapping
- * @generated
- */
- public Adapter createITypeMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.IJavaTypeMapping <em>IJava Type Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.IJavaTypeMapping
- * @generated
- */
- public Adapter createIJavaTypeMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IEntity <em>IEntity</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IEntity
- * @generated
- */
- public Adapter createIEntityAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IMappedSuperclass <em>IMapped Superclass</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IMappedSuperclass
- * @generated
- */
- public Adapter createIMappedSuperclassAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IEmbeddable <em>IEmbeddable</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IEmbeddable
- * @generated
- */
- public Adapter createIEmbeddableAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.IAttributeMapping <em>IAttribute Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.IAttributeMapping
- * @generated
- */
- public Adapter createIAttributeMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping <em>IJava Attribute Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping
- * @generated
- */
- public Adapter createIJavaAttributeMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IColumnMapping <em>IColumn Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IColumnMapping
- * @generated
- */
- public Adapter createIColumnMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IBasic <em>IBasic</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IBasic
- * @generated
- */
- public Adapter createIBasicAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IId <em>IId</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IId
- * @generated
- */
- public Adapter createIIdAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.ITransient <em>ITransient</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.ITransient
- * @generated
- */
- public Adapter createITransientAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IVersion <em>IVersion</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IVersion
- * @generated
- */
- public Adapter createIVersionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IEmbeddedId <em>IEmbedded Id</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IEmbeddedId
- * @generated
- */
- public Adapter createIEmbeddedIdAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IEmbedded <em>IEmbedded</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IEmbedded
- * @generated
- */
- public Adapter createIEmbeddedAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.ITable <em>ITable</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.ITable
- * @generated
- */
- public Adapter createITableAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IColumn <em>IColumn</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IColumn
- * @generated
- */
- public Adapter createIColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IAbstractJoinColumn <em>IAbstract Join Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IAbstractJoinColumn
- * @generated
- */
- public Adapter createIAbstractJoinColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IRelationshipMapping <em>IRelationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IRelationshipMapping
- * @generated
- */
- public Adapter createIRelationshipMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping <em>IMulti Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping
- * @generated
- */
- public Adapter createIMultiRelationshipMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IOneToMany <em>IOne To Many</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IOneToMany
- * @generated
- */
- public Adapter createIOneToManyAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IManyToMany <em>IMany To Many</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IManyToMany
- * @generated
- */
- public Adapter createIManyToManyAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IJoinTable <em>IJoin Table</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IJoinTable
- * @generated
- */
- public Adapter createIJoinTableAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.INamedColumn <em>INamed Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.INamedColumn
- * @generated
- */
- public Adapter createINamedColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IAbstractColumn <em>IAbstract Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IAbstractColumn
- * @generated
- */
- public Adapter createIAbstractColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IJoinColumn <em>IJoin Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IJoinColumn
- * @generated
- */
- public Adapter createIJoinColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IOverride <em>IOverride</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IOverride
- * @generated
- */
- public Adapter createIOverrideAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IAttributeOverride <em>IAttribute Override</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IAttributeOverride
- * @generated
- */
- public Adapter createIAttributeOverrideAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IAssociationOverride <em>IAssociation Override</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IAssociationOverride
- * @generated
- */
- public Adapter createIAssociationOverrideAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn <em>IDiscriminator Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn
- * @generated
- */
- public Adapter createIDiscriminatorColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn <em>IPrimary Key Join Column</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn
- * @generated
- */
- public Adapter createIPrimaryKeyJoinColumnAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IGeneratedValue <em>IGenerated Value</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IGeneratedValue
- * @generated
- */
- public Adapter createIGeneratedValueAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IGenerator <em>IGenerator</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IGenerator
- * @generated
- */
- public Adapter createIGeneratorAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.ITableGenerator <em>ITable Generator</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.ITableGenerator
- * @generated
- */
- public Adapter createITableGeneratorAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.ISequenceGenerator <em>ISequence Generator</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.ISequenceGenerator
- * @generated
- */
- public Adapter createISequenceGeneratorAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IQuery <em>IQuery</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IQuery
- * @generated
- */
- public Adapter createIQueryAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.INamedQuery <em>INamed Query</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.INamedQuery
- * @generated
- */
- public Adapter createINamedQueryAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.INamedNativeQuery <em>INamed Native Query</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.INamedNativeQuery
- * @generated
- */
- public Adapter createINamedNativeQueryAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IQueryHint <em>IQuery Hint</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IQueryHint
- * @generated
- */
- public Adapter createIQueryHintAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IUniqueConstraint <em>IUnique Constraint</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IUniqueConstraint
- * @generated
- */
- public Adapter createIUniqueConstraintAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.ICascade <em>ICascade</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.ICascade
- * @generated
- */
- public Adapter createICascadeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.ISecondaryTable <em>ISecondary Table</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.ISecondaryTable
- * @generated
- */
- public Adapter createISecondaryTableAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.ISingleRelationshipMapping <em>ISingle Relationship Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.ISingleRelationshipMapping
- * @generated
- */
- public Adapter createISingleRelationshipMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IManyToOne <em>IMany To One</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IManyToOne
- * @generated
- */
- public Adapter createIManyToOneAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.IOneToOne <em>IOne To One</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.IOneToOne
- * @generated
- */
- public Adapter createIOneToOneAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jpt.core.internal.mappings.INonOwningMapping <em>INon Owning Mapping</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jpt.core.internal.mappings.INonOwningMapping
- * @generated
- */
- public Adapter createINonOwningMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-} //JavaMappingsAdapterFactory
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
deleted file mode 100644
index 887ae78c16..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/util/JpaJavaMappingsSwitch.java
+++ /dev/null
@@ -1,2541 +0,0 @@
-/*******************************************************************************
- * 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.core.internal.content.java.mappings.util;
-
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jpt.core.internal.IAttributeMapping;
-import org.eclipse.jpt.core.internal.IJpaEObject;
-import org.eclipse.jpt.core.internal.IJpaSourceObject;
-import org.eclipse.jpt.core.internal.ITypeMapping;
-import org.eclipse.jpt.core.internal.JpaEObject;
-import org.eclipse.jpt.core.internal.content.java.IJavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.IJavaTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.JavaEObject;
-import org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.AbstractJavaTable;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaAbstractQuery;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaAssociationOverride;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaAttributeOverride;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaBasic;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaCascade;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaDiscriminatorColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddable;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbedded;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaEmbeddedId;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaEntity;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaGeneratedValue;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaGenerator;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaId;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaJoinTable;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToMany;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaManyToOne;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaMappedSuperclass;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaMultiRelationshipMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedNativeQuery;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaNamedQuery;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaNullAttributeMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaNullTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToMany;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaOneToOne;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaOverride;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaQueryHint;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaRelationshipMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaSecondaryTable;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaSequenceGenerator;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaSingleRelationshipMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaTable;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaTableGenerator;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaTransient;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaTypeMapping;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaUniqueConstraint;
-import org.eclipse.jpt.core.internal.content.java.mappings.JavaVersion;
-import org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage;
-import org.eclipse.jpt.core.internal.mappings.IAbstractColumn;
-import org.eclipse.jpt.core.internal.mappings.IAbstractJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IAssociationOverride;
-import org.eclipse.jpt.core.internal.mappings.IAttributeOverride;
-import org.eclipse.jpt.core.internal.mappings.IBasic;
-import org.eclipse.jpt.core.internal.mappings.ICascade;
-import org.eclipse.jpt.core.internal.mappings.IColumn;
-import org.eclipse.jpt.core.internal.mappings.IColumnMapping;
-import org.eclipse.jpt.core.internal.mappings.IDiscriminatorColumn;
-import org.eclipse.jpt.core.internal.mappings.IEmbeddable;
-import org.eclipse.jpt.core.internal.mappings.IEmbedded;
-import org.eclipse.jpt.core.internal.mappings.IEmbeddedId;
-import org.eclipse.jpt.core.internal.mappings.IEntity;
-import org.eclipse.jpt.core.internal.mappings.IGeneratedValue;
-import org.eclipse.jpt.core.internal.mappings.IGenerator;
-import org.eclipse.jpt.core.internal.mappings.IId;
-import org.eclipse.jpt.core.internal.mappings.IJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IJoinTable;
-import org.eclipse.jpt.core.internal.mappings.IManyToMany;
-import org.eclipse.jpt.core.internal.mappings.IManyToOne;
-import org.eclipse.jpt.core.internal.mappings.IMappedSuperclass;
-import org.eclipse.jpt.core.internal.mappings.IMultiRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.INamedColumn;
-import org.eclipse.jpt.core.internal.mappings.INamedNativeQuery;
-import org.eclipse.jpt.core.internal.mappings.INamedQuery;
-import org.eclipse.jpt.core.internal.mappings.INonOwningMapping;
-import org.eclipse.jpt.core.internal.mappings.IOneToMany;
-import org.eclipse.jpt.core.internal.mappings.IOneToOne;
-import org.eclipse.jpt.core.internal.mappings.IOverride;
-import org.eclipse.jpt.core.internal.mappings.IPrimaryKeyJoinColumn;
-import org.eclipse.jpt.core.internal.mappings.IQuery;
-import org.eclipse.jpt.core.internal.mappings.IQueryHint;
-import org.eclipse.jpt.core.internal.mappings.IRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.ISecondaryTable;
-import org.eclipse.jpt.core.internal.mappings.ISequenceGenerator;
-import org.eclipse.jpt.core.internal.mappings.ISingleRelationshipMapping;
-import org.eclipse.jpt.core.internal.mappings.ITable;
-import org.eclipse.jpt.core.internal.mappings.ITableGenerator;
-import org.eclipse.jpt.core.internal.mappings.ITransient;
-import org.eclipse.jpt.core.internal.mappings.IUniqueConstraint;
-import org.eclipse.jpt.core.internal.mappings.IVersion;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.core.internal.content.java.mappings.JpaJavaMappingsPackage
- * @generated
- */
-public class JpaJavaMappingsSwitch<T>
-{
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static JpaJavaMappingsPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JpaJavaMappingsSwitch() {
- if (modelPackage == null) {
- modelPackage = JpaJavaMappingsPackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public T doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case JpaJavaMappingsPackage.JAVA_TYPE_MAPPING : {
- JavaTypeMapping javaTypeMapping = (JavaTypeMapping) theEObject;
- T result = caseJavaTypeMapping(javaTypeMapping);
- if (result == null)
- result = caseJavaEObject(javaTypeMapping);
- if (result == null)
- result = caseIJavaTypeMapping(javaTypeMapping);
- if (result == null)
- result = caseJpaEObject(javaTypeMapping);
- if (result == null)
- result = caseIJpaSourceObject(javaTypeMapping);
- if (result == null)
- result = caseITypeMapping(javaTypeMapping);
- if (result == null)
- result = caseIJpaEObject(javaTypeMapping);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_ENTITY : {
- JavaEntity javaEntity = (JavaEntity) theEObject;
- T result = caseJavaEntity(javaEntity);
- if (result == null)
- result = caseJavaTypeMapping(javaEntity);
- if (result == null)
- result = caseIEntity(javaEntity);
- if (result == null)
- result = caseJavaEObject(javaEntity);
- if (result == null)
- result = caseIJavaTypeMapping(javaEntity);
- if (result == null)
- result = caseITypeMapping(javaEntity);
- if (result == null)
- result = caseJpaEObject(javaEntity);
- if (result == null)
- result = caseIJpaSourceObject(javaEntity);
- if (result == null)
- result = caseIJpaEObject(javaEntity);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_MAPPED_SUPERCLASS : {
- JavaMappedSuperclass javaMappedSuperclass = (JavaMappedSuperclass) theEObject;
- T result = caseJavaMappedSuperclass(javaMappedSuperclass);
- if (result == null)
- result = caseJavaTypeMapping(javaMappedSuperclass);
- if (result == null)
- result = caseIMappedSuperclass(javaMappedSuperclass);
- if (result == null)
- result = caseJavaEObject(javaMappedSuperclass);
- if (result == null)
- result = caseIJavaTypeMapping(javaMappedSuperclass);
- if (result == null)
- result = caseITypeMapping(javaMappedSuperclass);
- if (result == null)
- result = caseJpaEObject(javaMappedSuperclass);
- if (result == null)
- result = caseIJpaSourceObject(javaMappedSuperclass);
- if (result == null)
- result = caseIJpaEObject(javaMappedSuperclass);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_EMBEDDABLE : {
- JavaEmbeddable javaEmbeddable = (JavaEmbeddable) theEObject;
- T result = caseJavaEmbeddable(javaEmbeddable);
- if (result == null)
- result = caseJavaTypeMapping(javaEmbeddable);
- if (result == null)
- result = caseIEmbeddable(javaEmbeddable);
- if (result == null)
- result = caseJavaEObject(javaEmbeddable);
- if (result == null)
- result = caseIJavaTypeMapping(javaEmbeddable);
- if (result == null)
- result = caseITypeMapping(javaEmbeddable);
- if (result == null)
- result = caseJpaEObject(javaEmbeddable);
- if (result == null)
- result = caseIJpaSourceObject(javaEmbeddable);
- if (result == null)
- result = caseIJpaEObject(javaEmbeddable);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_NULL_TYPE_MAPPING : {
- JavaNullTypeMapping javaNullTypeMapping = (JavaNullTypeMapping) theEObject;
- T result = caseJavaNullTypeMapping(javaNullTypeMapping);
- if (result == null)
- result = caseJavaTypeMapping(javaNullTypeMapping);
- if (result == null)
- result = caseJavaEObject(javaNullTypeMapping);
- if (result == null)
- result = caseIJavaTypeMapping(javaNullTypeMapping);
- if (result == null)
- result = caseJpaEObject(javaNullTypeMapping);
- if (result == null)
- result = caseIJpaSourceObject(javaNullTypeMapping);
- if (result == null)
- result = caseITypeMapping(javaNullTypeMapping);
- if (result == null)
- result = caseIJpaEObject(javaNullTypeMapping);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_ATTRIBUTE_MAPPING : {
- JavaAttributeMapping javaAttributeMapping = (JavaAttributeMapping) theEObject;
- T result = caseJavaAttributeMapping(javaAttributeMapping);
- if (result == null)
- result = caseJavaEObject(javaAttributeMapping);
- if (result == null)
- result = caseIJavaAttributeMapping(javaAttributeMapping);
- if (result == null)
- result = caseJpaEObject(javaAttributeMapping);
- if (result == null)
- result = caseIJpaSourceObject(javaAttributeMapping);
- if (result == null)
- result = caseIAttributeMapping(javaAttributeMapping);
- if (result == null)
- result = caseIJpaEObject(javaAttributeMapping);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_BASIC : {
- JavaBasic javaBasic = (JavaBasic) theEObject;
- T result = caseJavaBasic(javaBasic);
- if (result == null)
- result = caseJavaAttributeMapping(javaBasic);
- if (result == null)
- result = caseIBasic(javaBasic);
- if (result == null)
- result = caseJavaEObject(javaBasic);
- if (result == null)
- result = caseIJavaAttributeMapping(javaBasic);
- if (result == null)
- result = caseIAttributeMapping(javaBasic);
- if (result == null)
- result = caseIColumnMapping(javaBasic);
- if (result == null)
- result = caseJpaEObject(javaBasic);
- if (result == null)
- result = caseIJpaSourceObject(javaBasic);
- if (result == null)
- result = caseIJpaEObject(javaBasic);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_ID : {
- JavaId javaId = (JavaId) theEObject;
- T result = caseJavaId(javaId);
- if (result == null)
- result = caseJavaAttributeMapping(javaId);
- if (result == null)
- result = caseIId(javaId);
- if (result == null)
- result = caseJavaEObject(javaId);
- if (result == null)
- result = caseIJavaAttributeMapping(javaId);
- if (result == null)
- result = caseIAttributeMapping(javaId);
- if (result == null)
- result = caseIColumnMapping(javaId);
- if (result == null)
- result = caseJpaEObject(javaId);
- if (result == null)
- result = caseIJpaSourceObject(javaId);
- if (result == null)
- result = caseIJpaEObject(javaId);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_TRANSIENT : {
- JavaTransient javaTransient = (JavaTransient) theEObject;
- T result = caseJavaTransient(javaTransient);
- if (result == null)
- result = caseJavaAttributeMapping(javaTransient);
- if (result == null)
- result = caseITransient(javaTransient);
- if (result == null)
- result = caseJavaEObject(javaTransient);
- if (result == null)
- result = caseIJavaAttributeMapping(javaTransient);
- if (result == null)
- result = caseIAttributeMapping(javaTransient);
- if (result == null)
- result = caseJpaEObject(javaTransient);
- if (result == null)
- result = caseIJpaSourceObject(javaTransient);
- if (result == null)
- result = caseIJpaEObject(javaTransient);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_VERSION : {
- JavaVersion javaVersion = (JavaVersion) theEObject;
- T result = caseJavaVersion(javaVersion);
- if (result == null)
- result = caseJavaAttributeMapping(javaVersion);
- if (result == null)
- result = caseIVersion(javaVersion);
- if (result == null)
- result = caseJavaEObject(javaVersion);
- if (result == null)
- result = caseIJavaAttributeMapping(javaVersion);
- if (result == null)
- result = caseIAttributeMapping(javaVersion);
- if (result == null)
- result = caseIColumnMapping(javaVersion);
- if (result == null)
- result = caseJpaEObject(javaVersion);
- if (result == null)
- result = caseIJpaSourceObject(javaVersion);
- if (result == null)
- result = caseIJpaEObject(javaVersion);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_EMBEDDED_ID : {
- JavaEmbeddedId javaEmbeddedId = (JavaEmbeddedId) theEObject;
- T result = caseJavaEmbeddedId(javaEmbeddedId);
- if (result == null)
- result = caseJavaAttributeMapping(javaEmbeddedId);
- if (result == null)
- result = caseIEmbeddedId(javaEmbeddedId);
- if (result == null)
- result = caseJavaEObject(javaEmbeddedId);
- if (result == null)
- result = caseIJavaAttributeMapping(javaEmbeddedId);
- if (result == null)
- result = caseIAttributeMapping(javaEmbeddedId);
- if (result == null)
- result = caseJpaEObject(javaEmbeddedId);
- if (result == null)
- result = caseIJpaSourceObject(javaEmbeddedId);
- if (result == null)
- result = caseIJpaEObject(javaEmbeddedId);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_EMBEDDED : {
- JavaEmbedded javaEmbedded = (JavaEmbedded) theEObject;
- T result = caseJavaEmbedded(javaEmbedded);
- if (result == null)
- result = caseJavaAttributeMapping(javaEmbedded);
- if (result == null)
- result = caseIEmbedded(javaEmbedded);
- if (result == null)
- result = caseJavaEObject(javaEmbedded);
- if (result == null)
- result = caseIJavaAttributeMapping(javaEmbedded);
- if (result == null)
- result = caseIAttributeMapping(javaEmbedded);
- if (result == null)
- result = caseJpaEObject(javaEmbedded);
- if (result == null)
- result = caseIJpaSourceObject(javaEmbedded);
- if (result == null)
- result = caseIJpaEObject(javaEmbedded);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_RELATIONSHIP_MAPPING : {
- JavaRelationshipMapping javaRelationshipMapping = (JavaRelationshipMapping) theEObject;
- T result = caseJavaRelationshipMapping(javaRelationshipMapping);
- if (result == null)
- result = caseJavaAttributeMapping(javaRelationshipMapping);
- if (result == null)
- result = caseIRelationshipMapping(javaRelationshipMapping);
- if (result == null)
- result = caseJavaEObject(javaRelationshipMapping);
- if (result == null)
- result = caseIJavaAttributeMapping(javaRelationshipMapping);
- if (result == null)
- result = caseIAttributeMapping(javaRelationshipMapping);
- if (result == null)
- result = caseJpaEObject(javaRelationshipMapping);
- if (result == null)
- result = caseIJpaSourceObject(javaRelationshipMapping);
- if (result == null)
- result = caseIJpaEObject(javaRelationshipMapping);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_SINGLE_RELATIONSHIP_MAPPING : {
- JavaSingleRelationshipMapping javaSingleRelationshipMapping = (JavaSingleRelationshipMapping) theEObject;
- T result = caseJavaSingleRelationshipMapping(javaSingleRelationshipMapping);
- if (result == null)
- result = caseJavaRelationshipMapping(javaSingleRelationshipMapping);
- if (result == null)
- result = caseISingleRelationshipMapping(javaSingleRelationshipMapping);
- if (result == null)
- result = caseJavaAttributeMapping(javaSingleRelationshipMapping);
- if (result == null)
- result = caseIRelationshipMapping(javaSingleRelationshipMapping);
- if (result == null)
- result = caseJavaEObject(javaSingleRelationshipMapping);
- if (result == null)
- result = caseIJavaAttributeMapping(javaSingleRelationshipMapping);
- if (result == null)
- result = caseIAttributeMapping(javaSingleRelationshipMapping);
- if (result == null)
- result = caseJpaEObject(javaSingleRelationshipMapping);
- if (result == null)
- result = caseIJpaSourceObject(javaSingleRelationshipMapping);
- if (result == null)
- result = caseIJpaEObject(javaSingleRelationshipMapping);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_MANY_TO_ONE : {
- JavaManyToOne javaManyToOne = (JavaManyToOne) theEObject;
- T result = caseJavaManyToOne(javaManyToOne);
- if (result == null)
- result = caseJavaSingleRelationshipMapping(javaManyToOne);
- if (result == null)
- result = caseIManyToOne(javaManyToOne);
- if (result == null)
- result = caseJavaRelationshipMapping(javaManyToOne);
- if (result == null)
- result = caseISingleRelationshipMapping(javaManyToOne);
- if (result == null)
- result = caseJavaAttributeMapping(javaManyToOne);
- if (result == null)
- result = caseIRelationshipMapping(javaManyToOne);
- if (result == null)
- result = caseJavaEObject(javaManyToOne);
- if (result == null)
- result = caseIJavaAttributeMapping(javaManyToOne);
- if (result == null)
- result = caseIAttributeMapping(javaManyToOne);
- if (result == null)
- result = caseJpaEObject(javaManyToOne);
- if (result == null)
- result = caseIJpaSourceObject(javaManyToOne);
- if (result == null)
- result = caseIJpaEObject(javaManyToOne);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_ONE_TO_ONE : {
- JavaOneToOne javaOneToOne = (JavaOneToOne) theEObject;
- T result = caseJavaOneToOne(javaOneToOne);
- if (result == null)
- result = caseJavaSingleRelationshipMapping(javaOneToOne);
- if (result == null)
- result = caseIOneToOne(javaOneToOne);
- if (result == null)
- result = caseJavaRelationshipMapping(javaOneToOne);
- if (result == null)
- result = caseISingleRelationshipMapping(javaOneToOne);
- if (result == null)
- result = caseINonOwningMapping(javaOneToOne);
- if (result == null)
- result = caseJavaAttributeMapping(javaOneToOne);
- if (result == null)
- result = caseIRelationshipMapping(javaOneToOne);
- if (result == null)
- result = caseJavaEObject(javaOneToOne);
- if (result == null)
- result = caseIJavaAttributeMapping(javaOneToOne);
- if (result == null)
- result = caseIAttributeMapping(javaOneToOne);
- if (result == null)
- result = caseJpaEObject(javaOneToOne);
- if (result == null)
- result = caseIJpaSourceObject(javaOneToOne);
- if (result == null)
- result = caseIJpaEObject(javaOneToOne);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_MULTI_RELATIONSHIP_MAPPING : {
- JavaMultiRelationshipMapping javaMultiRelationshipMapping = (JavaMultiRelationshipMapping) theEObject;
- T result = caseJavaMultiRelationshipMapping(javaMultiRelationshipMapping);
- if (result == null)
- result = caseJavaRelationshipMapping(javaMultiRelationshipMapping);
- if (result == null)
- result = caseIMultiRelationshipMapping(javaMultiRelationshipMapping);
- if (result == null)
- result = caseJavaAttributeMapping(javaMultiRelationshipMapping);
- if (result == null)
- result = caseIRelationshipMapping(javaMultiRelationshipMapping);
- if (result == null)
- result = caseINonOwningMapping(javaMultiRelationshipMapping);
- if (result == null)
- result = caseJavaEObject(javaMultiRelationshipMapping);
- if (result == null)
- result = caseIJavaAttributeMapping(javaMultiRelationshipMapping);
- if (result == null)
- result = caseIAttributeMapping(javaMultiRelationshipMapping);
- if (result == null)
- result = caseJpaEObject(javaMultiRelationshipMapping);
- if (result == null)
- result = caseIJpaSourceObject(javaMultiRelationshipMapping);
- if (result == null)
- result = caseIJpaEObject(javaMultiRelationshipMapping);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_ONE_TO_MANY : {
- JavaOneToMany javaOneToMany = (JavaOneToMany) theEObject;
- T result = caseJavaOneToMany(javaOneToMany);
- if (result == null)
- result = caseJavaMultiRelationshipMapping(javaOneToMany);
- if (result == null)
- result = caseIOneToMany(javaOneToMany);
- if (result == null)
- result = caseJavaRelationshipMapping(javaOneToMany);
- if (result == null)
- result = caseIMultiRelationshipMapping(javaOneToMany);
- if (result == null)
- result = caseJavaAttributeMapping(javaOneToMany);
- if (result == null)
- result = caseIRelationshipMapping(javaOneToMany);
- if (result == null)
- result = caseINonOwningMapping(javaOneToMany);
- if (result == null)
- result = caseJavaEObject(javaOneToMany);
- if (result == null)
- result = caseIJavaAttributeMapping(javaOneToMany);
- if (result == null)
- result = caseIAttributeMapping(javaOneToMany);
- if (result == null)
- result = caseJpaEObject(javaOneToMany);
- if (result == null)
- result = caseIJpaSourceObject(javaOneToMany);
- if (result == null)
- result = caseIJpaEObject(javaOneToMany);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_MANY_TO_MANY : {
- JavaManyToMany javaManyToMany = (JavaManyToMany) theEObject;
- T result = caseJavaManyToMany(javaManyToMany);
- if (result == null)
- result = caseJavaMultiRelationshipMapping(javaManyToMany);
- if (result == null)
- result = caseIManyToMany(javaManyToMany);
- if (result == null)
- result = caseJavaRelationshipMapping(javaManyToMany);
- if (result == null)
- result = caseIMultiRelationshipMapping(javaManyToMany);
- if (result == null)
- result = caseJavaAttributeMapping(javaManyToMany);
- if (result == null)
- result = caseIRelationshipMapping(javaManyToMany);
- if (result == null)
- result = caseINonOwningMapping(javaManyToMany);
- if (result == null)
- result = caseJavaEObject(javaManyToMany);
- if (result == null)
- result = caseIJavaAttributeMapping(javaManyToMany);
- if (result == null)
- result = caseIAttributeMapping(javaManyToMany);
- if (result == null)
- result = caseJpaEObject(javaManyToMany);
- if (result == null)
- result = caseIJpaSourceObject(javaManyToMany);
- if (result == null)
- result = caseIJpaEObject(javaManyToMany);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_NULL_ATTRIBUTE_MAPPING : {
- JavaNullAttributeMapping javaNullAttributeMapping = (JavaNullAttributeMapping) theEObject;
- T result = caseJavaNullAttributeMapping(javaNullAttributeMapping);
- if (result == null)
- result = caseJavaAttributeMapping(javaNullAttributeMapping);
- if (result == null)
- result = caseJavaEObject(javaNullAttributeMapping);
- if (result == null)
- result = caseIJavaAttributeMapping(javaNullAttributeMapping);
- if (result == null)
- result = caseJpaEObject(javaNullAttributeMapping);
- if (result == null)
- result = caseIJpaSourceObject(javaNullAttributeMapping);
- if (result == null)
- result = caseIAttributeMapping(javaNullAttributeMapping);
- if (result == null)
- result = caseIJpaEObject(javaNullAttributeMapping);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_TABLE : {
- AbstractJavaTable abstractJavaTable = (AbstractJavaTable) theEObject;
- T result = caseAbstractJavaTable(abstractJavaTable);
- if (result == null)
- result = caseJavaEObject(abstractJavaTable);
- if (result == null)
- result = caseITable(abstractJavaTable);
- if (result == null)
- result = caseJpaEObject(abstractJavaTable);
- if (result == null)
- result = caseIJpaSourceObject(abstractJavaTable);
- if (result == null)
- result = caseIJpaEObject(abstractJavaTable);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_TABLE : {
- JavaTable javaTable = (JavaTable) theEObject;
- T result = caseJavaTable(javaTable);
- if (result == null)
- result = caseAbstractJavaTable(javaTable);
- if (result == null)
- result = caseJavaEObject(javaTable);
- if (result == null)
- result = caseITable(javaTable);
- if (result == null)
- result = caseJpaEObject(javaTable);
- if (result == null)
- result = caseIJpaSourceObject(javaTable);
- if (result == null)
- result = caseIJpaEObject(javaTable);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_SECONDARY_TABLE : {
- JavaSecondaryTable javaSecondaryTable = (JavaSecondaryTable) theEObject;
- T result = caseJavaSecondaryTable(javaSecondaryTable);
- if (result == null)
- result = caseAbstractJavaTable(javaSecondaryTable);
- if (result == null)
- result = caseISecondaryTable(javaSecondaryTable);
- if (result == null)
- result = caseJavaEObject(javaSecondaryTable);
- if (result == null)
- result = caseITable(javaSecondaryTable);
- if (result == null)
- result = caseJpaEObject(javaSecondaryTable);
- if (result == null)
- result = caseIJpaSourceObject(javaSecondaryTable);
- if (result == null)
- result = caseIJpaEObject(javaSecondaryTable);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_JOIN_TABLE : {
- JavaJoinTable javaJoinTable = (JavaJoinTable) theEObject;
- T result = caseJavaJoinTable(javaJoinTable);
- if (result == null)
- result = caseAbstractJavaTable(javaJoinTable);
- if (result == null)
- result = caseIJoinTable(javaJoinTable);
- if (result == null)
- result = caseJavaEObject(javaJoinTable);
- if (result == null)
- result = caseITable(javaJoinTable);
- if (result == null)
- result = caseJpaEObject(javaJoinTable);
- if (result == null)
- result = caseIJpaSourceObject(javaJoinTable);
- if (result == null)
- result = caseIJpaEObject(javaJoinTable);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_NAMED_COLUMN : {
- JavaNamedColumn javaNamedColumn = (JavaNamedColumn) theEObject;
- T result = caseJavaNamedColumn(javaNamedColumn);
- if (result == null)
- result = caseJavaEObject(javaNamedColumn);
- if (result == null)
- result = caseINamedColumn(javaNamedColumn);
- if (result == null)
- result = caseJpaEObject(javaNamedColumn);
- if (result == null)
- result = caseIJpaSourceObject(javaNamedColumn);
- if (result == null)
- result = caseIJpaEObject(javaNamedColumn);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.ABSTRACT_JAVA_COLUMN : {
- AbstractJavaColumn abstractJavaColumn = (AbstractJavaColumn) theEObject;
- T result = caseAbstractJavaColumn(abstractJavaColumn);
- if (result == null)
- result = caseJavaNamedColumn(abstractJavaColumn);
- if (result == null)
- result = caseIAbstractColumn(abstractJavaColumn);
- if (result == null)
- result = caseJavaEObject(abstractJavaColumn);
- if (result == null)
- result = caseINamedColumn(abstractJavaColumn);
- if (result == null)
- result = caseJpaEObject(abstractJavaColumn);
- if (result == null)
- result = caseIJpaSourceObject(abstractJavaColumn);
- if (result == null)
- result = caseIJpaEObject(abstractJavaColumn);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_COLUMN : {
- JavaColumn javaColumn = (JavaColumn) theEObject;
- T result = caseJavaColumn(javaColumn);
- if (result == null)
- result = caseAbstractJavaColumn(javaColumn);
- if (result == null)
- result = caseIColumn(javaColumn);
- if (result == null)
- result = caseJavaNamedColumn(javaColumn);
- if (result == null)
- result = caseIAbstractColumn(javaColumn);
- if (result == null)
- result = caseJavaEObject(javaColumn);
- if (result == null)
- result = caseINamedColumn(javaColumn);
- if (result == null)
- result = caseJpaEObject(javaColumn);
- if (result == null)
- result = caseIJpaSourceObject(javaColumn);
- if (result == null)
- result = caseIJpaEObject(javaColumn);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_JOIN_COLUMN : {
- JavaJoinColumn javaJoinColumn = (JavaJoinColumn) theEObject;
- T result = caseJavaJoinColumn(javaJoinColumn);
- if (result == null)
- result = caseAbstractJavaColumn(javaJoinColumn);
- if (result == null)
- result = caseIJoinColumn(javaJoinColumn);
- if (result == null)
- result = caseJavaNamedColumn(javaJoinColumn);
- if (result == null)
- result = caseIAbstractColumn(javaJoinColumn);
- if (result == null)
- result = caseIAbstractJoinColumn(javaJoinColumn);
- if (result == null)
- result = caseJavaEObject(javaJoinColumn);
- if (result == null)
- result = caseINamedColumn(javaJoinColumn);
- if (result == null)
- result = caseJpaEObject(javaJoinColumn);
- if (result == null)
- result = caseIJpaSourceObject(javaJoinColumn);
- if (result == null)
- result = caseIJpaEObject(javaJoinColumn);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_OVERRIDE : {
- JavaOverride javaOverride = (JavaOverride) theEObject;
- T result = caseJavaOverride(javaOverride);
- if (result == null)
- result = caseJavaEObject(javaOverride);
- if (result == null)
- result = caseIOverride(javaOverride);
- if (result == null)
- result = caseJpaEObject(javaOverride);
- if (result == null)
- result = caseIJpaSourceObject(javaOverride);
- if (result == null)
- result = caseIJpaEObject(javaOverride);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_ATTRIBUTE_OVERRIDE : {
- JavaAttributeOverride javaAttributeOverride = (JavaAttributeOverride) theEObject;
- T result = caseJavaAttributeOverride(javaAttributeOverride);
- if (result == null)
- result = caseJavaOverride(javaAttributeOverride);
- if (result == null)
- result = caseIAttributeOverride(javaAttributeOverride);
- if (result == null)
- result = caseJavaEObject(javaAttributeOverride);
- if (result == null)
- result = caseIOverride(javaAttributeOverride);
- if (result == null)
- result = caseIColumnMapping(javaAttributeOverride);
- if (result == null)
- result = caseJpaEObject(javaAttributeOverride);
- if (result == null)
- result = caseIJpaSourceObject(javaAttributeOverride);
- if (result == null)
- result = caseIJpaEObject(javaAttributeOverride);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_ASSOCIATION_OVERRIDE : {
- JavaAssociationOverride javaAssociationOverride = (JavaAssociationOverride) theEObject;
- T result = caseJavaAssociationOverride(javaAssociationOverride);
- if (result == null)
- result = caseJavaOverride(javaAssociationOverride);
- if (result == null)
- result = caseIAssociationOverride(javaAssociationOverride);
- if (result == null)
- result = caseJavaEObject(javaAssociationOverride);
- if (result == null)
- result = caseIOverride(javaAssociationOverride);
- if (result == null)
- result = caseJpaEObject(javaAssociationOverride);
- if (result == null)
- result = caseIJpaSourceObject(javaAssociationOverride);
- if (result == null)
- result = caseIJpaEObject(javaAssociationOverride);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_DISCRIMINATOR_COLUMN : {
- JavaDiscriminatorColumn javaDiscriminatorColumn = (JavaDiscriminatorColumn) theEObject;
- T result = caseJavaDiscriminatorColumn(javaDiscriminatorColumn);
- if (result == null)
- result = caseJavaNamedColumn(javaDiscriminatorColumn);
- if (result == null)
- result = caseIDiscriminatorColumn(javaDiscriminatorColumn);
- if (result == null)
- result = caseJavaEObject(javaDiscriminatorColumn);
- if (result == null)
- result = caseINamedColumn(javaDiscriminatorColumn);
- if (result == null)
- result = caseJpaEObject(javaDiscriminatorColumn);
- if (result == null)
- result = caseIJpaSourceObject(javaDiscriminatorColumn);
- if (result == null)
- result = caseIJpaEObject(javaDiscriminatorColumn);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_PRIMARY_KEY_JOIN_COLUMN : {
- JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn = (JavaPrimaryKeyJoinColumn) theEObject;
- T result = caseJavaPrimaryKeyJoinColumn(javaPrimaryKeyJoinColumn);
- if (result == null)
- result = caseJavaNamedColumn(javaPrimaryKeyJoinColumn);
- if (result == null)
- result = caseIPrimaryKeyJoinColumn(javaPrimaryKeyJoinColumn);
- if (result == null)
- result = caseJavaEObject(javaPrimaryKeyJoinColumn);
- if (result == null)
- result = caseINamedColumn(javaPrimaryKeyJoinColumn);
- if (result == null)
- result = caseIAbstractJoinColumn(javaPrimaryKeyJoinColumn);
- if (result == null)
- result = caseJpaEObject(javaPrimaryKeyJoinColumn);
- if (result == null)
- result = caseIJpaSourceObject(javaPrimaryKeyJoinColumn);
- if (result == null)
- result = caseIJpaEObject(javaPrimaryKeyJoinColumn);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_GENERATED_VALUE : {
- JavaGeneratedValue javaGeneratedValue = (JavaGeneratedValue) theEObject;
- T result = caseJavaGeneratedValue(javaGeneratedValue);
- if (result == null)
- result = caseJavaEObject(javaGeneratedValue);
- if (result == null)
- result = caseIGeneratedValue(javaGeneratedValue);
- if (result == null)
- result = caseJpaEObject(javaGeneratedValue);
- if (result == null)
- result = caseIJpaSourceObject(javaGeneratedValue);
- if (result == null)
- result = caseIJpaEObject(javaGeneratedValue);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_GENERATOR : {
- JavaGenerator javaGenerator = (JavaGenerator) theEObject;
- T result = caseJavaGenerator(javaGenerator);
- if (result == null)
- result = caseJavaEObject(javaGenerator);
- if (result == null)
- result = caseIGenerator(javaGenerator);
- if (result == null)
- result = caseJpaEObject(javaGenerator);
- if (result == null)
- result = caseIJpaSourceObject(javaGenerator);
- if (result == null)
- result = caseIJpaEObject(javaGenerator);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_TABLE_GENERATOR : {
- JavaTableGenerator javaTableGenerator = (JavaTableGenerator) theEObject;
- T result = caseJavaTableGenerator(javaTableGenerator);
- if (result == null)
- result = caseJavaGenerator(javaTableGenerator);
- if (result == null)
- result = caseITableGenerator(javaTableGenerator);
- if (result == null)
- result = caseJavaEObject(javaTableGenerator);
- if (result == null)
- result = caseIGenerator(javaTableGenerator);
- if (result == null)
- result = caseJpaEObject(javaTableGenerator);
- if (result == null)
- result = caseIJpaSourceObject(javaTableGenerator);
- if (result == null)
- result = caseIJpaEObject(javaTableGenerator);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_SEQUENCE_GENERATOR : {
- JavaSequenceGenerator javaSequenceGenerator = (JavaSequenceGenerator) theEObject;
- T result = caseJavaSequenceGenerator(javaSequenceGenerator);
- if (result == null)
- result = caseJavaGenerator(javaSequenceGenerator);
- if (result == null)
- result = caseISequenceGenerator(javaSequenceGenerator);
- if (result == null)
- result = caseJavaEObject(javaSequenceGenerator);
- if (result == null)
- result = caseIGenerator(javaSequenceGenerator);
- if (result == null)
- result = caseJpaEObject(javaSequenceGenerator);
- if (result == null)
- result = caseIJpaSourceObject(javaSequenceGenerator);
- if (result == null)
- result = caseIJpaEObject(javaSequenceGenerator);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_ABSTRACT_QUERY : {
- JavaAbstractQuery javaAbstractQuery = (JavaAbstractQuery) theEObject;
- T result = caseJavaAbstractQuery(javaAbstractQuery);
- if (result == null)
- result = caseJavaEObject(javaAbstractQuery);
- if (result == null)
- result = caseIQuery(javaAbstractQuery);
- if (result == null)
- result = caseJpaEObject(javaAbstractQuery);
- if (result == null)
- result = caseIJpaSourceObject(javaAbstractQuery);
- if (result == null)
- result = caseIJpaEObject(javaAbstractQuery);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_NAMED_QUERY : {
- JavaNamedQuery javaNamedQuery = (JavaNamedQuery) theEObject;
- T result = caseJavaNamedQuery(javaNamedQuery);
- if (result == null)
- result = caseJavaAbstractQuery(javaNamedQuery);
- if (result == null)
- result = caseINamedQuery(javaNamedQuery);
- if (result == null)
- result = caseJavaEObject(javaNamedQuery);
- if (result == null)
- result = caseIQuery(javaNamedQuery);
- if (result == null)
- result = caseIJpaSourceObject(javaNamedQuery);
- if (result == null)
- result = caseJpaEObject(javaNamedQuery);
- if (result == null)
- result = caseIJpaEObject(javaNamedQuery);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_NAMED_NATIVE_QUERY : {
- JavaNamedNativeQuery javaNamedNativeQuery = (JavaNamedNativeQuery) theEObject;
- T result = caseJavaNamedNativeQuery(javaNamedNativeQuery);
- if (result == null)
- result = caseJavaAbstractQuery(javaNamedNativeQuery);
- if (result == null)
- result = caseINamedNativeQuery(javaNamedNativeQuery);
- if (result == null)
- result = caseJavaEObject(javaNamedNativeQuery);
- if (result == null)
- result = caseIQuery(javaNamedNativeQuery);
- if (result == null)
- result = caseIJpaSourceObject(javaNamedNativeQuery);
- if (result == null)
- result = caseJpaEObject(javaNamedNativeQuery);
- if (result == null)
- result = caseIJpaEObject(javaNamedNativeQuery);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_QUERY_HINT : {
- JavaQueryHint javaQueryHint = (JavaQueryHint) theEObject;
- T result = caseJavaQueryHint(javaQueryHint);
- if (result == null)
- result = caseJavaEObject(javaQueryHint);
- if (result == null)
- result = caseIQueryHint(javaQueryHint);
- if (result == null)
- result = caseJpaEObject(javaQueryHint);
- if (result == null)
- result = caseIJpaSourceObject(javaQueryHint);
- if (result == null)
- result = caseIJpaEObject(javaQueryHint);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_UNIQUE_CONSTRAINT : {
- JavaUniqueConstraint javaUniqueConstraint = (JavaUniqueConstraint) theEObject;
- T result = caseJavaUniqueConstraint(javaUniqueConstraint);
- if (result == null)
- result = caseJavaEObject(javaUniqueConstraint);
- if (result == null)
- result = caseIUniqueConstraint(javaUniqueConstraint);
- if (result == null)
- result = caseJpaEObject(javaUniqueConstraint);
- if (result == null)
- result = caseIJpaSourceObject(javaUniqueConstraint);
- if (result == null)
- result = caseIJpaEObject(javaUniqueConstraint);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case JpaJavaMappingsPackage.JAVA_CASCADE : {
- JavaCascade javaCascade = (JavaCascade) theEObject;
- T result = caseJavaCascade(javaCascade);
- if (result == null)
- result = caseJavaEObject(javaCascade);
- if (result == null)
- result = caseICascade(javaCascade);
- if (result == null)
- result = caseJpaEObject(javaCascade);
- if (result == null)
- result = caseIJpaSourceObject(javaCascade);
- if (result == null)
- result = caseIJpaEObject(javaCascade);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- default :
- return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Entity</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Entity</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaEntity(JavaEntity object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Mapped Superclass</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Mapped Superclass</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaMappedSuperclass(JavaMappedSuperclass object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Embeddable</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Embeddable</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaEmbeddable(JavaEmbeddable object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Null Type Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Null Type Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaNullTypeMapping(JavaNullTypeMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Null Attribute Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Null Attribute Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaNullAttributeMapping(JavaNullAttributeMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Basic</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Basic</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaBasic(JavaBasic object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Id</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Id</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaId(JavaId object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Transient</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Transient</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaTransient(JavaTransient object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Version</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Version</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaVersion(JavaVersion object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Embedded Id</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Embedded Id</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaEmbeddedId(JavaEmbeddedId object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Embedded</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Embedded</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaEmbedded(JavaEmbedded object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Attribute Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Attribute Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaAttributeMapping(JavaAttributeMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Type Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Type Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaTypeMapping(JavaTypeMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Abstract Java Table</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Abstract Java Table</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseAbstractJavaTable(AbstractJavaTable object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Table</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Table</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaTable(JavaTable object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaColumn(JavaColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Relationship Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Relationship Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaRelationshipMapping(JavaRelationshipMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Single Relationship Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Single Relationship Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaSingleRelationshipMapping(JavaSingleRelationshipMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java One To Many</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java One To Many</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaOneToMany(JavaOneToMany object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Many To Many</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Many To Many</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaManyToMany(JavaManyToMany object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Join Table</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Join Table</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaJoinTable(JavaJoinTable object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Named Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Named Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaNamedColumn(JavaNamedColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Abstract Java Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Abstract Java Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseAbstractJavaColumn(AbstractJavaColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Join Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Join Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaJoinColumn(JavaJoinColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Override</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Override</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaOverride(JavaOverride object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Attribute Override</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Attribute Override</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaAttributeOverride(JavaAttributeOverride object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Association Override</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Association Override</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaAssociationOverride(JavaAssociationOverride object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Discriminator Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Discriminator Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaDiscriminatorColumn(JavaDiscriminatorColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Primary Key Join Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Primary Key Join Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Generated Value</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Generated Value</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaGeneratedValue(JavaGeneratedValue object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Generator</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Generator</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaGenerator(JavaGenerator object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Table Generator</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Table Generator</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaTableGenerator(JavaTableGenerator object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Sequence Generator</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Sequence Generator</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaSequenceGenerator(JavaSequenceGenerator object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Abstract Query</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Abstract Query</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaAbstractQuery(JavaAbstractQuery object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Named Query</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Named Query</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaNamedQuery(JavaNamedQuery object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Named Native Query</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Named Native Query</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaNamedNativeQuery(JavaNamedNativeQuery object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Query Hint</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Query Hint</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaQueryHint(JavaQueryHint object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Unique Constraint</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Unique Constraint</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaUniqueConstraint(JavaUniqueConstraint object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Cascade</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Cascade</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaCascade(JavaCascade object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Secondary Table</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Secondary Table</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaSecondaryTable(JavaSecondaryTable object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IJpa EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IJpa EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIJpaEObject(IJpaEObject object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Jpa EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Jpa EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJpaEObject(JpaEObject object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IJpa Source Object</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IJpa Source Object</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIJpaSourceObject(IJpaSourceObject object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaEObject(JavaEObject object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Many To One</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Many To One</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaManyToOne(JavaManyToOne object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java One To One</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java One To One</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaOneToOne(JavaOneToOne object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Java Multi Relationship Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Java Multi Relationship Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseJavaMultiRelationshipMapping(JavaMultiRelationshipMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IType Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IType Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseITypeMapping(ITypeMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IJava Type Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IJava Type Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIJavaTypeMapping(IJavaTypeMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IEntity</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IEntity</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIEntity(IEntity object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IMapped Superclass</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IMapped Superclass</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIMappedSuperclass(IMappedSuperclass object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IEmbeddable</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IEmbeddable</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIEmbeddable(IEmbeddable object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IAttribute Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IAttribute Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIAttributeMapping(IAttributeMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IJava Attribute Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IJava Attribute Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIJavaAttributeMapping(IJavaAttributeMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IColumn Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IColumn Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIColumnMapping(IColumnMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IBasic</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IBasic</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIBasic(IBasic object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IId</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IId</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIId(IId object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>ITransient</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>ITransient</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseITransient(ITransient object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IVersion</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IVersion</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIVersion(IVersion object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IEmbedded Id</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IEmbedded Id</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIEmbeddedId(IEmbeddedId object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IEmbedded</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IEmbedded</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIEmbedded(IEmbedded object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>ITable</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>ITable</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseITable(ITable object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IColumn</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IColumn</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIColumn(IColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IAbstract Join Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IAbstract Join Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIAbstractJoinColumn(IAbstractJoinColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IRelationship Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IRelationship Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIRelationshipMapping(IRelationshipMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IMulti Relationship Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IMulti Relationship Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIMultiRelationshipMapping(IMultiRelationshipMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IOne To Many</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IOne To Many</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIOneToMany(IOneToMany object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IMany To Many</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IMany To Many</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIManyToMany(IManyToMany object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IJoin Table</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IJoin Table</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIJoinTable(IJoinTable object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>INamed Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>INamed Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseINamedColumn(INamedColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IAbstract Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IAbstract Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIAbstractColumn(IAbstractColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IJoin Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IJoin Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIJoinColumn(IJoinColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IOverride</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IOverride</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIOverride(IOverride object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IAttribute Override</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IAttribute Override</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIAttributeOverride(IAttributeOverride object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IAssociation Override</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IAssociation Override</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIAssociationOverride(IAssociationOverride object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IDiscriminator Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IDiscriminator Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIDiscriminatorColumn(IDiscriminatorColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IPrimary Key Join Column</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IPrimary Key Join Column</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIPrimaryKeyJoinColumn(IPrimaryKeyJoinColumn object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IGenerated Value</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IGenerated Value</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIGeneratedValue(IGeneratedValue object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IGenerator</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IGenerator</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIGenerator(IGenerator object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>ITable Generator</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>ITable Generator</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseITableGenerator(ITableGenerator object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>ISequence Generator</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>ISequence Generator</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseISequenceGenerator(ISequenceGenerator object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IQuery</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IQuery</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIQuery(IQuery object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>INamed Query</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>INamed Query</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseINamedQuery(INamedQuery object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>INamed Native Query</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>INamed Native Query</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseINamedNativeQuery(INamedNativeQuery object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IQuery Hint</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IQuery Hint</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIQueryHint(IQueryHint object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IUnique Constraint</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IUnique Constraint</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIUniqueConstraint(IUniqueConstraint object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>ICascade</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>ICascade</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseICascade(ICascade object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>ISecondary Table</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>ISecondary Table</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseISecondaryTable(ISecondaryTable object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>ISingle Relationship Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>ISingle Relationship Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseISingleRelationshipMapping(ISingleRelationshipMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IMany To One</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IMany To One</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIManyToOne(IManyToOne object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>IOne To One</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>IOne To One</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseIOneToOne(IOneToOne object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>INon Owning Mapping</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>INon Owning Mapping</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseINonOwningMapping(INonOwningMapping object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public T defaultCase(EObject object) {
- return null;
- }
-} //JavaMappingsSwitch

Back to the top