com.softwareag.centrasite.appl.framework.persistence.mapper
Interface BeanMapper<T extends RegistryBean>

Type Parameters:
T -
All Known Subinterfaces:
BackedBeanMapper<T>
All Known Implementing Classes:
AnnotationBeanMapper, BaseBeanMapper, DefaultBackedBeanMapper

public interface BeanMapper<T extends RegistryBean>

Interface provides methods for mapping a Bean RegistryBean to JAXR RegistryObject;


Method Summary
 java.lang.Class<T> getBeanClass()
          Retrieves the class of the bean which this BeanMapper is parameterized with.
 T toBean(PersistenceContext context, javax.xml.registry.infomodel.RegistryObject registryObject)
          The method creates and populates an object of type T with the data from a RegistryObject.
 java.util.List<javax.xml.registry.infomodel.RegistryObject> toJaxr(PersistenceContext context, T t)
          The method maps the information in the object of type T to a list of registry objects.
 

Method Detail

toBean

T toBean(PersistenceContext context,
         javax.xml.registry.infomodel.RegistryObject registryObject)
                              throws MappingException,
                                     javax.xml.registry.JAXRException
The method creates and populates an object of type T with the data from a RegistryObject.

Parameters:
context -
registryObject -
Returns:
T
Throws:
MappingException
javax.xml.registry.JAXRException

toJaxr

java.util.List<javax.xml.registry.infomodel.RegistryObject> toJaxr(PersistenceContext context,
                                                                   T t)
                                                                   throws MappingException,
                                                                          javax.xml.registry.JAXRException
The method maps the information in the object of type T to a list of registry objects. Note the first object in the List is the primary mapped object. All following are related objects like classifications, associations and etc.

Parameters:
context -
t -
Returns:
List of RegistryObject objects modified during the mapping.
Throws:
MappingException
javax.xml.registry.JAXRException

getBeanClass

java.lang.Class<T> getBeanClass()
Retrieves the class of the bean which this BeanMapper is parameterized with.

Returns:
Class