T
- Type class extending RegistryBean
public abstract class BaseBeanMapper<T extends RegistryBean> extends java.lang.Object implements BeanMapper<T>
Constructor and Description |
---|
BaseBeanMapper() |
Modifier and Type | Method and Description |
---|---|
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. |
public java.lang.Class<T> getBeanClass()
BeanMapper
is parameterized with.getBeanClass
in interface BeanMapper<T extends RegistryBean>
Class
for the beanpublic T toBean(PersistenceContext context, javax.xml.registry.infomodel.RegistryObject registryObject) throws MappingException, javax.xml.registry.JAXRException
T
with
the data from a RegistryObject
.toBean
in interface BeanMapper<T extends RegistryBean>
context
- The PersistenceContext
instanceregistryObject
- The JAXR RegistryObject
instanceMappingException
- If an error occurs in mapping the JAXR values to the beanjavax.xml.registry.JAXRException
- If a JAXR error occurs while accessing the registryObjectpublic java.util.List<javax.xml.registry.infomodel.RegistryObject> toJaxr(PersistenceContext context, T t) throws MappingException, javax.xml.registry.JAXRException
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.toJaxr
in interface BeanMapper<T extends RegistryBean>
context
- The PersistenceContext
instancet
- The bean objectList
of RegistryObject
objects modified during
the mapping.MappingException
- If an error occurs in mapping the bean values to JAXRjavax.xml.registry.JAXRException
- If a JAXR error occurs while populating the registryObject