jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r548496 [4/5] - in /jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src: dtd/ main/java/org/apache/jackrabbit/ocm/exception/ main/java/org/apache/jackrabbit/ocm/manager/ main/java/org/apache/jackrabbit/ocm/manager/beanconverter/...
Date Mon, 18 Jun 2007 21:46:48 GMT
Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/ObjectContentManagerInheritanceHierarchyTest.java (from r548484, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/PersistenceManagerInheritanceHierarchyTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/ObjectContentManagerInheritanceHierarchyTest.java?view=diff&rev=548496&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/PersistenceManagerInheritanceHierarchyTest.java&r1=548484&p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/ObjectContentManagerInheritanceHierarchyTest.java&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/PersistenceManagerInheritanceHierarchyTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/ObjectContentManagerInheritanceHierarchyTest.java Mon Jun 18 14:46:42 2007
@@ -40,14 +40,14 @@
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class PersistenceManagerInheritanceHierarchyTest extends TestBase {
-	private final static Log log = LogFactory.getLog(PersistenceManagerInheritanceHierarchyTest.class);
+public class ObjectContentManagerInheritanceHierarchyTest extends TestBase {
+	private final static Log log = LogFactory.getLog(ObjectContentManagerInheritanceHierarchyTest.class);
 
 	/**
 	 * <p>Defines the test case name for junit.</p>
 	 * @param testName The test case name.
 	 */
-	public PersistenceManagerInheritanceHierarchyTest(String testName) throws Exception {
+	public ObjectContentManagerInheritanceHierarchyTest(String testName) throws Exception {
 		super(testName);
 
 	}
@@ -55,7 +55,7 @@
 	public static Test suite() {
 		// All methods starting with "test" will be executed in the test suite.
 		return new RepositoryLifecycleTestSetup(new TestSuite(
-				PersistenceManagerInheritanceHierarchyTest.class));
+				ObjectContentManagerInheritanceHierarchyTest.class));
 	}
 
 	public void tearDown() throws Exception {
@@ -69,7 +69,7 @@
 	public void testRetrieveSingleton() {
 
 		try {
-			ObjectContentManager persistenceManager = this.getPersistenceManager();
+			ObjectContentManager ocm = this.getObjectContentManager();
 
 			//---------------------------------------------------------------------------------------------------------
 			// Insert a descendant object
@@ -79,14 +79,14 @@
 			descendant.setAncestorField("ancestorValue");
 			descendant.setIntField(200);
 			descendant.setPath("/test");
-			persistenceManager.insert(descendant);
-			persistenceManager.save();
+			ocm.insert(descendant);
+			ocm.save();
 
 			//---------------------------------------------------------------------------------------------------------
 			// Retrieve a descendant object
 			//---------------------------------------------------------------------------------------------------------						
 			descendant = null;
-			descendant = (Descendant) persistenceManager.getObject(	 "/test");
+			descendant = (Descendant) ocm.getObject(	 "/test");
 			assertEquals("Descendant path is invalid", descendant.getPath(), "/test");
 			assertEquals("Descendant ancestorField is invalid", descendant.getAncestorField(), "ancestorValue");
 			assertEquals("Descendant descendantField is invalid", descendant.getDescendantField(), "descendantValue");
@@ -97,20 +97,20 @@
 			//---------------------------------------------------------------------------------------------------------						
 			descendant.setAncestorField("anotherAncestorValue");
 			descendant.setIntField(123);
-			persistenceManager.update(descendant);
-			persistenceManager.save();
+			ocm.update(descendant);
+			ocm.save();
 
 			//---------------------------------------------------------------------------------------------------------
 			// Retrieve the updated descendant object
 			//---------------------------------------------------------------------------------------------------------						
 			descendant = null;
-			descendant = (Descendant) persistenceManager.getObject(	 "/test");
+			descendant = (Descendant) ocm.getObject(	 "/test");
 			assertEquals("Descendant path is invalid", descendant.getPath(), "/test");
 			assertEquals("Descendant ancestorField is invalid", descendant.getAncestorField(), "anotherAncestorValue");
 			assertEquals("Descendant descendantField is invalid", descendant	.getDescendantField(), "descendantValue");
 			assertEquals("Descendant intField is invalid", descendant.getIntField(), 123);
 
-			Ancestor ancestor = (Ancestor) persistenceManager.getObject("/test");
+			Ancestor ancestor = (Ancestor) ocm.getObject("/test");
 			assertTrue("Invalid object instance", ancestor instanceof Descendant );
 			assertEquals("Ancestor  path is invalid", ancestor.getPath(), "/test");
 			assertEquals("Ancestor ancestorField is invalid", ancestor.getAncestorField(), "anotherAncestorValue");
@@ -125,7 +125,7 @@
 
 	
 	public void testRetrieveCollection() {
-		ObjectContentManager persistenceManager = this.getPersistenceManager();
+		ObjectContentManager ocm = this.getObjectContentManager();
 
 		//---------------------------------------------------------------------------------------------------------	
 		// Insert  descendant objects
@@ -134,63 +134,63 @@
 		descendant.setDescendantField("descendantValue");
 		descendant.setAncestorField("ancestorValue");
 		descendant.setPath("/descendant1");
-		persistenceManager.insert(descendant);
+		ocm.insert(descendant);
 
 		descendant = new Descendant();
 		descendant.setDescendantField("descendantValue2");
 		descendant.setAncestorField("ancestorValue2");
 		descendant.setPath("/descendant2");
-		persistenceManager.insert(descendant);
+		ocm.insert(descendant);
 
 		SubDescendant subDescendant = new SubDescendant();
 		subDescendant.setDescendantField("descendantValue2");
 		subDescendant.setAncestorField("ancestorValue2");
 		subDescendant.setPath("/subdescendant");
 		subDescendant.setSubDescendantField("subdescendantvalue");
-		persistenceManager.insert(subDescendant);		
+		ocm.insert(subDescendant);		
 
 		 subDescendant = new SubDescendant();
 		subDescendant.setDescendantField("descendantValue3");
 		subDescendant.setAncestorField("ancestorValue2");
 		subDescendant.setPath("/subdescendant2");
 		subDescendant.setSubDescendantField("subdescendantvalue1");
-		persistenceManager.insert(subDescendant);		
+		ocm.insert(subDescendant);		
 		
 		
 		AnotherDescendant anotherDescendant = new AnotherDescendant();
 		anotherDescendant.setAnotherDescendantField("anotherDescendantValue");
 		anotherDescendant.setAncestorField("ancestorValue3");
 		anotherDescendant.setPath("/anotherdescendant1");
-		persistenceManager.insert(anotherDescendant);
+		ocm.insert(anotherDescendant);
 
 		anotherDescendant = new AnotherDescendant();
 		anotherDescendant.setAnotherDescendantField("anotherDescendantValue");
 		anotherDescendant.setAncestorField("ancestorValue4");
 		anotherDescendant.setPath("/anotherdescendant2");
-		persistenceManager.insert(anotherDescendant);
+		ocm.insert(anotherDescendant);
 
 		anotherDescendant = new AnotherDescendant();
 		anotherDescendant.setAnotherDescendantField("anotherDescendantValue2");
 		anotherDescendant.setAncestorField("ancestorValue5");
 		anotherDescendant.setPath("/anotherdescendant3");
-		persistenceManager.insert(anotherDescendant);
+		ocm.insert(anotherDescendant);
 
 		
 		Atomic a = new Atomic();
 		a.setPath("/atomic");
 		a.setBooleanPrimitive(true);
-		persistenceManager.insert(a);
+		ocm.insert(a);
 
-		persistenceManager.save();
+		ocm.save();
 
 		//---------------------------------------------------------------------------------------------------------	
 		// Retrieve Descendant class
 		//---------------------------------------------------------------------------------------------------------			
-		QueryManager queryManager = persistenceManager.getQueryManager();
+		QueryManager queryManager = ocm.getQueryManager();
 		Filter filter = queryManager.createFilter(Descendant.class);
 		Query query = queryManager.createQuery(filter);
 
-		Collection result = persistenceManager.getObjects(query);
+		Collection result = ocm.getObjects(query);
 		assertEquals("Invalid number of Descendant found", result.size(), 4);
 		assertTrue("Invalid item in the collection", this.contains(result, "/descendant1", Descendant.class));
 		assertTrue("Invalid item in the collection", this.contains(result, "/descendant2", Descendant.class));
@@ -201,12 +201,12 @@
 		//---------------------------------------------------------------------------------------------------------	
 		// Retrieve AnotherDescendant class
 		//---------------------------------------------------------------------------------------------------------			
-		queryManager = persistenceManager.getQueryManager();
+		queryManager = ocm.getQueryManager();
 		filter = queryManager.createFilter(AnotherDescendant.class);
 		filter.addEqualTo("anotherDescendantField", "anotherDescendantValue");
 		query = queryManager.createQuery(filter);
 
-		result = persistenceManager.getObjects(query);
+		result = ocm.getObjects(query);
 		assertEquals("Invalid number of AnotherDescendant found", result.size(),2);
 		assertTrue("Invalid item in the collection", this.contains(result, "/anotherdescendant1", AnotherDescendant.class));
 		assertTrue("Invalid item in the collection", this.contains(result, "/anotherdescendant2", AnotherDescendant.class));
@@ -214,12 +214,12 @@
 		//---------------------------------------------------------------------------------------------------------	
 		// Retrieve some descendants & subdescendants
 		//---------------------------------------------------------------------------------------------------------			
-		queryManager = persistenceManager.getQueryManager();
+		queryManager = ocm.getQueryManager();
 		filter = queryManager.createFilter(Descendant.class);		
 		filter.addEqualTo("descendantField","descendantValue2");
 		query = queryManager.createQuery(filter);
 
-		result = persistenceManager.getObjects(query);
+		result = ocm.getObjects(query);
 		assertEquals("Invalid ancestor object found", result.size(),2);
 		assertTrue("Invalid item in the collection", this.contains(result, "/descendant2", Descendant.class));
 		assertTrue("Invalid item in the collection", this.contains(result, "/subdescendant", SubDescendant.class));
@@ -227,11 +227,11 @@
 		//---------------------------------------------------------------------------------------------------------	
 		// Retrieve all class
 		//---------------------------------------------------------------------------------------------------------			
-		queryManager = persistenceManager.getQueryManager();
+		queryManager = ocm.getQueryManager();
 		filter = queryManager.createFilter(Ancestor.class);		
 		query = queryManager.createQuery(filter);
 
-		result = persistenceManager.getObjects(query);
+		result = ocm.getObjects(query);
 		assertEquals("Invalid ancestor object found", result.size(),7);
 		assertTrue("Invalid item in the collection", this.contains(result, "/descendant1", Descendant.class));
 		assertTrue("Invalid item in the collection", this.contains(result, "/descendant2", Descendant.class));

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/AllTests.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/AllTests.java?view=diff&rev=548496&r1=548495&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/AllTests.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/AllTests.java Mon Jun 18 14:46:42 2007
@@ -34,10 +34,10 @@
     }
 
     public static Test buildSuite() {
-        TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.persistence.interfaces");
+        TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.manager.interfaces");
         //$JUnit-BEGIN$
-        suite.addTestSuite(PersistenceManagerInterfaceConcreteClassTest.class);
-        suite.addTestSuite(PersistenceManagerInterfaceHierarchyTest.class);        
+        suite.addTestSuite(ObjectContentManagerInterfaceConcreteClassTest.class);
+        suite.addTestSuite(ObjectContentManagerInterfaceHierarchyTest.class);        
         //$JUnit-END$
 
         return suite;

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ObjectContentManagerInterfaceConcreteClassTest.java (from r548484, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/PersistenceManagerInterfaceConcreteClassTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ObjectContentManagerInterfaceConcreteClassTest.java?view=diff&rev=548496&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/PersistenceManagerInterfaceConcreteClassTest.java&r1=548484&p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ObjectContentManagerInterfaceConcreteClassTest.java&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/PersistenceManagerInterfaceConcreteClassTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ObjectContentManagerInterfaceConcreteClassTest.java Mon Jun 18 14:46:42 2007
@@ -44,14 +44,14 @@
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class PersistenceManagerInterfaceConcreteClassTest extends TestBase {
-	private final static Log log = LogFactory.getLog(PersistenceManagerInterfaceConcreteClassTest.class);
+public class ObjectContentManagerInterfaceConcreteClassTest extends TestBase {
+	private final static Log log = LogFactory.getLog(ObjectContentManagerInterfaceConcreteClassTest.class);
 
 	/**
 	 * <p>Defines the test case name for junit.</p>
 	 * @param testName The test case name.
 	 */
-	public PersistenceManagerInterfaceConcreteClassTest(String testName) throws Exception {
+	public ObjectContentManagerInterfaceConcreteClassTest(String testName) throws Exception {
 		super(testName);
 
 	}
@@ -59,7 +59,7 @@
 	public static Test suite() {
 		// All methods starting with "test" will be executed in the test suite.
 		return new RepositoryLifecycleTestSetup(new TestSuite(
-				PersistenceManagerInterfaceConcreteClassTest.class));
+				ObjectContentManagerInterfaceConcreteClassTest.class));
 	}
 
 	public void tearDown() throws Exception {
@@ -73,7 +73,7 @@
 	public void testRetrieveSingleton() {
 
 		try {
-			ObjectContentManager persistenceManager = this.getPersistenceManager();
+			ObjectContentManager ocm = this.getObjectContentManager();
 
 			//---------------------------------------------------------------------------------------------------------
 			// Insert 
@@ -88,13 +88,13 @@
             documentImpl.setDocumentStream(documentStream);
             Document document = documentImpl;
             
-            persistenceManager.insert(document);
-			persistenceManager.save();
+            ocm.insert(document);
+			ocm.save();
 
 			//---------------------------------------------------------------------------------------------------------
 			// Retrieve 
 			//---------------------------------------------------------------------------------------------------------						
-			document = (Document) persistenceManager.getObject( "/document1");
+			document = (Document) ocm.getObject( "/document1");
 			assertTrue("Invalid implementation for Document", document instanceof DocumentImpl);
 			assertEquals("Document path is invalid", document.getPath(), "/document1");
 			assertEquals("Content type  is invalid", document.getContentType(), "plain/text");
@@ -105,13 +105,13 @@
 			// Update  a document
 			//---------------------------------------------------------------------------------------------------------						
 			document.setName("anotherName");
-			persistenceManager.update(document);
-			persistenceManager.save();
+			ocm.update(document);
+			ocm.save();
 			
              //	---------------------------------------------------------------------------------------------------------
 			// Retrieve the updated descendant object
 			//---------------------------------------------------------------------------------------------------------						
-			document = (Document) persistenceManager.getObject( "/document1");
+			document = (Document) ocm.getObject( "/document1");
 			assertTrue("Invalid implementation for Document", document instanceof DocumentImpl);
 			assertEquals("document name is incorrect", document.getName(), "anotherName");
 			assertEquals("Document path is invalid", document.getPath(), "/document1");
@@ -119,7 +119,7 @@
 			assertNotNull("document stream is null", document.getDocumentStream());
 			assertTrue("Invalid document stream", document.getDocumentStream().getEncoding().equals("utf-8"));
 
-			CmsObject cmsObject = (CmsObject) persistenceManager.getObject( "/document1");
+			CmsObject cmsObject = (CmsObject) ocm.getObject( "/document1");
 			assertEquals("cmsObject name is incorrect", cmsObject.getName(), "anotherName");
 			assertEquals("cmsObject path is invalid", cmsObject.getPath(), "/document1");			
 			
@@ -132,7 +132,7 @@
 	
 	
 	public void testRetrieveCollection() {
-	ObjectContentManager persistenceManager = this.getPersistenceManager();
+	ObjectContentManager ocm = this.getObjectContentManager();
 
 	//---------------------------------------------------------------------------------------------------------
 	// Insert cmsobjects
@@ -145,7 +145,7 @@
     documentStream.setEncoding("utf-8");
     documentStream.setContent("Test Content".getBytes());
     document.setDocumentStream(documentStream);        
-    persistenceManager.insert(document);
+    ocm.insert(document);
     
     document = new DocumentImpl();
     document.setPath("/document2");        
@@ -155,7 +155,7 @@
     documentStream.setEncoding("utf-8");
     documentStream.setContent("Test Content".getBytes());
     document.setDocumentStream(documentStream);       
-    persistenceManager.insert(document);
+    ocm.insert(document);
 
     document = new DocumentImpl();
     document.setPath("/document3");        
@@ -165,12 +165,12 @@
     documentStream.setEncoding("utf-8");
     documentStream.setContent("Test Content 3".getBytes());
     document.setDocumentStream(documentStream);       
-    persistenceManager.insert(document);
+    ocm.insert(document);
     
     FolderImpl folder = new FolderImpl();
     folder.setPath("/folder1");
     folder.setName("folder1");
-    persistenceManager.insert(folder);
+    ocm.insert(folder);
 
 
     document = new DocumentImpl();        
@@ -189,24 +189,24 @@
     folder.setName("folder2");        
     folder.addChild(document);
     folder.addChild(subFolder);
-    persistenceManager.insert(folder);               		
+    ocm.insert(folder);               		
 
     
 	Atomic a = new Atomic();
 	a.setPath("/atomic");
 	a.setBooleanPrimitive(true);
-	persistenceManager.insert(a);
+	ocm.insert(a);
 
-	persistenceManager.save();
+	ocm.save();
 
 	//---------------------------------------------------------------------------------------------------------	
 	// Retrieve Folders found on the root level
 	//---------------------------------------------------------------------------------------------------------			
-	QueryManager queryManager = persistenceManager.getQueryManager();
+	QueryManager queryManager = ocm.getQueryManager();
 	Filter filter = queryManager.createFilter(Folder.class);
 	Query query = queryManager.createQuery(filter);
 	filter.setScope("/");
-	Collection result = persistenceManager.getObjects(query);
+	Collection result = ocm.getObjects(query);
 	assertEquals("Invalid number of folders found", result.size(), 2);
 	assertTrue("Invalid item in the collection", this.contains(result, "/folder1",FolderImpl.class));
 	assertTrue("Invalid item in the collection", this.contains(result, "/folder2", FolderImpl.class));		
@@ -215,13 +215,13 @@
 	//---------------------------------------------------------------------------------------------------------	
 	// Retrieve Documents 
 	//---------------------------------------------------------------------------------------------------------			
-	queryManager = persistenceManager.getQueryManager();
+	queryManager = ocm.getQueryManager();
 	filter = queryManager.createFilter(Document.class);
 	
 	filter.addLike("name", "document name%");
 	query = queryManager.createQuery(filter);
 
-	result = persistenceManager.getObjects(query);
+	result = ocm.getObjects(query);
 	assertEquals("Invalid number of documents  found", result.size(),2);
 	assertTrue("Invalid item in the collection", this.contains(result, "/document1", DocumentImpl.class));
 	assertTrue("Invalid item in the collection", this.contains(result, "/document2", DocumentImpl.class));
@@ -230,21 +230,21 @@
 	//---------------------------------------------------------------------------------------------------------	
 	// Retrieve folder2 
 	//---------------------------------------------------------------------------------------------------------	
-	Folder folder2 = (Folder) persistenceManager.getObject( "/folder2");
+	Folder folder2 = (Folder) ocm.getObject( "/folder2");
 	assertNotNull("folder 2 is null", folder2);
 	assertEquals("Invalid number of cms object  found in folder2 children", folder2.getChildren().size() ,2);
 	assertTrue("Invalid item in the collection", this.contains(folder2.getChildren(), "/folder2/document4", DocumentImpl.class));
 	assertTrue("Invalid item in the collection", this.contains(folder2.getChildren(), "/folder2/subfolder", FolderImpl.class));
 	
 	
-	CmsObject cmsObject = (CmsObject) persistenceManager.getObject( "/folder2");
+	CmsObject cmsObject = (CmsObject) ocm.getObject( "/folder2");
 	assertNotNull("folder 2 is null", cmsObject);
 	assertTrue("Invalid instance for folder 2",  cmsObject instanceof FolderImpl);
 	assertEquals("Invalid number of documents  found in folder2 children",  folder2.getChildren().size(),2);
 	assertTrue("Invalid item in the collection", this.contains(folder2.getChildren(), "/folder2/document4", DocumentImpl.class));
 	assertTrue("Invalid item in the collection", this.contains(folder2.getChildren(), "/folder2/subfolder", FolderImpl.class));
 	
-	Folder childFolder = (Folder) persistenceManager.getObject( "/folder2/subfolder");
+	Folder childFolder = (Folder) ocm.getObject( "/folder2/subfolder");
 	Folder parenFolder  = childFolder.getParentFolder();
 	assertNotNull("parent folder  is null", parenFolder);
 	assertTrue("Invalid instance for parent folder",  parenFolder instanceof FolderImpl);
@@ -255,12 +255,12 @@
 	//---------------------------------------------------------------------------------------------------------	
 	// Retrieve Contents (ancestor of Documents) 
 	//---------------------------------------------------------------------------------------------------------			
-	queryManager = persistenceManager.getQueryManager();
+	queryManager = ocm.getQueryManager();
 	filter = queryManager.createFilter(Content.class);
 	filter.addLike("name", "document name%");
 	query = queryManager.createQuery(filter);
 
-	result = persistenceManager.getObjects(query);
+	result = ocm.getObjects(query);
 	assertEquals("Invalid number of documents  found", result.size(),2);
 	assertTrue("Invalid item in the collection", this.contains(result, "/document1", DocumentImpl.class));
 	assertTrue("Invalid item in the collection", this.contains(result, "/document2", DocumentImpl.class));
@@ -269,12 +269,12 @@
 	//---------------------------------------------------------------------------------------------------------	
 	// Retrieve all cmsobjects found on the root level
 	//---------------------------------------------------------------------------------------------------------					
-	queryManager = persistenceManager.getQueryManager();
+	queryManager = ocm.getQueryManager();
 	filter = queryManager.createFilter(CmsObject.class);
 	filter.setScope("/");
 	query = queryManager.createQuery(filter);
 
-	result = persistenceManager.getObjects(query);
+	result = ocm.getObjects(query);
 	assertEquals("Invalid ancestor object found", result.size(),5);
 	assertTrue("Invalid item in the collection", this.contains(result, "/document1", DocumentImpl.class));
 	assertTrue("Invalid item in the collection", this.contains(result, "/document2", DocumentImpl.class));	
@@ -286,11 +286,11 @@
 	//---------------------------------------------------------------------------------------------------------	
 	// Retrieve all cmsobjects found anywhere
 	//---------------------------------------------------------------------------------------------------------					
-	queryManager = persistenceManager.getQueryManager();
+	queryManager = ocm.getQueryManager();
 	filter = queryManager.createFilter(CmsObject.class);		
 	query = queryManager.createQuery(filter);
 
-	result = persistenceManager.getObjects(query);
+	result = ocm.getObjects(query);
 	assertEquals("Invalid ancestor object found", result.size(),7);
 	assertTrue("Invalid item in the collection", this.contains(result, "/document1", DocumentImpl.class));
 	assertTrue("Invalid item in the collection", this.contains(result, "/document2", DocumentImpl.class));	
@@ -304,7 +304,7 @@
  
 
 public void testBeanCollection() {
-	ObjectContentManager persistenceManager = this.getPersistenceManager();
+	ObjectContentManager ocm = this.getObjectContentManager();
 
 	//---------------------------------------------------------------------------------------------------------
 	// Insert cmsobjects
@@ -331,14 +331,14 @@
          	    	 
      }
      log.debug("Save the folder and its 200 children");   
-     persistenceManager.insert(folder);
-     persistenceManager.save();
+     ocm.insert(folder);
+     ocm.save();
      log.debug("End - Save the folder and its 200 children");
 
 	//---------------------------------------------------------------------------------------------------------	
 	// Retrieve Folder
 	//---------------------------------------------------------------------------------------------------------			
-	folder  = (Folder) persistenceManager.getObject("/mainfolder");
+	folder  = (Folder) ocm.getObject("/mainfolder");
 	assertNotNull("Folder is null",folder);		
 	Collection children = folder.getChildren();
 	assertEquals("Invalid number of children", children.size(), 200);

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ObjectContentManagerInterfaceHierarchyTest.java (from r548484, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/PersistenceManagerInterfaceHierarchyTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ObjectContentManagerInterfaceHierarchyTest.java?view=diff&rev=548496&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/PersistenceManagerInterfaceHierarchyTest.java&r1=548484&p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ObjectContentManagerInterfaceHierarchyTest.java&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/PersistenceManagerInterfaceHierarchyTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ObjectContentManagerInterfaceHierarchyTest.java Mon Jun 18 14:46:42 2007
@@ -41,14 +41,14 @@
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class PersistenceManagerInterfaceHierarchyTest extends TestBase {
-	private final static Log log = LogFactory.getLog(PersistenceManagerInterfaceHierarchyTest.class);
+public class ObjectContentManagerInterfaceHierarchyTest extends TestBase {
+	private final static Log log = LogFactory.getLog(ObjectContentManagerInterfaceHierarchyTest.class);
 
 	/**
 	 * <p>Defines the test case name for junit.</p>
 	 * @param testName The test case name.
 	 */
-	public PersistenceManagerInterfaceHierarchyTest(String testName) throws Exception {
+	public ObjectContentManagerInterfaceHierarchyTest(String testName) throws Exception {
 		super(testName);
 
 	}
@@ -56,7 +56,7 @@
 	public static Test suite() {
 		// All methods starting with "test" will be executed in the test suite.
 		return new RepositoryLifecycleTestSetup(new TestSuite(
-				PersistenceManagerInterfaceHierarchyTest.class));
+				ObjectContentManagerInterfaceHierarchyTest.class));
 	}
 
 	public void tearDown() throws Exception {
@@ -70,7 +70,7 @@
 	public void testRetrieveSingleton() {
 
 		try {
-			ObjectContentManager persistenceManager = this.getPersistenceManager();
+			ObjectContentManager ocm = this.getObjectContentManager();
 
 			//---------------------------------------------------------------------------------------------------------
 			// Insert 
@@ -79,14 +79,14 @@
 			anotherDescendant.setAnotherDescendantField("anotherDescendantValue");
 			anotherDescendant.setAncestorField("ancestorValue");
 			anotherDescendant.setPath("/test");
-			persistenceManager.insert(anotherDescendant);
+			ocm.insert(anotherDescendant);
 
-			persistenceManager.save();
+			ocm.save();
 
 			//---------------------------------------------------------------------------------------------------------
 			// Retrieve 
 			//---------------------------------------------------------------------------------------------------------						
-			Interface result =  (Interface) persistenceManager.getObject("/test");
+			Interface result =  (Interface) ocm.getObject("/test");
 			assertNotNull("Object is null", result);
 			anotherDescendant = (AnotherDescendant) result; 
 			
@@ -104,7 +104,7 @@
 	
 	public void testRetrieveCollection() {
 		
-		ObjectContentManager persistenceManager = this.getPersistenceManager();
+		ObjectContentManager ocm = this.getObjectContentManager();
 
 		//---------------------------------------------------------------------------------------------------------	
 		// Insert  descendant objects
@@ -113,63 +113,63 @@
 		descendant.setDescendantField("descendantValue");
 		descendant.setAncestorField("ancestorValue");
 		descendant.setPath("/descendant1");
-		persistenceManager.insert(descendant);
+		ocm.insert(descendant);
 
 		descendant = new Descendant();
 		descendant.setDescendantField("descendantValue2");
 		descendant.setAncestorField("ancestorValue2");
 		descendant.setPath("/descendant2");
-		persistenceManager.insert(descendant);
+		ocm.insert(descendant);
 
 		SubDescendant subDescendant = new SubDescendant();
 		subDescendant.setDescendantField("descendantValue2");
 		subDescendant.setAncestorField("ancestorValue2");
 		subDescendant.setPath("/subdescendant");
 		subDescendant.setSubDescendantField("subdescendantvalue");
-		persistenceManager.insert(subDescendant);		
+		ocm.insert(subDescendant);		
 
 		 subDescendant = new SubDescendant();
 		subDescendant.setDescendantField("descendantValue3");
 		subDescendant.setAncestorField("ancestorValue2");
 		subDescendant.setPath("/subdescendant2");
 		subDescendant.setSubDescendantField("subdescendantvalue1");
-		persistenceManager.insert(subDescendant);		
+		ocm.insert(subDescendant);		
 		
 		
 		AnotherDescendant anotherDescendant = new AnotherDescendant();
 		anotherDescendant.setAnotherDescendantField("anotherDescendantValue");
 		anotherDescendant.setAncestorField("ancestorValue3");
 		anotherDescendant.setPath("/anotherdescendant1");
-		persistenceManager.insert(anotherDescendant);
+		ocm.insert(anotherDescendant);
 
 		anotherDescendant = new AnotherDescendant();
 		anotherDescendant.setAnotherDescendantField("anotherDescendantValue");
 		anotherDescendant.setAncestorField("ancestorValue4");
 		anotherDescendant.setPath("/anotherdescendant2");
-		persistenceManager.insert(anotherDescendant);
+		ocm.insert(anotherDescendant);
 
 		anotherDescendant = new AnotherDescendant();
 		anotherDescendant.setAnotherDescendantField("anotherDescendantValue2");
 		anotherDescendant.setAncestorField("ancestorValue5");
 		anotherDescendant.setPath("/anotherdescendant3");
-		persistenceManager.insert(anotherDescendant);
+		ocm.insert(anotherDescendant);
 
 		
 		Atomic a = new Atomic();
 		a.setPath("/atomic");
 		a.setBooleanPrimitive(true);
-		persistenceManager.insert(a);
+		ocm.insert(a);
 
-		persistenceManager.save();
+		ocm.save();
 
 		//---------------------------------------------------------------------------------------------------------	
 		// Retrieve Descendant class (implements  Interface.class)
 		//---------------------------------------------------------------------------------------------------------			
-		QueryManager queryManager = persistenceManager.getQueryManager();
+		QueryManager queryManager = ocm.getQueryManager();
 		Filter filter = queryManager.createFilter(Interface.class);
 		Query query = queryManager.createQuery(filter);
 
-		Collection result = persistenceManager.getObjects(query);
+		Collection result = ocm.getObjects(query);
 		assertEquals("Invalid number of  interface  found", result.size(),3);
 		assertTrue("Invalid item in the collection", this.contains(result, "/anotherdescendant1", AnotherDescendant.class));
 		assertTrue("Invalid item in the collection", this.contains(result, "/anotherdescendant2", AnotherDescendant.class));
@@ -179,11 +179,11 @@
 		//---------------------------------------------------------------------------------------------------------	
 		// Retrieve Descendant class and its children (implements  AnotherInterface.class)
 		//---------------------------------------------------------------------------------------------------------			
-	    queryManager = persistenceManager.getQueryManager();
+	    queryManager = ocm.getQueryManager();
 		filter = queryManager.createFilter(AnotherInterface.class);
 		query = queryManager.createQuery(filter);
 
-		result = persistenceManager.getObjects(query);
+		result = ocm.getObjects(query);
 		assertEquals("Invalid number of  interface  found", result.size(),4);
 		assertTrue("Invalid item in the collection", this.contains(result, "/descendant1", Descendant.class));
 		assertTrue("Invalid item in the collection", this.contains(result, "/descendant2", Descendant.class));

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/AllTests.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/AllTests.java?view=diff&rev=548496&r1=548495&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/AllTests.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/AllTests.java Mon Jun 18 14:46:42 2007
@@ -34,10 +34,10 @@
     }
 
     public static Test buildSuite() {
-        TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.persistence.jcrnodetype");
+        TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.manager.jcrnodetype");
         //$JUnit-BEGIN$
-        suite.addTestSuite(PersistenceManagerJcrNodeTypeTest.class);                
-        suite.addTestSuite(PersistenceManagerJcrPropertyTest.class);
+        suite.addTestSuite(ObjectContentManagerJcrNodeTypeTest.class);                
+        suite.addTestSuite(ObjectContentManagerJcrPropertyTest.class);
         //$JUnit-END$
 
         return suite;

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/ObjectContentManagerJcrNodeTypeTest.java (from r548484, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/ObjectContentManagerJcrNodeTypeTest.java?view=diff&rev=548496&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java&r1=548484&p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/ObjectContentManagerJcrNodeTypeTest.java&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/ObjectContentManagerJcrNodeTypeTest.java Mon Jun 18 14:46:42 2007
@@ -37,14 +37,14 @@
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class PersistenceManagerJcrNodeTypeTest extends TestBase {
-	private final static Log log = LogFactory.getLog(PersistenceManagerJcrNodeTypeTest.class);
+public class ObjectContentManagerJcrNodeTypeTest extends TestBase {
+	private final static Log log = LogFactory.getLog(ObjectContentManagerJcrNodeTypeTest.class);
 
 	/**
 	 * <p>Defines the test case name for junit.</p>
 	 * @param testName The test case name.
 	 */
-	public PersistenceManagerJcrNodeTypeTest(String testName) throws Exception {
+	public ObjectContentManagerJcrNodeTypeTest(String testName) throws Exception {
 		super(testName);
 
 	}
@@ -52,7 +52,7 @@
 	public static Test suite() {
 		// All methods starting with "test" will be executed in the test suite.
 		return new RepositoryLifecycleTestSetup(new TestSuite(
-				PersistenceManagerJcrNodeTypeTest.class));
+				ObjectContentManagerJcrNodeTypeTest.class));
 	}
 
 	public void tearDown() throws Exception {
@@ -68,7 +68,7 @@
 
 		try 
 		{
-			ObjectContentManager persistenceManager = this.getPersistenceManager();
+			ObjectContentManager ocm = this.getObjectContentManager();
 
 			//---------------------------------------------------------------------------------------------------------
 			// Insert a  folder (class mapped to jcr:folder) with one file (class mapped to jcr:file)
@@ -85,14 +85,14 @@
             folder.setPath("/folder1");
             folder.addChild(file);
             
-            persistenceManager.insert(folder);            
-			persistenceManager.save();
+            ocm.insert(folder);            
+			ocm.save();
 			
 			
 			//---------------------------------------------------------------------------------------------------------
 			// Retrieve a document object
 			//---------------------------------------------------------------------------------------------------------						
-			folder = (Folder) persistenceManager.getObject( "/folder1");
+			folder = (Folder) ocm.getObject( "/folder1");
 			assertNotNull("folder is null", folder);
 			System.out.println("Folder creation date : " + folder.getCreationDate());
 			assertTrue("Invalid number of children", folder.getChildren().size() == 1);

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/ObjectContentManagerJcrPropertyTest.java (from r548484, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/PersistenceManagerJcrPropertyTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/ObjectContentManagerJcrPropertyTest.java?view=diff&rev=548496&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/PersistenceManagerJcrPropertyTest.java&r1=548484&p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/ObjectContentManagerJcrPropertyTest.java&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/PersistenceManagerJcrPropertyTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/ObjectContentManagerJcrPropertyTest.java Mon Jun 18 14:46:42 2007
@@ -31,21 +31,21 @@
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class PersistenceManagerJcrPropertyTest extends TestBase {
-	private final static Log log = LogFactory.getLog(PersistenceManagerJcrPropertyTest.class);
+public class ObjectContentManagerJcrPropertyTest extends TestBase {
+	private final static Log log = LogFactory.getLog(ObjectContentManagerJcrPropertyTest.class);
 
 	/**
 	 * <p>Defines the test case name for junit.</p>
 	 * @param testName The test case name.
 	 */
-	public PersistenceManagerJcrPropertyTest(String testName) throws Exception {
+	public ObjectContentManagerJcrPropertyTest(String testName) throws Exception {
 		super(testName);
 
 	}
 
 	public static Test suite() {
 		// All methods starting with "test" will be executed in the test suite.
-		return new RepositoryLifecycleTestSetup(new TestSuite(PersistenceManagerJcrPropertyTest.class));
+		return new RepositoryLifecycleTestSetup(new TestSuite(ObjectContentManagerJcrPropertyTest.class));
 	}
 
 	public void tearDown() throws Exception {
@@ -61,7 +61,7 @@
 
 		try 
 		{
-			ObjectContentManager persistenceManager = this.getPersistenceManager();
+			ObjectContentManager ocm = this.getObjectContentManager();
 			//---------------------------------------------------------------------------------------------------------
 			// Insert without the mandatory field
 			//---------------------------------------------------------------------------------------------------------			
@@ -73,13 +73,13 @@
             
             try 
             {
-                 persistenceManager.insert(propertyTest);
+                 ocm.insert(propertyTest);
                  fail("Incorrect insert operation - the mandatory fields have no value");
             }
             catch(Exception e)
             {
                // Normal behaviour 	
-            	persistenceManager.refresh(false);
+            	ocm.refresh(false);
             }
             
 			//---------------------------------------------------------------------------------------------------------
@@ -87,13 +87,13 @@
 			//---------------------------------------------------------------------------------------------------------			
             propertyTest.setMandatoryProp("mandatoryValue");
             propertyTest.setMandatoryWithConstaintsProp("xx");
-            persistenceManager.insert(propertyTest);
-            persistenceManager.save();
+            ocm.insert(propertyTest);
+            ocm.save();
             
 			//---------------------------------------------------------------------------------------------------------
 			// Retrieve
 			//---------------------------------------------------------------------------------------------------------			
-            propertyTest = (PropertyTest) persistenceManager.getObject("/test");
+            propertyTest = (PropertyTest) ocm.getObject("/test");
             assertTrue("Invalid required property", propertyTest.getRequiredProp().equals("requiredPropValue"));
             assertTrue("Invalid required property with constraints", propertyTest.getRequiredWithConstraintsProp().equals("abc"));            
             assertTrue("Invalid autocreated property", propertyTest.getAutoCreatedProp().equals("aaa")); 
@@ -103,12 +103,12 @@
             //---------------------------------------------------------------------------------------------------------
 			// update the property requiredWithConstraintsProp with bad value
 			//---------------------------------------------------------------------------------------------------------			
-            propertyTest = (PropertyTest) persistenceManager.getObject("/test");
+            propertyTest = (PropertyTest) ocm.getObject("/test");
             propertyTest.setRequiredWithConstraintsProp("invalid value");
             try 
             {
-            	persistenceManager.update(propertyTest);
-            	persistenceManager.save();
+            	ocm.update(propertyTest);
+            	ocm.save();
             	fail("Invalid value was accepted for requiredWithConstraintsProp");
             }
             catch(Exception e)
@@ -119,12 +119,12 @@
             //---------------------------------------------------------------------------------------------------------
 			// update the property AutoCreatedWithConstraintsProp with bad value
 			//---------------------------------------------------------------------------------------------------------			
-            propertyTest = (PropertyTest) persistenceManager.getObject("/test");
+            propertyTest = (PropertyTest) ocm.getObject("/test");
             propertyTest.setAutoCreatedWithConstraintsProp("invalid value");
             try 
             {
-            	persistenceManager.update(propertyTest);
-            	persistenceManager.save();
+            	ocm.update(propertyTest);
+            	ocm.save();
             	fail("Invalid value was accepted for autoCreatedWithConstraintsProp ");
             }
             catch(Exception e)
@@ -136,12 +136,12 @@
             //---------------------------------------------------------------------------------------------------------
 			// update the property mandatoryWithConstaintsProp with bad value
 			//---------------------------------------------------------------------------------------------------------			
-            propertyTest = (PropertyTest) persistenceManager.getObject("/test");
+            propertyTest = (PropertyTest) ocm.getObject("/test");
             propertyTest.setMandatoryWithConstaintsProp("yy");
             try 
             {
-            	persistenceManager.update(propertyTest);
-            	persistenceManager.save();
+            	ocm.update(propertyTest);
+            	ocm.save();
             	fail("Invalid value was accepted for mandatoryWithConstaintsProp");
             }
             catch(Exception e)

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/AllTests.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/AllTests.java?view=diff&rev=548496&r1=548495&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/AllTests.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/AllTests.java Mon Jun 18 14:46:42 2007
@@ -34,9 +34,9 @@
     }
 
     public static Test buildSuite() {
-        TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.persistence.basic");
+        TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.manager.basic");
         //$JUnit-BEGIN$
-        suite.addTestSuite(PersistenceManagerLockTest.class);
+        suite.addTestSuite(ObjectContentManagerLockTest.class);
         //$JUnit-END$
 
         return suite;

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/ObjectContentManagerLockTest.java (from r548484, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/PersistenceManagerLockTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/ObjectContentManagerLockTest.java?view=diff&rev=548496&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/PersistenceManagerLockTest.java&r1=548484&p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/ObjectContentManagerLockTest.java&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/PersistenceManagerLockTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/ObjectContentManagerLockTest.java Mon Jun 18 14:46:42 2007
@@ -34,19 +34,19 @@
 import org.apache.jackrabbit.ocm.testmodel.Lockable;
 
 /**
- * Test Persistence Manager lock feature
+ * Test object content Manager lock feature
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class PersistenceManagerLockTest extends TestBase
+public class ObjectContentManagerLockTest extends TestBase
 {
-    private final static Log log = LogFactory.getLog(PersistenceManagerLockTest.class);
+    private final static Log log = LogFactory.getLog(ObjectContentManagerLockTest.class);
 
     /**
      * <p>Defines the test case name for junit.</p>
      * @param testName The test case name.
      */
-    public PersistenceManagerLockTest(String testName)  throws Exception
+    public ObjectContentManagerLockTest(String testName)  throws Exception
     {
         super(testName);
     }
@@ -55,7 +55,7 @@
     {
         // All methods starting with "test" will be executed in the test suite.
         return new RepositoryLifecycleTestSetup(
-                new TestSuite(PersistenceManagerLockTest.class));
+                new TestSuite(ObjectContentManagerLockTest.class));
     }
 
 
@@ -64,10 +64,10 @@
      */
     public void tearDown() throws Exception
     {
-    	if (getPersistenceManager().objectExists("/test"))
+    	if (getObjectContentManager().objectExists("/test"))
     	{
-    	   getPersistenceManager().remove("/test");
-    	   getPersistenceManager().save();
+    	   getObjectContentManager().remove("/test");
+    	   getObjectContentManager().save();
     	}
         super.tearDown();
     }
@@ -76,7 +76,7 @@
     {
         try
         {
-        	ObjectContentManager persistenceManager = getPersistenceManager();
+        	ObjectContentManager ocm = getObjectContentManager();
 
 
             // --------------------------------------------------------------------------------
@@ -110,59 +110,59 @@
             
             a.setCollection(collection);
             
-            persistenceManager.insert(a);
-            persistenceManager.save();
+            ocm.insert(a);
+            ocm.save();
             
 
             // --------------------------------------------------------------------------------
             // Get the object
             // --------------------------------------------------------------------------------           
-            a = (A) persistenceManager.getObject( "/test");
+            a = (A) ocm.getObject( "/test");
             assertNotNull("a is null", a);
             
             // --------------------------------------------------------------------------------
             // Check if the object is locked
             // --------------------------------------------------------------------------------
-            assertFalse("the object is locked", persistenceManager.isLocked("/test"));
+            assertFalse("the object is locked", ocm.isLocked("/test"));
             
             // --------------------------------------------------------------------------------
             // Lock the object
             // --------------------------------------------------------------------------------           
             
-            Lock lock = persistenceManager.lock("/test", true, false);
+            Lock lock = ocm.lock("/test", true, false);
             assertTrue("the Lock owner is not correct", lock.getLockOwner().equals("superuser"));
             
             // --------------------------------------------------------------------------------
             // Check if the object is locked
             // --------------------------------------------------------------------------------
-            assertTrue("the object is not locked", persistenceManager.isLocked("/test"));
+            assertTrue("the object is not locked", ocm.isLocked("/test"));
             
             // --------------------------------------------------------------------------------
             // Unlock the object
             // --------------------------------------------------------------------------------           
-            persistenceManager.unlock("/test", lock.getLockToken());
+            ocm.unlock("/test", lock.getLockToken());
 
             // --------------------------------------------------------------------------------
             // Check if the object is locked
             // --------------------------------------------------------------------------------
-            assertFalse("the object is locked", persistenceManager.isLocked("/test"));
+            assertFalse("the object is locked", ocm.isLocked("/test"));
 
             // --------------------------------------------------------------------------------
             // Lock & update 
             // --------------------------------------------------------------------------------
-            lock = persistenceManager.lock("/test", true, false);
-            a = (A) persistenceManager.getObject("/test");
+            lock = ocm.lock("/test", true, false);
+            a = (A) ocm.getObject("/test");
             a.setA1("new a1 Value");
-            persistenceManager.update(a);
-            persistenceManager.save();
-            persistenceManager.unlock("/test", lock.getLockToken());
+            ocm.update(a);
+            ocm.save();
+            ocm.unlock("/test", lock.getLockToken());
             
             
             // --------------------------------------------------------------------------------
             // Remove the object
             // --------------------------------------------------------------------------------           
-            persistenceManager.remove(a);
-            persistenceManager.save();
+            ocm.remove(a);
+            ocm.save();
             
         }
         catch (Exception e)
@@ -181,7 +181,7 @@
     {
         try
         {
-        	ObjectContentManager persistenceManager = getPersistenceManager();
+        	ObjectContentManager ocm = getObjectContentManager();
 
 
             // --------------------------------------------------------------------------------
@@ -191,60 +191,60 @@
             lockable.setPath("/test");
             lockable.setA1("a1");
             lockable.setA2("a2");
-            persistenceManager.insert(lockable);
-            persistenceManager.save();
+            ocm.insert(lockable);
+            ocm.save();
             
 
             // --------------------------------------------------------------------------------
             // Get the object
             // --------------------------------------------------------------------------------           
-            lockable = (Lockable) persistenceManager.getObject("/test");
+            lockable = (Lockable) ocm.getObject("/test");
             assertNotNull("a is null", lockable);
             
             // --------------------------------------------------------------------------------
             // Check if the object is locked
             // --------------------------------------------------------------------------------
-            assertFalse("the object is locked", persistenceManager.isLocked("/test"));
+            assertFalse("the object is locked", ocm.isLocked("/test"));
             assertNull("Attribute lockowner is not null", lockable.getLockOwner());
             // --------------------------------------------------------------------------------
             // Lock the object
             // --------------------------------------------------------------------------------                       
-            Lock lock = persistenceManager.lock("/test", true, false);
+            Lock lock = ocm.lock("/test", true, false);
             
             // --------------------------------------------------------------------------------
             // Check if the object is locked
             // --------------------------------------------------------------------------------
-            assertTrue("the object is not locked", persistenceManager.isLocked("/test"));
+            assertTrue("the object is not locked", ocm.isLocked("/test"));
             
             // --------------------------------------------------------------------------------
             // Unlock the object
             // --------------------------------------------------------------------------------           
-            persistenceManager.unlock("/test", lock.getLockToken());
+            ocm.unlock("/test", lock.getLockToken());
 
             // --------------------------------------------------------------------------------
             // Check if the object is locked
             // --------------------------------------------------------------------------------
-            assertFalse("the object is locked", persistenceManager.isLocked("/test"));
+            assertFalse("the object is locked", ocm.isLocked("/test"));
 
 
             // --------------------------------------------------------------------------------
             // Lock & update 
             // --------------------------------------------------------------------------------
-            lock = persistenceManager.lock("/test", true, false);
-            assertTrue("the object is not locked", persistenceManager.isLocked("/test"));
-            lockable = (Lockable) persistenceManager.getObject("/test");
+            lock = ocm.lock("/test", true, false);
+            assertTrue("the object is not locked", ocm.isLocked("/test"));
+            lockable = (Lockable) ocm.getObject("/test");
             assertNotNull("Attribute lockowner is null", lockable.getLockOwner());
             lockable.setA1("new a1 Value");
-            persistenceManager.update(lockable);
-            persistenceManager.save();
-            persistenceManager.unlock("/test", lock.getLockToken());
+            ocm.update(lockable);
+            ocm.save();
+            ocm.unlock("/test", lock.getLockToken());
             
             
             // --------------------------------------------------------------------------------
             // Remove the object
             // --------------------------------------------------------------------------------           
-            persistenceManager.remove(lockable);
-            persistenceManager.save();
+            ocm.remove(lockable);
+            ocm.save();
             
         }
         catch (Exception e)

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/AllTests.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/AllTests.java?view=diff&rev=548496&r1=548495&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/AllTests.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/AllTests.java Mon Jun 18 14:46:42 2007
@@ -34,7 +34,7 @@
     }
 
     public static Test buildSuite() {
-        TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.persistence.proxy");
+        TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.manager.proxy");
         //$JUnit-BEGIN$
         suite.addTestSuite(ProxyTest.class);
         

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/ProxyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/ProxyTest.java?view=diff&rev=548496&r1=548495&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/ProxyTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/ProxyTest.java Mon Jun 18 14:46:42 2007
@@ -63,7 +63,7 @@
 	public void testBeanProxy() {
 
 		try {
-			ObjectContentManager persistenceManager = this.getPersistenceManager();
+			ObjectContentManager ocm = this.getObjectContentManager();
 
 			Detail detail = new Detail();
 			detail.setField("FieldValue");			
@@ -76,14 +76,14 @@
 			main.setDetail(detail);
 			main.setProxyDetail(proxyDetail);
 							
-            persistenceManager.insert(main);
-			persistenceManager.save();
+            ocm.insert(main);
+			ocm.save();
 			
 			
 			//---------------------------------------------------------------------------------------------------------
 			// Retrieve the main object
 			//---------------------------------------------------------------------------------------------------------						
-			main = (Main) persistenceManager.getObject( "/test");
+			main = (Main) ocm.getObject( "/test");
 			assertNotNull("detail is null", main.getDetail());
 			assertTrue("Invalid detail bean", main.getDetail().getField().equals("FieldValue"));
 
@@ -108,14 +108,14 @@
 			main.setDetail(detail);
 			main.setProxyDetail(proxyDetail);
 			
-			persistenceManager.update(main);
-			persistenceManager.save();
+			ocm.update(main);
+			ocm.save();
 
 			//---------------------------------------------------------------------------------------------------------
 			// Retrieve the main object
 			//---------------------------------------------------------------------------------------------------------						
 
-			main = (Main) persistenceManager.getObject( "/test");
+			main = (Main) ocm.getObject( "/test");
 			assertNotNull("detail is null", main.getDetail());
 			assertTrue("Invalid detail bean", main.getDetail().getField().equals("AnotherFieldValue"));
 
@@ -138,7 +138,7 @@
 	public void testCollectionProxy() {
 
 		try {
-			ObjectContentManager persistenceManager = this.getPersistenceManager();
+			ObjectContentManager ocm = this.getObjectContentManager();
 
 			ArrayList  details= new ArrayList();
 			for(int i=1; i<=100;i++)
@@ -151,14 +151,14 @@
 			Main main = new Main();
 			main.setProxyCollection(details);
 			main.setPath("/test");							
-            persistenceManager.insert(main);
-			persistenceManager.save();
+            ocm.insert(main);
+			ocm.save();
 			
 			
 			//---------------------------------------------------------------------------------------------------------
 			// Retrieve the main object
 			//---------------------------------------------------------------------------------------------------------						
-			main = (Main) persistenceManager.getObject( "/test");
+			main = (Main) ocm.getObject( "/test");
 			assertNotNull("main is null", main);
 
             Collection result = main.getProxyCollection();
@@ -173,13 +173,13 @@
 			detail.setField("newFieldValue");			
 			result.add(detail);
 			main.setProxyCollection(result);
-			persistenceManager.update(main);
-			persistenceManager.save();
+			ocm.update(main);
+			ocm.save();
 
 			//---------------------------------------------------------------------------------------------------------
 			// Retrieve the main object
 			//---------------------------------------------------------------------------------------------------------						
-			main = (Main) persistenceManager.getObject("/test");
+			main = (Main) ocm.getObject("/test");
 			assertNotNull("main  is null", main);
             assertEquals("Invalide size",main.getProxyCollection().size(), 101);
             assertNull("nullcollectionproxy  is not null", main.getNullProxyCollection());

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/AllTests.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/AllTests.java?view=diff&rev=548496&r1=548495&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/AllTests.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/AllTests.java Mon Jun 18 14:46:42 2007
@@ -34,13 +34,13 @@
     }
 
     public static Test buildSuite() {
-        TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.persistence.query");
+        TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.manager.query");
         //$JUnit-BEGIN$
-        suite.addTestSuite(PersistenceManagerAtomicQueryTest.class);
-        suite.addTestSuite(PersistenceManagerIteratorQueryTest.class);
-        suite.addTestSuite(PersistenceManagerMultiValueQueryTest.class);
-        suite.addTestSuite(PersistenceManagerScopeQueryTest.class);
-        suite.addTestSuite(PersistenceManagerSimpleQueryTest.class);
+        suite.addTestSuite(ObjectContentManagerAtomicQueryTest.class);
+        suite.addTestSuite(ObjectContentManagerIteratorQueryTest.class);
+        suite.addTestSuite(ObjectContentManagerMultiValueQueryTest.class);
+        suite.addTestSuite(ObjectContentManagerScopeQueryTest.class);
+        suite.addTestSuite(ObjectContentManagerSimpleQueryTest.class);
         
         //$JUnit-END$
 

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java (from r548484, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/PersistenceManagerAtomicQueryTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java?view=diff&rev=548496&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/PersistenceManagerAtomicQueryTest.java&r1=548484&p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/PersistenceManagerAtomicQueryTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java Mon Jun 18 14:46:42 2007
@@ -40,16 +40,16 @@
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class PersistenceManagerAtomicQueryTest extends TestBase
+public class ObjectContentManagerAtomicQueryTest extends TestBase
 {
-	private final static Log log = LogFactory.getLog(PersistenceManagerAtomicQueryTest.class);
+	private final static Log log = LogFactory.getLog(ObjectContentManagerAtomicQueryTest.class);
 	private Date date = new Date();
 	
 	/**
 	 * <p>Defines the test case name for junit.</p>
 	 * @param testName The test case name.
 	 */
-	public PersistenceManagerAtomicQueryTest(String testName) throws Exception
+	public ObjectContentManagerAtomicQueryTest(String testName) throws Exception
 	{
 		super(testName);
 		
@@ -58,7 +58,7 @@
 	public static Test suite()
 	{
 		// All methods starting with "test" will be executed in the test suite.
-		return new RepositoryLifecycleTestSetup(new TestSuite(PersistenceManagerAtomicQueryTest.class));
+		return new RepositoryLifecycleTestSetup(new TestSuite(ObjectContentManagerAtomicQueryTest.class));
 	}
 	
     
@@ -77,7 +77,7 @@
 		{
 			
 			this.importData(date);
-			ObjectContentManager persistenceManager = this.getPersistenceManager();
+			ObjectContentManager ocm = this.getObjectContentManager();
 			
 			// Test Boolean value 
 			QueryManager queryManager = this.getQueryManager();
@@ -86,7 +86,7 @@
 			Query query = queryManager.createQuery(filter);
 			
 			long start = System.currentTimeMillis();
-			Collection result = persistenceManager.getObjects(query);
+			Collection result = ocm.getObjects(query);
 			System.out.println("getObjects  : " + (System.currentTimeMillis() - start));
 			
 			assertTrue("Invalid number of objects - should be = 50", result.size() == 50);
@@ -96,7 +96,7 @@
 			query = queryManager.createQuery(filter);
 
 			start = System.currentTimeMillis();
-			result = persistenceManager.getObjects(query);
+			result = ocm.getObjects(query);
 			System.out.println("getObjects 2 : " + (System.currentTimeMillis() - start));
 			assertTrue("Invalid number of objects - should be = 0", result.size() == 0);
 			
@@ -106,14 +106,14 @@
 			filter.addBetween("integerObject", new Integer(0), new Integer(500));
 			query = queryManager.createQuery(filter);
 			
-			result = persistenceManager.getObjects(query);			
+			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 5", result.size() == 5);
 			
 			filter = queryManager.createFilter(Atomic.class);
 			filter.addLessOrEqualThan("intPrimitive", new Integer(236));
 			query = queryManager.createQuery(filter);
 			
-			result = persistenceManager.getObjects(query);			
+			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 36", result.size() == 36);
 
 			
@@ -124,7 +124,7 @@
 			filter.addLessThan("calendar", calendar);
 			query = queryManager.createQuery(filter);
 			
-			result = persistenceManager.getObjects(query);			
+			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 100 ", result.size() == 100);
 
 			filter = queryManager.createFilter(Atomic.class);
@@ -133,28 +133,28 @@
 			filter.addLessThan("calendar", calendar);
 			query = queryManager.createQuery(filter);
 			
-			result = persistenceManager.getObjects(query);			
+			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 0 ", result.size() == 0);
 			
 			filter = queryManager.createFilter(Atomic.class);			
 			filter.addEqualTo("date", date);
 			query = queryManager.createQuery(filter);
 			
-			result = persistenceManager.getObjects(query);			
+			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 100 ", result.size() == 100);
 
 			filter = queryManager.createFilter(Atomic.class);			
 			filter.addBetween("date", date, new Date());
 			query = queryManager.createQuery(filter);
 			
-			result = persistenceManager.getObjects(query);			
+			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 100 ", result.size() == 100);
 
 			filter = queryManager.createFilter(Atomic.class);			
 			filter.addGreaterThan("date", date);
 			query = queryManager.createQuery(filter);
 			
-			result = persistenceManager.getObjects(query);			
+			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 0 ", result.size() == 0);
 
 			// Test contains method
@@ -162,21 +162,21 @@
 			filter.addContains(".", "JCR");
 			query = queryManager.createQuery(filter);
 			
-			result = persistenceManager.getObjects(query);			
+			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 50 ", result.size() == 50);
 			
 			filter = queryManager.createFilter(Atomic.class);			
 			filter.addContains("byteArray", "ocm");
 			query = queryManager.createQuery(filter);
 			
-			result = persistenceManager.getObjects(query);			
+			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 50 ", result.size() == 50);
 			
 			filter = queryManager.createFilter(Atomic.class);			
 			filter.addContains("byteArray", "String");
 			query = queryManager.createQuery(filter);
 			
-			result = persistenceManager.getObjects(query);			
+			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 0 ", result.size() == 0);
 
 
@@ -195,7 +195,7 @@
 		try
 		{
 
-			ObjectContentManager persistenceManager = getPersistenceManager();
+			ObjectContentManager ocm = getObjectContentManager();
 			
 			for (int i = 1; i <= 100; i++)
 			{
@@ -224,11 +224,11 @@
 					 a.setByteArray("This is small object stored in the ocm repository".getBytes());
 					 a.setInputStream(new ByteArrayInputStream("Another Stream".getBytes()));
 				}
-				persistenceManager.insert(a);
+				ocm.insert(a);
 				
 				
 			}
-			persistenceManager.save();
+			ocm.save();
 
 		}
 		catch (Exception e)

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerIteratorQueryTest.java (from r548484, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/PersistenceManagerIteratorQueryTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerIteratorQueryTest.java?view=diff&rev=548496&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/PersistenceManagerIteratorQueryTest.java&r1=548484&p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerIteratorQueryTest.java&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/PersistenceManagerIteratorQueryTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerIteratorQueryTest.java Mon Jun 18 14:46:42 2007
@@ -33,7 +33,7 @@
 import org.apache.jackrabbit.ocm.TestBase;
 import org.apache.jackrabbit.ocm.exception.JcrMappingException;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
-import org.apache.jackrabbit.ocm.manager.impl.PersistenceManagerImpl;
+import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
 import org.apache.jackrabbit.ocm.query.Filter;
 import org.apache.jackrabbit.ocm.query.Query;
 import org.apache.jackrabbit.ocm.query.QueryManager;
@@ -46,15 +46,15 @@
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class PersistenceManagerIteratorQueryTest extends TestBase
+public class ObjectContentManagerIteratorQueryTest extends TestBase
 {
-    private final static Log log = LogFactory.getLog(PersistenceManagerIteratorQueryTest.class);
+    private final static Log log = LogFactory.getLog(ObjectContentManagerIteratorQueryTest.class);
 
     /**
      * <p>Defines the test case name for junit.</p>
      * @param testName The test case name.
      */
-    public PersistenceManagerIteratorQueryTest(String testName)  throws Exception
+    public ObjectContentManagerIteratorQueryTest(String testName)  throws Exception
     {
         super(testName);
     }
@@ -63,7 +63,7 @@
     {
         // All methods starting with "test" will be executed in the test suite.
         return new RepositoryLifecycleTestSetup(
-                new TestSuite(PersistenceManagerIteratorQueryTest.class));
+                new TestSuite(ObjectContentManagerIteratorQueryTest.class));
     }
 
     /**
@@ -78,12 +78,12 @@
     
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().objectExists("/test"))
+        if (getObjectContentManager().objectExists("/test"))
         {
-            getPersistenceManager().remove("/test");
+            getObjectContentManager().remove("/test");
             
         }    
-        getPersistenceManager().save();
+        getObjectContentManager().save();
         super.tearDown();
     }	
     
@@ -101,18 +101,18 @@
     	      QueryManager queryManager = this.getQueryManager();
     	      Filter filter = queryManager.createFilter(Page.class);        	      
     	      Query query = queryManager.createQuery(filter);    	      
-    	      ObjectContentManager persistenceManager = this.getPersistenceManager();
+    	      ObjectContentManager ocm = this.getObjectContentManager();
     	      
     	      long  start = System.currentTimeMillis();
-    	      Iterator iterator = persistenceManager.getObjectIterator(query);
+    	      Iterator iterator = ocm.getObjectIterator(query);
     	      System.out.println("getObject takes : " + (System.currentTimeMillis() - start));
     	          	      
     	      start = System.currentTimeMillis();
-    	      Collection result = persistenceManager.getObjects(query);
+    	      Collection result = ocm.getObjects(query);
     	      System.out.println("getObject takes : " + (System.currentTimeMillis() - start));   
     	      
     	      start = System.currentTimeMillis();
-    	      iterator = persistenceManager.getObjectIterator(query);
+    	      iterator = ocm.getObjectIterator(query);
     	      System.out.println("getObject takes : " + (System.currentTimeMillis() - start));       	      
 
     	      
@@ -131,16 +131,16 @@
         
     	try
 		{
-    		ObjectContentManager persistenceManager = getPersistenceManager();
+    		ObjectContentManager ocm = getObjectContentManager();
     		
-        	if (persistenceManager.objectExists("/test"))
+        	if (ocm.objectExists("/test"))
             {
-                persistenceManager.remove("/test");
+                ocm.remove("/test");
             }
         	
-			PersistenceManagerImpl persistenceManagerImpl = (PersistenceManagerImpl) persistenceManager;
+			ObjectContentManagerImpl ocmImpl = (ObjectContentManagerImpl) ocm;
 			
-			Session session = persistenceManagerImpl.getSession();
+			Session session = ocmImpl.getSession();
 			Node root = session.getRootNode();
 			root.addNode("test");
 			root.addNode("test/node1");
@@ -160,7 +160,7 @@
 			paragraphs.add(new Paragraph("Another Para "));
 			page.setParagraphs(paragraphs);
 			
-			persistenceManager.insert(page);
+			ocm.insert(page);
 						
 			
 			page = new Page();
@@ -175,7 +175,7 @@
 			paragraphs.add(new Paragraph("Another Para"));
 			page.setParagraphs(paragraphs);
 			
-			persistenceManager.insert(page);
+			ocm.insert(page);
 			
 			page = new Page();
 			page.setPath("/test/node2/page1");
@@ -189,7 +189,7 @@
 			paragraphs.add(new Paragraph("Another Para"));
 			page.setParagraphs(paragraphs);
 			
-			persistenceManager.insert(page);
+			ocm.insert(page);
 
 			page = new Page();
 			page.setPath("/test/node2/page2");
@@ -203,9 +203,9 @@
 			paragraphs.add(new Paragraph("Another Para"));
 			page.setParagraphs(paragraphs);
 			
-			persistenceManager.insert(page);
+			ocm.insert(page);
 			
-			persistenceManager.save();
+			ocm.save();
 			
 
 			

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerMultiValueQueryTest.java (from r548484, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/PersistenceManagerMultiValueQueryTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerMultiValueQueryTest.java?view=diff&rev=548496&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/PersistenceManagerMultiValueQueryTest.java&r1=548484&p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerMultiValueQueryTest.java&r2=548496
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/PersistenceManagerMultiValueQueryTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerMultiValueQueryTest.java Mon Jun 18 14:46:42 2007
@@ -30,7 +30,7 @@
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
 import org.apache.jackrabbit.ocm.TestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
-import org.apache.jackrabbit.ocm.manager.impl.PersistenceManagerImpl;
+import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
 import org.apache.jackrabbit.ocm.query.Filter;
 import org.apache.jackrabbit.ocm.query.Query;
 import org.apache.jackrabbit.ocm.query.QueryManager;
@@ -41,15 +41,15 @@
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class PersistenceManagerMultiValueQueryTest extends TestBase
+public class ObjectContentManagerMultiValueQueryTest extends TestBase
 {
-    private final static Log log = LogFactory.getLog(PersistenceManagerMultiValueQueryTest.class);
+    private final static Log log = LogFactory.getLog(ObjectContentManagerMultiValueQueryTest.class);
 
     /**
      * <p>Defines the test case name for junit.</p>
      * @param testName The test case name.
      */
-    public PersistenceManagerMultiValueQueryTest(String testName)  throws Exception
+    public ObjectContentManagerMultiValueQueryTest(String testName)  throws Exception
     {
         super(testName);
     }
@@ -58,7 +58,7 @@
     {
         // All methods starting with "test" will be executed in the test suite.
         return new RepositoryLifecycleTestSetup(
-                new TestSuite(PersistenceManagerMultiValueQueryTest.class));
+                new TestSuite(ObjectContentManagerMultiValueQueryTest.class));
     }
 
     /**
@@ -73,12 +73,12 @@
     
     public void tearDown() throws Exception
     {
-        if (getPersistenceManager().objectExists("/test"))
+        if (getObjectContentManager().objectExists("/test"))
         {
-            getPersistenceManager().remove("/test");
+            getObjectContentManager().remove("/test");
             
         }    
-        getPersistenceManager().save();
+        getObjectContentManager().save();
         super.tearDown();
     }	
     
@@ -91,16 +91,16 @@
 	      Filter filter = queryManager.createFilter(MultiValue.class);    
 	      filter.addEqualTo("multiValues", "Value1");
 	      Query query = queryManager.createQuery(filter);    	      
-	      ObjectContentManager persistenceManager = this.getPersistenceManager();
-	      Collection result = persistenceManager.getObjects(query);
+	      ObjectContentManager ocm = this.getObjectContentManager();
+	      Collection result = ocm.getObjects(query);
 	      assertTrue("Invalid number of objects - should be = 3", result.size() == 3);            
           
   	      queryManager = this.getQueryManager();
 	      filter = queryManager.createFilter(MultiValue.class);    
 	      filter.addEqualTo("multiValues", "Value9");
 	      query = queryManager.createQuery(filter);    	      
-	      persistenceManager = this.getPersistenceManager();
-	      result = persistenceManager.getObjects(query);
+	      ocm = this.getObjectContentManager();
+	      result = ocm.getObjects(query);
 	      assertTrue("Invalid number of objects - should be = 1", result.size() == 1);
 	      MultiValue multiValue = (MultiValue)result.iterator().next();
 	      assertTrue("Incorrect MultiValue found ", multiValue.getName().equals("m3"));
@@ -119,11 +119,11 @@
     {
         try
         {
-        	ObjectContentManager persistenceManager = getPersistenceManager();
+        	ObjectContentManager ocm = getObjectContentManager();
 
-			PersistenceManagerImpl persistenceManagerImpl = (PersistenceManagerImpl) persistenceManager;
+			ObjectContentManagerImpl ocmImpl = (ObjectContentManagerImpl) ocm;
 			
-			Session session = persistenceManagerImpl.getSession();
+			Session session = ocmImpl.getSession();
 			Node root = session.getRootNode();
 			root.addNode("test");
 
@@ -136,7 +136,7 @@
             values.add("Value3");
             values.add("Value4");
             multiValue.setMultiValues(values);
-            persistenceManager.insert(multiValue);
+            ocm.insert(multiValue);
             
             multiValue = new MultiValue();
             multiValue.setPath("/test/m2");
@@ -147,7 +147,7 @@
             values.add("Value6");
             values.add("Value7");            
             multiValue.setMultiValues(values);
-            persistenceManager.insert(multiValue);
+            ocm.insert(multiValue);
             
             multiValue = new MultiValue();
             multiValue.setPath("/test/m3");
@@ -159,9 +159,9 @@
             values.add("Value9");
             
             multiValue.setMultiValues(values);
-            persistenceManager.insert(multiValue);
+            ocm.insert(multiValue);
                                    
-            persistenceManager.save();
+            ocm.save();
             
         }
         catch(Exception e)



Mime
View raw message