com.softwareag.centrasite.appl.framework.persistence.mapper.impl
Class BaseBeanMapper<T extends RegistryBean>

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.persistence.mapper.impl.BaseBeanMapper<T>
All Implemented Interfaces:
BeanMapper<T>
Direct Known Subclasses:
AnnotationBeanMapper

public abstract class BaseBeanMapper<T extends RegistryBean>
extends java.lang.Object
implements BeanMapper<T>

Base Mapper implementation. Provided basic functionality needed by the mapper classes.


Constructor Summary
BaseBeanMapper()
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseBeanMapper

public BaseBeanMapper()
Method Detail

getBeanClass

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

Specified by:
getBeanClass in interface BeanMapper<T extends RegistryBean>
Returns:
Class

toBean

public 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.

Specified by:
toBean in interface BeanMapper<T extends RegistryBean>
Returns:
T
Throws:
MappingException
javax.xml.registry.JAXRException

toJaxr

public 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.

Specified by:
toJaxr in interface BeanMapper<T extends RegistryBean>
Returns:
List of RegistryObject objects modified during the mapping.
Throws:
MappingException
javax.xml.registry.JAXRException