incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r448311 [20/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...
Date Wed, 20 Sep 2006 19:37:21 GMT
Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/BeanConverter.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/BeanConverter.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/BeanConverter.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/BeanConverter.java
Wed Sep 20 12:37:05 2006
@@ -1,108 +1,108 @@
-/*
- * 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.objectconverter;
-
-
-import javax.jcr.Node;
-import javax.jcr.Session;
-
-import org.apache.portals.graffito.jcr.exception.JcrMappingException;
-import org.apache.portals.graffito.jcr.exception.PersistenceException;
-import org.apache.portals.graffito.jcr.exception.RepositoryException;
-import org.apache.portals.graffito.jcr.mapper.model.BeanDescriptor;
-
-/**
- * Interface describing a custom bean converter. 
- *
- * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
- */
-public interface BeanConverter {
-    /**
-     * Insert the object.
-     *
-     * @param session the JCR session
-     * @param parentNode The parent node
-     * @param mapper available mappings
-     * @param beanName bean name to be inserter
-     * @param object bean
-     * 
-     * @throws PersistenceException thrown in case the insert fails; marks a failure due
to logic of
-     *  the insert (parent node cannot be accessed, the insert fails, etc.)
-     * @throws RepositoryException thrown in case the underlying repository has thrown a
-     *  <code>javax.jcr.RepositoryException</code> that is not possible to be
handled or
-     *  wrapped in PersistenceException; marks a repository failure
-     * @throws JcrMappingException throws in case the mapping of the bean is not correct
-     */
-    void insert(Session session, Node parentNode, BeanDescriptor descriptor, Object object)
-    throws PersistenceException, RepositoryException, JcrMappingException;
-
-    /**
-     * Update repository from bean values.
-     *
-     * @param session the JCR session
-     * @param parentNode The parent node
-     * @param mapper available mappings
-     * @param beanName bean name to be updated
-     * @param object bean
-     * 
-     * @throws PersistenceException thrown in case the update fails; marks a failure due
to logic
-     *  of update (parent node cannot be accessed, the update fails, etc.)
-     * @throws RepositoryException thrown in case the underlying repository has thrown a
-     *  <code>javax.jcr.RepositoryException</code> that is not possible to be
handled or
-     *  wrapped in PersistenceException; marks a repository failure
-     * @throws JcrMappingException throws in case the mapping of the bean is not correct
-     */
-    void update(Session session, Node parentNode, BeanDescriptor descriptor, Object object)
-    throws PersistenceException, RepositoryException, JcrMappingException;
-    
-    /**
-     * Retrieve a bean from the repository.
-     * 
-     * @param session the JCR session
-     * @param parentNode The parent node
-     * @param mapper available mappings
-     * @param beanName bean name to be retrieved
-     * @param beanClass class of the bean to be retrieved
-     * 
-     * @throws PersistenceException thrown in case the bean cannot be retrieved or initialized;

-     *  marks a failure due to logic of retrieval
-     * @throws RepositoryException thrown in case the underlying repository has thrown a
-     *  <code>javax.jcr.RepositoryException</code> that is not possible to be
handled or
-     *  wrapped in PersistenceException; marks a repository failure
-     * @throws JcrMappingException throws in case the mapping of the bean is not correct
-     */
-    Object getObject(Session session, Node parentNode, BeanDescriptor descriptor, Class beanClass)

-    throws PersistenceException, RepositoryException, JcrMappingException;
-
-
-    /**
-     * Remove the bean from the repository.
-     * 
-     * @param session the JCR session
-     * @param parentNode The parent node
-     * @param mapper available mappings
-     * @param beanName bean name to be retrieved
-     * 
-     * @throws PersistenceException thrown in case the bean cannot be removed; 
-     *  marks a failure due to logic of removal
-     * @throws RepositoryException thrown in case the underlying repository has thrown a
-     *  <code>javax.jcr.RepositoryException</code> that is not possible to be
handled or
-     *  wrapped in PersistenceException; marks a repository failure
-     * @throws JcrMappingException throws in case the mapping of the bean is not correct
-     */
-    void remove(Session session, Node parentNode, BeanDescriptor descriptor)
-    throws PersistenceException, RepositoryException, JcrMappingException;
-}
+/*
+ * 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.objectconverter;
+
+
+import javax.jcr.Node;
+import javax.jcr.Session;
+
+import org.apache.portals.graffito.jcr.exception.JcrMappingException;
+import org.apache.portals.graffito.jcr.exception.PersistenceException;
+import org.apache.portals.graffito.jcr.exception.RepositoryException;
+import org.apache.portals.graffito.jcr.mapper.model.BeanDescriptor;
+
+/**
+ * Interface describing a custom bean converter. 
+ *
+ * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
+ */
+public interface BeanConverter {
+    /**
+     * Insert the object.
+     *
+     * @param session the JCR session
+     * @param parentNode The parent node
+     * @param mapper available mappings
+     * @param beanName bean name to be inserter
+     * @param object bean
+     * 
+     * @throws PersistenceException thrown in case the insert fails; marks a failure due
to logic of
+     *  the insert (parent node cannot be accessed, the insert fails, etc.)
+     * @throws RepositoryException thrown in case the underlying repository has thrown a
+     *  <code>javax.jcr.RepositoryException</code> that is not possible to be
handled or
+     *  wrapped in PersistenceException; marks a repository failure
+     * @throws JcrMappingException throws in case the mapping of the bean is not correct
+     */
+    void insert(Session session, Node parentNode, BeanDescriptor descriptor, Object object)
+    throws PersistenceException, RepositoryException, JcrMappingException;
+
+    /**
+     * Update repository from bean values.
+     *
+     * @param session the JCR session
+     * @param parentNode The parent node
+     * @param mapper available mappings
+     * @param beanName bean name to be updated
+     * @param object bean
+     * 
+     * @throws PersistenceException thrown in case the update fails; marks a failure due
to logic
+     *  of update (parent node cannot be accessed, the update fails, etc.)
+     * @throws RepositoryException thrown in case the underlying repository has thrown a
+     *  <code>javax.jcr.RepositoryException</code> that is not possible to be
handled or
+     *  wrapped in PersistenceException; marks a repository failure
+     * @throws JcrMappingException throws in case the mapping of the bean is not correct
+     */
+    void update(Session session, Node parentNode, BeanDescriptor descriptor, Object object)
+    throws PersistenceException, RepositoryException, JcrMappingException;
+    
+    /**
+     * Retrieve a bean from the repository.
+     * 
+     * @param session the JCR session
+     * @param parentNode The parent node
+     * @param mapper available mappings
+     * @param beanName bean name to be retrieved
+     * @param beanClass class of the bean to be retrieved
+     * 
+     * @throws PersistenceException thrown in case the bean cannot be retrieved or initialized;

+     *  marks a failure due to logic of retrieval
+     * @throws RepositoryException thrown in case the underlying repository has thrown a
+     *  <code>javax.jcr.RepositoryException</code> that is not possible to be
handled or
+     *  wrapped in PersistenceException; marks a repository failure
+     * @throws JcrMappingException throws in case the mapping of the bean is not correct
+     */
+    Object getObject(Session session, Node parentNode, BeanDescriptor descriptor, Class beanClass)

+    throws PersistenceException, RepositoryException, JcrMappingException;
+
+
+    /**
+     * Remove the bean from the repository.
+     * 
+     * @param session the JCR session
+     * @param parentNode The parent node
+     * @param mapper available mappings
+     * @param beanName bean name to be retrieved
+     * 
+     * @throws PersistenceException thrown in case the bean cannot be removed; 
+     *  marks a failure due to logic of removal
+     * @throws RepositoryException thrown in case the underlying repository has thrown a
+     *  <code>javax.jcr.RepositoryException</code> that is not possible to be
handled or
+     *  wrapped in PersistenceException; marks a repository failure
+     * @throws JcrMappingException throws in case the mapping of the bean is not correct
+     */
+    void remove(Session session, Node parentNode, BeanDescriptor descriptor)
+    throws PersistenceException, RepositoryException, JcrMappingException;
+}

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

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/ObjectConverter.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/ObjectConverter.java?view=diff&rev=448311&r1=448310&r2=448311
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/ObjectConverter.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/ObjectConverter.java
Wed Sep 20 12:37:05 2006
@@ -1,128 +1,128 @@
-/*
- * 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.objectconverter;
-
-import javax.jcr.Node;
-import javax.jcr.Session;
-
-import org.apache.portals.graffito.jcr.exception.PersistenceException;
-
-
-/**
- * Convert any kind of beans into JCR nodes & properties
- * 
- * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe
</a>
- * @version $Id: Exp $
- */
-public interface ObjectConverter
-{
-	/**
-	 * Insert the object 
-	 * 
-	 * @param session the JCR session  
-	 * @param object the object to insert
-	 * @throws PersistenceException when it is not possible to insert the object
-	 * 
-	 */
-    public void insert(Session session, Object object) throws PersistenceException;
-    
-	/**
-	 * Update the object 
-	 * 
-	 * @param session the JCR session 
-	 * @param object the object to update
-	 * @throws PersistenceException when it is not possible to update the object
-	 */    
-    public void update(Session session, Object object) throws PersistenceException;
-    
-    /**
-     * Retrieve an object from the JCR repo
-     * 
-     * @param session The JCR session 
-     * @param clazz The class assigned to the object to retrieve
-     * @param path the JCR path
-     * @return The object found or null
-     * 
-     * @throws PersistenceException when it is not possible to retrieve the object
-     */
-    public Object getObject(Session session, String path) throws PersistenceException;
-    
-    /**
-     * Retrieve an object from the JCR repo
-     * 
-     * @param session The JCR session 
-     * @param clazz The class assigned to the object to retrieve
-     * @param path the JCR path
-     * @return The object found or null
-     * 
-     * @throws PersistenceException when it is not possible to retrieve the object
-     */
-    public Object getObject(Session session, Class clazz, String path) throws PersistenceException;
-    
-    
-    /**
-     * Retrieve the specified attribute  for the given persistent object.
-     * this attribute is either a bean or a collection. This method is usefull if the corresponding
descriptor has an autoRetrieve="false"
-     * 
-     * @param session The JCR session
-     * @param object The persistent object
-     * @param attributeName The name of the attribute to retrieve
-     */
-    public void retrieveMappedAttribute(Session session, Object object, String attributeName);
-
-    
-    /**
-     * Retrieve all mapped  attributes for the given persistent object.
-     * 
-     * @param session The JCR session     
-     * @param object The persistent object
-     */
-    public void retrieveAllMappedAttributes(Session session, Object object);
-    
-	/**
-	 * Insert the object 
-	 * 
-	 * @param session the JCR session 
-	 * @param parentNode The parent node used to store the new JCR element (object) 
-	 * @param nodeName The node name used to store the object
-	 * @param object the object to insert
-	 * @throws PersistenceException when it is not possible to insert the object
-	 */
-    public void insert(Session session, Node parentNode, String nodeName, Object object)
throws PersistenceException;
-    
-	/**
-	 * Update the object 
-	 * 
-	 * @param session the JCR session 
-	 * @param parentNode The parent node used to store the new JCR element (object) 
-	 * @param nodeName The node name used to store the object
-	 * @param object the object to update
-	 * @throws PersistenceException when it is not possible to update the object
-	 */    
-    public void update(Session session, Node parentNode, String nodeName, Object object)
throws PersistenceException;
-    
-   
-    /**
-     * Get the object JCR path 
-     * 
-     * @param session the JCR session 
-     * @param object the object for which the path has to be retrieve 
-     * @return the object JCR path 
-     * @throws PersistenceException when it is not possible to retrieve the object path
-     */
-    public String getPath(Session session , Object object)  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.objectconverter;
+
+import javax.jcr.Node;
+import javax.jcr.Session;
+
+import org.apache.portals.graffito.jcr.exception.PersistenceException;
+
+
+/**
+ * Convert any kind of beans into JCR nodes & properties
+ * 
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe
</a>
+ * @version $Id: Exp $
+ */
+public interface ObjectConverter
+{
+	/**
+	 * Insert the object 
+	 * 
+	 * @param session the JCR session  
+	 * @param object the object to insert
+	 * @throws PersistenceException when it is not possible to insert the object
+	 * 
+	 */
+    public void insert(Session session, Object object) throws PersistenceException;
+    
+	/**
+	 * Update the object 
+	 * 
+	 * @param session the JCR session 
+	 * @param object the object to update
+	 * @throws PersistenceException when it is not possible to update the object
+	 */    
+    public void update(Session session, Object object) throws PersistenceException;
+    
+    /**
+     * Retrieve an object from the JCR repo
+     * 
+     * @param session The JCR session 
+     * @param clazz The class assigned to the object to retrieve
+     * @param path the JCR path
+     * @return The object found or null
+     * 
+     * @throws PersistenceException when it is not possible to retrieve the object
+     */
+    public Object getObject(Session session, String path) throws PersistenceException;
+    
+    /**
+     * Retrieve an object from the JCR repo
+     * 
+     * @param session The JCR session 
+     * @param clazz The class assigned to the object to retrieve
+     * @param path the JCR path
+     * @return The object found or null
+     * 
+     * @throws PersistenceException when it is not possible to retrieve the object
+     */
+    public Object getObject(Session session, Class clazz, String path) throws PersistenceException;
+    
+    
+    /**
+     * Retrieve the specified attribute  for the given persistent object.
+     * this attribute is either a bean or a collection. This method is usefull if the corresponding
descriptor has an autoRetrieve="false"
+     * 
+     * @param session The JCR session
+     * @param object The persistent object
+     * @param attributeName The name of the attribute to retrieve
+     */
+    public void retrieveMappedAttribute(Session session, Object object, String attributeName);
+
+    
+    /**
+     * Retrieve all mapped  attributes for the given persistent object.
+     * 
+     * @param session The JCR session     
+     * @param object The persistent object
+     */
+    public void retrieveAllMappedAttributes(Session session, Object object);
+    
+	/**
+	 * Insert the object 
+	 * 
+	 * @param session the JCR session 
+	 * @param parentNode The parent node used to store the new JCR element (object) 
+	 * @param nodeName The node name used to store the object
+	 * @param object the object to insert
+	 * @throws PersistenceException when it is not possible to insert the object
+	 */
+    public void insert(Session session, Node parentNode, String nodeName, Object object)
throws PersistenceException;
+    
+	/**
+	 * Update the object 
+	 * 
+	 * @param session the JCR session 
+	 * @param parentNode The parent node used to store the new JCR element (object) 
+	 * @param nodeName The node name used to store the object
+	 * @param object the object to update
+	 * @throws PersistenceException when it is not possible to update the object
+	 */    
+    public void update(Session session, Node parentNode, String nodeName, Object object)
throws PersistenceException;
+    
+   
+    /**
+     * Get the object JCR path 
+     * 
+     * @param session the JCR session 
+     * @param object the object for which the path has to be retrieve 
+     * @return the object JCR path 
+     * @throws PersistenceException when it is not possible to retrieve the object path
+     */
+    public String getPath(Session session , Object object)  throws PersistenceException;
+
+}

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

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

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

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



Mime
View raw message