jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r580157 [1/2] - in /jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src: main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/ main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/ main/java/org/apache/jackrabbit/ocm/m...
Date Thu, 27 Sep 2007 21:15:11 GMT
Author: clombart
Date: Thu Sep 27 14:15:06 2007
New Revision: 580157

URL: http://svn.apache.org/viewvc?rev=580157&view=rev
Log:
- Bug fixes in the annotation mapper impl.
- Use similar unit tests and the same test content model for the annotation support. 
- Reorganise the unit units and rename some classes

This work is still in progress. 

Added:
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AbstractTestBase.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AnnotationTestBase.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/DigesterTestBase.java
      - copied, changed from r578997, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/TestBase.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationAtomicTest.java
      - copied, changed from r578593, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AtomicTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationDefaultValueTest.java
      - copied, changed from r578593, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DefaultValueTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationNullAtomicTest.java
      - copied, changed from r578593, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/NullAtomicTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterAtomicTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterDefaultValueTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterNullAtomicTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/CmsObject.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/Content.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/Document.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/Folder.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/impl/
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/impl/CmsObjectImpl.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/impl/ContentImpl.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/impl/DocumentImpl.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/impl/DocumentStream.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/auto/impl/FolderImpl.java
Removed:
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/TestBase.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AtomicTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DefaultValueTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/NullAtomicTest.java
Modified:
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationDescriptorReader.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationMapperImpl.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterDescriptorReader.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/model/MappingDescriptor.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AllTests.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AllTests.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/auto/ObjectContentManagerAutoTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerAvoidRecursiveLoopTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerCopyMoveTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerRemoveTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerSameNameSiblingTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/BeanDescriptorTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ArrayListTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DefaultCollectionConverterImplTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/HashMapTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/MultiValueCollectionConverterImplTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/NTCollectionConverterImplTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ResidualNodesCollectionConverterImplTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ResidualPropertiesCollectionConverterImplTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/ObjectContentManagerInheritanceConcreteClassTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/inheritance/ObjectContentManagerInheritanceHierarchyTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ObjectContentManagerInterfaceConcreteClassTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/interfaces/ObjectContentManagerInterfaceHierarchyTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/ObjectContentManagerJcrNodeTypeTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/jcrnodetype/ObjectContentManagerJcrPropertyTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/lock/ObjectContentManagerLockTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/proxy/ProxyTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerIteratorQueryTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerMultiValueQueryTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerScopeQueryTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerSimpleQueryTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/uuid/ObjectContentManagerUuidTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/version/ObjectContentManagerBasicVersionningTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/querymanager/QueryManagerTest.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/Atomic.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/testmodel/Default.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/test-config/jcrmapping-auto.xml

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationDescriptorReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationDescriptorReader.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationDescriptorReader.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationDescriptorReader.java Thu Sep 27 14:15:06 2007
@@ -22,17 +22,12 @@
 import java.beans.PropertyDescriptor;
 import java.util.List;
 
-import org.apache.jackrabbit.ocm.mapper.impl.annotation.Bean;
-import org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection;
-import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
-import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
 import org.apache.jackrabbit.ocm.mapper.DescriptorReader;
 import org.apache.jackrabbit.ocm.mapper.model.BeanDescriptor;
 import org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor;
 import org.apache.jackrabbit.ocm.mapper.model.CollectionDescriptor;
 import org.apache.jackrabbit.ocm.mapper.model.FieldDescriptor;
 import org.apache.jackrabbit.ocm.mapper.model.MappingDescriptor;
