org.apache.jackrabbit.ocm.manager.beanconverter.impl
Class DefaultBeanConverterImpl
java.lang.Object
org.apache.jackrabbit.ocm.manager.beanconverter.impl.AbstractBeanConverterImpl
org.apache.jackrabbit.ocm.manager.beanconverter.impl.DefaultBeanConverterImpl
- All Implemented Interfaces:
- BeanConverter
public class DefaultBeanConverterImpl
- extends AbstractBeanConverterImpl
- implements BeanConverter
Default Bean Converter
- Author:
- Lombart Christophe
Method Summary |
Object |
getObject(Session session,
Node parentNode,
BeanDescriptor beanDescriptor,
ClassDescriptor beanClassDescriptor,
Class beanClass,
Object parent)
Retrieve a bean from the repository. |
void |
insert(Session session,
Node parentNode,
BeanDescriptor beanDescriptor,
ClassDescriptor beanClassDescriptor,
Object object,
ClassDescriptor parentClassDescriptor,
Object parent)
Insert the object. |
void |
remove(Session session,
Node parentNode,
BeanDescriptor beanDescriptor,
ClassDescriptor beanClassDescriptor,
Object object,
ClassDescriptor parentClassDescriptor,
Object parent)
Remove the bean from the repository. |
void |
update(Session session,
Node parentNode,
BeanDescriptor beanDescriptor,
ClassDescriptor beanClassDescriptor,
Object object,
ClassDescriptor parentClassDescriptor,
Object parent)
Update repository from bean values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jackrabbit.ocm.manager.beanconverter.BeanConverter |
getPath |
DefaultBeanConverterImpl
public DefaultBeanConverterImpl(Mapper mapper,
ObjectConverter objectConverter,
AtomicTypeConverterProvider atomicTypeConverterProvider)
insert
public void insert(Session session,
Node parentNode,
BeanDescriptor beanDescriptor,
ClassDescriptor beanClassDescriptor,
Object object,
ClassDescriptor parentClassDescriptor,
Object parent)
throws ObjectContentManagerException,
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 sessionparentNode
- The node which will contain the converter beanbeanDescriptor
- The bean descriptorbeanClassDescriptor
- the Class Descriptor associated to the bean to insertobject
- the bean to convert( insert into the JCR structure)parentClassDescriptor
- The Class Descriptor associated to the parent objectparent
- the object which will contain the bean to convert
- Throws:
ObjectContentManagerException
- 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 ObjectContentManagerException; marks a repository failure
JcrMappingException
- throws in case the mapping of the bean is not correct
update
public void update(Session session,
Node parentNode,
BeanDescriptor beanDescriptor,
ClassDescriptor beanClassDescriptor,
Object object,
ClassDescriptor parentClassDescriptor,
Object parent)
throws ObjectContentManagerException,
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 sessionparentNode
- The node which will contain the converter beanbeanDescriptor
- The bean descriptorbeanClassDescriptor
- the Class Descriptor associated to the bean to updateobject
- the bean to convert( insert into the JCR structure)parentClassDescriptor
- The Class Descriptor associated to the parent objectparent
- the object which will contain the bean to convert
- Throws:
ObjectContentManagerException
- 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 ObjectContentManagerException; marks a repository failure
JcrMappingException
- throws in case the mapping of the bean is not correct
getObject
public Object getObject(Session session,
Node parentNode,
BeanDescriptor beanDescriptor,
ClassDescriptor beanClassDescriptor,
Class beanClass,
Object parent)
throws ObjectContentManagerException,
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 sessionparentNode
- The parent nodebeanDescriptor
- The bean descriptorbeanClassDescriptor
- the Class Descriptor associated to the bean to insertbeanClass
- The bean Classparent
- The parent which contain the bean to retrieve
- Throws:
ObjectContentManagerException
- 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 ObjectContentManagerException; marks a repository failure
JcrMappingException
- throws in case the mapping of the bean is not correct
remove
public void remove(Session session,
Node parentNode,
BeanDescriptor beanDescriptor,
ClassDescriptor beanClassDescriptor,
Object object,
ClassDescriptor parentClassDescriptor,
Object parent)
throws ObjectContentManagerException,
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 sessionparentNode
- The node which will contain the converter beanbeanDescriptor
- The bean descriptorbeanClassDescriptor
- the Class Descriptor associated to the bean to updateobject
- the bean to convert( insert into the JCR structure)parentClassDescriptor
- The Class Descriptor associated to the parent objectparent
- the object which contains the bean to convert
- Throws:
ObjectContentManagerException
- 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 ObjectContentManagerException; marks a repository failure
JcrMappingException
- throws in case the mapping of the bean is not correct
Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.