org.apache.portals.graffito.jcr.persistence.objectconverter.impl
Class AbstractBeanConverterImpl
java.lang.Object
org.apache.portals.graffito.jcr.persistence.objectconverter.impl.AbstractBeanConverterImpl
- All Implemented Interfaces:
- BeanConverter
- Direct Known Subclasses:
- ParentBeanConverterImpl
public abstract class AbstractBeanConverterImpl
- extends java.lang.Object
- implements BeanConverter
Method Summary |
abstract java.lang.Object |
getObject(javax.jcr.Session session,
javax.jcr.Node parentNode,
BeanDescriptor descriptor,
java.lang.Class beanClass)
Retrieve a bean from the repository. |
abstract void |
insert(javax.jcr.Session session,
javax.jcr.Node parentNode,
BeanDescriptor descriptor,
java.lang.Object object)
Insert the object. |
abstract void |
remove(javax.jcr.Session session,
javax.jcr.Node parentNode,
BeanDescriptor descriptor)
Remove the bean from the repository. |
abstract 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 |
objectConverter
protected ObjectConverter objectConverter
AbstractBeanConverterImpl
public AbstractBeanConverterImpl(ObjectConverter objectConverter)
insert
public abstract 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
- Parameters:
session
- the JCR sessionparentNode
- The parent nodeobject
- 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 abstract 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
- Parameters:
session
- the JCR sessionparentNode
- The parent nodeobject
- 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 abstract 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
- Parameters:
session
- the JCR sessionparentNode
- The parent nodebeanClass
- 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 abstract 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
- Parameters:
session
- the JCR sessionparentNode
- 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.