You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2006/09/20 19:37:21 UTC

svn commit: r448311 [16/25] - in /incubator/graffito/trunk: ./ api/ api/src/java/org/apache/portals/graffito/context/ api/src/java/org/apache/portals/graffito/exception/ api/src/java/org/apache/portals/graffito/services/core/ api/src/java/org/apache/po...

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/CollectionDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/CollectionDescriptor.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/CollectionDescriptor.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/CollectionDescriptor.java Wed Sep 20 12:37:05 2006
@@ -1,294 +1,294 @@
-/*
- * Copyright 2000-2005 The Apache Software Foundation.
- * 
- * Licensed 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.portals.graffito.jcr.mapper.model;
-
-/**
- * 
- * CollectionDescriptor is used by the mapper to read general information on a collection field
- * 
- * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
- * 
- */
-public class CollectionDescriptor
-{
-
-     private String fieldName;
-     private String jcrName;     
-     private String elementClassName; 
-     private String collectionConverterClassName;
-     private String collectionClassName;
-     private boolean proxy;
-     private boolean autoRetrieve = true;
-     private boolean autoUpdate = true;
-     private boolean autoInsert = true;     
-     private String jcrNodeType;
-     private boolean jcrAutoCreated;
-     private boolean jcrMandatory;
-     private String jcrOnParentVersion;
-     private boolean jcrProtected;
-     private boolean jcrSameNameSiblings;     
-     
-     private ClassDescriptor classDescriptor;
-    
-    /**
-     * @return Returns the fieldName.
-     */
-    public String getFieldName()
-    {
-        return fieldName;
-    }
-    /**
-     * @param fieldName The fieldName to set.
-     */
-    public void setFieldName(String fieldName)
-    {
-        this.fieldName = fieldName;
-    }
-    /**
-     * @return Returns the jcrName.
-     */
-    public String getJcrName()
-    {
-        return jcrName;
-    }
-    /**
-     * @param jcrName The jcrName to set.
-     */
-    public void setJcrName(String jcrName)
-    {
-        this.jcrName = jcrName;
-    }
-    
-    
-    /**
-     * @return Returns the elementClassName.
-     */
-    public String getElementClassName()
-    {
-        return elementClassName;
-    }
-    /**
-     * @param elementClassName The collection element class name to set.
-     *
-     */
-    public void setElementClassName(String elementClassName)
-    {
-        this.elementClassName = elementClassName;
-    }
-
-    /**
-     * @return Returns the proxy.
-     */
-    public boolean isProxy()
-    {
-        return proxy;
-    }
-    /**
-     * @param proxy The proxy to set.
-     */
-    public void setProxy(boolean proxy)
-    {
-        this.proxy = proxy;
-    }
-    
-    
-    
-    public boolean isAutoInsert() {
-		return autoInsert;
-	}
-	public void setAutoInsert(boolean autoInsert) {
-		this.autoInsert = autoInsert;
-	}
-	public boolean isAutoRetrieve() {
-		return autoRetrieve;
-	}
-	public void setAutoRetrieve(boolean autoRetrieve) {
-		this.autoRetrieve = autoRetrieve;
-	}
-	public boolean isAutoUpdate() {
-		return autoUpdate;
-	}
-	public void setAutoUpdate(boolean autoUpdate) {
-		this.autoUpdate = autoUpdate;
-	}
-	/**
-     * 
-     * @return The collection converter class name 
-     */
-    public String getCollectionConverter()
-    {
-        return collectionConverterClassName;
-    }
-    
-    /**
-     * Set the collection converter class name
-     * @param collectionConverterClassName The converter to set
-     */
-    public void setCollectionConverter(String collectionConverterClassName)
-    {
-        this.collectionConverterClassName = collectionConverterClassName;
-    }
-    
-    /**
-     *  
-     * @return the collection class name (can be also a Map)
-     */
-    public String getCollectionClassName()
-    {
-        return collectionClassName;
-    }
-    
-    /**
-     * Set the collection class name. 
-     * This collection class has to implement {@link org.apache.portals.graffito.jcr.persistence.collectionconverter.ManageableCollection}
-     * @param collectionClassName The collection class name to set
-     */
-    public void setCollectionClassName(String collectionClassName)
-    {
-        this.collectionClassName = collectionClassName;
-    }
-    
-    /**
-     * 
-     * @return The associated class descriptor
-     */
-    public ClassDescriptor getClassDescriptor()
-    {
-        return classDescriptor;
-    }
-    
-    /**
-     * Set the associated class descriptor
-     * @param classDescriptor the class descriptor to set 
-     */
-    public void setClassDescriptor(ClassDescriptor classDescriptor)
-    {
-        this.classDescriptor = classDescriptor;
-    }
-    
-    /** Getter for property jcrNodeType.
-     * 
-     * @return jcrNodeType
-     */
-    public String getJcrNodeType()
-    {
-        return jcrNodeType;
-    }
-
-    /** Setter for property jcrNodeType.
-     * 
-     * @param value jcrNodeType
-     */
-    public void setJcrNodeType(String value)
-    {
-        this.jcrNodeType = value;
-    }
-
-    /** Getter for property jcrAutoCreated.
-     * 
-     * @return jcrAutoCreated
-     */
-    public boolean isJcrAutoCreated()
-    {
-        return jcrAutoCreated;
-    }
-
-    /** Setter for property jcrAutoCreated.
-     * 
-     * @param value jcrAutoCreated
-     */
-    public void setJcrAutoCreated(boolean value)
-    {
-        this.jcrAutoCreated = value;
-    }
-
-    /** Getter for property jcrMandatory.
-     * 
-     * @return jcrMandatory
-     */
-    public boolean isJcrMandatory()
-    {
-        return jcrMandatory;
-    }
-
-    /** Setter for property jcrMandatory.
-     * 
-     * @param value jcrMandatory
-     */
-    public void setJcrMandatory(boolean value)
-    {
-        this.jcrMandatory = value;
-    }
-
-    /** Getter for property jcrOnParentVersion.
-     * 
-     * @return jcrOnParentVersion
-     */
-    public String getJcrOnParentVersion()
-    {
-        return jcrOnParentVersion;
-    }
-
-    /** Setter for property jcrOnParentVersion.
-     * 
-     * @param value jcrOnParentVersion
-     */
-    public void setJcrOnParentVersion(String value)
-    {
-        this.jcrOnParentVersion = value;
-    }
-
-    /** Getter for property jcrProtected.
-     * 
-     * @return jcrProtected
-     */
-    public boolean isJcrProtected()
-    {
-        return jcrProtected;
-    }
-
-    /** Setter for property jcrProtected.
-     * 
-     * @param value jcrProtected
-     */
-    public void setJcrProtected(boolean value)
-    {
-        this.jcrProtected = value;
-    }
-
-    /** Getter for property jcrSameNameSiblings.
-     * 
-     * @return jcrSameNameSiblings
-     */
-    public boolean isJcrSameNameSiblings()
-    {
-        return jcrSameNameSiblings;
-    }
-
-    /** Setter for property jcrSameNameSiblings.
-     * 
-     * @param value jcrSameNameSiblings
-     */
-    public void setJcrSameNameSiblings(boolean value)
-    {
-        this.jcrSameNameSiblings = value;
-    }
-    
-	public String toString() {
-		
-		return "Collection Descriptor : " +  this.getFieldName();
-	}    
-}
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.portals.graffito.jcr.mapper.model;
+
+/**
+ * 
+ * CollectionDescriptor is used by the mapper to read general information on a collection field
+ * 
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * 
+ */
+public class CollectionDescriptor
+{
+
+     private String fieldName;
+     private String jcrName;     
+     private String elementClassName; 
+     private String collectionConverterClassName;
+     private String collectionClassName;
+     private boolean proxy;
+     private boolean autoRetrieve = true;
+     private boolean autoUpdate = true;
+     private boolean autoInsert = true;     
+     private String jcrNodeType;
+     private boolean jcrAutoCreated;
+     private boolean jcrMandatory;
+     private String jcrOnParentVersion;
+     private boolean jcrProtected;
+     private boolean jcrSameNameSiblings;     
+     
+     private ClassDescriptor classDescriptor;
+    
+    /**
+     * @return Returns the fieldName.
+     */
+    public String getFieldName()
+    {
+        return fieldName;
+    }
+    /**
+     * @param fieldName The fieldName to set.
+     */
+    public void setFieldName(String fieldName)
+    {
+        this.fieldName = fieldName;
+    }
+    /**
+     * @return Returns the jcrName.
+     */
+    public String getJcrName()
+    {
+        return jcrName;
+    }
+    /**
+     * @param jcrName The jcrName to set.
+     */
+    public void setJcrName(String jcrName)
+    {
+        this.jcrName = jcrName;
+    }
+    
+    
+    /**
+     * @return Returns the elementClassName.
+     */
+    public String getElementClassName()
+    {
+        return elementClassName;
+    }
+    /**
+     * @param elementClassName The collection element class name to set.
+     *
+     */
+    public void setElementClassName(String elementClassName)
+    {
+        this.elementClassName = elementClassName;
+    }
+
+    /**
+     * @return Returns the proxy.
+     */
+    public boolean isProxy()
+    {
+        return proxy;
+    }
+    /**
+     * @param proxy The proxy to set.
+     */
+    public void setProxy(boolean proxy)
+    {
+        this.proxy = proxy;
+    }
+    
+    
+    
+    public boolean isAutoInsert() {
+		return autoInsert;
+	}
+	public void setAutoInsert(boolean autoInsert) {
+		this.autoInsert = autoInsert;
+	}
+	public boolean isAutoRetrieve() {
+		return autoRetrieve;
+	}
+	public void setAutoRetrieve(boolean autoRetrieve) {
+		this.autoRetrieve = autoRetrieve;
+	}
+	public boolean isAutoUpdate() {
+		return autoUpdate;
+	}
+	public void setAutoUpdate(boolean autoUpdate) {
+		this.autoUpdate = autoUpdate;
+	}
+	/**
+     * 
+     * @return The collection converter class name 
+     */
+    public String getCollectionConverter()
+    {
+        return collectionConverterClassName;
+    }
+    
+    /**
+     * Set the collection converter class name
+     * @param collectionConverterClassName The converter to set
+     */
+    public void setCollectionConverter(String collectionConverterClassName)
+    {
+        this.collectionConverterClassName = collectionConverterClassName;
+    }
+    
+    /**
+     *  
+     * @return the collection class name (can be also a Map)
+     */
+    public String getCollectionClassName()
+    {
+        return collectionClassName;
+    }
+    
+    /**
+     * Set the collection class name. 
+     * This collection class has to implement {@link org.apache.portals.graffito.jcr.persistence.collectionconverter.ManageableCollection}
+     * @param collectionClassName The collection class name to set
+     */
+    public void setCollectionClassName(String collectionClassName)
+    {
+        this.collectionClassName = collectionClassName;
+    }
+    
+    /**
+     * 
+     * @return The associated class descriptor
+     */
+    public ClassDescriptor getClassDescriptor()
+    {
+        return classDescriptor;
+    }
+    
+    /**
+     * Set the associated class descriptor
+     * @param classDescriptor the class descriptor to set 
+     */
+    public void setClassDescriptor(ClassDescriptor classDescriptor)
+    {
+        this.classDescriptor = classDescriptor;
+    }
+    
+    /** Getter for property jcrNodeType.
+     * 
+     * @return jcrNodeType
+     */
+    public String getJcrNodeType()
+    {
+        return jcrNodeType;
+    }
+
+    /** Setter for property jcrNodeType.
+     * 
+     * @param value jcrNodeType
+     */
+    public void setJcrNodeType(String value)
+    {
+        this.jcrNodeType = value;
+    }
+
+    /** Getter for property jcrAutoCreated.
+     * 
+     * @return jcrAutoCreated
+     */
+    public boolean isJcrAutoCreated()
+    {
+        return jcrAutoCreated;
+    }
+
+    /** Setter for property jcrAutoCreated.
+     * 
+     * @param value jcrAutoCreated
+     */
+    public void setJcrAutoCreated(boolean value)
+    {
+        this.jcrAutoCreated = value;
+    }
+
+    /** Getter for property jcrMandatory.
+     * 
+     * @return jcrMandatory
+     */
+    public boolean isJcrMandatory()
+    {
+        return jcrMandatory;
+    }
+
+    /** Setter for property jcrMandatory.
+     * 
+     * @param value jcrMandatory
+     */
+    public void setJcrMandatory(boolean value)
+    {
+        this.jcrMandatory = value;
+    }
+
+    /** Getter for property jcrOnParentVersion.
+     * 
+     * @return jcrOnParentVersion
+     */
+    public String getJcrOnParentVersion()
+    {
+        return jcrOnParentVersion;
+    }
+
+    /** Setter for property jcrOnParentVersion.
+     * 
+     * @param value jcrOnParentVersion
+     */
+    public void setJcrOnParentVersion(String value)
+    {
+        this.jcrOnParentVersion = value;
+    }
+
+    /** Getter for property jcrProtected.
+     * 
+     * @return jcrProtected
+     */
+    public boolean isJcrProtected()
+    {
+        return jcrProtected;
+    }
+
+    /** Setter for property jcrProtected.
+     * 
+     * @param value jcrProtected
+     */
+    public void setJcrProtected(boolean value)
+    {
+        this.jcrProtected = value;
+    }
+
+    /** Getter for property jcrSameNameSiblings.
+     * 
+     * @return jcrSameNameSiblings
+     */
+    public boolean isJcrSameNameSiblings()
+    {
+        return jcrSameNameSiblings;
+    }
+
+    /** Setter for property jcrSameNameSiblings.
+     * 
+     * @param value jcrSameNameSiblings
+     */
+    public void setJcrSameNameSiblings(boolean value)
+    {
+        this.jcrSameNameSiblings = value;
+    }
+    
+	public String toString() {
+		
+		return "Collection Descriptor : " +  this.getFieldName();
+	}    
+}

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/CollectionDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/FieldDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/FieldDescriptor.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/FieldDescriptor.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/FieldDescriptor.java Wed Sep 20 12:37:05 2006
@@ -1,298 +1,298 @@
-/*
- * Copyright 2000-2005 The Apache Software Foundation.
- *
- * Licensed 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.portals.graffito.jcr.mapper.model;
-
-import org.apache.portals.graffito.jcr.exception.JcrMappingException;
-import org.apache.portals.graffito.jcr.reflection.ReflectionUtils;
-
-
-/**
- *
- *
- * FieldDescriptor is used by the mapper to read general information on a atomic field
- *
- * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
- *
- */
-public class FieldDescriptor {
-    private String fieldName;
-    private String fieldType;
-    private Class fieldTypeClass;
-    private String jcrName;
-    private String jcrType;
-    private boolean jcrAutoCreated;
-    private boolean jcrMandatory;
-    private String jcrOnParentVersion;
-    private boolean jcrProtected;
-    private boolean jcrMultiple;
-    private ClassDescriptor classDescriptor;
-    private boolean id;
-    private boolean path;
-   
-
-    /**
-     * @return Returns the fieldName.
-     */
-    public String getFieldName() {
-        return fieldName;
-    }
-
-    /**
-     * @param fieldName The fieldName to set.
-     */
-    public void setFieldName(String fieldName) {
-        this.fieldName = fieldName;
-    }
-
-    /**
-     * @return the primitive or fully qualified class of the field
-     * or <tt>null</tt> if not specified in the mapping
-     */
-    public String getFieldType() {
-        return this.fieldType;
-    }
-
-    /**
-     * Sets the type of the field. It supports primitive types, specified as
-     * int, long, etc or fully qualified class names.
-     *
-     * @param fieldType the type of the field
-     */
-    public void setFieldType(String fieldType) {
-        this.fieldType = fieldType;
-    }
-
-    /**
-     * @return the field class of the field
-     * or <tt>null</tt> if not specified in the mapping
-     * or if the class was not found
-     */
-    public Class getFieldTypeClass() {
-        if (this.fieldType == null) {
-            return null;
-        }
-        if (this.fieldTypeClass == null) {
-            this.fieldTypeClass = loadFieldTypeClass();
-        }
-
-        return this.fieldTypeClass;
-    }
-
-    /**
-     * @return Returns the jcrName.
-     */
-    public String getJcrName() {
-        return jcrName;
-    }
-
-    /**
-     * @param jcrName The jcrName to set.
-     */
-    public void setJcrName(String jcrName) {
-        this.jcrName = jcrName;
-    }
-
-    /**
-     *
-     * @return the associated class descriptor
-     */
-    public ClassDescriptor getClassDescriptor() {
-        return classDescriptor;
-    }
-
-    /**
-     * Set the associated class descriptor
-     * @param classDescriptor  the class descriptor to set
-     */
-    public void setClassDescriptor(ClassDescriptor classDescriptor) {
-        this.classDescriptor = classDescriptor;
-    }
-
-    /**
-     * @return true if the field is the class ID
-     */
-    public boolean isId() {
-        return id;
-    }
-
-    /**
-     *
-     * @param id
-     */
-    public void setId(boolean id) {
-        this.id = id;
-    }
-
-    /**
-     * @return Returns true if the field is the object JCR path.
-     */
-    public boolean isPath() {
-        return path;
-    }
-
-    /**
-     * @param path The path to set.
-     */
-    public void setPath(boolean path) {
-        this.path = path;
-    }
-
-    /** Getter for property jcrType.
-     *
-     * @return jcrType
-     */
-    public String getJcrType() {
-        return jcrType;
-    }
-
-    /** Setter for property jcrType.
-     *
-     * @param value jcrType
-     */
-    public void setJcrType(String value) {
-        this.jcrType = value;
-    }
-
-    /** Getter for propery jcrAutoCreated.
-     *
-     * @return jcrAutoCreated
-     */
-    public boolean isJcrAutoCreated() {
-        return jcrAutoCreated;
-    }
-
-    /** Setter for property jcrAutoCreated.
-     *
-     * @param value jcrAutoCreated
-     */
-    public void setJcrAutoCreated(boolean value) {
-        this.jcrAutoCreated = value;
-    }
-
-    /** Getter for property jcrMandatory.
-     *
-     * @return jcrMandatory
-     */
-    public boolean isJcrMandatory() {
-        return jcrMandatory;
-    }
-
-    /** Setter for property jcrMandatory.
-     *
-     * @param value jcrMandatory
-     */
-    public void setJcrMandatory(boolean value) {
-        this.jcrMandatory = value;
-    }
-
-    /** Getter for property jcrOnParentVersion.
-     *
-     * @return jcrOnParentVersion
-     */
-    public String getJcrOnParentVersion() {
-        return jcrOnParentVersion;
-    }
-
-    /** Setter for property jcrOnParentVersion.
-     *
-     * @param value jcrOnParentVersion
-     */
-    public void setJcrOnParentVersion(String value) {
-        this.jcrOnParentVersion = value;
-    }
-
-    /** Getter for property jcrProtected.
-     *
-     * @return jcrProtected
-     */
-    public boolean isJcrProtected() {
-        return jcrProtected;
-    }
-
-    /** Setter for property jcrProtected.
-     *
-     * @param value jcrProtected
-     */
-    public void setJcrProtected(boolean value) {
-        this.jcrProtected = value;
-    }
-
-    /** Getter for property jcrMultiple.
-     *
-     * @return jcrMultiple
-     */
-    public boolean isJcrMultiple() {
-        return jcrMultiple;
-    }
-
-    /** Setter for property jcrMultiple.
-     *
-     * @param value jcrMultiple
-     */
-    public void setJcrMultiple(boolean value) {
-        this.jcrMultiple = value;
-    }
-
-    /**
-     * Initialize the fieldTypeClass.
-     *
-     * @return the primitive class or the class accordign to fieldType
-     */
-    private Class loadFieldTypeClass() {
-        if (this.fieldType == null) {
-            return null;
-        }
-        if ("byte".equals(this.fieldType)) {
-            return byte.class;
-        }
-        else if ("short".equals(this.fieldType)) {
-            return short.class;
-        }
-        else if ("int".equals(this.fieldType)) {
-            return int.class;
-        }
-        else if ("long".equals(this.fieldType)) {
-            return long.class;
-        }
-        else if ("float".equals(this.fieldType)) {
-            return float.class;
-        }
-        else if ("double".equals(this.fieldType)) {
-            return double.class;
-        }
-        else if ("char".equals(this.fieldType)) {
-            return char.class;
-        }
-        else if ("boolean".equals(this.fieldType)) {
-            return boolean.class;
-        }
-        else {
-            try {
-                return ReflectionUtils.forName(this.fieldType);
-            }
-            catch (JcrMappingException jme) {
-                ; // nothing to do; it will be dynamically determined
-            }
-        }
-
-        return null;
-    }
-    
-	public String toString() {
-		
-		return "Field Descriptor : " +  this.getFieldName();
-	}    
-}
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.portals.graffito.jcr.mapper.model;
+
+import org.apache.portals.graffito.jcr.exception.JcrMappingException;
+import org.apache.portals.graffito.jcr.reflection.ReflectionUtils;
+
+
+/**
+ *
+ *
+ * FieldDescriptor is used by the mapper to read general information on a atomic field
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ *
+ */
+public class FieldDescriptor {
+    private String fieldName;
+    private String fieldType;
+    private Class fieldTypeClass;
+    private String jcrName;
+    private String jcrType;
+    private boolean jcrAutoCreated;
+    private boolean jcrMandatory;
+    private String jcrOnParentVersion;
+    private boolean jcrProtected;
+    private boolean jcrMultiple;
+    private ClassDescriptor classDescriptor;
+    private boolean id;
+    private boolean path;
+   
+
+    /**
+     * @return Returns the fieldName.
+     */
+    public String getFieldName() {
+        return fieldName;
+    }
+
+    /**
+     * @param fieldName The fieldName to set.
+     */
+    public void setFieldName(String fieldName) {
+        this.fieldName = fieldName;
+    }
+
+    /**
+     * @return the primitive or fully qualified class of the field
+     * or <tt>null</tt> if not specified in the mapping
+     */
+    public String getFieldType() {
+        return this.fieldType;
+    }
+
+    /**
+     * Sets the type of the field. It supports primitive types, specified as
+     * int, long, etc or fully qualified class names.
+     *
+     * @param fieldType the type of the field
+     */
+    public void setFieldType(String fieldType) {
+        this.fieldType = fieldType;
+    }
+
+    /**
+     * @return the field class of the field
+     * or <tt>null</tt> if not specified in the mapping
+     * or if the class was not found
+     */
+    public Class getFieldTypeClass() {
+        if (this.fieldType == null) {
+            return null;
+        }
+        if (this.fieldTypeClass == null) {
+            this.fieldTypeClass = loadFieldTypeClass();
+        }
+
+        return this.fieldTypeClass;
+    }
+
+    /**
+     * @return Returns the jcrName.
+     */
+    public String getJcrName() {
+        return jcrName;
+    }
+
+    /**
+     * @param jcrName The jcrName to set.
+     */
+    public void setJcrName(String jcrName) {
+        this.jcrName = jcrName;
+    }
+
+    /**
+     *
+     * @return the associated class descriptor
+     */
+    public ClassDescriptor getClassDescriptor() {
+        return classDescriptor;
+    }
+
+    /**
+     * Set the associated class descriptor
+     * @param classDescriptor  the class descriptor to set
+     */
+    public void setClassDescriptor(ClassDescriptor classDescriptor) {
+        this.classDescriptor = classDescriptor;
+    }
+
+    /**
+     * @return true if the field is the class ID
+     */
+    public boolean isId() {
+        return id;
+    }
+
+    /**
+     *
+     * @param id
+     */
+    public void setId(boolean id) {
+        this.id = id;
+    }
+
+    /**
+     * @return Returns true if the field is the object JCR path.
+     */
+    public boolean isPath() {
+        return path;
+    }
+
+    /**
+     * @param path The path to set.
+     */
+    public void setPath(boolean path) {
+        this.path = path;
+    }
+
+    /** Getter for property jcrType.
+     *
+     * @return jcrType
+     */
+    public String getJcrType() {
+        return jcrType;
+    }
+
+    /** Setter for property jcrType.
+     *
+     * @param value jcrType
+     */
+    public void setJcrType(String value) {
+        this.jcrType = value;
+    }
+
+    /** Getter for propery jcrAutoCreated.
+     *
+     * @return jcrAutoCreated
+     */
+    public boolean isJcrAutoCreated() {
+        return jcrAutoCreated;
+    }
+
+    /** Setter for property jcrAutoCreated.
+     *
+     * @param value jcrAutoCreated
+     */
+    public void setJcrAutoCreated(boolean value) {
+        this.jcrAutoCreated = value;
+    }
+
+    /** Getter for property jcrMandatory.
+     *
+     * @return jcrMandatory
+     */
+    public boolean isJcrMandatory() {
+        return jcrMandatory;
+    }
+
+    /** Setter for property jcrMandatory.
+     *
+     * @param value jcrMandatory
+     */
+    public void setJcrMandatory(boolean value) {
+        this.jcrMandatory = value;
+    }
+
+    /** Getter for property jcrOnParentVersion.
+     *
+     * @return jcrOnParentVersion
+     */
+    public String getJcrOnParentVersion() {
+        return jcrOnParentVersion;
+    }
+
+    /** Setter for property jcrOnParentVersion.
+     *
+     * @param value jcrOnParentVersion
+     */
+    public void setJcrOnParentVersion(String value) {
+        this.jcrOnParentVersion = value;
+    }
+
+    /** Getter for property jcrProtected.
+     *
+     * @return jcrProtected
+     */
+    public boolean isJcrProtected() {
+        return jcrProtected;
+    }
+
+    /** Setter for property jcrProtected.
+     *
+     * @param value jcrProtected
+     */
+    public void setJcrProtected(boolean value) {
+        this.jcrProtected = value;
+    }
+
+    /** Getter for property jcrMultiple.
+     *
+     * @return jcrMultiple
+     */
+    public boolean isJcrMultiple() {
+        return jcrMultiple;
+    }
+
+    /** Setter for property jcrMultiple.
+     *
+     * @param value jcrMultiple
+     */
+    public void setJcrMultiple(boolean value) {
+        this.jcrMultiple = value;
+    }
+
+    /**
+     * Initialize the fieldTypeClass.
+     *
+     * @return the primitive class or the class accordign to fieldType
+     */
+    private Class loadFieldTypeClass() {
+        if (this.fieldType == null) {
+            return null;
+        }
+        if ("byte".equals(this.fieldType)) {
+            return byte.class;
+        }
+        else if ("short".equals(this.fieldType)) {
+            return short.class;
+        }
+        else if ("int".equals(this.fieldType)) {
+            return int.class;
+        }
+        else if ("long".equals(this.fieldType)) {
+            return long.class;
+        }
+        else if ("float".equals(this.fieldType)) {
+            return float.class;
+        }
+        else if ("double".equals(this.fieldType)) {
+            return double.class;
+        }
+        else if ("char".equals(this.fieldType)) {
+            return char.class;
+        }
+        else if ("boolean".equals(this.fieldType)) {
+            return boolean.class;
+        }
+        else {
+            try {
+                return ReflectionUtils.forName(this.fieldType);
+            }
+            catch (JcrMappingException jme) {
+                ; // nothing to do; it will be dynamically determined
+            }
+        }
+
+        return null;
+    }
+    
+	public String toString() {
+		
+		return "Field Descriptor : " +  this.getFieldName();
+	}    
+}

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/FieldDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ImplementDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ImplementDescriptor.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ImplementDescriptor.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ImplementDescriptor.java Wed Sep 20 12:37:05 2006
@@ -1,42 +1,42 @@
-/*
- * Copyright 2000-2005 The Apache Software Foundation.
- *
- * Licensed 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.portals.graffito.jcr.mapper.model;
-
-
-/**
- *
- *
- * ImplementDescriptor is used by the mapper to read general information on a implemented interface
- *
- * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
- *
- */
-public class ImplementDescriptor {
-    private String interfaceName;
-
-	public String getInterfaceName() {
-		return interfaceName;
-	}
-
-	public void setInterfaceName(String interfaceName) {
-		this.interfaceName = interfaceName;
-	}
-
-	public String toString() {
-		
-		return "Field Descriptor : " +  this.interfaceName;
-	}    
-}
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.portals.graffito.jcr.mapper.model;
+
+
+/**
+ *
+ *
+ * ImplementDescriptor is used by the mapper to read general information on a implemented interface
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ *
+ */
+public class ImplementDescriptor {
+    private String interfaceName;
+
+	public String getInterfaceName() {
+		return interfaceName;
+	}
+
+	public void setInterfaceName(String interfaceName) {
+		this.interfaceName = interfaceName;
+	}
+
+	public String toString() {
+		
+		return "Field Descriptor : " +  this.interfaceName;
+	}    
+}

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ImplementDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/MappingDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/MappingDescriptor.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/MappingDescriptor.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/MappingDescriptor.java Wed Sep 20 12:37:05 2006
@@ -1,110 +1,110 @@
-/*
- * Copyright 2000-2005 The Apache Software Foundation.
- *
- * Licensed 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.portals.graffito.jcr.mapper.model;
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.portals.graffito.jcr.mapper.Mapper;
-import org.apache.portals.graffito.jcr.mapper.impl.DigesterMapperImpl;
-import org.apache.portals.graffito.jcr.persistence.PersistenceConstant;
-
-/**
- * This class match to the complete xml mapping files.
- * it contains mainly a collection of {@link ClassDescriptor}
- *
- * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
- * @version $Id: Exp $
- */
-public class MappingDescriptor {
-	
-	private static final Log log = LogFactory.getLog(MappingDescriptor.class);
-    private HashMap classDescriptorsByClassName = new HashMap();
-    private HashMap classDescriptorsByNodeType = new HashMap();
-
-    private Mapper mapper;
-
-    private String packageName;
-    
-    public void setPackage(String pckgName) {
-        this.packageName = pckgName;
-    }
-    
-    /**
-     * Add a new ClassDescriptor
-     *
-     * @param classDescriptor The class descriptor to add
-     */
-    public void addClassDescriptor(ClassDescriptor classDescriptor) {
-    	
-        log.debug("Adding the class descriptor for : " + classDescriptor.getClassName());	
-        if (null != this.packageName && !"".equals(this.packageName)) {
-            classDescriptor.setClassName(this.packageName + "." + classDescriptor.getClassName());
-
-            if (null != classDescriptor.getExtend() && !"".equals(classDescriptor.getExtend())) {
-                classDescriptor.setExtend(this.packageName + "." + classDescriptor.getExtend());
-            }
-        }
-
-        classDescriptorsByClassName.put(classDescriptor.getClassName(), classDescriptor);
-        
-        if (null != classDescriptor.getJcrNodeType() && !  "".equals(classDescriptor.getJcrNodeType()) && 
-        		 ! PersistenceConstant.NT_UNSTRUCTURED.equals(classDescriptor.getJcrNodeType()))
-        	 {
-             classDescriptorsByNodeType.put(classDescriptor.getJcrNodeType(), classDescriptor);	
-        	 }
-        classDescriptor.setMappingDescriptor(this);
-    }
-
-    /**
-     * Get the classdescriptor to used for the class
-     * @param className the class name
-     * @return the class descriptor found or null
-     */
-    public ClassDescriptor getClassDescriptorByName(String className) {
-        return (ClassDescriptor) classDescriptorsByClassName.get(className);
-    }
-    
-    public ClassDescriptor getClassDescriptorByNodeType(String nodeType)
-    {
-        return (ClassDescriptor) classDescriptorsByNodeType.get(nodeType);	
-    }
-
-    /**
-     * Get all class descriptors by class name
-     * @return all class descriptors found
-     */
-    public Map getClassDescriptorsByClassName() {
-        return classDescriptorsByClassName;
-    }
-    /**
-     * Get all class descriptors by class name
-     * @return all class descriptors found
-     */
-    public Map getClassDescriptorsByNodeType() {
-        return classDescriptorsByNodeType;
-    }
-    public Mapper getMapper() {
-        return this.mapper;
-    }
-
-    public void setMapper(Mapper parentMapper) {
-        this.mapper = parentMapper;
-    }
-}
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.portals.graffito.jcr.mapper.model;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.portals.graffito.jcr.mapper.Mapper;
+import org.apache.portals.graffito.jcr.mapper.impl.DigesterMapperImpl;
+import org.apache.portals.graffito.jcr.persistence.PersistenceConstant;
+
+/**
+ * This class match to the complete xml mapping files.
+ * it contains mainly a collection of {@link ClassDescriptor}
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public class MappingDescriptor {
+	
+	private static final Log log = LogFactory.getLog(MappingDescriptor.class);
+    private HashMap classDescriptorsByClassName = new HashMap();
+    private HashMap classDescriptorsByNodeType = new HashMap();
+
+    private Mapper mapper;
+
+    private String packageName;
+    
+    public void setPackage(String pckgName) {
+        this.packageName = pckgName;
+    }
+    
+    /**
+     * Add a new ClassDescriptor
+     *
+     * @param classDescriptor The class descriptor to add
+     */
+    public void addClassDescriptor(ClassDescriptor classDescriptor) {
+    	
+        log.debug("Adding the class descriptor for : " + classDescriptor.getClassName());	
+        if (null != this.packageName && !"".equals(this.packageName)) {
+            classDescriptor.setClassName(this.packageName + "." + classDescriptor.getClassName());
+
+            if (null != classDescriptor.getExtend() && !"".equals(classDescriptor.getExtend())) {
+                classDescriptor.setExtend(this.packageName + "." + classDescriptor.getExtend());
+            }
+        }
+
+        classDescriptorsByClassName.put(classDescriptor.getClassName(), classDescriptor);
+        
+        if (null != classDescriptor.getJcrNodeType() && !  "".equals(classDescriptor.getJcrNodeType()) && 
+        		 ! PersistenceConstant.NT_UNSTRUCTURED.equals(classDescriptor.getJcrNodeType()))
+        	 {
+             classDescriptorsByNodeType.put(classDescriptor.getJcrNodeType(), classDescriptor);	
+        	 }
+        classDescriptor.setMappingDescriptor(this);
+    }
+
+    /**
+     * Get the classdescriptor to used for the class
+     * @param className the class name
+     * @return the class descriptor found or null
+     */
+    public ClassDescriptor getClassDescriptorByName(String className) {
+        return (ClassDescriptor) classDescriptorsByClassName.get(className);
+    }
+    
+    public ClassDescriptor getClassDescriptorByNodeType(String nodeType)
+    {
+        return (ClassDescriptor) classDescriptorsByNodeType.get(nodeType);	
+    }
+
+    /**
+     * Get all class descriptors by class name
+     * @return all class descriptors found
+     */
+    public Map getClassDescriptorsByClassName() {
+        return classDescriptorsByClassName;
+    }
+    /**
+     * Get all class descriptors by class name
+     * @return all class descriptors found
+     */
+    public Map getClassDescriptorsByNodeType() {
+        return classDescriptorsByNodeType;
+    }
+    public Mapper getMapper() {
+        return this.mapper;
+    }
+
+    public void setMapper(Mapper parentMapper) {
+        this.mapper = parentMapper;
+    }
+}

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/MappingDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/CustomNodeTypeCreator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/PersistenceConstant.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/PersistenceManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/AtomicTypeConverter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/AtomicTypeConverterProvider.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/AtomicTypeConverterProvider.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/AtomicTypeConverterProvider.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/AtomicTypeConverterProvider.java Wed Sep 20 12:37:05 2006
@@ -1,45 +1,45 @@
-/*
- * Copyright 2004-2005 The Apache Software Foundation or its licensors,
- *                     as applicable.
- *
- * Licensed 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.portals.graffito.jcr.persistence.atomictypeconverter;
-
-
-import java.util.Map;
-
-/**
- * This interface defines a provider for accessing
- * {@link org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter}
- * 
- * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
- */
-public interface AtomicTypeConverterProvider {
-    /**
-     * Retrieves the <code>AtomicTypeConverter</code> associated with a class.
-     * 
-     * @param clazz a class
-     * @return the corresponding <code>AtomicTypeConverter</code> or <tt>null</tt>
-     * if the class has no <code>AtomicTypeConverter</code> associated
-     */
-    AtomicTypeConverter getAtomicTypeConverter(Class clazz);
-
-    /**
-     * Returns a map of all registered <code>AtomicTypeConverter<code>s.
-     * 
-     * @return <code>Map<Class, AtomicTypeConverter></code>
-     */
-    Map getAtomicTypeConverters();
-
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed 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.portals.graffito.jcr.persistence.atomictypeconverter;
+
+
+import java.util.Map;
+
+/**
+ * This interface defines a provider for accessing
+ * {@link org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter}
+ * 
+ * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
+ */
+public interface AtomicTypeConverterProvider {
+    /**
+     * Retrieves the <code>AtomicTypeConverter</code> associated with a class.
+     * 
+     * @param clazz a class
+     * @return the corresponding <code>AtomicTypeConverter</code> or <tt>null</tt>
+     * if the class has no <code>AtomicTypeConverter</code> associated
+     */
+    AtomicTypeConverter getAtomicTypeConverter(Class clazz);
+
+    /**
+     * Returns a map of all registered <code>AtomicTypeConverter<code>s.
+     * 
+     * @return <code>Map<Class, AtomicTypeConverter></code>
+     */
+    Map getAtomicTypeConverters();
+
 }

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/AtomicTypeConverterProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/AtomicTypeConverterProviderImpl.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/AtomicTypeConverterProviderImpl.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/AtomicTypeConverterProviderImpl.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/AtomicTypeConverterProviderImpl.java Wed Sep 20 12:37:05 2006
@@ -1,101 +1,101 @@
-/*
- * Copyright 2004-2005 The Apache Software Foundation or its licensors,
- *                     as applicable.
- *
- * Licensed 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.portals.graffito.jcr.persistence.atomictypeconverter.impl;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.portals.graffito.jcr.exception.IncorrectAtomicTypeException;
-import org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter;
-import org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverterProvider;
-
-
-/**
- * Implementation of {@link AtomicTypeConverterProvider}.
- * 
- * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
- */
-public class AtomicTypeConverterProviderImpl implements AtomicTypeConverterProvider {
-    protected Map m_converters;
-    protected Map m_converterInstances = new HashMap();
-    
-    /**
-     * No-arg constructor.
-     */
-    public AtomicTypeConverterProviderImpl() {
-    }
-    
-    /**
-     * Full constructor.
-     * 
-     * @param converters a map of classes and their associated <code>AtomicTypeConverter</code>
-     * classes.
-     */
-    public AtomicTypeConverterProviderImpl(Map converters) {
-        m_converters= converters;
-    }
-    
-    /**
-     * Sets the associations of classes and their <code>AtomicTypeConverter</code>
-     * classes.
-     * 
-     * @param converters <code>Map<Class, Class></code>
-     */
-    public void setAtomicTypeConvertors(Map converters) {
-        m_converters= converters;
-    }
-    
-    /**
-     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverterProvider#getAtomicTypeConverter(java.lang.Class)
-     */
-    public AtomicTypeConverter getAtomicTypeConverter(Class clazz) {
-        AtomicTypeConverter converter= (AtomicTypeConverter) m_converterInstances.get(clazz);
-        if(null != converter) {
-            return converter;
-        }
-        Class converterClass= (Class) m_converters.get(clazz);
-        if(null == converterClass) {
-            throw new IncorrectAtomicTypeException("No registered converter for class '" + clazz + "'");
-        }
-        
-        try {
-            converter= (AtomicTypeConverter) converterClass.newInstance();
-            m_converterInstances.put(clazz, converter);
-        }
-        catch(Exception ex) {
-            throw new IncorrectAtomicTypeException(
-                    "Cannot create converter instance from class '" + clazz + "'", ex);
-            
-        }
-        
-        return converter;
-    }
-    
-    /**
-     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverterProvider#getAtomicTypeConverters()
-     */
-    public Map getAtomicTypeConverters() {
-        Map result= new HashMap();
-        for(Iterator it= m_converters.keySet().iterator(); it.hasNext(); ) {
-            Class clazz= (Class) it.next();
-            result.put(clazz, getAtomicTypeConverter(clazz));
-        }
-        
-        return result;
-    }
-}
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed 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.portals.graffito.jcr.persistence.atomictypeconverter.impl;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.portals.graffito.jcr.exception.IncorrectAtomicTypeException;
+import org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter;
+import org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverterProvider;
+
+
+/**
+ * Implementation of {@link AtomicTypeConverterProvider}.
+ * 
+ * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
+ */
+public class AtomicTypeConverterProviderImpl implements AtomicTypeConverterProvider {
+    protected Map m_converters;
+    protected Map m_converterInstances = new HashMap();
+    
+    /**
+     * No-arg constructor.
+     */
+    public AtomicTypeConverterProviderImpl() {
+    }
+    
+    /**
+     * Full constructor.
+     * 
+     * @param converters a map of classes and their associated <code>AtomicTypeConverter</code>
+     * classes.
+     */
+    public AtomicTypeConverterProviderImpl(Map converters) {
+        m_converters= converters;
+    }
+    
+    /**
+     * Sets the associations of classes and their <code>AtomicTypeConverter</code>
+     * classes.
+     * 
+     * @param converters <code>Map<Class, Class></code>
+     */
+    public void setAtomicTypeConvertors(Map converters) {
+        m_converters= converters;
+    }
+    
+    /**
+     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverterProvider#getAtomicTypeConverter(java.lang.Class)
+     */
+    public AtomicTypeConverter getAtomicTypeConverter(Class clazz) {
+        AtomicTypeConverter converter= (AtomicTypeConverter) m_converterInstances.get(clazz);
+        if(null != converter) {
+            return converter;
+        }
+        Class converterClass= (Class) m_converters.get(clazz);
+        if(null == converterClass) {
+            throw new IncorrectAtomicTypeException("No registered converter for class '" + clazz + "'");
+        }
+        
+        try {
+            converter= (AtomicTypeConverter) converterClass.newInstance();
+            m_converterInstances.put(clazz, converter);
+        }
+        catch(Exception ex) {
+            throw new IncorrectAtomicTypeException(
+                    "Cannot create converter instance from class '" + clazz + "'", ex);
+            
+        }
+        
+        return converter;
+    }
+    
+    /**
+     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverterProvider#getAtomicTypeConverters()
+     */
+    public Map getAtomicTypeConverters() {
+        Map result= new HashMap();
+        for(Iterator it= m_converters.keySet().iterator(); it.hasNext(); ) {
+            Class clazz= (Class) it.next();
+            result.put(clazz, getAtomicTypeConverter(clazz));
+        }
+        
+        return result;
+    }
+}

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/AtomicTypeConverterProviderImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/BinaryTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/BooleanTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/ByteArrayTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/CalendarTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/DefaultAtomicTypeConverterProvider.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/DefaultAtomicTypeConverterProvider.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/DefaultAtomicTypeConverterProvider.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/DefaultAtomicTypeConverterProvider.java Wed Sep 20 12:37:05 2006
@@ -1,81 +1,81 @@
-/*
- * Copyright 2004-2005 The Apache Software Foundation or its licensors,
- *                     as applicable.
- *
- * Licensed 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.portals.graffito.jcr.persistence.atomictypeconverter.impl;
-
-import java.io.InputStream;
-import java.sql.Timestamp;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- * An <code>AtomicTypeConverterProvider</code> that registers by default the
- * convertes available in Graffito.
- * 
- * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
- */
-public class DefaultAtomicTypeConverterProvider extends AtomicTypeConverterProviderImpl {
-    /**
-     * No-arg constructor.
-     */
-    public DefaultAtomicTypeConverterProvider() {
-        m_converters= registerDefaultAtomicTypeConverters();
-    }
-    
-    /**
-     * Full constructor.
-     * 
-     * @param converters a map of classes and their associated <code>AtomicTypeConverter</code>
-     * classes.
-     */
-    public DefaultAtomicTypeConverterProvider(Map converters) {
-        this();
-        m_converters.putAll(converters);
-    }
-    
-    /**
-     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.impl.AtomicTypeConverterProviderImpl#setAtomicTypeConvertors(java.util.Map)
-     */
-    public void setAtomicTypeConvertors(Map converters) {
-        m_converters.putAll(converters);
-    }
-    
-    protected Map registerDefaultAtomicTypeConverters() {
-        Map converters= new HashMap();
-        
-        converters.put(String.class, StringTypeConverterImpl.class);
-        converters.put(InputStream.class, BinaryTypeConverterImpl.class);
-        converters.put(long.class, LongTypeConverterImpl.class);
-        converters.put(Long.class, LongTypeConverterImpl.class);
-        converters.put(int.class, IntTypeConverterImpl.class);
-        converters.put(Integer.class, IntTypeConverterImpl.class);
-        converters.put(double.class, DoubleTypeConverterImpl.class);
-        converters.put(Double.class, DoubleTypeConverterImpl.class);
-        converters.put(boolean.class, BooleanTypeConverterImpl.class);
-        converters.put(Boolean.class, BooleanTypeConverterImpl.class);
-        converters.put(Calendar.class, CalendarTypeConverterImpl.class);
-        converters.put(GregorianCalendar.class, CalendarTypeConverterImpl.class);
-        converters.put(Date.class, UtilDateTypeConverterImpl.class);
-        converters.put(byte[].class, ByteArrayTypeConverterImpl.class);
-        converters.put(Timestamp.class, TimestampTypeConverterImpl.class);
-        
-        return converters;
-    }
-}
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed 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.portals.graffito.jcr.persistence.atomictypeconverter.impl;
+
+import java.io.InputStream;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * An <code>AtomicTypeConverterProvider</code> that registers by default the
+ * convertes available in Graffito.
+ * 
+ * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
+ */
+public class DefaultAtomicTypeConverterProvider extends AtomicTypeConverterProviderImpl {
+    /**
+     * No-arg constructor.
+     */
+    public DefaultAtomicTypeConverterProvider() {
+        m_converters= registerDefaultAtomicTypeConverters();
+    }
+    
+    /**
+     * Full constructor.
+     * 
+     * @param converters a map of classes and their associated <code>AtomicTypeConverter</code>
+     * classes.
+     */
+    public DefaultAtomicTypeConverterProvider(Map converters) {
+        this();
+        m_converters.putAll(converters);
+    }
+    
+    /**
+     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.impl.AtomicTypeConverterProviderImpl#setAtomicTypeConvertors(java.util.Map)
+     */
+    public void setAtomicTypeConvertors(Map converters) {
+        m_converters.putAll(converters);
+    }
+    
+    protected Map registerDefaultAtomicTypeConverters() {
+        Map converters= new HashMap();
+        
+        converters.put(String.class, StringTypeConverterImpl.class);
+        converters.put(InputStream.class, BinaryTypeConverterImpl.class);
+        converters.put(long.class, LongTypeConverterImpl.class);
+        converters.put(Long.class, LongTypeConverterImpl.class);
+        converters.put(int.class, IntTypeConverterImpl.class);
+        converters.put(Integer.class, IntTypeConverterImpl.class);
+        converters.put(double.class, DoubleTypeConverterImpl.class);
+        converters.put(Double.class, DoubleTypeConverterImpl.class);
+        converters.put(boolean.class, BooleanTypeConverterImpl.class);
+        converters.put(Boolean.class, BooleanTypeConverterImpl.class);
+        converters.put(Calendar.class, CalendarTypeConverterImpl.class);
+        converters.put(GregorianCalendar.class, CalendarTypeConverterImpl.class);
+        converters.put(Date.class, UtilDateTypeConverterImpl.class);
+        converters.put(byte[].class, ByteArrayTypeConverterImpl.class);
+        converters.put(Timestamp.class, TimestampTypeConverterImpl.class);
+        
+        return converters;
+    }
+}

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/DefaultAtomicTypeConverterProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/DoubleTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/IntTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/LongTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/NullTypeConverterImpl.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/NullTypeConverterImpl.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/NullTypeConverterImpl.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/NullTypeConverterImpl.java Wed Sep 20 12:37:05 2006
@@ -1,56 +1,56 @@
-/*
- * Copyright 2004-2005 The Apache Software Foundation or its licensors,
- *                     as applicable.
- *
- * Licensed 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.portals.graffito.jcr.persistence.atomictypeconverter.impl;
-
-
-import javax.jcr.Value;
-import javax.jcr.ValueFactory;
-
-import org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter;
-
-/**
- * Double Type Converter
- *
- * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
- */
-public class NullTypeConverterImpl implements AtomicTypeConverter {
-
-    /**
-     *
-     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter#getValue(java.lang.Object)
-     */
-    public Value getValue(ValueFactory valueFactory, Object propValue) {
-        return null;
-    }
-
-    /**
-     *
-     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter#getObject(javax.jcr.Value)
-     */
-    public Object getObject(Value value) {
-        return null;
-    }
-
-    /**
-     *
-     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter#getStringValue(java.lang.Object)
-     */
-    public String getStringValue(Object object) {
-        return null;
-    }
-}
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed 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.portals.graffito.jcr.persistence.atomictypeconverter.impl;
+
+
+import javax.jcr.Value;
+import javax.jcr.ValueFactory;
+
+import org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter;
+
+/**
+ * Double Type Converter
+ *
+ * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
+ */
+public class NullTypeConverterImpl implements AtomicTypeConverter {
+
+    /**
+     *
+     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter#getValue(java.lang.Object)
+     */
+    public Value getValue(ValueFactory valueFactory, Object propValue) {
+        return null;
+    }
+
+    /**
+     *
+     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter#getObject(javax.jcr.Value)
+     */
+    public Object getObject(Value value) {
+        return null;
+    }
+
+    /**
+     *
+     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter#getStringValue(java.lang.Object)
+     */
+    public String getStringValue(Object object) {
+        return null;
+    }
+}

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/NullTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/StringTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/TimestampTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UtilDateTypeConverterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/collectionconverter/CollectionConverter.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/collectionconverter/CollectionConverter.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/collectionconverter/CollectionConverter.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/collectionconverter/CollectionConverter.java Wed Sep 20 12:37:05 2006
@@ -1,87 +1,87 @@
-/*
- * Copyright 2000-2005 The Apache Software Foundation.
- * 
- * Licensed 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.portals.graffito.jcr.persistence.collectionconverter;
-
-import javax.jcr.Node;
-import javax.jcr.Session;
-
-import org.apache.portals.graffito.jcr.exception.PersistenceException;
-import org.apache.portals.graffito.jcr.mapper.model.CollectionDescriptor;
-
-/**
- * Convert any kind of {@link ManageableCollection} into severals JCR nodes.
- * 
- * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
- * 
- */
-public interface CollectionConverter
-{
-
-	/**
-	 * Insert/convert collection elements into some JCR nodes
-	 * @param session The JCR session 
-	 * @param parentNode the node which will contains the collection element
-	 * @param collectionDescriptor The collection descriptor
-	 * @param collection the collection to insert
-	 * 
-	 * @throws PersistenceException when it is not possible to insert the collection
-	 * 
-	 */
-	public void insertCollection(Session session, Node parentNode, 
-			                     CollectionDescriptor collectionDescriptor, ManageableCollection collection) throws PersistenceException;
-
-	/**
-	 * Update collection elements already present in the JCR repository
-	 * @param session The JCR session 
-	 * @param parentNode the node which will contains the collection element
-	 * @param collectionDescriptor The collection descriptor
-	 * @param collection the collection to update
-	 * 
-	 * @throws PersistenceException when it is not possible to update the collection
-	 */
-	public void updateCollection(Session session, Node parentNode, 
-			                     CollectionDescriptor collectionDescriptor, ManageableCollection collection) throws PersistenceException;
-
-	/**
-	 * Get a {@link ManageableCollection} from the JCR repository 
-	 * @param session The JCR session 
-	 * @param parentNode the node which contains the collection element
-	 * @param collectionDescriptor The collection descriptor
-	 * @param collectionFieldClass The collection class to used (ArrayList, Vector, ..) 
-	 * @return The collection populates with all elements found in the JCR repository
-	 * 
-	 * @throws PersistenceException when it is not possible to retrieve the collection 
-	 */
-	public ManageableCollection getCollection(Session session, Node parentNode, 
-			                                  CollectionDescriptor collectionDescriptor, Class collectionFieldClass) throws PersistenceException;
-
-	
-	/**
-	 * Check if the collection is null. This method is mainly used in the Proxy manager to return a null value or a proxy object
-	 * Without proxy proxy, this method is never called. 
-	 * 
-	 * @param session The JCR session 
-	 * @param parentNode the node which contains the collection element
-	 * @param collectionDescriptor The collection descriptor
-	 * @param collectionFieldClass The collection class to used (ArrayList, Vector, ..) 
-	 * @return true if the collection contains elements.
-	 * 
-	 * 
-	 * @throws PersistenceException when it is not possible to retrieve the collection 
-	 */	
-	public boolean isNull(Session session, Node parentNode, 
-                                      CollectionDescriptor collectionDescriptor, Class collectionFieldClass) throws PersistenceException;
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.portals.graffito.jcr.persistence.collectionconverter;
+
+import javax.jcr.Node;
+import javax.jcr.Session;
+
+import org.apache.portals.graffito.jcr.exception.PersistenceException;
+import org.apache.portals.graffito.jcr.mapper.model.CollectionDescriptor;
+
+/**
+ * Convert any kind of {@link ManageableCollection} into severals JCR nodes.
+ * 
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * 
+ */
+public interface CollectionConverter
+{
+
+	/**
+	 * Insert/convert collection elements into some JCR nodes
+	 * @param session The JCR session 
+	 * @param parentNode the node which will contains the collection element
+	 * @param collectionDescriptor The collection descriptor
+	 * @param collection the collection to insert
+	 * 
+	 * @throws PersistenceException when it is not possible to insert the collection
+	 * 
+	 */
+	public void insertCollection(Session session, Node parentNode, 
+			                     CollectionDescriptor collectionDescriptor, ManageableCollection collection) throws PersistenceException;
+
+	/**
+	 * Update collection elements already present in the JCR repository
+	 * @param session The JCR session 
+	 * @param parentNode the node which will contains the collection element
+	 * @param collectionDescriptor The collection descriptor
+	 * @param collection the collection to update
+	 * 
+	 * @throws PersistenceException when it is not possible to update the collection
+	 */
+	public void updateCollection(Session session, Node parentNode, 
+			                     CollectionDescriptor collectionDescriptor, ManageableCollection collection) throws PersistenceException;
+
+	/**
+	 * Get a {@link ManageableCollection} from the JCR repository 
+	 * @param session The JCR session 
+	 * @param parentNode the node which contains the collection element
+	 * @param collectionDescriptor The collection descriptor
+	 * @param collectionFieldClass The collection class to used (ArrayList, Vector, ..) 
+	 * @return The collection populates with all elements found in the JCR repository
+	 * 
+	 * @throws PersistenceException when it is not possible to retrieve the collection 
+	 */
+	public ManageableCollection getCollection(Session session, Node parentNode, 
+			                                  CollectionDescriptor collectionDescriptor, Class collectionFieldClass) throws PersistenceException;
+
+	
+	/**
+	 * Check if the collection is null. This method is mainly used in the Proxy manager to return a null value or a proxy object
+	 * Without proxy proxy, this method is never called. 
+	 * 
+	 * @param session The JCR session 
+	 * @param parentNode the node which contains the collection element
+	 * @param collectionDescriptor The collection descriptor
+	 * @param collectionFieldClass The collection class to used (ArrayList, Vector, ..) 
+	 * @return true if the collection contains elements.
+	 * 
+	 * 
+	 * @throws PersistenceException when it is not possible to retrieve the collection 
+	 */	
+	public boolean isNull(Session session, Node parentNode, 
+                                      CollectionDescriptor collectionDescriptor, Class collectionFieldClass) throws PersistenceException;
 }

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/collectionconverter/CollectionConverter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/collectionconverter/ManageableCollection.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/collectionconverter/ManageableCollection.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/collectionconverter/ManageableCollection.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/collectionconverter/ManageableCollection.java Wed Sep 20 12:37:05 2006
@@ -1,47 +1,47 @@
-/*
- * Copyright 2000-2005 The Apache Software Foundation.
- * 
- * Licensed 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.portals.graffito.jcr.persistence.collectionconverter;
-
-import java.util.Iterator;
-
-/** 
- * Common interface used to persist any kind of Collection or Map.
- * 
- *
- * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
- * 
- */
-public interface ManageableCollection
-{
-    /**
-     * Add an object into this ManageableCollection
-     * @param object the object to add
-     */
-	public void addObject(Object object);
-   
-	/**
-	 * @return The ManageableCollection iterator
-	 */
-    public Iterator getIterator();
-    
-    /** 
-     * @return The ManageableCollection size
-     */
-    public int getSize();
-    
-    
-}
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.portals.graffito.jcr.persistence.collectionconverter;
+
+import java.util.Iterator;
+
+/** 
+ * Common interface used to persist any kind of Collection or Map.
+ * 
+ *
+ * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
+ * 
+ */
+public interface ManageableCollection
+{
+    /**
+     * Add an object into this ManageableCollection
+     * @param object the object to add
+     */
+	public void addObject(Object object);
+   
+	/**
+	 * @return The ManageableCollection iterator
+	 */
+    public Iterator getIterator();
+    
+    /** 
+     * @return The ManageableCollection size
+     */
+    public int getSize();
+    
+    
+}

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/collectionconverter/ManageableCollection.java
------------------------------------------------------------------------------
    svn:eol-style = native