|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.ocm.manager.beanconverter.impl.AbstractBeanConverterImpl org.apache.jackrabbit.ocm.manager.beanconverter.impl.ParentBeanConverterImpl
public class ParentBeanConverterImpl
Bean converter used to access to the parent object. the mixin type referenceable is not mandatory for the node matching to the parent object.
Field Summary |
---|
Fields inherited from class org.apache.jackrabbit.ocm.manager.beanconverter.impl.AbstractBeanConverterImpl |
---|
atomicTypeConverterProvider, mapper, objectConverter |
Constructor Summary | |
---|---|
ParentBeanConverterImpl(Mapper mapper,
ObjectConverter objectConverter,
AtomicTypeConverterProvider atomicTypeConverterProvider)
|
Method Summary | |
---|---|
Object |
getObject(Session session,
Node parentNode,
BeanDescriptor beanDescriptor,
ClassDescriptor beanClassDescriptor,
Class beanClass,
Object parent)
Retrieve a bean from the repository. |
String |
getPath(Session session,
BeanDescriptor beanDescriptor,
Node parentNode)
Default implementation for many BeanConverter. |
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 |
Constructor Detail |
---|
public ParentBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider)
Method Detail |
---|
public void insert(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent) throws ObjectContentManagerException, RepositoryException, JcrMappingException
BeanConverter
insert
in interface BeanConverter
insert
in class AbstractBeanConverterImpl
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
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 correctpublic void update(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent) throws ObjectContentManagerException, RepositoryException, JcrMappingException
BeanConverter
update
in interface BeanConverter
update
in class AbstractBeanConverterImpl
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
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 correctpublic Object getObject(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Class beanClass, Object parent) throws ObjectContentManagerException, RepositoryException, JcrMappingException
BeanConverter
getObject
in interface BeanConverter
getObject
in class AbstractBeanConverterImpl
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
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 correctpublic void remove(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent) throws ObjectContentManagerException, RepositoryException, JcrMappingException
BeanConverter
remove
in interface BeanConverter
remove
in class AbstractBeanConverterImpl
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
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 correctpublic String getPath(Session session, BeanDescriptor beanDescriptor, Node parentNode) throws ObjectContentManagerException
getPath
in interface BeanConverter
getPath
in class AbstractBeanConverterImpl
session
- the JCR sessionbeanDescriptor
- The descriptor of the bean to convertparentNode
- the node which contain this bean (its corresponfing subnode)
ObjectContentManagerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |