diff options
author | Karen Butzke | 2012-09-05 14:40:14 +0000 |
---|---|---|
committer | Karen Butzke | 2012-09-05 18:06:22 +0000 |
commit | 37ab5884977fa7df0a3c86177a36cae41f6fe1a9 (patch) | |
tree | 538378fdb071d0aa5baf4ed08bddc367a162f88a /jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core | |
parent | 8ff91ca2965145b716ae25d6030ddd42613dfde2 (diff) | |
download | webtools.dali-37ab5884977fa7df0a3c86177a36cae41f6fe1a9.tar.gz webtools.dali-37ab5884977fa7df0a3c86177a36cae41f6fe1a9.tar.xz webtools.dali-37ab5884977fa7df0a3c86177a36cae41f6fe1a9.zip |
Deleted Java and Orm interfaces that are no longer needed after deleting
JavaJpaContextNode and XmlContextNode
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core')
9 files changed, 189 insertions, 199 deletions
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaManyToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaManyToManyMappingTests.java index 754fd71d20..eeba048453 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaManyToManyMappingTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaManyToManyMappingTests.java @@ -39,7 +39,7 @@ import org.eclipse.jpt.jpa.core.context.persistence.ClassRef; import org.eclipse.jpt.jpa.core.jpa2.context.ManyToManyMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0; import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaManyToManyMapping2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCollectionMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyClass2_0Annotation; import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation; @@ -934,7 +934,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".State"); addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer(); ListIterator<JavaAttributeOverride> specifiedMapKeyAttributeOverrides = mapKeyAttributeOverrideContainer.getSpecifiedOverrides().iterator(); @@ -1028,7 +1028,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer(); JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE); @@ -1123,7 +1123,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer(); assertEquals(0, mapKeyAttributeOverrideContainer.getSpecifiedOverridesSize()); @@ -1153,7 +1153,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer(); assertEquals(4, mapKeyAttributeOverrideContainer.getOverridesSize()); @@ -1193,7 +1193,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer(); assertEquals(4, mapKeyAttributeOverrideContainer.getVirtualOverridesSize()); @@ -1234,7 +1234,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer(); mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified(); mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified(); @@ -1276,7 +1276,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer(); mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified(); mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified(); @@ -1309,7 +1309,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) persistentAttribute.getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) persistentAttribute.getMapping(); assertNull(manyToManyMapping.getMapKeyConverter().getType()); manyToManyMapping.setMapKeyConverter(BaseEnumeratedConverter.class); @@ -1337,7 +1337,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) persistentAttribute.getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) persistentAttribute.getMapping(); assertNull(manyToManyMapping.getMapKeyConverter().getType()); @@ -1363,7 +1363,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) persistentAttribute.getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) persistentAttribute.getMapping(); assertNull(manyToManyMapping.getMapKeyConverter().getType()); manyToManyMapping.setMapKeyConverter(BaseTemporalConverter.class); @@ -1387,7 +1387,7 @@ public class EclipseLink2_0JavaManyToManyMappingTests addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); - JavaManyToManyMapping2_0 manyToManyMapping = (JavaManyToManyMapping2_0) persistentAttribute.getMapping(); + JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) persistentAttribute.getMapping(); assertNull(manyToManyMapping.getMapKeyConverter().getType()); diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaManyToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaManyToOneMappingTests.java index 419b686ff0..eb5e49e8e8 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaManyToOneMappingTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaManyToOneMappingTests.java @@ -23,8 +23,7 @@ import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType; import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute; import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneRelationship2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaManyToOneMapping2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToOneMapping2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapsId2_0Annotation; import org.eclipse.jpt.jpa.core.resource.java.JPA; @@ -118,7 +117,7 @@ public class EclipseLink2_0JavaManyToOneMappingTests JavaResourceField resourceField = resourceType.getFields().iterator().next(); JavaPersistentType contextType = getJavaPersistentType(); JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne"); - JavaManyToOneMapping2_0 contextMapping = (JavaManyToOneMapping2_0) contextAttribute.getMapping(); + ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping(); assertNotNull(resourceField.getAnnotation(JPA.ID)); assertTrue(contextMapping.getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); @@ -141,7 +140,7 @@ public class EclipseLink2_0JavaManyToOneMappingTests JavaResourceField resourceField = resourceType.getFields().iterator().next(); JavaPersistentType contextType = getJavaPersistentType(); JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne"); - JavaManyToOneMapping2_0 contextMapping = (JavaManyToOneMapping2_0) contextAttribute.getMapping(); + ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping(); assertNotNull(resourceField.getAnnotation(JPA.ID)); assertTrue(contextMapping.getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); @@ -162,7 +161,7 @@ public class EclipseLink2_0JavaManyToOneMappingTests JavaResourceField resourceField = resourceType.getFields().iterator().next(); JavaPersistentType contextType = getJavaPersistentType(); JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne"); - JavaManyToOneMapping2_0 contextMapping = (JavaManyToOneMapping2_0) contextAttribute.getMapping(); + ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping(); MapsId2_0Annotation annotation = (MapsId2_0Annotation) resourceField.getAnnotation(JPA2_0.MAPS_ID); @@ -189,7 +188,7 @@ public class EclipseLink2_0JavaManyToOneMappingTests JavaResourceField resourceField = resourceType.getFields().iterator().next(); JavaPersistentType contextType = getJavaPersistentType(); JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("address"); - JavaManyToOneMapping2_0 contextMapping = (JavaManyToOneMapping2_0) contextAttribute.getMapping(); + ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping(); assertNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); assertNull(contextMapping.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); @@ -222,27 +221,27 @@ public class EclipseLink2_0JavaManyToOneMappingTests getJpaProject().synchronizeContextModel(); assertNull(resourceField.getAnnotation(JPA.ID)); - assertFalse(((JavaManyToOneMapping2_0) contextAttribute.getMapping()). + assertFalse(((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertNotNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); assertEquals("foo", ((MapsId2_0Annotation) resourceField.getAnnotation(JPA2_0.MAPS_ID)).getValue()); - assertEquals("foo", ((JavaManyToOneMapping2_0) contextAttribute.getMapping()). + assertEquals("foo", ((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); contextAttribute.setMappingKey(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY); - assertFalse(((JavaOneToOneMapping2_0) contextAttribute.getMapping()). + assertFalse(((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertNotNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); assertEquals("foo", ((MapsId2_0Annotation) resourceField.getAnnotation(JPA2_0.MAPS_ID)).getValue()); - assertEquals("foo", ((JavaOneToOneMapping2_0) contextAttribute.getMapping()). + assertEquals("foo", ((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); contextAttribute.setMappingKey(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY); - assertFalse(((JavaManyToOneMapping2_0) contextAttribute.getMapping()). + assertFalse(((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertNotNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); assertEquals("foo", ((MapsId2_0Annotation) resourceField.getAnnotation(JPA2_0.MAPS_ID)).getValue()); - assertEquals("foo", ((JavaManyToOneMapping2_0) contextAttribute.getMapping()). + assertEquals("foo", ((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); } diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaOneToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaOneToManyMappingTests.java index 9ab4319e60..21347b8091 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaOneToManyMappingTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaOneToManyMappingTests.java @@ -19,6 +19,8 @@ import org.eclipse.jpt.common.core.resource.java.NestableAnnotation; import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter; import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable; import org.eclipse.jpt.common.utility.internal.iterators.ArrayIterator; +import org.eclipse.jpt.jpa.core.context.AttributeOverride; +import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer; import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter; import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter; import org.eclipse.jpt.jpa.core.context.BasicMapping; @@ -31,19 +33,16 @@ import org.eclipse.jpt.jpa.core.context.OneToManyMapping; import org.eclipse.jpt.jpa.core.context.PersistentAttribute; import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride; import org.eclipse.jpt.jpa.core.context.TemporalType; -import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverride; -import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer; +import org.eclipse.jpt.jpa.core.context.VirtualAttributeOverride; import org.eclipse.jpt.jpa.core.context.java.JavaOneToManyMapping; import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType; -import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAttributeOverride; import org.eclipse.jpt.jpa.core.context.persistence.ClassRef; import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyRelationship2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0; import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToManyMapping2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovable2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovalHolder2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovable2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovalHolder2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyClass2_0Annotation; import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation; @@ -328,8 +327,8 @@ public class EclipseLink2_0JavaOneToManyMappingTests }); } - private JavaOrphanRemovable2_0 getOrphanRemovalOf(OneToManyMapping2_0 oneToManyMapping) { - return ((JavaOrphanRemovalHolder2_0) oneToManyMapping).getOrphanRemoval(); + private OrphanRemovable2_0 getOrphanRemovalOf(OneToManyMapping2_0 oneToManyMapping) { + return ((OrphanRemovalHolder2_0) oneToManyMapping).getOrphanRemoval(); } public void testDefaultOneToManyGetDefaultOrphanRemoval() throws Exception { @@ -356,7 +355,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); assertEquals(false, mappingsOrphanRemoval.isOrphanRemoval()); @@ -371,7 +370,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); @@ -390,7 +389,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); assertEquals(Boolean.FALSE, mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); } @@ -401,7 +400,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); mappingsOrphanRemoval.setSpecifiedOrphanRemoval(Boolean.TRUE); @@ -422,7 +421,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); mappingsOrphanRemoval.setSpecifiedOrphanRemoval(Boolean.TRUE); @@ -448,7 +447,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); @@ -1054,10 +1053,10 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".State"); addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); - JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); - ListIterator<JavaAttributeOverride> specifiedMapKeyAttributeOverrides = mapKeyAttributeOverrideContainer.getSpecifiedOverrides().iterator(); + ListIterator<? extends AttributeOverride> specifiedMapKeyAttributeOverrides = mapKeyAttributeOverrideContainer.getSpecifiedOverrides().iterator(); assertFalse(specifiedMapKeyAttributeOverrides.hasNext()); JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE); @@ -1148,8 +1147,8 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); - JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE); JavaResourceField resourceField = resourceType.getFields().iterator().next(); @@ -1243,8 +1242,8 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); - JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); assertEquals(0, mapKeyAttributeOverrideContainer.getSpecifiedOverridesSize()); JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE); @@ -1273,8 +1272,8 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); - JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); assertEquals(4, mapKeyAttributeOverrideContainer.getOverridesSize()); JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE); @@ -1313,8 +1312,8 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); - JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); assertEquals(4, mapKeyAttributeOverrideContainer.getVirtualOverridesSize()); JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE); @@ -1354,8 +1353,8 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); - JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified(); mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified(); @@ -1376,7 +1375,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests attributeOverrides = resourceField.getAnnotations(AttributeOverrideAnnotation.ANNOTATION_NAME).iterator(); assertFalse(attributeOverrides.hasNext()); - Iterator<JavaVirtualAttributeOverride> virtualAttributeOverrides = mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator(); + Iterator<? extends VirtualAttributeOverride> virtualAttributeOverrides = mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator(); assertEquals("city", virtualAttributeOverrides.next().getName()); assertEquals("state.foo", virtualAttributeOverrides.next().getName()); assertEquals("state.address", virtualAttributeOverrides.next().getName()); @@ -1396,12 +1395,12 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(PACKAGE_NAME + ".PropertyInfo"); addXmlClassRef(PACKAGE_NAME + ".State"); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); - JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping(); + AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer(); mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified(); mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified(); - ListIterator<JavaAttributeOverride> specifiedOverrides = mapKeyAttributeOverrideContainer.getSpecifiedOverrides().iterator(); + ListIterator<? extends AttributeOverride> specifiedOverrides = mapKeyAttributeOverrideContainer.getSpecifiedOverrides().iterator(); assertEquals("city", specifiedOverrides.next().getName()); assertEquals("state.foo", specifiedOverrides.next().getName()); assertFalse(specifiedOverrides.hasNext()); @@ -1429,7 +1428,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) persistentAttribute.getMapping(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); assertNull(oneToManyMapping.getMapKeyConverter().getType()); oneToManyMapping.setMapKeyConverter(BaseEnumeratedConverter.class); @@ -1457,7 +1456,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) persistentAttribute.getMapping(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); assertNull(oneToManyMapping.getMapKeyConverter().getType()); @@ -1483,7 +1482,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) persistentAttribute.getMapping(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); assertNull(oneToManyMapping.getMapKeyConverter().getType()); oneToManyMapping.setMapKeyConverter(BaseTemporalConverter.class); @@ -1507,7 +1506,7 @@ public class EclipseLink2_0JavaOneToManyMappingTests addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME); PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); - JavaOneToManyMapping2_0 oneToManyMapping = (JavaOneToManyMapping2_0) persistentAttribute.getMapping(); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); assertNull(oneToManyMapping.getMapKeyConverter().getType()); diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaOneToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaOneToOneMappingTests.java index d9898b3d68..d439bb639d 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaOneToOneMappingTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaOneToOneMappingTests.java @@ -26,12 +26,11 @@ import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute; import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType; import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType; import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute; +import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneRelationship2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaManyToOneMapping2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToOneMapping2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovable2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovalHolder2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovable2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovalHolder2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapsId2_0Annotation; import org.eclipse.jpt.jpa.core.jpa2.resource.java.OneToOne2_0Annotation; @@ -272,7 +271,7 @@ public class EclipseLink2_0JavaOneToOneMappingTests JavaResourceField resourceField = resourceType.getFields().iterator().next(); JavaPersistentType contextType = getJavaPersistentType(); JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne"); - JavaOneToOneMapping2_0 contextMapping = (JavaOneToOneMapping2_0) contextAttribute.getMapping(); + OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping(); assertNotNull(resourceField.getAnnotation(JPA.ID)); assertTrue(contextMapping.getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); @@ -295,7 +294,7 @@ public class EclipseLink2_0JavaOneToOneMappingTests JavaResourceField resourceField = resourceType.getFields().iterator().next(); JavaPersistentType contextType = getJavaPersistentType(); JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne"); - JavaOneToOneMapping2_0 contextMapping = (JavaOneToOneMapping2_0) contextAttribute.getMapping(); + OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping(); assertNotNull(resourceField.getAnnotation(JPA.ID)); assertTrue(contextMapping.getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); @@ -316,7 +315,7 @@ public class EclipseLink2_0JavaOneToOneMappingTests JavaResourceField resourceField = resourceType.getFields().iterator().next(); JavaPersistentType contextType = getJavaPersistentType(); JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne"); - JavaOneToOneMapping2_0 contextMapping = (JavaOneToOneMapping2_0) contextAttribute.getMapping(); + OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping(); assertNotNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); assertNull(contextMapping.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); @@ -346,7 +345,7 @@ public class EclipseLink2_0JavaOneToOneMappingTests JavaResourceField resourceField = resourceType.getFields().iterator().next(); JavaPersistentType contextType = getJavaPersistentType(); JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("address"); - JavaOneToOneMapping2_0 contextMapping = (JavaOneToOneMapping2_0) contextAttribute.getMapping(); + OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping(); assertNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); assertNull(contextMapping.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); @@ -376,26 +375,26 @@ public class EclipseLink2_0JavaOneToOneMappingTests JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne"); assertNotNull(resourceField.getAnnotation(JPA.ID)); - assertTrue(((JavaOneToOneMapping2_0) contextAttribute.getMapping()). + assertTrue(((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); - assertNull(((JavaOneToOneMapping2_0) contextAttribute.getMapping()). + assertNull(((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); contextAttribute.setMappingKey(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY); assertNotNull(resourceField.getAnnotation(JPA.ID)); - assertTrue(((JavaOneToOneMapping2_0) contextAttribute.getMapping()). + assertTrue(((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); - assertNull(((JavaOneToOneMapping2_0) contextAttribute.getMapping()). + assertNull(((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); contextAttribute.setMappingKey(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY); assertNotNull(resourceField.getAnnotation(JPA.ID)); - assertTrue(((JavaManyToOneMapping2_0) contextAttribute.getMapping()). + assertTrue(((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); - assertNull(((JavaManyToOneMapping2_0) contextAttribute.getMapping()). + assertNull(((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); // this is no longer supported (it was a bit of a testing hack anyway...) @@ -406,12 +405,12 @@ public class EclipseLink2_0JavaOneToOneMappingTests this.getJpaProject().synchronizeContextModel(); assertNotNull(resourceField.getAnnotation(JPA.ID)); assertNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); - assertTrue(contextAttribute.getMapping() instanceof JavaOneToOneMapping2_0); + assertTrue(contextAttribute.getMapping() instanceof OneToOneMapping2_0); contextAttribute.setMappingKey(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY); assertNotNull(resourceField.getAnnotation(JPA.ID)); assertNull(resourceField.getAnnotation(JPA2_0.MAPS_ID)); - assertTrue(contextAttribute.getMapping() instanceof JavaManyToOneMapping2_0); + assertTrue(contextAttribute.getMapping() instanceof ManyToOneMapping2_0); contextAttribute.setMappingKey(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY); assertNull(resourceField.getAnnotation(JPA.ID)); @@ -501,8 +500,8 @@ public class EclipseLink2_0JavaOneToOneMappingTests assertEquals("foo", stateFooMapping.getName()); } - private JavaOrphanRemovable2_0 getOrphanRemovalOf(OneToOneMapping2_0 oneToOneMapping) { - return ((JavaOrphanRemovalHolder2_0) oneToOneMapping).getOrphanRemoval(); + private OrphanRemovable2_0 getOrphanRemovalOf(OneToOneMapping2_0 oneToOneMapping) { + return ((OrphanRemovalHolder2_0) oneToOneMapping).getOrphanRemoval(); } public void testDefaultOneToOneGetDefaultOrphanRemoval() throws Exception { @@ -529,7 +528,7 @@ public class EclipseLink2_0JavaOneToOneMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToOneMapping2_0 oneToOneMapping = (OneToOneMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToOneMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToOneMapping); assertEquals(false, mappingsOrphanRemoval.isOrphanRemoval()); @@ -543,7 +542,7 @@ public class EclipseLink2_0JavaOneToOneMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToOneMapping2_0 oneToOneMapping = (OneToOneMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToOneMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToOneMapping); assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); @@ -572,7 +571,7 @@ public class EclipseLink2_0JavaOneToOneMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToOneMapping2_0 oneToOneMapping = (OneToOneMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToOneMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToOneMapping); assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); mappingsOrphanRemoval.setSpecifiedOrphanRemoval(Boolean.TRUE); @@ -593,7 +592,7 @@ public class EclipseLink2_0JavaOneToOneMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToOneMapping2_0 oneToOneMapping = (OneToOneMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToOneMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToOneMapping); assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); mappingsOrphanRemoval.setSpecifiedOrphanRemoval(Boolean.TRUE); @@ -618,7 +617,7 @@ public class EclipseLink2_0JavaOneToOneMappingTests PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next(); OneToOneMapping2_0 oneToOneMapping = (OneToOneMapping2_0) persistentAttribute.getMapping(); - JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToOneMapping); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToOneMapping); assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java index 5dfe280f5c..2b4ff4dc21 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java @@ -10,20 +10,21 @@ package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.orm; import java.util.Iterator; + import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter; import org.eclipse.jpt.common.utility.internal.iterators.ArrayIterator; import org.eclipse.jpt.jpa.core.MappingKeys; import org.eclipse.jpt.jpa.core.context.AttributeMapping; +import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter; +import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter; import org.eclipse.jpt.jpa.core.context.Column; import org.eclipse.jpt.jpa.core.context.Entity; import org.eclipse.jpt.jpa.core.context.EnumType; -import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter; import org.eclipse.jpt.jpa.core.context.FetchType; import org.eclipse.jpt.jpa.core.context.ManyToManyMapping; import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn; import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute; -import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter; import org.eclipse.jpt.jpa.core.context.TemporalType; import org.eclipse.jpt.jpa.core.context.java.JavaManyToManyMapping; import org.eclipse.jpt.jpa.core.context.orm.OrmEntity; @@ -36,8 +37,8 @@ import org.eclipse.jpt.jpa.core.jpa2.context.ManyToManyMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0; import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaManyToManyMapping2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmManyToManyMapping2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCollectionMapping2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCollectionMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0; import org.eclipse.jpt.jpa.core.resource.java.JPA; import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory; @@ -509,7 +510,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("manyToManyMapping"), MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmManyToManyMapping2_0 ormManyToManyMapping = (OrmManyToManyMapping2_0) ormPersistentAttribute.getMapping(); + OrmCollectionMapping2_0 ormManyToManyMapping = (OrmCollectionMapping2_0) ormPersistentAttribute.getMapping(); XmlManyToMany manyToMany = getXmlEntityMappings().getEntities().get(0).getAttributes().getManyToManys().get(0); assertNull(ormManyToManyMapping.getSpecifiedMapKeyClass()); @@ -546,7 +547,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests getEntityMappings().addPersistentType(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, PACKAGE_NAME + ".State"); ManyToManyMapping2_0 virtualManyToManyMapping = (ManyToManyMapping2_0) ormPersistentType.getAttributeNamed("addresses").getMapping(); - JavaManyToManyMapping2_0 javaManyToManyMapping = (JavaManyToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); + JavaCollectionMapping2_0 javaManyToManyMapping = (JavaCollectionMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); assertEquals("java.lang.String", virtualManyToManyMapping.getMapKeyClass()); assertNull(virtualManyToManyMapping.getSpecifiedMapKeyClass()); assertEquals("java.lang.String", virtualManyToManyMapping.getDefaultMapKeyClass()); @@ -563,7 +564,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("manyToManyMapping"), MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmManyToManyMapping2_0 ormManyToManyMapping = (OrmManyToManyMapping2_0) ormPersistentAttribute.getMapping(); + OrmCollectionMapping2_0 ormManyToManyMapping = (OrmCollectionMapping2_0) ormPersistentAttribute.getMapping(); XmlManyToMany manyToMany = getXmlEntityMappings().getEntities().get(0).getAttributes().getManyToManys().get(0); assertNull(ormManyToManyMapping.getSpecifiedMapKeyClass()); @@ -798,7 +799,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests assertEquals(ReadOnlyColumn.DEFAULT_SCALE, virtualColumn.getScale()); //set Column annotation in Java - JavaManyToManyMapping2_0 javaManyToManyMapping = (JavaManyToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); + JavaCollectionMapping2_0 javaManyToManyMapping = (JavaCollectionMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); javaManyToManyMapping.getMapKeyColumn().setSpecifiedName("FOO"); javaManyToManyMapping.getMapKeyColumn().setSpecifiedTable("FOO_TABLE"); javaManyToManyMapping.getMapKeyColumn().setColumnDefinition("COLUMN_DEFINITION"); @@ -850,11 +851,11 @@ public class EclipseLink2_0OrmManyToManyMappingTests getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address"); OrmPersistentAttribute addressesPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("addresses"), MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmManyToManyMapping2_0 addressesVirtualMapping = (OrmManyToManyMapping2_0) addressesPersistentAttribute.getMapping(); + OrmCollectionMapping2_0 addressesVirtualMapping = (OrmCollectionMapping2_0) addressesPersistentAttribute.getMapping(); Column ormColumn = addressesVirtualMapping.getMapKeyColumn(); //set Column annotation in Java - JavaManyToManyMapping2_0 javaManyToManyMapping = (JavaManyToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); + JavaCollectionMapping2_0 javaManyToManyMapping = (JavaCollectionMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); javaManyToManyMapping.getMapKeyColumn().setSpecifiedName("FOO"); javaManyToManyMapping.getMapKeyColumn().setSpecifiedTable("FOO_TABLE"); javaManyToManyMapping.getMapKeyColumn().setColumnDefinition("COLUMN_DEFINITION"); @@ -907,7 +908,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests assertEquals("ORM_TABLE_Address", ormColumn.getTable()); //set Column table element in Java - JavaManyToManyMapping2_0 javaManyToManyMapping = (JavaManyToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); + ManyToManyMapping2_0 javaManyToManyMapping = (ManyToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); javaManyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("JAVA_JOIN_TABLE"); assertEquals("JAVA_JOIN_TABLE", ormColumn.getTable()); javaManyToManyMapping.getMapKeyColumn().setSpecifiedTable("JAVA_TABLE"); @@ -915,7 +916,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests //make addresses persistent attribute not default addressesPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("addresses"), MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY); - addressesVirtualMapping = (OrmManyToManyMapping2_0) addressesPersistentAttribute.getMapping(); + addressesVirtualMapping = (ManyToManyMapping2_0) addressesPersistentAttribute.getMapping(); ormColumn = addressesVirtualMapping.getMapKeyColumn(); assertNull(ormColumn.getSpecifiedTable()); assertEquals("ORM_TABLE_Address", ormColumn.getDefaultTable()); @@ -992,7 +993,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("manyToManyMapping"), MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmManyToManyMapping2_0 ormManyToManyMapping = (OrmManyToManyMapping2_0) ormPersistentAttribute.getMapping(); + OrmCollectionMapping2_0 ormManyToManyMapping = (OrmCollectionMapping2_0) ormPersistentAttribute.getMapping(); XmlManyToMany_2_0 manyToManyResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getManyToManys().get(0); assertNull(ormManyToManyMapping.getMapKeyConverter().getType()); @@ -1018,7 +1019,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("manyToManyMapping"), MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmManyToManyMapping2_0 ormManyToManyMapping = (OrmManyToManyMapping2_0) ormPersistentAttribute.getMapping(); + OrmCollectionMapping2_0 ormManyToManyMapping = (OrmCollectionMapping2_0) ormPersistentAttribute.getMapping(); XmlManyToMany_2_0 manyToManyResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getManyToManys().get(0); assertNull(ormManyToManyMapping.getMapKeyConverter().getType()); @@ -1045,7 +1046,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("manyToManyMapping"), MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmManyToManyMapping2_0 ormManyToManyMapping = (OrmManyToManyMapping2_0) ormPersistentAttribute.getMapping(); + OrmCollectionMapping2_0 ormManyToManyMapping = (OrmCollectionMapping2_0) ormPersistentAttribute.getMapping(); XmlManyToMany_2_0 manyToManyResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getManyToManys().get(0); assertNull(ormManyToManyMapping.getMapKeyConverter().getType()); @@ -1075,7 +1076,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("manyToManyMapping"), MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmManyToManyMapping2_0 ormManyToManyMapping = (OrmManyToManyMapping2_0) ormPersistentAttribute.getMapping(); + OrmCollectionMapping2_0 ormManyToManyMapping = (OrmCollectionMapping2_0) ormPersistentAttribute.getMapping(); XmlManyToMany_2_0 manyToManyResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getManyToManys().get(0); assertNull(ormManyToManyMapping.getMapKeyConverter().getType()); diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmManyToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmManyToOneMappingTests.java index c47a6fd817..4f39ff964c 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmManyToOneMappingTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmManyToOneMappingTests.java @@ -27,11 +27,9 @@ import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute; import org.eclipse.jpt.jpa.core.jpa2.context.Cascade2_0; import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneRelationship2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaManyToOneMapping2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaManyToOneRelationship2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmManyToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmManyToOneRelationship2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0; import org.eclipse.jpt.jpa.core.resource.java.JPA; import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory; @@ -212,7 +210,7 @@ public class EclipseLink2_0OrmManyToOneMappingTests createTestEntityWithIdDerivedIdentity(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne"); - OrmManyToOneMapping2_0 contextMapping = (OrmManyToOneMapping2_0) contextAttribute.getMapping(); + ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlDerivedId_2_0 resourceMapping = resourceEntity.getAttributes().getManyToOnes().get(0); @@ -236,7 +234,7 @@ public class EclipseLink2_0OrmManyToOneMappingTests createTestEntityWithIdDerivedIdentity(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne"); - OrmManyToOneMapping2_0 contextMapping = (OrmManyToOneMapping2_0) contextAttribute.getMapping(); + ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlDerivedId_2_0 resourceMapping = resourceEntity.getAttributes().getManyToOnes().get(0); @@ -256,7 +254,7 @@ public class EclipseLink2_0OrmManyToOneMappingTests createTestEntityWithMapsIdDerivedIdentity(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne"); - OrmManyToOneMapping2_0 contextMapping = (OrmManyToOneMapping2_0) contextAttribute.getMapping(); + ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlMapsId_2_0 resourceMapping = resourceEntity.getAttributes().getManyToOnes().get(0); @@ -280,7 +278,7 @@ public class EclipseLink2_0OrmManyToOneMappingTests createTestEntityWithMapsIdDerivedIdentity(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne"); - OrmManyToOneMapping2_0 contextMapping = (OrmManyToOneMapping2_0) contextAttribute.getMapping(); + ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlMapsId_2_0 resourceMapping = resourceEntity.getAttributes().getManyToOnes().get(0); @@ -309,28 +307,28 @@ public class EclipseLink2_0OrmManyToOneMappingTests XmlManyToOne resourceManyToOne = resourceEntity.getAttributes().getManyToOnes().get(0); resourceManyToOne.setId(Boolean.TRUE); assertEquals(Boolean.TRUE, resourceManyToOne.getId()); - assertTrue(((OrmManyToOneMapping2_0) contextAttribute.getMapping()). + assertTrue(((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertNull(resourceManyToOne.getMapsId()); - assertNull(((OrmManyToOneMapping2_0) contextAttribute.getMapping()). + assertNull(((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); contextAttribute.setMappingKey(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY); XmlOneToOne resourceOneToOne = resourceEntity.getAttributes().getOneToOnes().get(0); assertEquals(Boolean.TRUE, resourceOneToOne.getId()); - assertTrue(((OrmOneToOneMapping2_0) contextAttribute.getMapping()). + assertTrue(((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertNull(resourceOneToOne.getMapsId()); - assertNull(((OrmOneToOneMapping2_0) contextAttribute.getMapping()). + assertNull(((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); contextAttribute.setMappingKey(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY); resourceManyToOne.setId(Boolean.TRUE); assertEquals(Boolean.TRUE, resourceManyToOne.getId()); - assertTrue(((OrmManyToOneMapping2_0) contextAttribute.getMapping()). + assertTrue(((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertNull(resourceManyToOne.getMapsId()); - assertNull(((OrmManyToOneMapping2_0) contextAttribute.getMapping()). + assertNull(((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); } @@ -340,7 +338,7 @@ public class EclipseLink2_0OrmManyToOneMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("address"); - JavaManyToOneMapping2_0 javaManyToOneMapping = ((JavaManyToOneMapping2_0) ormPersistentAttribute.getJavaPersistentAttribute().getMapping()); + ManyToOneMapping2_0 javaManyToOneMapping = ((ManyToOneMapping2_0) ormPersistentAttribute.getJavaPersistentAttribute().getMapping()); ManyToOneMapping2_0 virtualManyToOneMapping = (ManyToOneMapping2_0) ormPersistentAttribute.getMapping(); ((ManyToOneRelationship2_0) javaManyToOneMapping.getRelationship()).setStrategyToJoinTable(); JoinTable ormJoinTable = ((ManyToOneRelationship2_0) virtualManyToOneMapping.getRelationship()).getJoinTableStrategy().getJoinTable(); @@ -395,7 +393,7 @@ public class EclipseLink2_0OrmManyToOneMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("address"), MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY); - OrmManyToOneMapping2_0 ormManyToOneMapping = (OrmManyToOneMapping2_0) ormPersistentAttribute.getMapping(); + ManyToOneMapping2_0 ormManyToOneMapping = (ManyToOneMapping2_0) ormPersistentAttribute.getMapping(); ((ManyToOneRelationship2_0) ormManyToOneMapping.getRelationship()).setStrategyToJoinTable(); JoinTable ormJoinTable = ((OrmManyToOneRelationship2_0) ormManyToOneMapping.getRelationship()).getJoinTableStrategy().getJoinTable(); assertEquals(null, ormJoinTable.getDefaultName()); @@ -411,7 +409,7 @@ public class EclipseLink2_0OrmManyToOneMappingTests ((JavaEntity) ormPersistentType.getJavaPersistentType().getMapping()).getTable().setSpecifiedName("BAR"); assertEquals("BAR_FOO", ormJoinTable.getDefaultName()); - JavaManyToOneMapping2_0 javaManyToOneMapping = (JavaManyToOneMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("address").getMapping(); + ManyToOneMapping2_0 javaManyToOneMapping = (ManyToOneMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("address").getMapping(); ((ManyToOneRelationship2_0) javaManyToOneMapping.getRelationship()).setStrategyToJoinTable(); ((ManyToOneRelationship2_0) javaManyToOneMapping.getRelationship()).getJoinTableStrategy().getJoinTable().setSpecifiedName("JAVA_JOIN_TABLE"); @@ -453,7 +451,7 @@ public class EclipseLink2_0OrmManyToOneMappingTests createTestEntityWithManyToOneMapping(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("id"); - OrmManyToOneMapping2_0 contextMapping = (OrmManyToOneMapping2_0) contextAttribute.getMapping(); + ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping(); OrmManyToOneRelationship2_0 rel = (OrmManyToOneRelationship2_0) contextMapping.getRelationship(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlManyToOne resourceMapping = resourceEntity.getAttributes().getManyToOnes().get(0); @@ -486,7 +484,7 @@ public class EclipseLink2_0OrmManyToOneMappingTests createTestEntityWithManyToOneMapping(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("id"); - OrmManyToOneMapping2_0 contextMapping = (OrmManyToOneMapping2_0) contextAttribute.getMapping(); + ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping(); OrmManyToOneRelationship2_0 rel = (OrmManyToOneRelationship2_0) contextMapping.getRelationship(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlManyToOne resourceMapping = resourceEntity.getAttributes().getManyToOnes().get(0); @@ -570,7 +568,7 @@ public class EclipseLink2_0OrmManyToOneMappingTests virtualPersistentAttribute.addToXml(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getSpecifiedAttributes().iterator().next(); - OrmManyToOneMapping2_0 ormManyToOneMapping = (OrmManyToOneMapping2_0) ormPersistentAttribute.getMapping(); + ManyToOneMapping2_0 ormManyToOneMapping = (ManyToOneMapping2_0) ormPersistentAttribute.getMapping(); assertEquals("address", ormManyToOneMapping.getName()); assertEquals(FetchType.EAGER, ormManyToOneMapping.getDefaultFetch()); assertEquals(true, ormManyToOneMapping.isDefaultOptional()); diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmOneToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmOneToManyMappingTests.java index fe46a49657..0507a2dc93 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmOneToManyMappingTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmOneToManyMappingTests.java @@ -39,11 +39,8 @@ import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyRelationship2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0; import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovable2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovalHolder2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToManyMapping2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToManyMapping2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovable2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyColumn2_0Annotation; import org.eclipse.jpt.jpa.core.resource.java.JPA; @@ -258,8 +255,8 @@ public class EclipseLink2_0OrmOneToManyMappingTests }); } - private OrmOrphanRemovable2_0 getOrphanRemovalOf(OneToManyMapping2_0 oneToManyMapping) { - return ((OrmOrphanRemovalHolder2_0) oneToManyMapping).getOrphanRemoval(); + private OrphanRemovable2_0 getOrphanRemovalOf(OneToManyMapping2_0 oneToManyMapping) { + return ((OrphanRemovalHolder2_0) oneToManyMapping).getOrphanRemoval(); } public void testUpdateSpecifiedOrphanRemoval() throws Exception { @@ -267,8 +264,8 @@ public class EclipseLink2_0OrmOneToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("oneToMany"), MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmOneToManyMapping2_0 oneToManyMapping = (OrmOneToManyMapping2_0) ormPersistentAttribute.getMapping(); - OrmOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) ormPersistentAttribute.getMapping(); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); XmlOneToMany oneToManyResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getOneToManys().get(0); assertEquals(null, mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); @@ -289,8 +286,8 @@ public class EclipseLink2_0OrmOneToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("oneToMany"), MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmOneToManyMapping2_0 oneToManyMapping = (OrmOneToManyMapping2_0) ormPersistentAttribute.getMapping(); - OrmOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); + OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) ormPersistentAttribute.getMapping(); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(oneToManyMapping); XmlOneToMany oneToManyResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getOneToManys().get(0); assertEquals(null, mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); @@ -421,7 +418,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("oneToMany"), MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmOneToManyMapping2_0 ormOneToManyMapping = (OrmOneToManyMapping2_0) ormPersistentAttribute.getMapping(); + OneToManyMapping2_0 ormOneToManyMapping = (OneToManyMapping2_0) ormPersistentAttribute.getMapping(); XmlOneToMany oneToMany = getXmlEntityMappings().getEntities().get(0).getAttributes().getOneToManys().get(0); assertNull(ormOneToManyMapping.getSpecifiedMapKeyClass()); @@ -458,7 +455,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests getEntityMappings().addPersistentType(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, PACKAGE_NAME + ".State"); OneToManyMapping2_0 virtualOneToManyMapping = (OneToManyMapping2_0) ormPersistentType.getAttributeNamed("addresses").getMapping(); - JavaOneToManyMapping2_0 javaOneToManyMapping = (JavaOneToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); + OneToManyMapping2_0 javaOneToManyMapping = (OneToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); assertNull(virtualOneToManyMapping.getSpecifiedMapKeyClass()); assertEquals("java.lang.String", virtualOneToManyMapping.getMapKeyClass()); assertEquals("java.lang.String", virtualOneToManyMapping.getDefaultMapKeyClass()); @@ -483,7 +480,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("oneToMany"), MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmOneToManyMapping2_0 ormOneToManyMapping = (OrmOneToManyMapping2_0) ormPersistentAttribute.getMapping(); + OneToManyMapping2_0 ormOneToManyMapping = (OneToManyMapping2_0) ormPersistentAttribute.getMapping(); XmlOneToMany oneToMany = getXmlEntityMappings().getEntities().get(0).getAttributes().getOneToManys().get(0); assertNull(ormOneToManyMapping.getSpecifiedMapKeyClass()); @@ -662,7 +659,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests assertEquals(ReadOnlyColumn.DEFAULT_SCALE, ormColumn.getScale()); //set Column annotation in Java - JavaOneToManyMapping2_0 javaOneToManyMapping = (JavaOneToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); + OneToManyMapping2_0 javaOneToManyMapping = (OneToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); javaOneToManyMapping.getMapKeyColumn().setSpecifiedName("FOO"); javaOneToManyMapping.getMapKeyColumn().setSpecifiedTable("FOO_TABLE"); javaOneToManyMapping.getMapKeyColumn().setColumnDefinition("COLUMN_DEFINITION"); @@ -713,11 +710,11 @@ public class EclipseLink2_0OrmOneToManyMappingTests getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address"); OrmPersistentAttribute addressesPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("addresses"), MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmOneToManyMapping2_0 addressesVirtualMapping = (OrmOneToManyMapping2_0) addressesPersistentAttribute.getMapping(); + OneToManyMapping2_0 addressesVirtualMapping = (OneToManyMapping2_0) addressesPersistentAttribute.getMapping(); Column ormColumn = addressesVirtualMapping.getMapKeyColumn(); //set Column annotation in Java - JavaOneToManyMapping2_0 javaOneToManyMapping = (JavaOneToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); + OneToManyMapping2_0 javaOneToManyMapping = (OneToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); javaOneToManyMapping.getMapKeyColumn().setSpecifiedName("FOO"); javaOneToManyMapping.getMapKeyColumn().setSpecifiedTable("FOO_TABLE"); javaOneToManyMapping.getMapKeyColumn().setColumnDefinition("COLUMN_DEFINITION"); @@ -770,7 +767,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests assertEquals("ORM_TABLE_Address", ormColumn.getTable()); //set Column table element in Java - JavaOneToManyMapping2_0 javaOneToManyMapping = (JavaOneToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); + OneToManyMapping2_0 javaOneToManyMapping = (OneToManyMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("addresses").getMapping(); javaOneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("JAVA_JOIN_TABLE"); assertEquals("JAVA_JOIN_TABLE", ormColumn.getTable()); javaOneToManyMapping.getMapKeyColumn().setSpecifiedTable("JAVA_TABLE"); @@ -778,7 +775,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests //make name persistent attribute not default addressesPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("addresses"), MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmOneToManyMapping2_0 addressesMapping = (OrmOneToManyMapping2_0) addressesPersistentAttribute.getMapping(); + OneToManyMapping2_0 addressesMapping = (OneToManyMapping2_0) addressesPersistentAttribute.getMapping(); ormColumn = addressesMapping.getMapKeyColumn(); assertNull(ormColumn.getSpecifiedTable()); assertEquals("ORM_TABLE_Address", ormColumn.getDefaultTable()); @@ -905,7 +902,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests //test virtual orm mapping, setting the join column on the java mapping OrmReadOnlyPersistentAttribute persistentAttribute = ormPersistentType.getAttributeNamed("addresses"); OneToManyMapping2_0 virtualOneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); - JavaOneToManyMapping2_0 javaOneToManyMapping = (JavaOneToManyMapping2_0) persistentAttribute.getJavaPersistentAttribute().getMapping(); + OneToManyMapping2_0 javaOneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getJavaPersistentAttribute().getMapping(); ((OneToManyRelationship2_0) javaOneToManyMapping.getRelationship()).setStrategyToJoinColumn(); JoinColumn joinColumn = ((OneToManyRelationship2_0) virtualOneToManyMapping.getRelationship()).getJoinColumnStrategy().getSpecifiedJoinColumns().iterator().next(); @@ -920,7 +917,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests //override the mapping in orm.xml persistentAttribute.addToXml(); persistentAttribute = ormPersistentType.getAttributeNamed("addresses"); - OrmOneToManyMapping2_0 ormOneToManyMapping = (OrmOneToManyMapping2_0) persistentAttribute.getMapping(); + OneToManyMapping2_0 ormOneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); assertFalse(persistentAttribute.isVirtual()); assertFalse(((OneToManyRelationship2_0) ormOneToManyMapping.getRelationship()).strategyIsJoinColumn()); @@ -950,7 +947,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests //test virtual orm mapping, setting the join column on the java mapping OrmReadOnlyPersistentAttribute persistentAttribute = ormPersistentType.getAttributeNamed("addresses"); OneToManyMapping2_0 virtualOneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); - JavaOneToManyMapping2_0 javaOneToManyMapping = (JavaOneToManyMapping2_0) persistentAttribute.getJavaPersistentAttribute().getMapping(); + OneToManyMapping2_0 javaOneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getJavaPersistentAttribute().getMapping(); ((OneToManyRelationship2_0) javaOneToManyMapping.getRelationship()).setStrategyToJoinColumn(); assertTrue(persistentAttribute.isVirtual()); @@ -975,7 +972,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests //override the mapping in orm.xml persistentAttribute.addToXml(); persistentAttribute = ormPersistentType.getAttributeNamed("addresses"); - OrmOneToManyMapping2_0 ormOneToManyMapping = (OrmOneToManyMapping2_0) persistentAttribute.getMapping(); + OneToManyMapping2_0 ormOneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); assertFalse(persistentAttribute.isVirtual()); assertFalse(((OneToManyRelationship2_0) ormOneToManyMapping.getRelationship()).strategyIsJoinColumn()); @@ -1004,7 +1001,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests //test virtual orm mapping, setting the join column on the java mapping OrmReadOnlyPersistentAttribute persistentAttribute = ormPersistentType.getAttributeNamed("addresses"); OneToManyMapping2_0 virtualOneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); - JavaOneToManyMapping2_0 javaOneToManyMapping = (JavaOneToManyMapping2_0) persistentAttribute.getJavaPersistentAttribute().getMapping(); + OneToManyMapping2_0 javaOneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getJavaPersistentAttribute().getMapping(); ((OneToManyRelationship2_0) javaOneToManyMapping.getRelationship()).setStrategyToJoinColumn(); ((Orderable2_0) javaOneToManyMapping.getOrderable()).setOrderColumnOrdering(true); OrderColumn2_0 orderColumn = ((Orderable2_0) virtualOneToManyMapping.getOrderable()).getOrderColumn(); @@ -1019,7 +1016,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests //override the mapping in orm.xml persistentAttribute.addToXml(); persistentAttribute = ormPersistentType.getAttributeNamed("addresses"); - OrmOneToManyMapping2_0 ormOneToManyMapping = (OrmOneToManyMapping2_0) persistentAttribute.getMapping(); + OneToManyMapping2_0 ormOneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping(); assertFalse(persistentAttribute.isVirtual()); assertFalse(((OneToManyRelationship2_0) ormOneToManyMapping.getRelationship()).strategyIsJoinColumn()); @@ -1108,7 +1105,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("oneToMany"), MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmOneToManyMapping2_0 ormOneToManyMapping = (OrmOneToManyMapping2_0) ormPersistentAttribute.getMapping(); + OneToManyMapping2_0 ormOneToManyMapping = (OneToManyMapping2_0) ormPersistentAttribute.getMapping(); XmlOneToMany_2_0 oneToManyResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getOneToManys().get(0); assertNull(ormOneToManyMapping.getMapKeyConverter().getType()); @@ -1134,7 +1131,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("oneToMany"), MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmOneToManyMapping2_0 ormOneToManyMapping = (OrmOneToManyMapping2_0) ormPersistentAttribute.getMapping(); + OneToManyMapping2_0 ormOneToManyMapping = (OneToManyMapping2_0) ormPersistentAttribute.getMapping(); XmlOneToMany_2_0 oneToManyResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getOneToManys().get(0); assertNull(ormOneToManyMapping.getMapKeyConverter().getType()); @@ -1161,7 +1158,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("oneToMany"), MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmOneToManyMapping2_0 ormOneToManyMapping = (OrmOneToManyMapping2_0) ormPersistentAttribute.getMapping(); + OneToManyMapping2_0 ormOneToManyMapping = (OneToManyMapping2_0) ormPersistentAttribute.getMapping(); XmlOneToMany_2_0 oneToManyResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getOneToManys().get(0); assertNull(ormOneToManyMapping.getMapKeyConverter().getType()); @@ -1191,7 +1188,7 @@ public class EclipseLink2_0OrmOneToManyMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("oneToMany"), MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY); - OrmOneToManyMapping2_0 ormOneToManyMapping = (OrmOneToManyMapping2_0) ormPersistentAttribute.getMapping(); + OneToManyMapping2_0 ormOneToManyMapping = (OneToManyMapping2_0) ormPersistentAttribute.getMapping(); XmlOneToMany_2_0 oneToManyResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getOneToManys().get(0); assertNull(ormOneToManyMapping.getMapKeyConverter().getType()); diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmOneToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmOneToOneMappingTests.java index 20c59ff897..2cc64b3bb3 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmOneToOneMappingTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmOneToOneMappingTests.java @@ -29,16 +29,13 @@ import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute; import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType; import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute; import org.eclipse.jpt.jpa.core.jpa2.context.Cascade2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.ManyToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneRelationship2_0; +import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovable2_0; import org.eclipse.jpt.jpa.core.jpa2.context.OrphanRemovalHolder2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToOneRelationship2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmManyToOneMapping2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToOneMapping2_0; import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToOneRelationship2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovable2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0; import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0; import org.eclipse.jpt.jpa.core.resource.java.JPA; import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory; @@ -290,7 +287,7 @@ public class EclipseLink2_0OrmOneToOneMappingTests createTestEntityWithIdDerivedIdentity(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne"); - OrmOneToOneMapping2_0 contextMapping = (OrmOneToOneMapping2_0) contextAttribute.getMapping(); + OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlDerivedId_2_0 resourceMapping = resourceEntity.getAttributes().getOneToOnes().get(0); @@ -314,7 +311,7 @@ public class EclipseLink2_0OrmOneToOneMappingTests createTestEntityWithIdDerivedIdentity(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne"); - OrmOneToOneMapping2_0 contextMapping = (OrmOneToOneMapping2_0) contextAttribute.getMapping(); + OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlDerivedId_2_0 resourceMapping = resourceEntity.getAttributes().getOneToOnes().get(0); @@ -334,7 +331,7 @@ public class EclipseLink2_0OrmOneToOneMappingTests createTestEntityWithMapsIdDerivedIdentity(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne"); - OrmOneToOneMapping2_0 contextMapping = (OrmOneToOneMapping2_0) contextAttribute.getMapping(); + OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlMapsId_2_0 resourceMapping = resourceEntity.getAttributes().getOneToOnes().get(0); @@ -358,7 +355,7 @@ public class EclipseLink2_0OrmOneToOneMappingTests createTestEntityWithMapsIdDerivedIdentity(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne"); - OrmOneToOneMapping2_0 contextMapping = (OrmOneToOneMapping2_0) contextAttribute.getMapping(); + OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlMapsId_2_0 resourceMapping = resourceEntity.getAttributes().getOneToOnes().get(0); @@ -387,28 +384,28 @@ public class EclipseLink2_0OrmOneToOneMappingTests XmlOneToOne resourceOneToOne = resourceEntity.getAttributes().getOneToOnes().get(0); resourceOneToOne.setMapsId("foo"); assertNull(resourceOneToOne.getId()); - assertFalse(((OrmOneToOneMapping2_0) contextAttribute.getMapping()). + assertFalse(((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertEquals("foo", resourceOneToOne.getMapsId()); - assertEquals("foo", ((OrmOneToOneMapping2_0) contextAttribute.getMapping()). + assertEquals("foo", ((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); contextAttribute.setMappingKey(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY); XmlManyToOne resourceManyToOne = resourceEntity.getAttributes().getManyToOnes().get(0); assertNull(resourceManyToOne.getId()); - assertFalse(((OrmManyToOneMapping2_0) contextAttribute.getMapping()). + assertFalse(((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertEquals("foo", resourceManyToOne.getMapsId()); - assertEquals("foo", ((OrmManyToOneMapping2_0) contextAttribute.getMapping()). + assertEquals("foo", ((ManyToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); contextAttribute.setMappingKey(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY); resourceOneToOne = resourceEntity.getAttributes().getOneToOnes().get(0); assertNull(resourceOneToOne.getId()); - assertFalse(((OrmOneToOneMapping2_0) contextAttribute.getMapping()). + assertFalse(((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getIdDerivedIdentityStrategy().getValue()); assertEquals("foo", resourceOneToOne.getMapsId()); - assertEquals("foo", ((OrmOneToOneMapping2_0) contextAttribute.getMapping()). + assertEquals("foo", ((OneToOneMapping2_0) contextAttribute.getMapping()). getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getSpecifiedIdAttributeName()); } @@ -504,8 +501,8 @@ public class EclipseLink2_0OrmOneToOneMappingTests assertEquals("foo", stateFooMapping.getName()); } - private OrmOrphanRemovable2_0 getOrphanRemovalOf(OneToOneMapping2_0 oneToOneMapping) { - return ((OrmOrphanRemovalHolder2_0) oneToOneMapping).getOrphanRemoval(); + private OrphanRemovable2_0 getOrphanRemovalOf(OneToOneMapping2_0 oneToOneMapping) { + return ((OrphanRemovalHolder2_0) oneToOneMapping).getOrphanRemoval(); } public void testUpdateSpecifiedOrphanRemoval() throws Exception { @@ -513,8 +510,8 @@ public class EclipseLink2_0OrmOneToOneMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("oneToOne"), MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY); - OrmOneToOneMapping2_0 ormOneToOneMapping = (OrmOneToOneMapping2_0) ormPersistentAttribute.getMapping(); - OrmOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(ormOneToOneMapping); + OneToOneMapping2_0 ormOneToOneMapping = (OneToOneMapping2_0) ormPersistentAttribute.getMapping(); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(ormOneToOneMapping); XmlOneToOne oneToOneResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getOneToOnes().get(0); assertEquals(null, mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); @@ -535,8 +532,8 @@ public class EclipseLink2_0OrmOneToOneMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("oneToOne"), MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY); - OrmOneToOneMapping2_0 ormOneToOneMapping = (OrmOneToOneMapping2_0) ormPersistentAttribute.getMapping(); - OrmOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(ormOneToOneMapping); + OneToOneMapping2_0 ormOneToOneMapping = (OneToOneMapping2_0) ormPersistentAttribute.getMapping(); + OrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(ormOneToOneMapping); XmlOneToOne oneToOneResource = getXmlEntityMappings().getEntities().get(0).getAttributes().getOneToOnes().get(0); assertEquals(null, mappingsOrphanRemoval.getSpecifiedOrphanRemoval()); @@ -558,7 +555,7 @@ public class EclipseLink2_0OrmOneToOneMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("address"); - JavaOneToOneMapping2_0 javaOneToOneMapping = ((JavaOneToOneMapping2_0) ormPersistentAttribute.getJavaPersistentAttribute().getMapping()); + OneToOneMapping2_0 javaOneToOneMapping = ((OneToOneMapping2_0) ormPersistentAttribute.getJavaPersistentAttribute().getMapping()); OneToOneMapping2_0 virtualOneToOneMapping = (OneToOneMapping2_0) ormPersistentAttribute.getMapping(); ((OneToOneRelationship2_0) javaOneToOneMapping.getRelationship()).setStrategyToJoinTable(); JoinTable virtualJoinTable = ((OneToOneRelationship2_0) virtualOneToOneMapping.getRelationship()).getJoinTableStrategy().getJoinTable(); @@ -613,7 +610,7 @@ public class EclipseLink2_0OrmOneToOneMappingTests OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.addAttributeToXml(ormPersistentType.getAttributeNamed("address"), MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY); - OrmOneToOneMapping2_0 ormOneToOneMapping = (OrmOneToOneMapping2_0) ormPersistentAttribute.getMapping(); + OneToOneMapping2_0 ormOneToOneMapping = (OneToOneMapping2_0) ormPersistentAttribute.getMapping(); ((OneToOneRelationship2_0) ormOneToOneMapping.getRelationship()).setStrategyToJoinTable(); OrmJoinTable ormJoinTable = ((OrmOneToOneRelationship2_0) ormOneToOneMapping.getRelationship()).getJoinTableStrategy().getJoinTable(); assertEquals(null, ormJoinTable.getDefaultName()); @@ -629,7 +626,7 @@ public class EclipseLink2_0OrmOneToOneMappingTests ((JavaEntity) ormPersistentType.getJavaPersistentType().getMapping()).getTable().setSpecifiedName("BAR"); assertEquals("BAR_FOO", ormJoinTable.getDefaultName()); - JavaOneToOneMapping2_0 javaOneToOneMapping = (JavaOneToOneMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("address").getMapping(); + OneToOneMapping2_0 javaOneToOneMapping = (OneToOneMapping2_0) ormPersistentType.getJavaPersistentType().getAttributeNamed("address").getMapping(); ((OneToOneRelationship2_0) javaOneToOneMapping.getRelationship()).setStrategyToJoinTable(); ((OneToOneRelationship2_0) javaOneToOneMapping.getRelationship()).getJoinTableStrategy().getJoinTable().setSpecifiedName("JAVA_JOIN_TABLE"); @@ -671,7 +668,7 @@ public class EclipseLink2_0OrmOneToOneMappingTests createTestEntityWithOneToOneMapping(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("id"); - OrmOneToOneMapping2_0 contextMapping = (OrmOneToOneMapping2_0) contextAttribute.getMapping(); + OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping(); OrmOneToOneRelationship2_0 rel = (OrmOneToOneRelationship2_0) contextMapping.getRelationship(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlOneToOne resourceMapping = resourceEntity.getAttributes().getOneToOnes().get(0); @@ -730,7 +727,7 @@ public class EclipseLink2_0OrmOneToOneMappingTests createTestEntityWithOneToOneMapping(); OrmPersistentType contextType = getEntityMappings().getPersistentType(FULLY_QUALIFIED_TYPE_NAME); OrmReadOnlyPersistentAttribute contextAttribute = contextType.getAttributeNamed("id"); - OrmOneToOneMapping2_0 contextMapping = (OrmOneToOneMapping2_0) contextAttribute.getMapping(); + OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping(); OrmOneToOneRelationship2_0 rel = (OrmOneToOneRelationship2_0) contextMapping.getRelationship(); XmlEntity resourceEntity = (XmlEntity) contextType.getMapping().getXmlTypeMapping(); XmlOneToOne resourceMapping = resourceEntity.getAttributes().getOneToOnes().get(0); diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmCachingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmCachingTests.java index 868065b582..28ca699cb9 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmCachingTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmCachingTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2011 Oracle. All rights reserved. + * Copyright (c) 2007, 2012 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. @@ -19,9 +19,9 @@ import org.eclipse.jpt.jpa.core.resource.java.JPA; import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCacheCoordinationType; import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCacheIsolationType2_2; import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCacheType; +import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCaching; import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkExistenceType; import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkTimeOfDay; -import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkCaching; import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkEntity; import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.Caching; import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.EclipseLinkOrmFactory; @@ -56,7 +56,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(true, caching.isShared()); @@ -74,7 +74,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); caching.setSpecifiedType(EclipseLinkCacheType.HARD_WEAK); caching.setSpecifiedSize(Integer.valueOf(500)); @@ -113,7 +113,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertTrue(caching.isDefaultShared()); @@ -127,7 +127,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(true, caching.isShared()); @@ -138,7 +138,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(EclipseLinkCacheType.SOFT_WEAK, caching.getType()); @@ -161,7 +161,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(EclipseLinkCacheType.SOFT_WEAK, caching.getDefaultType()); @@ -175,7 +175,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(EclipseLinkCacheType.SOFT_WEAK, caching.getType()); @@ -186,7 +186,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(false, caching.isAlwaysRefresh()); @@ -203,7 +203,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(false, caching.isAlwaysRefresh()); @@ -214,7 +214,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(false, caching.isRefreshOnlyIfNewer()); @@ -231,7 +231,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(false, caching.isRefreshOnlyIfNewer()); @@ -242,7 +242,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(false, caching.isDisableHits()); @@ -259,7 +259,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(false, caching.isDisableHits()); @@ -270,7 +270,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(EclipseLinkCacheCoordinationType.SEND_OBJECT_CHANGES, caching.getCoordinationType()); @@ -294,7 +294,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(EclipseLinkCacheCoordinationType.SEND_OBJECT_CHANGES, caching.getCoordinationType()); } @@ -314,7 +314,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); caching.setExpiry(Integer.valueOf(58)); assertEquals(Integer.valueOf(58), caching.getExpiry()); @@ -329,7 +329,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); caching.addExpiryTimeOfDay(); caching.getExpiryTimeOfDay().setHour(Integer.valueOf(5)); @@ -346,7 +346,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertNull(caching.getExpiryTimeOfDay()); } @@ -356,7 +356,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertNull(caching.getExpiryTimeOfDay()); @@ -371,7 +371,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertNull(caching.getExpiryTimeOfDay()); } @@ -381,7 +381,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); caching.setExpiry(Integer.valueOf(800)); assertEquals(Integer.valueOf(800), caching.getExpiry()); @@ -398,7 +398,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(100, caching.getSize()); @@ -414,7 +414,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(100, caching.getDefaultSize()); @@ -428,7 +428,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); assertEquals(100, caching.getSize()); @@ -444,7 +444,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); XmlCache xmlCache = entity.getXmlTypeMapping().getCache(); assertEquals(EclipseLinkCacheIsolationType2_2.SHARED, caching.getIsolation()); @@ -474,7 +474,7 @@ public class EclipseLinkOrmCachingTests OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME); OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping(); - OrmEclipseLinkCaching caching = entity.getCaching(); + EclipseLinkCaching caching = entity.getCaching(); XmlCache xmlCache = entity.getXmlTypeMapping().getCache(); assertEquals(EclipseLinkCacheIsolationType2_2.SHARED, caching.getIsolation()); |