Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2012-01-13 12:51:02 +0000
committerkmoore2012-01-13 12:51:02 +0000
commit33be5b905af50d6b550ed2bbf837e8f0ed0b2c96 (patch)
tree602bc1d4787fe2683a17cbef81f6bed8878c50f9 /jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa
parent55e2ca0e2ce42a482134188e252e7a64b4fba079 (diff)
downloadwebtools.dali-33be5b905af50d6b550ed2bbf837e8f0ed0b2c96.tar.gz
webtools.dali-33be5b905af50d6b550ed2bbf837e8f0ed0b2c96.tar.xz
webtools.dali-33be5b905af50d6b550ed2bbf837e8f0ed0b2c96.zip
change OrmPersistenceUnitDefaults and EntityMappings to implement AccessHolder, thus unifying all places that use access type so that extension is simpler
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa')
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentTypeTests.java12
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaBasicMappingTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEntityTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/EntityMappingsTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/OrmEntityTests.java8
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/PersistenceUnitDefaultsTests.java34
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/persistence/PersistenceUnitTests.java10
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaPersistentType2_0Tests.java12
8 files changed, 46 insertions, 46 deletions
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentTypeTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentTypeTests.java
index 0147eb8427..e1bc71fbb7 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentTypeTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentTypeTests.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.
@@ -351,7 +351,7 @@ public class GenericJavaPersistentTypeTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
addXmlClassRef(PACKAGE_NAME + ".AnnotationTestTypeChild");
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.FIELD);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.FIELD);
ListIterator<ClassRef> classRefs = getPersistenceUnit().getSpecifiedClassRefs().iterator();
classRefs.next();
@@ -389,10 +389,10 @@ public class GenericJavaPersistentTypeTests extends ContextModelTestCase
JavaPersistentType javaPersistentType = entityPersistentType.getJavaPersistentType();
assertEquals(AccessType.FIELD, javaPersistentType.getAccess());
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.FIELD);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.FIELD);
assertEquals(AccessType.FIELD, javaPersistentType.getAccess());
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
assertEquals(AccessType.PROPERTY, javaPersistentType.getAccess());
}
@@ -421,7 +421,7 @@ public class GenericJavaPersistentTypeTests extends ContextModelTestCase
createTestEntityAnnotatedField();
JavaPersistentType javaPersistentType = entityPersistentType.getJavaPersistentType();
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
assertEquals(AccessType.FIELD, javaPersistentType.getAccess());
}
@@ -445,7 +445,7 @@ public class GenericJavaPersistentTypeTests extends ContextModelTestCase
createTestEntityAnnotatedField();
JavaPersistentType javaPersistentType = entityPersistentType.getJavaPersistentType();
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
getEntityMappings().getPersistenceUnitMetadata().setXmlMappingMetadataComplete(true);
assertEquals(AccessType.FIELD, javaPersistentType.getAccess());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaBasicMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaBasicMappingTests.java
index 103d128b80..d247f2f4b2 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaBasicMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaBasicMappingTests.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.
@@ -249,7 +249,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
createOrmXmlFile();
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
assertNull(basicMapping.getSpecifiedFetch());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEntityTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEntityTests.java
index fc1adbc1d5..9eab5a6221 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEntityTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEntityTests.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.
@@ -534,7 +534,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals(AccessType.FIELD, superPersistentType.getAccess());
assertEquals(AccessType.FIELD, childPersistentType.getAccess());
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
assertEquals(AccessType.PROPERTY, superPersistentType.getAccess());
assertEquals(AccessType.PROPERTY, childPersistentType.getAccess());
@@ -577,7 +577,7 @@ public class JavaEntityTests extends ContextModelTestCase
getJpaProject().synchronizeContextModel();
assertEquals(AccessType.FIELD, getJavaPersistentType().getAccess());
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
assertEquals(AccessType.PROPERTY, getJavaPersistentType().getAccess());
getEntityMappings().setSpecifiedAccess(AccessType.FIELD);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/EntityMappingsTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/EntityMappingsTests.java
index 75e9d99837..78e1c50bba 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/EntityMappingsTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/EntityMappingsTests.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.
@@ -345,13 +345,13 @@ public class EntityMappingsTests extends ContextModelTestCase
assertNull(getEntityMappings().getSpecifiedAccess());
assertNull(getXmlEntityMappings().getAccess());
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.FIELD);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.FIELD);
assertEquals(AccessType.FIELD, getEntityMappings().getDefaultAccess());
assertEquals(AccessType.FIELD, getEntityMappings().getAccess());
assertNull(getEntityMappings().getSpecifiedAccess());
assertNull(getXmlEntityMappings().getAccess());
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(null);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(null);
assertNull(getEntityMappings().getDefaultAccess());
assertNull(getEntityMappings().getAccess());
assertNull(getEntityMappings().getSpecifiedAccess());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/OrmEntityTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/OrmEntityTests.java
index d62222a79a..b6145ce3e5 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/OrmEntityTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/OrmEntityTests.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.
@@ -490,7 +490,7 @@ public class OrmEntityTests extends ContextModelTestCase
assertEquals(AccessType.FIELD, ormPersistentType.getDefaultAccess());
getEntityMappings().setSpecifiedAccess(AccessType.FIELD);
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
//entityMappings access wins over persistence-unit-defaults access
assertEquals(AccessType.FIELD, ormPersistentType.getDefaultAccess());
@@ -498,7 +498,7 @@ public class OrmEntityTests extends ContextModelTestCase
//persistence-unit-defaults access used now
assertEquals(AccessType.PROPERTY, ormPersistentType.getDefaultAccess());
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(null);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(null);
assertEquals(AccessType.FIELD, ormPersistentType.getDefaultAccess());
ormPersistentType.getJavaPersistentType().getAttributeNamed("id").setMappingKey(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY);
@@ -506,7 +506,7 @@ public class OrmEntityTests extends ContextModelTestCase
assertEquals(AccessType.FIELD, ormPersistentType.getDefaultAccess());
getEntityMappings().setSpecifiedAccess(AccessType.PROPERTY);
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
assertEquals(AccessType.FIELD, ormPersistentType.getDefaultAccess());
ormPersistentType.getJavaPersistentType().getAttributeNamed("id").setMappingKey(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/PersistenceUnitDefaultsTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/PersistenceUnitDefaultsTests.java
index b4ac863b89..0ce25c36e7 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/PersistenceUnitDefaultsTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/PersistenceUnitDefaultsTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 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.
@@ -313,56 +313,56 @@ public class PersistenceUnitDefaultsTests extends ContextModelTestCase
assertNull(getXmlEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().getAccess());
}
- public void testModifyAccess() throws Exception {
+ public void testModifySpecifiedAccess() throws Exception {
OrmPersistenceUnitDefaults persistenceUnitDefaults = getPersistenceUnitDefaults();
- assertNull(persistenceUnitDefaults.getAccess());
+ assertNull(persistenceUnitDefaults.getSpecifiedAccess());
assertNull(getXmlEntityMappings().getPersistenceUnitMetadata());
//set access in the context model, verify resource model modified
- persistenceUnitDefaults.setAccess(AccessType.PROPERTY);
- assertEquals(AccessType.PROPERTY, persistenceUnitDefaults.getAccess());
+ persistenceUnitDefaults.setSpecifiedAccess(AccessType.PROPERTY);
+ assertEquals(AccessType.PROPERTY, persistenceUnitDefaults.getSpecifiedAccess());
assertEquals(org.eclipse.jpt.jpa.core.resource.orm.AccessType.PROPERTY, getXmlEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().getAccess());
//set access to null in the context model
- persistenceUnitDefaults.setAccess(null);
- assertNull(persistenceUnitDefaults.getAccess());
+ persistenceUnitDefaults.setSpecifiedAccess(null);
+ assertNull(persistenceUnitDefaults.getSpecifiedAccess());
assertNull(getXmlEntityMappings().getPersistenceUnitMetadata());
}
public void testModifyAccess2() throws Exception {
OrmPersistenceUnitDefaults persistenceUnitDefaults = getPersistenceUnitDefaults();
- assertNull(persistenceUnitDefaults.getAccess());
+ assertNull(persistenceUnitDefaults.getSpecifiedAccess());
assertNull(getXmlEntityMappings().getPersistenceUnitMetadata());
//set access in the context model, verify resource model modified
- persistenceUnitDefaults.setAccess(AccessType.FIELD);
- assertEquals(AccessType.FIELD, persistenceUnitDefaults.getAccess());
+ persistenceUnitDefaults.setSpecifiedAccess(AccessType.FIELD);
+ assertEquals(AccessType.FIELD, persistenceUnitDefaults.getSpecifiedAccess());
assertEquals(org.eclipse.jpt.jpa.core.resource.orm.AccessType.FIELD, getXmlEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().getAccess());
//set another element on the persistence-unit-defaults element so it doesn't get removed
getXmlEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setCascadePersist(true);
//set access to null in the context model
- persistenceUnitDefaults.setAccess(null);
- assertNull(persistenceUnitDefaults.getAccess());
+ persistenceUnitDefaults.setSpecifiedAccess(null);
+ assertNull(persistenceUnitDefaults.getSpecifiedAccess());
assertNull(getXmlEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().getAccess());
}
public void testModifyAccess3() throws Exception {
OrmPersistenceUnitDefaults persistenceUnitDefaults = getPersistenceUnitDefaults();
- assertNull(persistenceUnitDefaults.getAccess());
+ assertNull(persistenceUnitDefaults.getSpecifiedAccess());
assertNull(getXmlEntityMappings().getPersistenceUnitMetadata());
//set another element on the persistence-unit-metadata element so only persistence-unit-defaults element gets removed
getXmlEntityMappings().setPersistenceUnitMetadata(OrmFactory.eINSTANCE.createXmlPersistenceUnitMetadata());
getXmlEntityMappings().getPersistenceUnitMetadata().setXmlMappingMetadataComplete(true);
//set access in the context model, verify resource model modified
- persistenceUnitDefaults.setAccess(AccessType.FIELD);
- assertEquals(AccessType.FIELD, persistenceUnitDefaults.getAccess());
+ persistenceUnitDefaults.setSpecifiedAccess(AccessType.FIELD);
+ assertEquals(AccessType.FIELD, persistenceUnitDefaults.getSpecifiedAccess());
assertEquals(org.eclipse.jpt.jpa.core.resource.orm.AccessType.FIELD, getXmlEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().getAccess());
//set access to null in the context model
- persistenceUnitDefaults.setAccess(null);
- assertNull(persistenceUnitDefaults.getAccess());
+ persistenceUnitDefaults.setSpecifiedAccess(null);
+ assertNull(persistenceUnitDefaults.getSpecifiedAccess());
assertNull(getXmlEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults());
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/persistence/PersistenceUnitTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/persistence/PersistenceUnitTests.java
index d6a932cd4e..9b9928c7c4 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/persistence/PersistenceUnitTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/persistence/PersistenceUnitTests.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.
@@ -1089,17 +1089,17 @@ public class PersistenceUnitTests extends ContextModelTestCase
assertEquals(null, persistenceUnit.getDefaultAccess());
- ormMappingFile.getRoot().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ ormMappingFile.getRoot().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
assertEquals(AccessType.PROPERTY, persistenceUnit.getDefaultAccess());
- ormMappingFile.getRoot().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.FIELD);
+ ormMappingFile.getRoot().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.FIELD);
assertEquals(AccessType.FIELD, persistenceUnit.getDefaultAccess());
- ormMappingFile.getRoot().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(null);
+ ormMappingFile.getRoot().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(null);
assertFalse(ormMappingFile.getRoot().getPersistenceUnitMetadata().resourceExists());
assertEquals(null, persistenceUnit.getDefaultAccess());
- orm2MappingFile.getRoot().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.FIELD);
+ orm2MappingFile.getRoot().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.FIELD);
assertEquals(AccessType.FIELD, persistenceUnit.getDefaultAccess());
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaPersistentType2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaPersistentType2_0Tests.java
index 37bff06833..26997a7544 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaPersistentType2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaPersistentType2_0Tests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 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.
@@ -424,7 +424,7 @@ public class GenericJavaPersistentType2_0Tests extends Generic2_0ContextModelTes
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
addXmlClassRef(PACKAGE_NAME + ".AnnotationTestTypeChild");
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.FIELD);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.FIELD);
ListIterator<ClassRef> classRefs = getPersistenceUnit().getSpecifiedClassRefs().iterator();
classRefs.next();
@@ -461,10 +461,10 @@ public class GenericJavaPersistentType2_0Tests extends Generic2_0ContextModelTes
createTestEntity();
JavaPersistentType javaPersistentType = entityPersistentType.getJavaPersistentType();
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.FIELD);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.FIELD);
assertEquals(AccessType.FIELD, javaPersistentType.getAccess());
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
assertEquals(AccessType.PROPERTY, javaPersistentType.getAccess());
}
@@ -493,7 +493,7 @@ public class GenericJavaPersistentType2_0Tests extends Generic2_0ContextModelTes
createTestEntityAnnotatedField();
JavaPersistentType javaPersistentType = entityPersistentType.getJavaPersistentType();
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
assertEquals(AccessType.FIELD, javaPersistentType.getAccess());
}
@@ -517,7 +517,7 @@ public class GenericJavaPersistentType2_0Tests extends Generic2_0ContextModelTes
createTestEntityAnnotatedField();
JavaPersistentType javaPersistentType = entityPersistentType.getJavaPersistentType();
- getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setAccess(AccessType.PROPERTY);
+ getEntityMappings().getPersistenceUnitMetadata().getPersistenceUnitDefaults().setSpecifiedAccess(AccessType.PROPERTY);
getEntityMappings().getPersistenceUnitMetadata().setXmlMappingMetadataComplete(true);
assertEquals(AccessType.FIELD, javaPersistentType.getAccess());

Back to the top