org.apache.portals.graffito.jcr.persistence.objectconverter.impl
Class ParentBeanConverterImpl

java.lang.Object
  extended by org.apache.portals.graffito.jcr.persistence.objectconverter.impl.AbstractBeanConverterImpl
      extended by org.apache.portals.graffito.jcr.persistence.objectconverter.impl.ParentBeanConverterImpl
All Implemented Interfaces:
BeanConverter

public class ParentBeanConverterImpl
extends AbstractBeanConverterImpl
implements BeanConverter


Field Summary
 
Fields inherited from class org.apache.portals.graffito.jcr.persistence.objectconverter.impl.AbstractBeanConverterImpl
objectConverter
 
Constructor Summary
ParentBeanConverterImpl(ObjectConverter objectConverter)
           
 
Method Summary
 java.lang.Object getObject(javax.jcr.Session session, javax.jcr.Node parentNode, BeanDescriptor descriptor, java.lang.Class beanClass)
          Retrieve a bean from the repository.
 void insert(javax.jcr.Session session, javax.jcr.Node parentNode, BeanDescriptor descriptor, java.lang.Object object)
          Insert the object.
 void remove(javax.jcr.Session session, javax.jcr.Node parentNode, BeanDescriptor descriptor)
          Remove the bean from the repository.
 void update(javax.jcr.Session session, javax.jcr.Node parentNode, BeanDescriptor descriptor, java.lang.Object object)
          Update repository from bean values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParentBeanConverterImpl

public ParentBeanConverterImpl(ObjectConverter objectConverter)
Method Detail

insert

public void insert(javax.jcr.Session session,
                   javax.jcr.Node parentNode,
                   BeanDescriptor descriptor,
                   java.lang.Object object)
            throws PersistenceException,
                   RepositoryException,
                   JcrMappingException
Description copied from interface: BeanConverter
Insert the object.

Specified by:
insert in interface BeanConverter
Specified by:
insert in class AbstractBeanConverterImpl
Parameters:
session - the JCR session
parentNode - The parent node
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.)
RepositoryException - thrown in case the underlying repository has thrown a javax.jcr.RepositoryException that is not possible to be handled or wrapped in PersistenceException; marks a repository failure
JcrMappingException - throws in case the mapping of the bean is not correct

update

public void update(javax.jcr.Session session,
                   javax.jcr.Node parentNode,
                   BeanDescriptor descriptor,
                   java.lang.Object object)
            throws PersistenceException,
                   RepositoryException,
                   JcrMappingException
Description copied from interface: BeanConverter
Update repository from bean values.

Specified by:
update in interface BeanConverter
Specified by:
update in class AbstractBeanConverterImpl
Parameters:
session - the JCR session
parentNode - The parent node
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.)
RepositoryException - thrown in case the underlying repository has thrown a javax.jcr.RepositoryException that is not possible to be handled or wrapped in PersistenceException; marks a repository failure
JcrMappingException - throws in case the mapping of the bean is not correct

getObject

public java.lang.Object getObject(javax.jcr.Session session,
                                  javax.jcr.Node parentNode,
                                  BeanDescriptor descriptor,
                                  java.lang.Class beanClass)
                           throws PersistenceException,
                                  RepositoryException,
                                  JcrMappingException
Description copied from interface: BeanConverter
Retrieve a bean from the repository.

Specified by:
getObject in interface BeanConverter
Specified by:
getObject in class AbstractBeanConverterImpl
Parameters:
session - the JCR session
parentNode - The parent node
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
RepositoryException - thrown in case the underlying repository has thrown a javax.jcr.RepositoryException that is not possible to be handled or wrapped in PersistenceException; marks a repository failure
JcrMappingException - throws in case the mapping of the bean is not correct

remove

public void remove(javax.jcr.Session session,
                   javax.jcr.Node parentNode,
                   BeanDescriptor descriptor)
            throws PersistenceException,
                   RepositoryException,
                   JcrMappingException
Description copied from interface: BeanConverter
Remove the bean from the repository.

Specified by:
remove in interface BeanConverter
Specified by:
remove in class AbstractBeanConverterImpl
Parameters:
session - the JCR session
parentNode - The parent node
Throws:
PersistenceException - thrown in case the bean cannot be removed; marks a failure due to logic of removal
RepositoryException - thrown in case the underlying repository has thrown a javax.jcr.RepositoryException that is not possible to be handled or wrapped in PersistenceException; marks a repository failure
JcrMappingException - throws in case the mapping of the bean is not correct


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.