-import org.apache.jackrabbit.ocm.reflection.ReflectionUtils;
 
 /**
  * Helper class that reads the xml mapping file and load all class descriptors into memory (object graph)
@@ -42,8 +37,8 @@
  */
 public class AnnotationDescriptorReader implements DescriptorReader
 {
-	List<String> annotatedClassNames;
-    public AnnotationDescriptorReader(List<String> annotatedClassNames)
+	List<Class> annotatedClassNames;
+    public AnnotationDescriptorReader(List<Class> annotatedClassNames)
     {
    	     this.annotatedClassNames = annotatedClassNames;
     }
@@ -53,8 +48,8 @@
     public MappingDescriptor loadClassDescriptors()
 	{
 		MappingDescriptor mappingDescriptor = new MappingDescriptor();	
-		for (String className : annotatedClassNames) {
-			Class clazz = ReflectionUtils.forName(className);
+		for (Class clazz : annotatedClassNames) {
+			
 			ClassDescriptor classDescriptor = buildClassDescriptor(mappingDescriptor, clazz);
 			mappingDescriptor.addClassDescriptor(classDescriptor);
 		}
@@ -68,9 +63,21 @@
 		ClassDescriptor descriptor = new ClassDescriptor();
 		descriptor.setClassName(clazz.getName());
 		descriptor.setJcrType(annotationNode.jcrType());
-		descriptor.setJcrSuperTypes(annotationNode.jcrSuperTypes());		
-		descriptor.setJcrMixinTypes(annotationNode.jcrMixinTypes());
-		descriptor.setExtend(annotationNode.extend());		
+		if (annotationNode.jcrSuperTypes() != null && ! annotationNode.jcrSuperTypes().equals(""))
+		{
+		     descriptor.setJcrSuperTypes(annotationNode.jcrSuperTypes());
+		}
+		
+		if (annotationNode.jcrMixinTypes() != null && ! annotationNode.jcrMixinTypes().equals(""))
+		{		
+		     descriptor.setJcrMixinTypes(annotationNode.jcrMixinTypes());
+		}
+		
+		if (annotationNode.extend() != null && ! annotationNode.extend().equals(""))
+		{
+		     descriptor.setExtend(annotationNode.extend());
+		}
+		
 		descriptor.setAbstract(annotationNode.isAbstract());
 		descriptor.setInterface(clazz.isInterface());
 		
@@ -203,15 +210,33 @@
 				fieldDescriptor.setPath(jcrProperty.path());
 				fieldDescriptor.setUuid(jcrProperty.uuid());
 				
-				// It is not possible to set a null value into a annotation attribute.
-				// If the converter == Object.class, it shoudl be considered as null
+				// It is not possible to set a null value into an annotation attribute.
+				// If the converter == Object.class, it should be considered as null
 				if (! jcrProperty.converter().equals(Object.class))
 				{
 				    fieldDescriptor.setConverter(jcrProperty.converter().getName());
 				}
-				fieldDescriptor.setJcrDefaultValue(jcrProperty.jcrDefaultValue());			
-				fieldDescriptor.setJcrValueConstraints(jcrProperty.jcrDefaultValue());
-				fieldDescriptor.setJcrType(jcrProperty.jcrType());
+				
+				// It is not possible to set a null value into an annotation attribute.
+				// If the jcrDefaultValue value is an empty string => it should be considered as null
+				if ((jcrProperty.jcrDefaultValue() != null) && (!jcrProperty.jcrDefaultValue().equals("")))
+				{
+				     fieldDescriptor.setJcrDefaultValue(jcrProperty.jcrDefaultValue());
+				}
+				
+				// It is not possible to set a null value into an annotation attribute.
+				// If the jcrValueConstraints value is an empty string => it should be considered as null
+				if ((jcrProperty.jcrValueConstraints() != null) && (!jcrProperty.jcrValueConstraints().equals("")))
+				{	
+				     fieldDescriptor.setJcrValueConstraints(jcrProperty.jcrValueConstraints());
+				}
+				
+				// It is not possible to set a null value into an annotation attribute.
+				// If the jcrProperty value is an empty string => it should be considered as null
+				if ((jcrProperty.jcrType() != null) && (!jcrProperty.jcrType().equals("")))
+				{
+				    fieldDescriptor.setJcrType(jcrProperty.jcrType());
+				}
 				
 				fieldDescriptor.setJcrAutoCreated(jcrProperty.jcrAutoCreated());
 				fieldDescriptor.setJcrMandatory(jcrProperty.jcrMandatory());

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationMapperImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationMapperImpl.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationMapperImpl.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/annotation/AnnotationMapperImpl.java Thu Sep 27 14:15:06 2007
@@ -31,7 +31,7 @@
 public class AnnotationMapperImpl extends AbstractMapperImpl implements Mapper {
 
 	
-	public AnnotationMapperImpl(List<String> annotatedClassNames)
+	public AnnotationMapperImpl(List<Class> annotatedClassNames)
 	{		
         descriptorReader = new AnnotationDescriptorReader(annotatedClassNames);
         this.buildMapper();

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterDescriptorReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterDescriptorReader.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterDescriptorReader.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/impl/digester/DigesterDescriptorReader.java Thu Sep 27 14:15:06 2007
@@ -117,6 +117,7 @@
 			for (Iterator iter = configFileStreams.iterator(); iter.hasNext();) 
 			{
 				InputStream xmlMappingDescriptorFile = (InputStream) iter.next();
+				
 				Digester digester = new Digester();
 				digester.setValidating(this.validating);
 				if (null != this.dtdResolver) 

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/model/MappingDescriptor.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/model/MappingDescriptor.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/model/MappingDescriptor.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/model/MappingDescriptor.java Thu Sep 27 14:15:06 2007
@@ -19,7 +19,6 @@
 
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.commons.logging.Log;
@@ -56,6 +55,12 @@
      */
     public void addClassDescriptor(ClassDescriptor classDescriptor) {
     	
+    	
+    	if (classDescriptorsByClassName.get(classDescriptor.getClassName()) != null)
+    	{
+    	    log.warn("Duplicate classdescriptor for : " + classDescriptor.getClassName() + ". The mapping setting will be overriden");	
+    	}
+    	
         log.debug("Adding the class descriptor for : " + classDescriptor.getClassName());	
         if (null != this.packageName && !"".equals(this.packageName)) {
             classDescriptor.setClassName(this.packageName + "." + classDescriptor.getClassName());
@@ -69,9 +74,14 @@
         
         if (null != classDescriptor.getJcrType() && !  "".equals(classDescriptor.getJcrType()) && 
         		 ! ManagerConstant.NT_UNSTRUCTURED.equals(classDescriptor.getJcrType()))
-        	 {
-             classDescriptorsByNodeType.put(classDescriptor.getJcrType(), classDescriptor);	
-        	 }
+        {
+        	if ((classDescriptorsByNodeType.get(classDescriptor.getClassName()) != null) &&
+        		classDescriptor.usesNodeTypePerConcreteClassStrategy()	)
+        	{
+        	    log.warn("Duplicate classdescriptor for node type : " + classDescriptor.getJcrType());	
+        	}
+            classDescriptorsByNodeType.put(classDescriptor.getJcrType(), classDescriptor);	
+        }
         classDescriptor.setMappingDescriptor(this);
     }
 

Added: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AbstractTestBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AbstractTestBase.java?rev=580157&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AbstractTestBase.java (added)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AbstractTestBase.java Thu Sep 27 14:15:06 2007
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.ocm;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.Iterator;
+
+import javax.jcr.ImportUUIDBehavior;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Repository;
+import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.Workspace;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.nodetype.NodeTypeManager;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
+import org.apache.jackrabbit.core.nodetype.NodeTypeDef;
+import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
+import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader;
+import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
+import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
+import org.apache.jackrabbit.ocm.mapper.Mapper;
+import org.apache.jackrabbit.ocm.query.QueryManager;
+import org.apache.jackrabbit.ocm.reflection.ReflectionUtils;
+import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
+import org.xml.sax.ContentHandler;
+
+/**
+ * Base class for testcases. Provides priviledged access to the jcr test
+ * repository.
+ * 
+ * @author <a href="mailto:okiessler@apache.org">Oliver Kiessler</a>
+ * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
+ * @version $Id: Exp $
+ */
+public abstract class AbstractTestBase extends TestCase
+{
+
+	protected final static Log log = LogFactory.getLog(AbstractTestBase.class);
+	
+	protected Session session;
+
+	protected ObjectContentManager ocm;
+
+	protected Mapper mapper;
+    
+    protected boolean isInit = false;
+
+	/**
+	 * <p>
+	 * Defines the test case name for junit.
+	 * </p>
+	 * 
+	 * @param testName
+	 *            The test case name.
+	 */
+	public AbstractTestBase(String testName)
+	{
+		super(testName);
+	}
+
+	/**
+	 * Setting up the testcase.
+	 * 
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception
+	{
+		try {
+			super.setUp();
+	        
+	        if (!isInit) {
+	            initObjectContentManager();
+	            RepositoryUtil.setupSession(getSession());
+	            registerNodeTypes(getSession());
+	            isInit = true;
+	        }
+			
+		}
+		catch (Exception e )
+		{
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	public void tearDown() throws Exception
+	{
+		super.tearDown();
+	}
+
+	/**
+	 * Getter for property ocm.
+	 * 
+	 * @return jcrSession
+	 */
+	public ObjectContentManager getObjectContentManager()
+	{
+		try
+		{
+			if (ocm == null)
+			{
+				initObjectContentManager();
+				RepositoryUtil.setupSession(getSession());
+                registerNodeTypes(getSession());
+			}
+			return ocm;
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+	protected abstract void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException;
+	
+    protected void registerNodeTypes(Session session) 
+    throws InvalidNodeTypeDefException, javax.jcr.RepositoryException, IOException {
+        InputStream xml = new FileInputStream(
+                "./src/test/test-config/nodetypes/custom_nodetypes.xml");
+
+        // HINT: throws InvalidNodeTypeDefException, IOException
+        NodeTypeDef[] types = NodeTypeReader.read(xml);
+
+        Workspace workspace = session.getWorkspace();
+        NodeTypeManager ntMgr = workspace.getNodeTypeManager();
+        NodeTypeRegistry ntReg = ((NodeTypeManagerImpl) ntMgr).getNodeTypeRegistry();
+
+        for (int j = 0; j < types.length; j++) {
+            NodeTypeDef def = types[j];
+
+            try {
+                ntReg.getNodeTypeDef(def.getName());
+            }
+            catch (NoSuchNodeTypeException nsne) {
+                // HINT: if not already registered than register custom node type
+                ntReg.registerNodeType(def);
+            }
+
+        }
+    }
+   
+
+	public void exportDocument(String filePath, String nodePath, boolean skipBinary, boolean noRecurse)
+	{
+		try
+		{
+			BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(filePath));
+			ContentHandler handler = new org.apache.xml.serialize.XMLSerializer(os, null).asContentHandler();
+			session.exportDocumentView(nodePath, handler, skipBinary, noRecurse);
+			os.flush();
+			os.close();
+		}
+		catch (Exception e)
+		{
+			System.out.println("Impossible to export the content from : " + nodePath);
+			e.printStackTrace();
+		}
+	}
+
+	public void importDocument(String filePath, String nodePath)
+	{
+		try
+		{
+			BufferedInputStream is = new BufferedInputStream(new FileInputStream(filePath));
+			session.importXML(nodePath, is, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
+			session.save();
+			is.close();
+		}
+		catch (Exception e)
+		{
+			System.out.println("Impossible to import the content from : " + nodePath);
+			e.printStackTrace();
+		}
+
+	}
+
+	protected Session getSession()
+	{
+		return this.session;
+	}
+
+	public QueryManager getQueryManager()
+	{
+		return ocm.getQueryManager();
+	}
+	
+    protected boolean contains(Collection result, String path, Class objectClass)
+    {
+            Iterator iterator = result.iterator();
+            while (iterator.hasNext())
+            {
+                Object  object = iterator.next();
+                String itemPath = (String)  ReflectionUtils.getNestedProperty(object, "path");
+                if (itemPath.equals(path))
+                {
+                    if (object.getClass() == objectClass)
+                    {
+                       return true;	
+                    }
+                    else
+                    {
+                    	   return false;
+                    }
+ 
+                }
+            }
+            return false;
+    }
+
+	
+	protected  void cleanUpRepisotory() 
+	{
+		try 
+		{
+				Session session = this.getSession();		
+				NodeIterator nodeIterator = session.getRootNode().getNodes();
+		
+				while (nodeIterator.hasNext())
+				{
+					Node node = nodeIterator.nextNode();
+					if (! node.getName().startsWith("jcr:"))
+					{
+					    log.debug("tearDown - remove : " + node.getPath());
+					    node.remove();
+					}
+				}
+				session.save();
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+		}
+	}
+
+
+}
\ No newline at end of file

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AllTests.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AllTests.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AllTests.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AllTests.java Thu Sep 27 14:15:06 2007
@@ -33,7 +33,7 @@
 
     public static Test buildSuite() throws Exception {
         TestSuite suite= new TestSuite("Jackrabbit OCM Tests");
-        suite.addTest(org.apache.jackrabbit.ocm.mapper.AllTests.buildSuite());     
+             
         suite.addTest(org.apache.jackrabbit.ocm.manager.atomic.AllTests.buildSuite());
         suite.addTest(org.apache.jackrabbit.ocm.manager.auto.AllTests.buildSuite());
         suite.addTest(org.apache.jackrabbit.ocm.manager.basic.AllTests.buildSuite());
@@ -46,7 +46,8 @@
         suite.addTest(org.apache.jackrabbit.ocm.manager.proxy.AllTests.buildSuite());
         suite.addTest(org.apache.jackrabbit.ocm.manager.query.AllTests.buildSuite());
         suite.addTest(org.apache.jackrabbit.ocm.manager.uuid.AllTests.buildSuite());        
-        suite.addTest(org.apache.jackrabbit.ocm.manager.version.AllTests.buildSuite());        
+        suite.addTest(org.apache.jackrabbit.ocm.manager.version.AllTests.buildSuite());
+        suite.addTest(org.apache.jackrabbit.ocm.mapper.AllTests.buildSuite());
         suite.addTest(org.apache.jackrabbit.ocm.querymanager.AllTests.buildSuite());
         suite.addTest(org.apache.jackrabbit.ocm.repository.AllTests.buildSuite());
         

Added: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AnnotationTestBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AnnotationTestBase.java?rev=580157&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AnnotationTestBase.java (added)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/AnnotationTestBase.java Thu Sep 27 14:15:06 2007
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.ocm;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jcr.Repository;
+import javax.jcr.UnsupportedRepositoryOperationException;
+
+import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
+import org.apache.jackrabbit.ocm.mapper.Mapper;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.AnnotationMapperImpl;
+import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
+import org.apache.jackrabbit.ocm.testmodel.Atomic;
+import org.apache.jackrabbit.ocm.testmodel.Default;
+
+/**
+ * Base class for testcases. Provides priviledged access to the jcr test
+ * repository.
+ * 
+ * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
+ * 
+ * 
+ */
+public abstract class AnnotationTestBase extends AbstractTestBase
+{
+
+
+	/**
+	 * <p>
+	 * Defines the test case name for junit.
+	 * </p>
+	 * 
+	 * @param testName
+	 *            The test case name.
+	 */
+	public AnnotationTestBase(String testName)
+	{
+		super(testName);
+	}
+
+    
+	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
+	{
+		Repository repository = RepositoryUtil.getRepository("repositoryTest");	
+		session = RepositoryUtil.login(repository, "superuser", "superuser");
+		List<Class> classes = new ArrayList<Class>();
+		classes.add(Atomic.class);
+		classes.add(Default.class);
+		
+		Mapper mapper = new AnnotationMapperImpl(classes);
+		ocm = new ObjectContentManagerImpl(session, mapper);
+		
+		
+		
+	}
+
+
+
+
+
+}
\ No newline at end of file

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/DigesterTestBase.java (from r578997, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/TestBase.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/DigesterTestBase.java?p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/DigesterTestBase.java&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/TestBase.java&r1=578997&r2=580157&rev=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/TestBase.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/DigesterTestBase.java Thu Sep 27 14:15:06 2007
@@ -16,63 +16,23 @@
  */
 package org.apache.jackrabbit.ocm;
 
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collection;
-import java.util.Iterator;
-
-import javax.jcr.ImportUUIDBehavior;
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
 import javax.jcr.Repository;
-import javax.jcr.Session;
 import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.Workspace;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.nodetype.NodeTypeManager;
-
-import junit.framework.TestCase;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
-import org.apache.jackrabbit.core.nodetype.NodeTypeDef;
-import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
-import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
-import org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader;
-import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
-import org.apache.jackrabbit.ocm.mapper.Mapper;
-import org.apache.jackrabbit.ocm.query.QueryManager;
-import org.apache.jackrabbit.ocm.reflection.ReflectionUtils;
 import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
-import org.xml.sax.ContentHandler;
 
 /**
  * Base class for testcases. Provides priviledged access to the jcr test
  * repository.
  * 
- * @author <a href="mailto:okiessler@apache.org">Oliver Kiessler</a>
- * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
- * @version $Id: Exp $
+ * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
+ * 
+ * 
  */
-public abstract class TestBase extends TestCase
+public abstract class DigesterTestBase extends AbstractTestBase
 {
 
-	private final static Log log = LogFactory.getLog(TestBase.class);
-	
-	protected Session session;
-
-	protected ObjectContentManager ocm;
-
-	protected Mapper mapper;
-    
-    protected boolean isInit = false;
-
 	/**
 	 * <p>
 	 * Defines the test case name for junit.
@@ -81,92 +41,11 @@
 	 * @param testName
 	 *            The test case name.
 	 */
-	public TestBase(String testName)
+	public DigesterTestBase(String testName)
 	{
 		super(testName);
 	}
 
-	/**
-	 * Setting up the testcase.
-	 * 
-	 * @see junit.framework.TestCase#setUp()
-	 */
-	protected void setUp() throws Exception
-	{
-		try {
-			super.setUp();
-	        
-	        if (!isInit) {
-	            initObjectContentManager();
-	            RepositoryUtil.setupSession(getSession());
-	            registerNodeTypes(getSession());
-	            isInit = true;
-	        }
-			
-		}
-		catch (Exception e )
-		{
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * @see junit.framework.TestCase#tearDown()
-	 */
-	public void tearDown() throws Exception
-	{
-		super.tearDown();
-	}
-
-	/**
-	 * Getter for property ocm.
-	 * 
-	 * @return jcrSession
-	 */
-	public ObjectContentManager getObjectContentManager()
-	{
-		try
-		{
-			if (ocm == null)
-			{
-				initObjectContentManager();
-				RepositoryUtil.setupSession(getSession());
-                registerNodeTypes(getSession());
-			}
-			return ocm;
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			return null;
-		}
-	}
-
-    protected void registerNodeTypes(Session session) 
-    throws InvalidNodeTypeDefException, javax.jcr.RepositoryException, IOException {
-        InputStream xml = new FileInputStream(
-                "./src/test/test-config/nodetypes/custom_nodetypes.xml");
-
-        // HINT: throws InvalidNodeTypeDefException, IOException
-        NodeTypeDef[] types = NodeTypeReader.read(xml);
-
-        Workspace workspace = session.getWorkspace();
-        NodeTypeManager ntMgr = workspace.getNodeTypeManager();
-        NodeTypeRegistry ntReg = ((NodeTypeManagerImpl) ntMgr).getNodeTypeRegistry();
-
-        for (int j = 0; j < types.length; j++) {
-            NodeTypeDef def = types[j];
-
-            try {
-                ntReg.getNodeTypeDef(def.getName());
-            }
-            catch (NoSuchNodeTypeException nsne) {
-                // HINT: if not already registered than register custom node type
-                ntReg.registerNodeType(def);
-            }
-
-        }
-    }
     
 	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
 	{
@@ -183,108 +62,5 @@
 		ocm = new ObjectContentManagerImpl(session, files);
 		
 	}
-
-	/**
-	 * Setter for property jcrSession.
-	 * 
-	 * @param ocm
-	 *            The object content manager
-	 */
-	public void setObjectContentManager(ObjectContentManager ocm)
-	{
-		this.ocm = ocm;
-	}
-
-	public void exportDocument(String filePath, String nodePath, boolean skipBinary, boolean noRecurse)
-	{
-		try
-		{
-			BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(filePath));
-			ContentHandler handler = new org.apache.xml.serialize.XMLSerializer(os, null).asContentHandler();
-			session.exportDocumentView(nodePath, handler, skipBinary, noRecurse);
-			os.flush();
-			os.close();
-		}
-		catch (Exception e)
-		{
-			System.out.println("Impossible to export the content from : " + nodePath);
-			e.printStackTrace();
-		}
-	}
-
-	public void importDocument(String filePath, String nodePath)
-	{
-		try
-		{
-			BufferedInputStream is = new BufferedInputStream(new FileInputStream(filePath));
-			session.importXML(nodePath, is, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
-			session.save();
-			is.close();
-		}
-		catch (Exception e)
-		{
-			System.out.println("Impossible to import the content from : " + nodePath);
-			e.printStackTrace();
-		}
-
-	}
-
-	protected Session getSession()
-	{
-		return this.session;
-	}
-
-	public QueryManager getQueryManager()
-	{
-		return ocm.getQueryManager();
-	}
-	
-    protected boolean contains(Collection result, String path, Class objectClass)
-    {
-            Iterator iterator = result.iterator();
-            while (iterator.hasNext())
-            {
-                Object  object = iterator.next();
-                String itemPath = (String)  ReflectionUtils.getNestedProperty(object, "path");
-                if (itemPath.equals(path))
-                {
-                    if (object.getClass() == objectClass)
-                    {
-                       return true;	
-                    }
-                    else
-                    {
-                    	   return false;
-                    }
- 
-                }
-            }
-            return false;
-    }
-
-	
-	protected  void cleanUpRepisotory() {
-		try 
-		{
-				Session session = this.getSession();		
-				NodeIterator nodeIterator = session.getRootNode().getNodes();
-		
-				while (nodeIterator.hasNext())
-				{
-					Node node = nodeIterator.nextNode();
-					if (! node.getName().startsWith("jcr:"))
-					{
-					    log.debug("tearDown - remove : " + node.getPath());
-					    node.remove();
-					}
-				}
-				session.save();
-		}
-		catch(Exception e)
-		{
-			e.printStackTrace();
-		}
-	}
-
 
 }

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AllTests.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AllTests.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AllTests.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AllTests.java Thu Sep 27 14:15:06 2007
@@ -36,9 +36,13 @@
     public static Test buildSuite() {
         TestSuite suite= new TestSuite("Test for org.apache.jackrabbit.ocm.jcr.manager.atomic");
         //$JUnit-BEGIN$
-        suite.addTestSuite(AtomicTest.class);
-        suite.addTestSuite(NullAtomicTest.class);        
-        
+        suite.addTestSuite(AnnotationAtomicTest.class);
+        suite.addTestSuite(AnnotationNullAtomicTest.class);    
+        suite.addTestSuite(AnnotationDefaultValueTest.class);
+        suite.addTestSuite(DigesterAtomicTest.class);
+        suite.addTestSuite(DigesterNullAtomicTest.class);    
+        suite.addTestSuite(DigesterDefaultValueTest.class);
+
         //$JUnit-END$
 
         return suite;

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationAtomicTest.java (from r578593, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AtomicTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationAtomicTest.java?p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationAtomicTest.java&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AtomicTest.java&r1=578593&r2=580157&rev=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AtomicTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationAtomicTest.java Thu Sep 27 14:15:06 2007
@@ -26,25 +26,25 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.ocm.AnnotationTestBase;
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
 
 /**
- * Test Atomic perisstence fields
+ * Test atomic persistence fields
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class AtomicTest extends TestBase
+public class AnnotationAtomicTest extends AnnotationTestBase
 {
-    private final static Log log = LogFactory.getLog(AtomicTest.class);
+    private final static Log log = LogFactory.getLog(AnnotationAtomicTest.class);
 
     /**
      * <p>Defines the test case name for junit.</p>
      * @param testName The test case name.
      */
-    public AtomicTest(String testName) throws Exception
+    public AnnotationAtomicTest(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(AtomicTest.class));
+        return new RepositoryLifecycleTestSetup(new TestSuite(AnnotationAtomicTest.class));
     }
 
 

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationDefaultValueTest.java (from r578593, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DefaultValueTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationDefaultValueTest.java?p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationDefaultValueTest.java&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DefaultValueTest.java&r1=578593&r2=580157&rev=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DefaultValueTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationDefaultValueTest.java Thu Sep 27 14:15:06 2007
@@ -23,23 +23,24 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.ocm.AnnotationTestBase;
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.Default;
 
 /**
  * Test Default value assignement
  */
-public class DefaultValueTest extends TestBase
+public class AnnotationDefaultValueTest extends AnnotationTestBase
 {
-    private final static Log log = LogFactory.getLog(DefaultValueTest.class);
+    private final static Log log = LogFactory.getLog(AnnotationDefaultValueTest.class);
 
     /**
      * <p>Defines the test case name for junit.</p>
      * @param testName The test case name.
      */
-    public DefaultValueTest(String testName) throws Exception
+    public AnnotationDefaultValueTest(String testName) throws Exception
     {
         super(testName);
     }
@@ -47,7 +48,7 @@
     public static Test suite()
     {
         // All methods starting with "test" will be executed in the test suite.
-        return new RepositoryLifecycleTestSetup(new TestSuite(DefaultValueTest.class));
+        return new RepositoryLifecycleTestSetup(new TestSuite(AnnotationDefaultValueTest.class));
     }
 
 

Copied: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationNullAtomicTest.java (from r578593, jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/NullAtomicTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationNullAtomicTest.java?p2=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationNullAtomicTest.java&p1=jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/NullAtomicTest.java&r1=578593&r2=580157&rev=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/NullAtomicTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/AnnotationNullAtomicTest.java Thu Sep 27 14:15:06 2007
@@ -26,7 +26,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
 
@@ -35,15 +35,15 @@
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class NullAtomicTest extends TestBase
+public class AnnotationNullAtomicTest extends DigesterTestBase
 {
-    private final static Log log = LogFactory.getLog(NullAtomicTest.class);
+    private final static Log log = LogFactory.getLog(AnnotationNullAtomicTest.class);
 
     /**
      * <p>Defines the test case name for junit.</p>
      * @param testName The test case name.
      */
-    public NullAtomicTest(String testName)
+    public AnnotationNullAtomicTest(String testName)
     {
         super(testName);
     }
@@ -51,7 +51,7 @@
     public static Test suite()
     {
         // All methods starting with "test" will be executed in the test suite.
-        return new RepositoryLifecycleTestSetup(new TestSuite(NullAtomicTest.class));
+        return new RepositoryLifecycleTestSetup(new TestSuite(AnnotationNullAtomicTest.class));
     }
     
 

Added: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterAtomicTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterAtomicTest.java?rev=580157&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterAtomicTest.java (added)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterAtomicTest.java Thu Sep 27 14:15:06 2007
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.ocm.manager.atomic;
+
+import java.io.ByteArrayInputStream;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.Date;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
+import org.apache.jackrabbit.ocm.testmodel.Atomic;
+
+/**
+ * Test atomic persistence fields
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+ */
+public class DigesterAtomicTest extends DigesterTestBase
+{
+    private final static Log log = LogFactory.getLog(DigesterAtomicTest.class);
+
+    /**
+     * <p>Defines the test case name for junit.</p>
+     * @param testName The test case name.
+     */
+    public DigesterAtomicTest(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(DigesterAtomicTest.class));
+    }
+
+
+	public void tearDown() throws Exception {
+
+		cleanUpRepisotory();
+		super.tearDown();
+		
+	}
+    
+    public void testAtomicFields()
+    {
+        try
+        {
+        	ObjectContentManager ocm = getObjectContentManager();
+        	Date date = new Date();
+        	Calendar calendar = Calendar.getInstance();
+            // --------------------------------------------------------------------------------
+            // Create and store an object graph in the repository
+            // --------------------------------------------------------------------------------
+            Atomic a = new Atomic();
+            a.setPath("/test");
+            a.setBooleanObject(new Boolean(true));
+            a.setBooleanPrimitive(true);
+            a.setIntegerObject(new Integer(100));
+            a.setIntPrimitive(200);
+            a.setString("Test String");
+            a.setDate(date);
+            a.setInt2boolean(true);
+            
+            byte[] content = "Test Byte".getBytes();
+            a.setByteArray(content);
+            a.setCalendar(calendar);
+            a.setDoubleObject(new Double(2.12));
+            a.setDoublePrimitive(1.23);
+            long now = System.currentTimeMillis();
+            a.setTimestamp(new Timestamp(now));
+            
+            ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream("Test Stream".getBytes());
+            a.setInputStream(byteArrayInputStream);
+            a.setNamedProperty("ocm:test");
+            a.setPathProperty("/node1/node2");
+            a.setUndefinedProperty("aStringData");
+            
+            ocm.insert(a);
+            ocm.save();
+
+             
+            // --------------------------------------------------------------------------------
+            // Get the object
+            // --------------------------------------------------------------------------------
+            a = null;
+            a = (Atomic) ocm.getObject( "/test");
+            assertNotNull("a is null", a);
+            assertNotNull("Boolean object is null", a.getBooleanObject());
+            assertTrue("Incorrect boolean object", a.getBooleanObject().booleanValue());
+            assertTrue("Incorrect boolean primitive", a.isBooleanPrimitive());
+            assertNotNull("Integer Object is null", a.getIntegerObject());
+            assertTrue("Incorrect Integer object", a.getIntegerObject().intValue() == 100);
+            assertTrue("Incorrect int primitive", a.getIntPrimitive() == 200);
+            assertNotNull("String object is null", a.getString());
+            assertTrue("Incorrect boolean object", a.getString().equals("Test String"));
+            assertNotNull("Byte array object is null", a.getByteArray());
+            assertTrue("Incorrect byte object", new String(a.getByteArray()).equals("Test Byte"));
+            
+            assertNotNull("date object is null", a.getDate());
+            assertTrue("Invalid date", a.getDate().equals(date));            
+            assertNotNull("calendar object is null", a.getCalendar());
+            
+            log.debug("Calendar : " + a.getCalendar().get(Calendar.YEAR) + "-" + a.getCalendar().get(Calendar.MONTH) + "-" + a.getCalendar().get(Calendar.DAY_OF_MONTH));
+            assertTrue("Invalid calendar object", a.getCalendar().equals(calendar));
+            
+            assertNotNull("Double object is null", a.getDoubleObject());
+            assertTrue("Incorrect double object", a.getDoubleObject().doubleValue() == 2.12);
+            assertTrue("Incorrect double primitive", a.getDoublePrimitive() == 1.23);
+            
+            assertNotNull("Incorrect input stream primitive", a.getInputStream());
+            assertNotNull("Incorrect timestamp", a.getTimestamp());
+            assertTrue("Invalid timestamp value ", a.getTimestamp().getTime() == now);            
+            assertTrue("Invalid int2boolean value ", a.isInt2boolean());
+            
+            assertTrue("Invalid namedProperty value ", a.getNamedProperty().equals("ocm:test"));
+            assertTrue("Invalid pathProperty value ", a.getPathProperty().equals("/node1/node2"));
+            assertTrue("Invalid undefinedProperty value ", ((String) a.getUndefinedProperty()).equals("aStringData"));
+            // --------------------------------------------------------------------------------
+            // Update the property "namedProperty" with an invalid value
+            // --------------------------------------------------------------------------------            
+            try 
+            {
+               // update with an incorrect namespace - Should throws an exception
+               a.setNamedProperty("unknown:test");               
+               ocm.update(a);
+               fail("Exception was not triggered with an invalid namespace");
+               ocm.save();
+            }
+            catch (Exception e)
+            {
+               
+                
+            }
+            
+            // --------------------------------------------------------------------------------
+            // Update the property "pathProperty" with an invalid value
+            // --------------------------------------------------------------------------------            
+            try 
+            {
+               // update with an incorrect namespace - Should throws an exception
+               a.setPathProperty("//node1");               
+               ocm.update(a);
+               fail("Exception was not triggered with an invalid path");
+               ocm.save();
+            }
+            catch (Exception e)
+            {
+               
+                
+            }
+            
+            // --------------------------------------------------------------------------------
+            // Update the property "undefinedProperty" with an invalid value
+            // --------------------------------------------------------------------------------            
+            a = null;
+            a = (Atomic) ocm.getObject( "/test");
+
+            a.setUndefinedProperty(new Double(1.2));
+            ocm.update(a);
+            ocm.save();
+            
+            // --------------------------------------------------------------------------------
+            // Get the object
+            // --------------------------------------------------------------------------------
+            a = null;
+            a = (Atomic) ocm.getObject( "/test");
+            assertNotNull("a is null", a);
+            assertTrue("Invalid undefinedProperty value ", ((Double) a.getUndefinedProperty()).doubleValue() == 1.2);
+            
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            fail("Exception occurs during the unit test : " + e);
+        }
+        
+    }
+    
+}
\ No newline at end of file

Added: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterDefaultValueTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterDefaultValueTest.java?rev=580157&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterDefaultValueTest.java (added)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterDefaultValueTest.java Thu Sep 27 14:15:06 2007
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.ocm.manager.atomic;
+
+import javax.jcr.Node;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
+import org.apache.jackrabbit.ocm.testmodel.Default;
+
+/**
+ * Test Default value assignement
+ */
+public class DigesterDefaultValueTest extends DigesterTestBase
+{
+    private final static Log log = LogFactory.getLog(DigesterDefaultValueTest.class);
+
+    /**
+     * <p>Defines the test case name for junit.</p>
+     * @param testName The test case name.
+     */
+    public DigesterDefaultValueTest(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(DigesterDefaultValueTest.class));
+    }
+
+
+	public void tearDown() throws Exception {
+
+		cleanUpRepisotory();
+		super.tearDown();
+		
+	}
+    
+	public void testDefaultValues()
+	{
+	    try
+	    {
+	        ObjectContentManager ocm = getObjectContentManager();
+	        
+	        // --------------------------------------------------------------------------------
+	        // Create and store an object graph in the repository
+	        // --------------------------------------------------------------------------------
+	        Default a = new Default();
+	        a.setPath("/testDefault");
+	        a.setP1("p1Value");
+	        // do not set p2, p3, p4, p5
+	        
+	        ocm.insert(a);
+	        ocm.save();
+	        
+	        
+	        // --------------------------------------------------------------------------------
+	        // Get the object
+	        // --------------------------------------------------------------------------------
+	        a = null;
+	        a = (Default) ocm.getObject( "/testDefault" );
+	        assertNotNull("a is null", a);
+	        
+	        assertEquals("p1Value", a.getP1());
+	        assertNull(a.getP2());
+	        assertEquals("p3DescriptorDefaultValue", a.getP3());
+	        assertEquals("p4DefaultValue", a.getP4());
+	        assertEquals("p5DefaultValue", a.getP5());
+	        
+	    }
+	    catch (Exception e)
+	    {
+	        e.printStackTrace();
+	        fail("Exception occurs during the unit test : " + e);
+	    }
+	    
+	}
+	
+	
+    public void testDefaultValuesRead()
+    {
+        try
+        {
+        	ObjectContentManager ocm = getObjectContentManager();
+
+        	// --------------------------------------------------------------------------------
+            // Manually create a node
+        	// we need this test as SimpleFieldsHelper.storeSimpleField sets the
+        	// property value if the field is not set but a jcrDefaultValue
+        	// is set. But we want to test, that SimpleFieldsHelper.retrieveSimpleField
+        	// sets the default value from the jcrDefaultValue
+            // --------------------------------------------------------------------------------
+        	Node nodeA = ocm.getSession().getRootNode().addNode("testDefault", "ocm:DefTestPrimary");
+        	nodeA.setProperty("ocm:p1", "p1Value");
+        	ocm.getSession().save();
+        	
+             
+            // --------------------------------------------------------------------------------
+            // Get the object
+            // --------------------------------------------------------------------------------
+            Default a = (Default) ocm.getObject( "/testDefault" );
+            assertNotNull("a is null", a);
+            
+            assertEquals("p1Value", a.getP1());
+            assertNull(a.getP2());
+            assertEquals("p3DescriptorDefaultValue", a.getP3());
+            assertEquals("p4DefaultValue", a.getP4());
+            assertEquals("p5DefaultValue", a.getP5());
+
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            fail("Exception occurs during the unit test : " + e);
+        }
+        
+    }
+    
+}
\ No newline at end of file

Added: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterNullAtomicTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterNullAtomicTest.java?rev=580157&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterNullAtomicTest.java (added)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/atomic/DigesterNullAtomicTest.java Thu Sep 27 14:15:06 2007
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.ocm.manager.atomic;
+
+import java.io.ByteArrayInputStream;
+import java.util.Calendar;
+import java.util.Date;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
+import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
+import org.apache.jackrabbit.ocm.testmodel.Atomic;
+
+/**
+ * Test Atomic perisstence fields
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+ */
+public class DigesterNullAtomicTest extends DigesterTestBase
+{
+    private final static Log log = LogFactory.getLog(DigesterNullAtomicTest.class);
+
+    /**
+     * <p>Defines the test case name for junit.</p>
+     * @param testName The test case name.
+     */
+    public DigesterNullAtomicTest(String testName)
+    {
+        super(testName);
+    }
+
+    public static Test suite()
+    {
+        // All methods starting with "test" will be executed in the test suite.
+        return new RepositoryLifecycleTestSetup(new TestSuite(DigesterNullAtomicTest.class));
+    }
+    
+
+	public void tearDown() throws Exception {
+
+		cleanUpRepisotory();
+		super.tearDown();
+		
+	}  
+
+    public void testNullValueAtomicFields()
+    {
+        try
+        {
+
+        	ObjectContentManager ocm = getObjectContentManager();
+     
+            // --------------------------------------------------------------------------------
+            // Create and store an object graph in the repository
+            // --------------------------------------------------------------------------------
+            Atomic a = new Atomic();
+            a.setPath("/test");
+            a.setIntegerObject(new Integer(100));            
+            a.setDate(new Date());
+            byte[] content = "Test Byte".getBytes();
+            a.setByteArray(content);
+            a.setCalendar(Calendar.getInstance());
+            a.setDoubleObject(new Double(2.12));
+            a.setDoublePrimitive(1.23);
+            
+            ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream("Test Stream".getBytes());
+            a.setInputStream(byteArrayInputStream);
+            
+            ocm.insert(a);
+            ocm.save();
+             
+            // --------------------------------------------------------------------------------
+            // Get the object
+            // --------------------------------------------------------------------------------
+            a = null;
+            a = (Atomic) ocm.getObject( "/test");
+            assertNotNull("a is null", a);
+            assertNull("Boolean object is not null", a.getBooleanObject());
+            
+            assertFalse("Incorrect boolean primitive", a.isBooleanPrimitive());
+            assertNotNull("Integer Object is null", a.getIntegerObject());
+            assertTrue("Incorrect Integer object", a.getIntegerObject().intValue() == 100);
+            assertTrue("Incorrect int primitive", a.getIntPrimitive() == 0);
+            assertNull("String object is not null", a.getString());            
+            assertNotNull("Byte array object is null", a.getByteArray());
+            assertTrue("Incorrect byte object", new String(a.getByteArray()).equals("Test Byte"));
+            
+            assertNotNull("date object is null", a.getDate());
+            assertNotNull("calendar object is null", a.getCalendar());
+            
+            assertNotNull("Double object is null", a.getDoubleObject());
+            assertTrue("Incorrect double object", a.getDoubleObject().doubleValue() == 2.12);
+            assertTrue("Incorrect double primitive", a.getDoublePrimitive() == 1.23);
+            
+            assertNotNull("Incorrect input stream primitive", a.getInputStream());
+            
+            
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            fail("Exception occurs during the unit test : " + e);
+        }
+        
+    }
+    
+}
\ No newline at end of file

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/auto/ObjectContentManagerAutoTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/auto/ObjectContentManagerAutoTest.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/auto/ObjectContentManagerAutoTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/auto/ObjectContentManagerAutoTest.java Thu Sep 27 14:15:06 2007
@@ -16,6 +16,9 @@
  */
 package org.apache.jackrabbit.ocm.manager.auto;
 
+//import javax.jcr.Repository;
+//import javax.jcr.UnsupportedRepositoryOperationException;
+
 import javax.jcr.Repository;
 import javax.jcr.UnsupportedRepositoryOperationException;
 
@@ -24,23 +27,23 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 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.ObjectContentManagerImpl;
 import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
-import org.apache.jackrabbit.ocm.testmodel.inheritance.impl.DocumentImpl;
-import org.apache.jackrabbit.ocm.testmodel.inheritance.impl.DocumentStream;
-import org.apache.jackrabbit.ocm.testmodel.inheritance.impl.FolderImpl;
-import org.apache.jackrabbit.ocm.testmodel.interfaces.Document;
-import org.apache.jackrabbit.ocm.testmodel.interfaces.Folder;
+import org.apache.jackrabbit.ocm.testmodel.auto.Document;
+import org.apache.jackrabbit.ocm.testmodel.auto.Folder;
+import org.apache.jackrabbit.ocm.testmodel.auto.impl.DocumentImpl;
+import org.apache.jackrabbit.ocm.testmodel.auto.impl.DocumentStream;
+import org.apache.jackrabbit.ocm.testmodel.auto.impl.FolderImpl;
 
 /**
  * Test autoupdate setting
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class ObjectContentManagerAutoTest extends TestBase {
+public class ObjectContentManagerAutoTest extends DigesterTestBase {
 	private final static Log log = LogFactory.getLog(ObjectContentManagerAutoTest.class);
 
 	/**
@@ -147,11 +150,9 @@
 	protected void initObjectContentManager() throws UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
 	{
 		Repository repository = RepositoryUtil.getRepository("repositoryTest");
-		String[] files = { "./src/test/test-config/jcrmapping-auto.xml"};
+		String[] files = {"./src/test/test-config/jcrmapping-auto.xml"};
 		session = RepositoryUtil.login(repository, "superuser", "superuser");
-
 		ocm = new ObjectContentManagerImpl(session, files);
 		
 	}	
-	
 }

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerAvoidRecursiveLoopTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerAvoidRecursiveLoopTest.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerAvoidRecursiveLoopTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerAvoidRecursiveLoopTest.java Thu Sep 27 14:15:06 2007
@@ -27,7 +27,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
 import org.apache.jackrabbit.ocm.repository.RepositoryUtil;
@@ -42,7 +42,7 @@
  *
  * @author <a href="mailto:christophe.lombart@gmail.com>Christophe Lombart</a>
  */
-public class ObjectContentManagerAvoidRecursiveLoopTest extends TestBase
+public class ObjectContentManagerAvoidRecursiveLoopTest extends DigesterTestBase
 {
     private final static Log log = LogFactory.getLog(ObjectContentManagerAvoidRecursiveLoopTest.class);
 

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerCopyMoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerCopyMoveTest.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerCopyMoveTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerCopyMoveTest.java Thu Sep 27 14:15:06 2007
@@ -27,7 +27,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 import org.apache.jackrabbit.ocm.exception.ObjectContentManagerException;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.Atomic;
@@ -40,7 +40,7 @@
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class ObjectContentManagerCopyMoveTest extends TestBase
+public class ObjectContentManagerCopyMoveTest extends DigesterTestBase
 {
 	private final static Log log = LogFactory.getLog(ObjectContentManagerCopyMoveTest.class);
 	

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerRemoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerRemoveTest.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerRemoveTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerRemoveTest.java Thu Sep 27 14:15:06 2007
@@ -28,7 +28,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.query.Filter;
 import org.apache.jackrabbit.ocm.query.Query;
@@ -41,7 +41,7 @@
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class ObjectContentManagerRemoveTest extends TestBase
+public class ObjectContentManagerRemoveTest extends DigesterTestBase
 {
 	private final static Log log = LogFactory.getLog(ObjectContentManagerRemoveTest.class);
 	private Date date = new Date();

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerSameNameSiblingTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerSameNameSiblingTest.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerSameNameSiblingTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerSameNameSiblingTest.java Thu Sep 27 14:15:06 2007
@@ -31,7 +31,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
 import org.apache.jackrabbit.ocm.query.Filter;
@@ -47,7 +47,7 @@
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class ObjectContentManagerSameNameSiblingTest extends TestBase
+public class ObjectContentManagerSameNameSiblingTest extends DigesterTestBase
 {
 	private final static Log log = LogFactory.getLog(ObjectContentManagerSameNameSiblingTest.class);
 	private Date date = new Date();

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerTest.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/basic/ObjectContentManagerTest.java Thu Sep 27 14:15:06 2007
@@ -25,7 +25,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.B;
@@ -37,7 +37,7 @@
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class ObjectContentManagerTest extends TestBase
+public class ObjectContentManagerTest extends DigesterTestBase
 {
     private final static Log log = LogFactory.getLog(ObjectContentManagerTest.class);
 

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/BeanDescriptorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/BeanDescriptorTest.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/BeanDescriptorTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/beanconverter/BeanDescriptorTest.java Thu Sep 27 14:15:06 2007
@@ -27,7 +27,7 @@
 import junit.framework.TestSuite;
 
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.B;
@@ -43,7 +43,7 @@
  * 
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
-public class BeanDescriptorTest extends TestBase {
+public class BeanDescriptorTest extends DigesterTestBase {
 
     
     public BeanDescriptorTest(String testname) {
@@ -58,7 +58,7 @@
     
     
     /**
-     * @see org.apache.jackrabbit.ocm.TestBase#setUp()
+     * @see org.apache.jackrabbit.ocm.DigesterTestBase#setUp()
      */
     protected void setUp() throws Exception {
         super.setUp();
@@ -68,7 +68,7 @@
 
     
     /**
-     * @see org.apache.jackrabbit.ocm.TestBase#tearDown()
+     * @see org.apache.jackrabbit.ocm.DigesterTestBase#tearDown()
      */
     public void tearDown() throws Exception {
         clean();

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ArrayListTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ArrayListTest.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ArrayListTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ArrayListTest.java Thu Sep 27 14:15:06 2007
@@ -24,7 +24,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.collection.ArrayListElement;
 import org.apache.jackrabbit.ocm.testmodel.collection.Element;
@@ -33,7 +33,7 @@
 /**
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
-public class ArrayListTest extends TestBase
+public class ArrayListTest extends DigesterTestBase
 {
     private final static Log log = LogFactory.getLog(ArrayListTest.class);
 

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DefaultCollectionConverterImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DefaultCollectionConverterImplTest.java?rev=580157&r1=580156&r2=580157&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DefaultCollectionConverterImplTest.java (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/collectionconverter/DefaultCollectionConverterImplTest.java Thu Sep 27 14:15:06 2007
@@ -25,7 +25,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.ocm.RepositoryLifecycleTestSetup;
-import org.apache.jackrabbit.ocm.TestBase;
+import org.apache.jackrabbit.ocm.DigesterTestBase;
 import org.apache.jackrabbit.ocm.manager.ObjectContentManager;
 import org.apache.jackrabbit.ocm.testmodel.A;
 import org.apache.jackrabbit.ocm.testmodel.C;
@@ -35,7 +35,7 @@
  *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
-public class DefaultCollectionConverterImplTest extends TestBase
+public class DefaultCollectionConverterImplTest extends DigesterTestBase
 {
     private final static Log log = LogFactory.getLog(DefaultCollectionConverterImplTest.class);
 



Mime
View raw message