Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java')
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java77
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java143
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java64
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java37
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.java40
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java96
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java169
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaStructureNodes.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java47
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java41
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java33
103 files changed, 4086 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java
new file mode 100644
index 0000000000..94676c16d0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+public interface DefaultJavaAttributeMappingDefinition
+ extends JavaAttributeMappingDefinition
+{
+ /**
+ * Return whether the definition's mapping is the "default" mapping for the
+ * specified persistent attribute.
+ */
+ boolean isDefault(JavaPersistentAttribute persistentAttribute);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java
new file mode 100644
index 0000000000..fb16f1d95f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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.jpa.core.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.jpt.jpa.core.JpaStructureNode;
+import org.eclipse.jpt.jpa.core.context.JpaContextNode;
+import org.eclipse.jpt.jpa.core.context.PersistentType;
+import org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer;
+import org.eclipse.jpt.jpa.core.resource.java.JavaResourcePackageFragmentRoot;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * A JAR file identified by a <code>persistence.xml</code> <code>jar-file</code> element.
+ * This holds persistent types corresponding to all the "persistable" types
+ * discovered in the JAR.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JarFile
+ extends JpaContextNode, JpaStructureNode, PersistentTypeContainer
+{
+ JavaResourcePackageFragmentRoot getJarResourcePackageFragmentRoot();
+
+
+ // ********** Java persistent types **********
+
+ /**
+ * Return the JAR file's Java persistent types.
+ * Return only the types that are annotated with JPA annotations.
+ */
+ Iterator<JavaPersistentType> javaPersistentTypes();
+ String JAVA_PERSISTENT_TYPES_COLLECTION = "javaPersistentTypes"; //$NON-NLS-1$
+
+ /**
+ * Return the size of the JAR file's Java persistent types.
+ */
+ int javaPersistentTypesSize();
+
+ /**
+ * Return the persistent type with the specified name.
+ * Return null if the persistent type is not found.
+ */
+ PersistentType getPersistentType(String typeName);
+
+
+ // ********** validation **********
+
+ /**
+ * Add to the list of current validation messages
+ */
+ void validate(List<IMessage> messages, IReporter reporter);
+
+ /**
+ * Return true if this jar file exists in the given folder
+ */
+ boolean isIn(IFolder folder);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java
new file mode 100644
index 0000000000..1ceb4e962a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.AssociationOverride;
+import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
+
+/**
+ * Java association override
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaAssociationOverride
+ extends JavaReadOnlyAssociationOverride, AssociationOverride, JavaOverride
+{
+ JavaVirtualAssociationOverride convertToVirtual();
+
+ AssociationOverrideAnnotation getOverrideAnnotation();
+
+ JavaOverrideRelationship getRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java
new file mode 100644
index 0000000000..b43e2ee1de
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
+import org.eclipse.jpt.jpa.core.context.Override_;
+import org.eclipse.jpt.jpa.core.context.VirtualOverride;
+
+/**
+ * Java association override container
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaAssociationOverrideContainer
+ extends AssociationOverrideContainer, JavaOverrideContainer
+{
+ ListIterator<JavaReadOnlyAssociationOverride> overrides();
+ JavaReadOnlyAssociationOverride getOverrideNamed(String name);
+ ListIterator<JavaAssociationOverride> specifiedOverrides();
+ JavaAssociationOverride getSpecifiedOverride(int index);
+ JavaAssociationOverride getSpecifiedOverrideNamed(String name);
+ ListIterator<JavaVirtualAssociationOverride> virtualOverrides();
+ JavaVirtualAssociationOverride convertOverrideToVirtual(Override_ specifiedOverride);
+ JavaAssociationOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
+
+
+ // ********** owner **********
+
+ interface Owner
+ extends AssociationOverrideContainer.Owner, JavaOverrideContainer.Owner
+ {
+ // combine two interfaces
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java
new file mode 100644
index 0000000000..0a438ef690
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.AttributeMapping;
+import org.eclipse.jpt.jpa.core.resource.java.Annotation;
+import org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * Java attribute mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaAttributeMapping
+ extends AttributeMapping, JavaJpaContextNode
+{
+ JavaPersistentAttribute getParent();
+
+ JavaPersistentAttribute getPersistentAttribute();
+
+ JavaResourcePersistentAttribute getResourcePersistentAttribute();
+
+ Annotation getMappingAnnotation();
+
+ Annotation getAnnotationForUpdate();
+
+ void updateDefault();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java
new file mode 100644
index 0000000000..887a8d2d89
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.JpaFactory;
+
+/**
+ * Map a string key to an attribute mapping and its corresponding
+ * Java annotations.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaAttributeMappingDefinition
+{
+ /**
+ * Return the attribute mapping's key.
+ */
+ String getKey();
+
+ /**
+ * Return the name of the attribute mapping's annotation.
+ */
+ String getAnnotationName();
+
+ /**
+ * Return the names of the attribute mapping's "supporting" annotations.
+ */
+ Iterable<String> getSupportingAnnotationNames();
+
+ /**
+ * Return whether the definition's mapping is
+ * the "specified" mapping for the specified persistent attribute.
+ * <p>
+ * <strong>NB:</strong> A mapping is not necessarily "specified" if its
+ * annotation is present
+ * (see {@link org.eclipse.jpt.jpa.core.internal.jpa2.context.java.AbstractJavaIdMappingDefinition2_0#isSpecified(JavaPersistentAttribute)})
+ */
+ boolean isSpecified(JavaPersistentAttribute persistentAttribute);
+
+ /**
+ * Build a Java attribute mapping for the specified persistent attribute.
+ * Use the specified factory for creation so extenders can simply override
+ * the appropriate factory method instead of building a definition for the
+ * same key.
+ */
+ JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java
new file mode 100644
index 0000000000..093e0e8eca
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.AttributeOverride;
+import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation;
+
+/**
+ * Java attribute override
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaAttributeOverride
+ extends JavaReadOnlyAttributeOverride, AttributeOverride, JavaOverride
+{
+ JavaVirtualAttributeOverride convertToVirtual();
+
+ AttributeOverrideAnnotation getOverrideAnnotation();
+
+ JavaColumn getColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java
new file mode 100644
index 0000000000..48bd48d7d5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
+import org.eclipse.jpt.jpa.core.context.Override_;
+import org.eclipse.jpt.jpa.core.context.VirtualOverride;
+
+/**
+ * Java attribute override container
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaAttributeOverrideContainer
+ extends AttributeOverrideContainer, JavaOverrideContainer
+{
+ ListIterator<JavaReadOnlyAttributeOverride> overrides();
+ JavaReadOnlyAttributeOverride getOverrideNamed(String name);
+ ListIterator<JavaAttributeOverride> specifiedOverrides();
+ JavaAttributeOverride getSpecifiedOverride(int index);
+ JavaAttributeOverride getSpecifiedOverrideNamed(String name);
+ ListIterator<JavaVirtualAttributeOverride> virtualOverrides();
+ JavaVirtualAttributeOverride convertOverrideToVirtual(Override_ specifiedOverride);
+ JavaAttributeOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
+
+
+ // ********** Java owner **********
+
+ interface Owner
+ extends AttributeOverrideContainer.Owner, JavaOverrideContainer.Owner
+ {
+ // combine two interfaces
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java
new file mode 100644
index 0000000000..3e92a1890e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.jpa.core.context.BaseColumn;
+import org.eclipse.jpt.jpa.core.resource.java.BaseColumnAnnotation;
+
+/**
+ * Java column or join column
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaBaseColumn
+ extends BaseColumn, JavaNamedColumn
+{
+ BaseColumnAnnotation getColumnAnnotation();
+
+ /**
+ * Return the (best guess) text location of the column's table.
+ */
+ TextRange getTableTextRange(CompilationUnit astRoot);
+
+
+ // ********** owner **********
+
+ /**
+ * interface allowing columns to be used in multiple places
+ * (e.g. basic mappings and attribute overrides)
+ */
+ interface Owner
+ extends JavaNamedColumn.Owner, BaseColumn.Owner
+ {
+ // combine two interfaces
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java
new file mode 100644
index 0000000000..ab5405f5d5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.BaseEmbeddedMapping;
+
+/**
+ * Behavior common to Java embedded and embedded ID mappings.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaBaseEmbeddedMapping
+ extends BaseEmbeddedMapping, JavaAttributeMapping
+{
+ JavaAttributeOverrideContainer getAttributeOverrideContainer();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.java
new file mode 100644
index 0000000000..9a54c73cce
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.jpa.core.context.BaseJoinColumn;
+
+/**
+ * Java join column or primary key join column
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaBaseJoinColumn
+ extends BaseJoinColumn, JavaNamedColumn
+{
+ /**
+ * Return the (best guess) text location of the join column's
+ * referenced column name.
+ */
+ TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot);
+
+
+ // ********** owner **********
+
+ /**
+ * interface allowing join columns to be used in multiple places
+ * (e.g. 1:1 mappings and join tables)
+ */
+ interface Owner
+ extends BaseJoinColumn.Owner, JavaNamedColumn.Owner
+ {
+ // combine interfaces
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java
new file mode 100644
index 0000000000..b5d8038928
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.BasicMapping;
+import org.eclipse.jpt.jpa.core.resource.java.BasicAnnotation;
+
+/**
+ * Java basic mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaBasicMapping
+ extends BasicMapping, JavaColumnMapping, JavaConvertibleMapping
+{
+ BasicAnnotation getMappingAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.java
new file mode 100644
index 0000000000..9f0562919b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.Cascade;
+
+/**
+ * Java cascade (persist, merge, remove, refresh)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaCascade
+ extends Cascade, JavaJpaContextNode
+{
+ // combine various interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.java
new file mode 100644
index 0000000000..3c0a4fb3eb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.CollectionMapping;
+
+/**
+ * JPA Java collection mapping (e.g. 1:m, m:m, element collection)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaCollectionMapping
+ extends CollectionMapping, JavaAttributeMapping
+{
+ JavaOrderable getOrderable();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java
new file mode 100644
index 0000000000..f2117d070e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.Column;
+import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
+
+/**
+ * Java column
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaColumn
+ extends Column, JavaBaseColumn
+{
+ CompleteColumnAnnotation getColumnAnnotation();
+
+ // ********** owner **********
+
+ interface Owner
+ extends JavaBaseColumn.Owner
+ {
+ CompleteColumnAnnotation getColumnAnnotation();
+ void removeColumnAnnotation();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java
new file mode 100644
index 0000000000..1d4f3fd5fa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ColumnMapping;
+
+/**
+ * Java column mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaColumnMapping
+ extends ColumnMapping, JavaAttributeMapping, JavaColumn.Owner
+{
+ JavaColumn getColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java
new file mode 100644
index 0000000000..60df112508
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.common.utility.internal.ClassName;
+import org.eclipse.jpt.common.utility.internal.StringTools;
+import org.eclipse.jpt.jpa.core.JpaFactory;
+import org.eclipse.jpt.jpa.core.context.Converter;
+import org.eclipse.jpt.jpa.core.resource.java.Annotation;
+import org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * Java converter
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.1
+ * @since 2.1
+ */
+public interface JavaConverter
+ extends Converter, JavaJpaContextNode
+{
+ JavaAttributeMapping getParent();
+
+ Annotation getConverterAnnotation();
+
+ /**
+ * Allow the converter to clean up any related annotations before it is
+ * removed itself.
+ */
+ void dispose();
+
+
+ // ********** adapter **********
+
+ /**
+ * This interface allows a convertible mapping to interact with various
+ * Java converters via the same protocol.
+ */
+ public interface Adapter
+ {
+ /**
+ * Return the type of converter handled by the adapter.
+ */
+ Class<? extends Converter> getConverterType();
+
+ /**
+ * Build a converter corresponding to the specified mapping
+ * if the mapping's resource attribute is modified by the adapter's
+ * converter annotation. Return <code>null</code> otherwise.
+ * This is used to build a converter during construction of the
+ * converter's mapping.
+ */
+ JavaConverter buildConverter(JavaAttributeMapping parent, JpaFactory factory);
+
+ /**
+ * Return the adapter's converter annotation for the specified Java
+ * resource persistent member.
+ * Return <code>null</code> if the adapter's converter annotation is
+ * missing.
+ * The returned converter annotation is compared to the parent's
+ * converter's converter annotation while the context model is synchronized
+ * with the resource model. If it has changed, the parent will build
+ * a new converter (via the adapter).
+ *
+ * @see #buildConverter(Annotation, JavaAttributeMapping, JpaFactory)
+ */
+ Annotation getConverterAnnotation(JavaResourcePersistentAttribute javaResourcePersistentAttribute);
+
+ /**
+ * Build a converter using the specified converter annotation.
+ * This is used when the context model is synchronized with the
+ * resource model (and the resource model has changed).
+ *
+ * @see #getConverterAnnotation(JavaResourcePersistentAttribute)
+ */
+ JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory);
+
+ /**
+ * Build a new converter and, if necessary, its corresponding converter
+ * annotation.
+ */
+ JavaConverter buildNewConverter(JavaAttributeMapping parent, JpaFactory factory);
+
+ /**
+ * Remove the adapter's converter annotation from the specified
+ * Java resource persistent member.
+ */
+ void removeConverterAnnotation(JavaResourcePersistentAttribute javaResourcePersistentAttribute);
+ }
+
+
+ // ********** abstract adapter **********
+
+ public abstract static class AbstractAdapter
+ implements JavaConverter.Adapter
+ {
+ public JavaConverter buildConverter(JavaAttributeMapping parent, JpaFactory factory) {
+ Annotation annotation = this.getConverterAnnotation(parent.getResourcePersistentAttribute());
+ return (annotation == null) ? null : this.buildConverter(annotation, parent, factory);
+ }
+
+ public Annotation getConverterAnnotation(JavaResourcePersistentAttribute attribute) {
+ return attribute.getAnnotation(this.getAnnotationName());
+ }
+
+ protected abstract String getAnnotationName();
+
+ public JavaConverter buildNewConverter(JavaAttributeMapping parent, JpaFactory factory) {
+ return this.buildConverter(this.buildConverterAnnotationIfNecessary(parent.getResourcePersistentAttribute()), parent, factory);
+ }
+
+ protected Annotation buildConverterAnnotationIfNecessary(JavaResourcePersistentAttribute attribute) {
+ // the annotation may already be present, after we remove the other converter annotations
+ Annotation annotation = this.getConverterAnnotation(attribute);
+ return (annotation != null) ? annotation : this.buildConverterAnnotation(attribute);
+ }
+
+ protected Annotation buildConverterAnnotation(JavaResourcePersistentAttribute attribute) {
+ return attribute.addAnnotation(this.getAnnotationName());
+ }
+
+ public void removeConverterAnnotation(JavaResourcePersistentAttribute attribute) {
+ attribute.removeAnnotation(this.getAnnotationName());
+ }
+
+ @Override
+ public String toString() {
+ return StringTools.buildToStringFor(this, ClassName.getSimpleName(this.getAnnotationName()));
+ }
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.java
new file mode 100644
index 0000000000..a6f9bd607f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ConvertibleMapping;
+
+/**
+ * Java attribute mapping that has a converter (e.g. basic, ID, version).
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaConvertibleMapping
+ extends ConvertibleMapping, JavaAttributeMapping
+{
+ JavaConverter getConverter();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java
new file mode 100644
index 0000000000..18ca8a5820
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.DiscriminatorColumn;
+import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
+
+/**
+ * Java discriminator column
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaDiscriminatorColumn
+ extends DiscriminatorColumn, JavaNamedColumn
+{
+ DiscriminatorColumnAnnotation getColumnAnnotation();
+
+
+ // ********** owner **********
+
+ /**
+ * interface allowing columns to be used in multiple places
+ */
+ interface Owner
+ extends JavaNamedColumn.Owner, DiscriminatorColumn.Owner
+ {
+ // combine two interfaces
+ }
+
+} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java
new file mode 100644
index 0000000000..f00fca6d49
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.Embeddable;
+import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation;
+
+/**
+ * Java embeddable type mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaEmbeddable
+ extends Embeddable, JavaTypeMapping
+{
+ EmbeddableAnnotation getMappingAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java
new file mode 100644
index 0000000000..8f066b4392
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.EmbeddedIdMapping;
+import org.eclipse.jpt.jpa.core.resource.java.EmbeddedIdAnnotation;
+
+/**
+ * Java embedded ID mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaEmbeddedIdMapping
+ extends EmbeddedIdMapping, JavaBaseEmbeddedMapping
+{
+ EmbeddedIdAnnotation getMappingAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java
new file mode 100644
index 0000000000..ff6631c380
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.EmbeddedMapping;
+import org.eclipse.jpt.jpa.core.resource.java.EmbeddedAnnotation;
+
+/**
+ * Java embedded mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaEmbeddedMapping
+ extends EmbeddedMapping, JavaBaseEmbeddedMapping
+{
+ EmbeddedAnnotation getMappingAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java
new file mode 100644
index 0000000000..ea466ee4e9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.Entity;
+import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation;
+
+/**
+ * Java entity
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaEntity
+ extends Entity, JavaTypeMapping
+{
+ EntityAnnotation getMappingAnnotation();
+
+ JavaTable getTable();
+
+ JavaIdClassReference getIdClassReference();
+
+ JavaDiscriminatorColumn getDiscriminatorColumn();
+
+
+ // ********** secondary tables **********
+
+ ListIterator<JavaSecondaryTable> secondaryTables();
+ ListIterator<JavaSecondaryTable> specifiedSecondaryTables();
+ JavaSecondaryTable addSpecifiedSecondaryTable();
+ JavaSecondaryTable addSpecifiedSecondaryTable(int index);
+
+
+ // ********** primary key join columns **********
+
+ ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns();
+ ListIterator<JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns();
+ JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
+
+ JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
+ String DEFAULT_PRIMARY_KEY_JOIN_COLUMN_PROPERTY = "defaultPrimaryKeyJoinColumn"; //$NON-NLS-1$
+
+
+ // ********** containers **********
+
+ JavaAttributeOverrideContainer getAttributeOverrideContainer();
+ JavaAssociationOverrideContainer getAssociationOverrideContainer();
+ JavaQueryContainer getQueryContainer();
+ JavaGeneratorContainer getGeneratorContainer();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java
new file mode 100644
index 0000000000..ec8671ad3c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.JpaFactory;
+import org.eclipse.jpt.jpa.core.context.Converter;
+import org.eclipse.jpt.jpa.core.context.EnumeratedConverter;
+import org.eclipse.jpt.jpa.core.resource.java.Annotation;
+import org.eclipse.jpt.jpa.core.resource.java.EnumeratedAnnotation;
+
+/**
+ * Java enumerated converter
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaEnumeratedConverter
+ extends EnumeratedConverter, JavaConverter
+{
+ // ********** adapter **********
+
+ public static class Adapter
+ extends JavaConverter.AbstractAdapter
+ {
+ private static final Adapter INSTANCE = new Adapter();
+ public static Adapter instance() {
+ return INSTANCE;
+ }
+
+ private Adapter() {
+ super();
+ }
+
+ public Class<? extends Converter> getConverterType() {
+ return EnumeratedConverter.class;
+ }
+
+ @Override
+ protected String getAnnotationName() {
+ return EnumeratedAnnotation.ANNOTATION_NAME;
+ }
+
+ public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) {
+ return factory.buildJavaEnumeratedConverter(parent, (EnumeratedAnnotation) converterAnnotation);
+ }
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java
new file mode 100644
index 0000000000..d93495dd04
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.jpa.core.context.GeneratedValue;
+import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
+
+/**
+ * Java generated value
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaGeneratedValue
+ extends GeneratedValue, JavaJpaContextNode
+{
+ GeneratedValueAnnotation getGeneratedValueAnnotation();
+
+ /**
+ * Return the (best guess) text location of the generator.
+ */
+ TextRange getGeneratorTextRange(CompilationUnit astRoot);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java
new file mode 100644
index 0000000000..25395aff31
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.jpa.core.context.Generator;
+import org.eclipse.jpt.jpa.core.resource.java.GeneratorAnnotation;
+
+/**
+ * Java sequence and table generators
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaGenerator
+ extends Generator, JavaJpaContextNode
+{
+ GeneratorAnnotation getGeneratorAnnotation();
+
+ TextRange getNameTextRange(CompilationUnit astRoot);
+} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java
new file mode 100644
index 0000000000..8592c86715
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.GeneratorContainer;
+import org.eclipse.jpt.jpa.core.resource.java.JavaResourceAnnotatedElement;
+
+/**
+ * Java generator container
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaGeneratorContainer
+ extends GeneratorContainer, JavaJpaContextNode
+{
+ // ********** sequence generator **********
+
+ JavaSequenceGenerator getSequenceGenerator();
+
+ JavaSequenceGenerator addSequenceGenerator();
+
+
+ // ********** table generator **********
+
+ JavaTableGenerator getTableGenerator();
+
+ JavaTableGenerator addTableGenerator();
+
+ interface Owner
+ {
+ JavaResourceAnnotatedElement getResourceAnnotatedElement();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java
new file mode 100644
index 0000000000..e21214ca35
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.IdClassReference;
+
+/**
+ * Java ID class reference
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaIdClassReference
+ extends IdClassReference, JavaJpaContextNode
+{
+ /**
+ * Return the fully qualified name of the id class, taking into consideration the default value if applicable
+ */
+ String getFullyQualifiedIdClassName();
+ String FULLY_QUALIFIED_ID_CLASS_PROPERTY = "fullyQualifiedIdClass"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java
new file mode 100644
index 0000000000..7fe82f003d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.IdMapping;
+import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation;
+
+/**
+ * Java ID mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaIdMapping
+ extends IdMapping, JavaColumnMapping, JavaConvertibleMapping, JavaGeneratorContainer.Owner
+{
+ IdAnnotation getMappingAnnotation();
+
+ JavaGeneratorContainer getGeneratorContainer();
+
+ JavaGeneratedValue getGeneratedValue();
+ JavaGeneratedValue addGeneratedValue();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java
new file mode 100644
index 0000000000..b8510b1d5a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.JoinColumn;
+import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
+
+/**
+ * Java join column
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaJoinColumn
+ extends JoinColumn, JavaBaseJoinColumn, JavaBaseColumn
+{
+ JoinColumnAnnotation getColumnAnnotation();
+
+
+ // ********** owner **********
+
+ interface Owner
+ extends JoinColumn.Owner, JavaBaseJoinColumn.Owner, JavaBaseColumn.Owner
+ {
+ // combine interfaces
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.java
new file mode 100644
index 0000000000..b42bc14b39
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.JoinColumnRelationship;
+
+/**
+ * Java join column relationship (1:1, 1:m, m:1, and association override)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaJoinColumnRelationship
+ extends JoinColumnRelationship, JavaRelationship
+{
+ JavaJoinColumnRelationshipStrategy getJoinColumnStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java
new file mode 100644
index 0000000000..cba596937c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.JoinColumnRelationshipStrategy;
+
+/**
+ * Java join column relationship strategy
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaJoinColumnRelationshipStrategy
+ extends JoinColumnRelationshipStrategy, JavaRelationshipStrategy
+{
+ ListIterator<JavaJoinColumn> joinColumns();
+
+ ListIterator<JavaJoinColumn> specifiedJoinColumns();
+ JavaJoinColumn getSpecifiedJoinColumn(int index);
+ JavaJoinColumn addSpecifiedJoinColumn();
+ JavaJoinColumn addSpecifiedJoinColumn(int index);
+
+ JavaJoinColumn getDefaultJoinColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java
new file mode 100644
index 0000000000..7d1ac7c54f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.JoinTable;
+import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
+
+/**
+ * Java join table
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaJoinTable
+ extends JoinTable, JavaReferenceTable
+{
+ JavaJoinTableRelationshipStrategy getParent();
+
+ JoinTableAnnotation getTableAnnotation();
+
+
+ // ********** inverse join columns **********
+
+ ListIterator<JavaJoinColumn> inverseJoinColumns();
+
+ ListIterator<JavaJoinColumn> specifiedInverseJoinColumns();
+ JavaJoinColumn getSpecifiedInverseJoinColumn(int index);
+ JavaJoinColumn addSpecifiedInverseJoinColumn();
+ JavaJoinColumn addSpecifiedInverseJoinColumn(int index);
+
+ JavaJoinColumn getDefaultInverseJoinColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.java
new file mode 100644
index 0000000000..2418a7d02e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.JoinTableRelationship;
+
+/**
+ * Java join table relationship (1:1, 1:m, m:1, m:m)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaJoinTableRelationship
+ extends JoinTableRelationship, JavaRelationship
+{
+ JavaJoinTableRelationshipStrategy getJoinTableStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java
new file mode 100644
index 0000000000..c6c912fa07
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.JoinTableRelationshipStrategy;
+import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
+
+/**
+ * Java join table relationship strategy
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JavaJoinTableRelationshipStrategy
+ extends JoinTableRelationshipStrategy, JavaRelationshipStrategy
+{
+ JavaJoinTable getJoinTable();
+
+ /**
+ * Return the join table annotation, use a null object instead of returning null
+ * if the join table annotation does not exist.
+ */
+ JoinTableAnnotation getJoinTableAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java
new file mode 100644
index 0000000000..ff33b25ef8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.common.utility.Filter;
+import org.eclipse.jpt.jpa.core.context.JpaContextNode;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Java JPA context node.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaJpaContextNode
+ extends JpaContextNode
+{
+ /**
+ * Return the Java code-completion proposals for the specified position
+ * in the source code.
+ */
+ Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot);
+
+
+ // ********** validation **********
+
+ /**
+ * Adds to the list of current validation messages
+ */
+ void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
+
+ TextRange getValidationTextRange(CompilationUnit astRoot);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java
new file mode 100644
index 0000000000..2158df7c79
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.JpaFactory;
+import org.eclipse.jpt.jpa.core.context.Converter;
+import org.eclipse.jpt.jpa.core.context.LobConverter;
+import org.eclipse.jpt.jpa.core.resource.java.Annotation;
+import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation;
+
+/**
+ * Java LOB converter
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaLobConverter
+ extends LobConverter, JavaConverter
+{
+ // ********** adapter **********
+
+ public static class Adapter
+ extends JavaConverter.AbstractAdapter
+ {
+ private static final Adapter INSTANCE = new Adapter();
+ public static Adapter instance() {
+ return INSTANCE;
+ }
+
+ private Adapter() {
+ super();
+ }
+
+ public Class<? extends Converter> getConverterType() {
+ return LobConverter.class;
+ }
+
+ @Override
+ protected String getAnnotationName() {
+ return LobAnnotation.ANNOTATION_NAME;
+ }
+
+ public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) {
+ return factory.buildJavaLobConverter(parent, (LobAnnotation) converterAnnotation);
+ }
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java
new file mode 100644
index 0000000000..9e2544dc8f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ManyToManyMapping;
+import org.eclipse.jpt.jpa.core.resource.java.ManyToManyAnnotation;
+
+/**
+ * Java m:m mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaManyToManyMapping
+ extends ManyToManyMapping, JavaMultiRelationshipMapping
+{
+ ManyToManyAnnotation getMappingAnnotation();
+
+ ManyToManyAnnotation getAnnotationForUpdate();
+
+ JavaManyToManyRelationship getRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.java
new file mode 100644
index 0000000000..0ecaef922d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ManyToManyRelationship;
+
+/**
+ * Java m:m relationship
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaManyToManyRelationship
+ extends ManyToManyRelationship,
+ JavaMappedByRelationship,
+ JavaMappingJoinTableRelationship
+{
+ // combine various interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java
new file mode 100644
index 0000000000..6c7db3b15d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ManyToOneMapping;
+import org.eclipse.jpt.jpa.core.resource.java.ManyToOneAnnotation;
+
+/**
+ * Java m:1 mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaManyToOneMapping
+ extends ManyToOneMapping, JavaSingleRelationshipMapping
+{
+ ManyToOneAnnotation getMappingAnnotation();
+
+ JavaManyToOneRelationship getRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java
new file mode 100644
index 0000000000..c146adb25a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ManyToOneRelationship;
+
+/**
+ * Java m:1 relationship
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaManyToOneRelationship
+ extends ManyToOneRelationship,
+ JavaMappingJoinColumnRelationship
+{
+ // combine various interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java
new file mode 100644
index 0000000000..4a7fec62be
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
+import org.eclipse.jpt.jpa.core.resource.java.OwnableRelationshipMappingAnnotation;
+
+/**
+ * Java "mapped by" relationship (1:1, 1:m, m:m)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaMappedByRelationship
+ extends MappedByRelationship, JavaRelationship
+{
+ JavaMappedByRelationshipStrategy getMappedByStrategy();
+
+ OwnableRelationshipMappingAnnotation getMappingAnnotation();
+
+ OwnableRelationshipMappingAnnotation getMappingAnnotationForUpdate();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.java
new file mode 100644
index 0000000000..77b3356adb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.MappedByRelationshipStrategy;
+
+/**
+ * Java "mapped by" relationship strategy
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaMappedByRelationshipStrategy
+ extends JavaRelationshipStrategy, MappedByRelationshipStrategy
+{
+ // combine various interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java
new file mode 100644
index 0000000000..1ccd402c93
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
+import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
+
+/**
+ * Java mapped superclass
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaMappedSuperclass
+ extends MappedSuperclass, JavaTypeMapping
+{
+ MappedSuperclassAnnotation getMappingAnnotation();
+
+ JavaIdClassReference getIdClassReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java
new file mode 100644
index 0000000000..20cd4e734d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 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.jpa.core.context.java;
+
+/**
+ * Java mapping join column relationship (1:1, 1:m, m:1)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaMappingJoinColumnRelationship
+ extends JavaJoinColumnRelationship,
+ JavaMappingRelationship
+{
+ // combine various interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java
new file mode 100644
index 0000000000..027552a3c5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 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.jpa.core.context.java;
+
+/**
+ * Java mapping join table relationship (1:1, 1:m, m:1, m:m)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaMappingJoinTableRelationship
+ extends JavaJoinTableRelationship,
+ JavaMappingRelationship
+{
+ // combine various interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.java
new file mode 100644
index 0000000000..e47c8299b1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.MappingRelationship;
+
+/**
+ * Java mapping relationship (1:1, 1:m, m:1, m:m)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaMappingRelationship
+ extends MappingRelationship, JavaRelationship
+{
+ JavaRelationshipMapping getMapping();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.java
new file mode 100644
index 0000000000..595c23129a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.MultiRelationshipMapping;
+
+/**
+ * Java multi-valued (1:m, m:m) relationship mapping.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaMultiRelationshipMapping
+ extends MultiRelationshipMapping, JavaRelationshipMapping, JavaCollectionMapping
+{
+ // combine various interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java
new file mode 100644
index 0000000000..7607bad56f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.jpa.core.context.NamedColumn;
+import org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation;
+
+/**
+ * Java
+ * <ul>
+ * <li>column
+ * <li>join column
+ * <li>primary key join column
+ * <li>discriminator column
+ * <li>order column
+ * </ul>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaNamedColumn
+ extends NamedColumn, JavaJpaContextNode
+{
+ NamedColumnAnnotation getColumnAnnotation();
+
+ /**
+ * Return the (best guess) text location of the column's name.
+ */
+ TextRange getNameTextRange(CompilationUnit astRoot);
+
+
+ // ********** owner **********
+
+ /**
+ * interface allowing columns to be used in multiple places
+ * (e.g. basic mappings and attribute overrides)
+ */
+ interface Owner
+ extends NamedColumn.Owner
+ {
+ /**
+ * Return the column owner's text range. This can be returned by the
+ * column when its annotation is not present.
+ */
+ TextRange getValidationTextRange(CompilationUnit astRoot);
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java
new file mode 100644
index 0000000000..0d915857af
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
+import org.eclipse.jpt.jpa.core.context.NamedNativeQuery;
+import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation;
+
+/**
+ * Java named native query
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaNamedNativeQuery
+ extends NamedNativeQuery, JavaQuery
+{
+ NamedNativeQueryAnnotation getQueryAnnotation();
+
+ // required to resolve ambiguity
+ ListIterable<JavaQueryHint> getHints();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java
new file mode 100644
index 0000000000..bf742d7a87
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
+import org.eclipse.jpt.jpa.core.context.NamedQuery;
+import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation;
+
+/**
+ * Java named query
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaNamedQuery
+ extends NamedQuery, JavaQuery
+{
+ NamedQueryAnnotation getQueryAnnotation();
+
+ // required to resolve ambiguity
+ ListIterable<JavaQueryHint> getHints();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java
new file mode 100644
index 0000000000..dc6461010b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.OneToManyMapping;
+import org.eclipse.jpt.jpa.core.resource.java.OneToManyAnnotation;
+
+/**
+ * Java 1:m mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaOneToManyMapping
+ extends OneToManyMapping, JavaMultiRelationshipMapping
+{
+ OneToManyAnnotation getMappingAnnotation();
+
+ OneToManyAnnotation getAnnotationForUpdate();
+
+ JavaOneToManyRelationship getRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.java
new file mode 100644
index 0000000000..dab064d031
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.OneToManyRelationship;
+
+/**
+ * Java 1:m relationship
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaOneToManyRelationship
+ extends OneToManyRelationship,
+ JavaMappedByRelationship,
+ JavaMappingJoinTableRelationship
+{
+ // combine various interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java
new file mode 100644
index 0000000000..b98d965be9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.OneToOneMapping;
+import org.eclipse.jpt.jpa.core.resource.java.OneToOneAnnotation;
+
+/**
+ * Java 1:1 mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaOneToOneMapping
+ extends OneToOneMapping, JavaSingleRelationshipMapping
+{
+ OneToOneAnnotation getMappingAnnotation();
+
+ OneToOneAnnotation getAnnotationForUpdate();
+
+ JavaOneToOneRelationship getRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java
new file mode 100644
index 0000000000..3715ccf9e2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.OneToOneRelationship;
+
+/**
+ * Java 1:1 relationship
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaOneToOneRelationship
+ extends OneToOneRelationship,
+ JavaMappedByRelationship,
+ JavaPrimaryKeyJoinColumnRelationship,
+ JavaMappingJoinColumnRelationship
+{
+ // combine various interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java
new file mode 100644
index 0000000000..2a5c042baf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.Orderable;
+
+/**
+ * Multi-valued (1:m, m:m) relationship mappings support ordering.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOrderable
+ extends Orderable, JavaJpaContextNode
+{
+ JavaAttributeMapping getParent();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.java
new file mode 100644
index 0000000000..a7d3f41694
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.jpa.core.context.Override_;
+import org.eclipse.jpt.jpa.core.resource.java.OverrideAnnotation;
+
+/**
+ * Java override
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 3.0
+ * @since 2.3
+ */
+public interface JavaOverride
+ extends Override_, JavaReadOnlyOverride
+{
+ JavaVirtualOverride convertToVirtual();
+
+ OverrideAnnotation getOverrideAnnotation();
+
+ /**
+ * Return the (best guess) text location of the override's name.
+ */
+ TextRange getNameTextRange(CompilationUnit astRoot);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java
new file mode 100644
index 0000000000..90a62ee8ba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.jpa.core.context.OverrideContainer;
+import org.eclipse.jpt.jpa.core.context.Override_;
+import org.eclipse.jpt.jpa.core.context.VirtualOverride;
+import org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentMember;
+
+/**
+ * Java attribute or association override container
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOverrideContainer
+ extends OverrideContainer, JavaJpaContextNode
+{
+ ListIterator<? extends JavaReadOnlyOverride> overrides();
+ JavaReadOnlyOverride getOverrideNamed(String name);
+ ListIterator<? extends JavaOverride> specifiedOverrides();
+ JavaOverride getSpecifiedOverride(int index);
+ JavaOverride getSpecifiedOverrideNamed(String name);
+ ListIterator<? extends JavaVirtualOverride> virtualOverrides();
+ JavaVirtualOverride convertOverrideToVirtual(Override_ specifiedOverride);
+ JavaOverride convertOverrideToSpecified(VirtualOverride virtualOverride);
+
+ /**
+ * JPA 2.0
+ * <p>
+ * Return a prefix (<em>without</em> the following <code>'.'</code>)
+ * that may be prepended to the override name.
+ * Return <code>null</code> if no prefix is supported.
+ */
+ String getPossiblePrefix();
+ String getWritePrefix();
+
+
+ // ********** owner **********
+
+ interface Owner
+ extends OverrideContainer.Owner
+ {
+ JavaResourcePersistentMember getResourcePersistentMember();
+
+ TextRange getValidationTextRange(CompilationUnit astRoot);
+
+ /**
+ * JPA 2.0
+ * <p>
+ * Return the prefix (<em>without</em> the following <code>'.'</code>)
+ * to be prepended to the override name.
+ */
+ String getWritePrefix();
+
+ /**
+ * JPA 2.0
+ * <p>
+ * Return a prefix (<em>without</em> the following <code>'.'</code>)
+ * that may be prepended to the override name.
+ * Return <code>null</code> if no prefix is supported.
+ * <p>
+ * JPA 2.0 supports the prefixes <code>"map"</code> and <code>"key"</code>.
+ */
+ String getPossiblePrefix();
+
+ /**
+ * JPA 2.0
+ * <p>
+ * This is necessary for JPA 2.0 because an override annotation for an
+ * element collection can have a name with a prefix that indicates
+ * whether the override applies to element collection's embedded key or
+ * value. Return whether the specified override name, which may have a
+ * prefix, is relevant to the override container.
+ * <p>
+ * JPA 2.0 supports the prefixes <code>"map"</code> and <code>"key"</code>.
+ */
+ boolean isRelevant(String overrideName);
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.java
new file mode 100644
index 0000000000..bd7bfedc49
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.OverrideRelationship;
+
+/**
+ * Java association override relationship
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOverrideRelationship
+ extends OverrideRelationship,
+ JavaJoinColumnRelationship
+{
+ JavaAssociationOverride getAssociationOverride();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java
new file mode 100644
index 0000000000..27b1653476
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.jpa.core.context.CollectionMapping;
+import org.eclipse.jpt.jpa.core.context.Embeddable;
+import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
+import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * Context Java persistent <em>attribute</em> (field or property).
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaPersistentAttribute
+ extends PersistentAttribute, JavaJpaContextNode
+{
+ // ********** mapping **********
+
+ JavaAttributeMapping getMapping();
+
+ JavaAttributeMapping setMappingKey(String key);
+
+
+ // ********** misc **********
+
+ /**
+ * Return the "resource" persistent attribute.
+ */
+ JavaResourcePersistentAttribute getResourcePersistentAttribute();
+
+ /**
+ * Return whether the attribute contains the given offset into the text file.
+ */
+ boolean contains(int offset, CompilationUnit astRoot);
+
+ /**
+ * Return the embeddable (type mapping) corresponding to the persistent
+ * attribute's type. Return <code>null</code> if it is not found.
+ */
+ Embeddable getEmbeddable();
+
+ /**
+ * Return whether the attribute is a field (as opposed to a property).
+ */
+ boolean isField();
+
+ /**
+ * Return whether the attribute is a property (as opposed to a field).
+ */
+ boolean isProperty();
+
+ /**
+ * Return whether the attribute is 'public', which is problematic for fields.
+ */
+ boolean isPublic();
+
+ /**
+ * Return whether the attribute is 'final', which is problematic.
+ */
+ boolean isFinal();
+
+
+ // ********** type **********
+
+ /**
+ * Return whether the attribute's type is valid for a default basic mapping.
+ */
+ boolean typeIsBasic();
+
+ /**
+ * Return the attribute's type name if it is valid as a target type
+ * (i.e. the type is neither an array nor a "container").
+ */
+ String getSingleReferenceTargetTypeName();
+
+ /**
+ * If the attribute's type is an appropriate "container" type,
+ * return the type parameter that can be used as a target type.
+ * Return null if the attribute is not a container or if the type
+ * parameter is not valid as a target type (i.e. it is either
+ * an array or a "container").
+ */
+ String getMultiReferenceTargetTypeName();
+
+ /**
+ * If the attribute's type is a map type,
+ * return the type parameter that can be used as a key type.
+ * Return null if the attribute is not a map or if the type
+ * parameter is not valid as a key type (i.e. it is either
+ * an array or a "container").
+ */
+ String getMultiReferenceMapKeyTypeName();
+
+ /**
+ * Return the JpaContainer that corresponds to this attribute's type.
+ * Return a null implementation if the type is not a container (map or collection)
+ */
+ JpaContainerDefinition getJpaContainerDefinition();
+
+
+ // ********** JPA container **********
+
+ /**
+ * JPA container definition interface (and null implementation)
+ */
+ interface JpaContainerDefinition {
+ String getTypeName();
+ boolean isContainer();
+ boolean isMap();
+ String getMultiReferenceTargetTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute);
+ String getMultiReferenceMapKeyTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute);
+ String getMetamodelContainerFieldTypeName();
+ String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping);
+
+ final class Null implements JpaContainerDefinition {
+ public static final JpaContainerDefinition INSTANCE = new Null();
+ public static JpaContainerDefinition instance() {
+ return INSTANCE;
+ }
+ // ensure single instance
+ private Null() {
+ super();
+ }
+ public String getTypeName() {
+ return null;
+ }
+ public boolean isContainer() {
+ return false;
+ }
+ public boolean isMap() {
+ return false;
+ }
+ public String getMultiReferenceTargetTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute) {
+ return null;
+ }
+ public String getMultiReferenceMapKeyTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute) {
+ return null;
+ }
+ public String getMetamodelContainerFieldTypeName() {
+ return JPA2_0.COLLECTION_ATTRIBUTE;
+ }
+ public String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping) {
+ return null;
+ }
+ @Override
+ public String toString() {
+ return JpaContainerDefinition.class.getSimpleName() + ".Null"; //$NON-NLS-1$
+ }
+ }
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java
new file mode 100644
index 0000000000..0ab09a0dc5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.PersistentType;
+import org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * Context Java persistent type.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaPersistentType
+ extends PersistentType, JavaJpaContextNode
+{
+ // ********** covariant overrides **********
+
+ JavaTypeMapping getMapping();
+
+ @SuppressWarnings("unchecked")
+ ListIterator<JavaPersistentAttribute> attributes();
+ String ATTRIBUTES_LIST = "attributes"; //$NON-NLS-1$
+
+ JavaPersistentAttribute getAttributeNamed(String attributeName);
+
+
+ // ********** Java **********
+
+ /**
+ * Return whether any attribute in this persistent type is annotated
+ */
+ boolean hasAnyAnnotatedAttributes();
+
+ /**
+ * Return the Java resource persistent type.
+ */
+ JavaResourcePersistentType getResourcePersistentType();
+
+ JavaPersistentAttribute getAttributeFor(JavaResourcePersistentAttribute javaResourcePersistentAttribute);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java
new file mode 100644
index 0000000000..6c047186b5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
+import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+
+/**
+ * Java primary key join column
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaPrimaryKeyJoinColumn
+ extends PrimaryKeyJoinColumn, JavaBaseJoinColumn
+{
+ PrimaryKeyJoinColumnAnnotation getColumnAnnotation();
+} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java
new file mode 100644
index 0000000000..6c47161927
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumnRelationship;
+
+/**
+ * Java primary key join column relationship (1:1)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaPrimaryKeyJoinColumnRelationship
+ extends PrimaryKeyJoinColumnRelationship,
+ JavaMappingRelationship
+{
+ JavaPrimaryKeyJoinColumnRelationshipStrategy getPrimaryKeyJoinColumnStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java
new file mode 100644
index 0000000000..16158a0615
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumnRelationshipStrategy;
+
+/**
+ * Java primary key join column relationship strategy
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaPrimaryKeyJoinColumnRelationshipStrategy
+ extends JavaRelationshipStrategy, PrimaryKeyJoinColumnRelationshipStrategy
+{
+ ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns();
+ JavaPrimaryKeyJoinColumn getPrimaryKeyJoinColumn(int index);
+ JavaPrimaryKeyJoinColumn addPrimaryKeyJoinColumn();
+ JavaPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java
new file mode 100644
index 0000000000..9dbea1e546
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
+import org.eclipse.jpt.jpa.core.context.Query;
+import org.eclipse.jpt.jpa.core.resource.java.QueryAnnotation;
+
+/**
+ * Java named and named native queries
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaQuery
+ extends Query, JavaJpaContextNode
+{
+ QueryAnnotation getQueryAnnotation();
+
+
+ // ********** hints **********
+
+ @SuppressWarnings("unchecked")
+ ListIterable<JavaQueryHint> getHints();
+
+ JavaQueryHint addHint();
+
+ JavaQueryHint addHint(int index);
+
+
+ // ********** validation **********
+
+ TextRange getNameTextRange(CompilationUnit astRoot);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java
new file mode 100644
index 0000000000..6f7afe6241
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.QueryContainer;
+import org.eclipse.jpt.jpa.core.resource.java.JavaResourceAnnotatedElement;
+
+/**
+ * Java query container
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaQueryContainer
+ extends QueryContainer, JavaJpaContextNode
+{
+ // ********** named queries **********
+
+ @SuppressWarnings("unchecked")
+ ListIterator<JavaNamedQuery> namedQueries();
+
+ JavaNamedQuery addNamedQuery();
+
+ JavaNamedQuery addNamedQuery(int index);
+
+
+ // ********** named native queries **********
+
+ @SuppressWarnings("unchecked")
+ ListIterator<JavaNamedNativeQuery> namedNativeQueries();
+
+ JavaNamedNativeQuery addNamedNativeQuery();
+
+ JavaNamedNativeQuery addNamedNativeQuery(int index);
+
+ interface Owner
+ {
+ JavaResourceAnnotatedElement getResourceAnnotatedElement();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java
new file mode 100644
index 0000000000..859b893437
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.QueryHint;
+import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation;
+
+/**
+ * Java query hint
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaQueryHint
+ extends QueryHint, JavaJpaContextNode
+{
+ QueryHintAnnotation getQueryHintAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java
new file mode 100644
index 0000000000..69afbc01ea
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
+
+/**
+ * Java read-only association override
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaReadOnlyAssociationOverride
+ extends ReadOnlyAssociationOverride, JavaReadOnlyOverride
+{
+ JavaAssociationOverrideContainer getContainer();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java
new file mode 100644
index 0000000000..1f552eeaee
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
+
+/**
+ * Read-only Java attribute override
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaReadOnlyAttributeOverride
+ extends ReadOnlyAttributeOverride, JavaReadOnlyOverride
+{
+ JavaAttributeOverrideContainer getContainer();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java
new file mode 100644
index 0000000000..530c455545
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
+
+/**
+ * Read-only Java override
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaReadOnlyOverride
+ extends ReadOnlyOverride, JavaJpaContextNode
+{
+ JavaOverrideContainer getContainer();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.java
new file mode 100644
index 0000000000..59aae9e166
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
+
+/**
+ * Java relationship (join column, join table, mapped by, primary key join
+ * column, mapping)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaReadOnlyRelationship
+ extends ReadOnlyRelationship, JavaJpaContextNode
+{
+ JavaReadOnlyRelationshipStrategy getStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java
new file mode 100644
index 0000000000..196563f5ce
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
+
+/**
+ * Java read-only relationship strategy
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaReadOnlyRelationshipStrategy
+ extends ReadOnlyRelationshipStrategy, JavaJpaContextNode
+{
+ JavaReadOnlyRelationship getRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.java
new file mode 100644
index 0000000000..f0d2546f07
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
+
+/**
+ * Java read-only unique constraint
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaReadOnlyUniqueConstraint
+ extends ReadOnlyUniqueConstraint, JavaJpaContextNode
+{
+ // combine interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java
new file mode 100644
index 0000000000..d65d9fe62e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.ReferenceTable;
+import org.eclipse.jpt.jpa.core.resource.java.ReferenceTableAnnotation;
+
+/**
+ * Java reference table
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaReferenceTable
+ extends ReferenceTable, JavaTable
+{
+ ReferenceTableAnnotation getTableAnnotation();
+
+
+ // ********** join columns **********
+
+ ListIterator<JavaJoinColumn> joinColumns();
+
+ ListIterator<JavaJoinColumn> specifiedJoinColumns();
+ JavaJoinColumn getSpecifiedJoinColumn(int index);
+ JavaJoinColumn addSpecifiedJoinColumn();
+ JavaJoinColumn addSpecifiedJoinColumn(int index);
+
+ JavaJoinColumn getDefaultJoinColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java
new file mode 100644
index 0000000000..088cd7bd3a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.Relationship;
+
+/**
+ * Java relationship (join column, join table, mapped by, primary key join
+ * column, mapping)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaRelationship
+ extends Relationship, JavaReadOnlyRelationship
+{
+ JavaRelationshipStrategy getStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java
new file mode 100644
index 0000000000..7636c3885d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
+import org.eclipse.jpt.jpa.core.resource.java.RelationshipMappingAnnotation;
+
+/**
+ * Java relationship (1:1, 1:m, m:1, m:m) mapping.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaRelationshipMapping
+ extends RelationshipMapping, JavaAttributeMapping
+{
+ RelationshipMappingAnnotation getMappingAnnotation();
+
+ RelationshipMappingAnnotation getAnnotationForUpdate();
+
+ JavaCascade getCascade();
+
+ JavaMappingRelationship getRelationship();
+
+ /**
+ * If the target entity is specified, this will return it fully qualified.
+ * If not specified, it returns the default target entity, which is always
+ * fully qualified
+ */
+ String getFullyQualifiedTargetEntity();
+ String FULLY_QUALIFIED_TARGET_ENTITY_PROPERTY = "fullyQualifiedTargetEntity"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.java
new file mode 100644
index 0000000000..f658507620
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.RelationshipStrategy;
+
+/**
+ * Java relationship strategy
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JavaRelationshipStrategy
+ extends RelationshipStrategy, JavaReadOnlyRelationshipStrategy
+{
+ JavaRelationship getRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java
new file mode 100644
index 0000000000..27b74cab7c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.SecondaryTable;
+import org.eclipse.jpt.jpa.core.resource.java.SecondaryTableAnnotation;
+
+/**
+ * Java secondary table
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 3.0
+ * @since 2.0
+ */
+public interface JavaSecondaryTable
+ extends SecondaryTable, JavaTable
+{
+ JavaEntity getParent();
+
+ SecondaryTableAnnotation getTableAnnotation();
+
+
+ // ********** primary key join columns **********
+
+ ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns();
+ ListIterator<JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns();
+ JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn();
+ JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
+ JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java
new file mode 100644
index 0000000000..f00727d412
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
+import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation;
+
+/**
+ * Java sequence generator
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaSequenceGenerator
+ extends JavaGenerator, SequenceGenerator
+{
+ SequenceGeneratorAnnotation getGeneratorAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java
new file mode 100644
index 0000000000..fc688ddfff
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.SingleRelationshipMapping;
+import org.eclipse.jpt.jpa.core.resource.java.SingleRelationshipMappingAnnotation;
+
+/**
+ * Java single (m:1, 1:1) mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaSingleRelationshipMapping
+ extends SingleRelationshipMapping, JavaRelationshipMapping
+{
+ SingleRelationshipMappingAnnotation getMappingAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaStructureNodes.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaStructureNodes.java
new file mode 100644
index 0000000000..e95b3def50
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaStructureNodes.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
+
+/**
+ *
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaStructureNodes
+{
+ String COMPILATION_UNIT_ID =
+ JptJpaCorePlugin.PLUGIN_ID + ".java.compilationUnit"; //$NON-NLS-1$
+
+ String PERSISTENT_TYPE_ID =
+ JptJpaCorePlugin.PLUGIN_ID + ".java.persistentType"; //$NON-NLS-1$
+
+ String PERSISTENT_ATTRIBUTE_ID =
+ JptJpaCorePlugin.PLUGIN_ID + ".java.persistentAttribute"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java
new file mode 100644
index 0000000000..e270eee2f1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.jpa.core.context.Table;
+import org.eclipse.jpt.jpa.core.resource.java.BaseTableAnnotation;
+
+/**
+ * Java table
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 3.0
+ * @since 2.0
+ */
+public interface JavaTable
+ extends Table, JavaJpaContextNode
+{
+ BaseTableAnnotation getTableAnnotation();
+
+ TextRange getNameTextRange(CompilationUnit astRoot);
+ TextRange getSchemaTextRange(CompilationUnit astRoot);
+ TextRange getCatalogTextRange(CompilationUnit astRoot);
+
+ ListIterator<JavaUniqueConstraint> uniqueConstraints();
+ JavaUniqueConstraint getUniqueConstraint(int index);
+ JavaUniqueConstraint addUniqueConstraint();
+ JavaUniqueConstraint addUniqueConstraint(int index);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java
new file mode 100644
index 0000000000..ee8dba64e9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.TableGenerator;
+import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation;
+
+/**
+ * Java table generator
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaTableGenerator
+ extends JavaGenerator, TableGenerator
+{
+ TableGeneratorAnnotation getGeneratorAnnotation();
+
+ @SuppressWarnings("unchecked")
+ Iterable<JavaUniqueConstraint> getUniqueConstraints();
+
+ JavaUniqueConstraint addUniqueConstraint(int index);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java
new file mode 100644
index 0000000000..a05540642d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.JpaFactory;
+import org.eclipse.jpt.jpa.core.context.Converter;
+import org.eclipse.jpt.jpa.core.context.TemporalConverter;
+import org.eclipse.jpt.jpa.core.resource.java.Annotation;
+import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
+
+/**
+ * Java temporal converter
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaTemporalConverter
+ extends TemporalConverter, JavaConverter
+{
+ // ********** adapter **********
+
+ public static class Adapter
+ extends JavaConverter.AbstractAdapter
+ {
+ private static final Adapter INSTANCE = new Adapter();
+ public static Adapter instance() {
+ return INSTANCE;
+ }
+
+ private Adapter() {
+ super();
+ }
+
+ public Class<? extends Converter> getConverterType() {
+ return TemporalConverter.class;
+ }
+
+ @Override
+ protected String getAnnotationName() {
+ return TemporalAnnotation.ANNOTATION_NAME;
+ }
+
+ public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) {
+ return factory.buildJavaTemporalConverter(parent, (TemporalAnnotation) converterAnnotation);
+ }
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java
new file mode 100644
index 0000000000..eed007e2aa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.TransientMapping;
+import org.eclipse.jpt.jpa.core.resource.java.TransientAnnotation;
+
+/**
+ * Java transient "mapping"
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaTransientMapping
+ extends JavaAttributeMapping, TransientMapping
+{
+ TransientAnnotation getMappingAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java
new file mode 100644
index 0000000000..034db01fe9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import java.util.Iterator;
+
+import org.eclipse.jpt.jpa.core.context.TypeMapping;
+import org.eclipse.jpt.jpa.core.resource.java.Annotation;
+import org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * Java type mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaTypeMapping
+ extends TypeMapping, JavaJpaContextNode
+{
+ JavaResourcePersistentType getResourcePersistentType();
+
+ Annotation getMappingAnnotation();
+
+
+ // ********** covariant overrides **********
+
+ JavaPersistentType getPersistentType();
+
+ @SuppressWarnings("unchecked")
+ Iterator<JavaAttributeMapping> attributeMappings();
+
+ @SuppressWarnings("unchecked")
+ Iterable<JavaAttributeMapping> getAttributeMappings(String mappingKey);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java
new file mode 100644
index 0000000000..28dfa505e0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.JpaFactory;
+import org.eclipse.jpt.jpa.core.resource.java.Annotation;
+
+/**
+ * Map a string key to a type mapping and its corresponding
+ * Java annotations.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaTypeMappingDefinition
+{
+ /**
+ * Return the type mapping's key.
+ */
+ String getKey();
+
+ /**
+ * Return the name of the type mapping's annotation.
+ */
+ String getAnnotationName();
+
+ /**
+ * Return the names of the type mapping's "supporting" annotations.
+ */
+ Iterable<String> getSupportingAnnotationNames();
+
+ /**
+ * Build a Java type mapping for the specified persistent type and
+ * annotation.
+ * Use the specified factory for creation so extenders can simply override
+ * the appropriate factory method instead of building a definition for the
+ * same key.
+ */
+ JavaTypeMapping buildMapping(JavaPersistentType persistentType, Annotation annotation, JpaFactory factory);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.java
new file mode 100644
index 0000000000..9073653d88
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
+import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
+
+/**
+ * Java unique constraint
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaUniqueConstraint
+ extends UniqueConstraint, JavaReadOnlyUniqueConstraint
+{
+ UniqueConstraintAnnotation getUniqueConstraintAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java
new file mode 100644
index 0000000000..d74d02a75b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.VersionMapping;
+import org.eclipse.jpt.jpa.core.resource.java.VersionAnnotation;
+
+/**
+ * Java version mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaVersionMapping
+ extends VersionMapping, JavaColumnMapping, JavaConvertibleMapping
+{
+ VersionAnnotation getMappingAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.java
new file mode 100644
index 0000000000..37ca150230
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.VirtualAssociationOverride;
+
+/**
+ * Java virtual association override
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualAssociationOverride
+ extends VirtualAssociationOverride,
+ JavaVirtualOverride,
+ JavaReadOnlyAssociationOverride
+{
+ JavaVirtualOverrideRelationship getRelationship();
+
+ JavaAssociationOverride convertToSpecified();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.java
new file mode 100644
index 0000000000..8687426537
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.VirtualAttributeOverride;
+
+/**
+ * Java virtual attribute override
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualAttributeOverride
+ extends VirtualAttributeOverride,
+ JavaVirtualOverride,
+ JavaReadOnlyAttributeOverride
+{
+ JavaAttributeOverride convertToSpecified();
+
+ JavaVirtualColumn getColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java
new file mode 100644
index 0000000000..6b5161bfa6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.Column;
+import org.eclipse.jpt.jpa.core.context.VirtualColumn;
+
+/**
+ * Java virtual column
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualColumn
+ extends VirtualColumn, JavaJpaContextNode
+{
+ /**
+ * The overridden column can be either a Java join column or an
+ * <code>orm.xml</code> join column; so we don't change the return type
+ * here.
+ */
+ Column getOverriddenColumn();
+
+
+ // ********** owner **********
+
+ interface Owner
+ extends VirtualColumn.Owner
+ {
+ /**
+ * The overridden column can be either a Java column or an
+ * <code>orm.xml</code> column; so we don't change the return type here.
+ */
+ Column resolveOverriddenColumn();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java
new file mode 100644
index 0000000000..f3f4a2d24d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.JoinColumn;
+import org.eclipse.jpt.jpa.core.context.VirtualJoinColumn;
+
+/**
+ * Java virtual join column
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualJoinColumn
+ extends VirtualJoinColumn, JavaJpaContextNode
+{
+ /**
+ * The overridden join column can be either a Java join column or an
+ * <code>orm.xml</code> join column; so we don't change the return type
+ * here.
+ */
+ JoinColumn getOverriddenColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.java
new file mode 100644
index 0000000000..dfb9d21642
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.VirtualJoinColumnRelationship;
+
+/**
+ * Java virtual join column relationship
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualJoinColumnRelationship
+ extends VirtualJoinColumnRelationship,
+ JavaVirtualRelationship
+{
+ JavaVirtualJoinColumnRelationshipStrategy getJoinColumnStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.java
new file mode 100644
index 0000000000..b9b9bc4c10
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.VirtualJoinColumnRelationshipStrategy;
+
+/**
+ * Java virtual join column relationship strategy.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualJoinColumnRelationshipStrategy
+ extends VirtualJoinColumnRelationshipStrategy, JavaVirtualRelationshipStrategy
+{
+ ListIterator<JavaVirtualJoinColumn> joinColumns();
+ ListIterator<JavaVirtualJoinColumn> specifiedJoinColumns();
+ JavaVirtualJoinColumn getSpecifiedJoinColumn(int index);
+ JavaVirtualJoinColumn getDefaultJoinColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java
new file mode 100644
index 0000000000..c6da69c644
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.jpa.core.context.VirtualJoinTable;
+
+/**
+ * Java virtual join table
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualJoinTable
+ extends VirtualJoinTable, JavaJpaContextNode
+{
+ JavaVirtualJoinTableRelationshipStrategy getParent();
+
+ ListIterator<JavaVirtualUniqueConstraint> uniqueConstraints();
+ JavaVirtualUniqueConstraint getUniqueConstraint(int index);
+
+ ListIterator<JavaVirtualJoinColumn> joinColumns();
+ ListIterator<JavaVirtualJoinColumn> specifiedJoinColumns();
+ JavaVirtualJoinColumn getSpecifiedJoinColumn(int index);
+ JavaVirtualJoinColumn getDefaultJoinColumn();
+
+ ListIterator<JavaVirtualJoinColumn> inverseJoinColumns();
+ ListIterator<JavaVirtualJoinColumn> specifiedInverseJoinColumns();
+ JavaVirtualJoinColumn getSpecifiedInverseJoinColumn(int index);
+ JavaVirtualJoinColumn getDefaultInverseJoinColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.java
new file mode 100644
index 0000000000..5f2963c8b2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationship;
+
+/**
+ * Java virtual join table relationship
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualJoinTableRelationship
+ extends VirtualJoinTableRelationship,
+ JavaVirtualRelationship
+{
+ JavaVirtualJoinTableRelationshipStrategy getJoinTableStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.java
new file mode 100644
index 0000000000..7c8ea38e78
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationshipStrategy;
+
+/**
+ * Java virtual join table relationship strategy.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualJoinTableRelationshipStrategy
+ extends VirtualJoinTableRelationshipStrategy, JavaVirtualRelationshipStrategy
+{
+ JavaVirtualJoinTable getJoinTable();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.java
new file mode 100644
index 0000000000..576234b13b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.VirtualOverride;
+
+/**
+ * Java virtual<ul>
+ * <li>attribute override
+ * <li>association override
+ * </ul>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualOverride
+ extends VirtualOverride, JavaReadOnlyOverride
+{
+ JavaOverride convertToSpecified();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.java
new file mode 100644
index 0000000000..970fb1ba45
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.VirtualOverrideRelationship;
+
+/**
+ * Java virtual association override relationship
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualOverrideRelationship
+ extends VirtualOverrideRelationship,
+ JavaVirtualJoinColumnRelationship
+{
+ JavaVirtualAssociationOverride getAssociationOverride();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java
new file mode 100644
index 0000000000..fb03325c31
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.VirtualRelationship;
+
+/**
+ * Java virtual relationship
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualRelationship
+ extends VirtualRelationship, JavaReadOnlyRelationship
+{
+ JavaVirtualRelationshipStrategy getStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java
new file mode 100644
index 0000000000..850754310e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.VirtualRelationshipStrategy;
+
+/**
+ * Java virtual strategy
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualRelationshipStrategy
+ extends VirtualRelationshipStrategy, JavaReadOnlyRelationshipStrategy
+{
+ JavaVirtualRelationship getRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java
new file mode 100644
index 0000000000..d2363e24e7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jpa.core.context.java;
+
+import org.eclipse.jpt.jpa.core.context.UniqueConstraint;
+import org.eclipse.jpt.jpa.core.context.VirtualUniqueConstraint;
+
+/**
+ * Java virtual database unique constraint
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JavaVirtualUniqueConstraint
+ extends VirtualUniqueConstraint, JavaReadOnlyUniqueConstraint
+{
+ /**
+ * The overridden unique constraint can be either a Java unique constraint
+ * or an <code>orm.xml</code> unique constraint; so we don't change the
+ * return type here.
+ */
+ UniqueConstraint getOverriddenUniqueConstraint();
+}

Back to the top