T
- Type class extending RegistryBean
public interface BeanMapper<T extends RegistryBean>
RegistryBean
to JAXR RegistryObject
.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,
RegistryObject registryObject)
The method creates and populates an object of type
T with
the data from a RegistryObject . |
java.util.List<RegistryObject> |
toJaxr(PersistenceContext context,
T t)
The method maps the information in the object of type
T to
a list of registry objects. |
T toBean(PersistenceContext context, RegistryObject registryObject) throws MappingException, JAXRException
T
with
the data from a RegistryObject
.context
- The PersistenceContext
instanceregistryObject
- The JAXR RegistryObject
instanceMappingException
- If an error occurs in mapping the JAXR values to the beanJAXRException
- If a JAXR error occurs while accessing the registryObjectjava.util.List<RegistryObject> toJaxr(PersistenceContext context, T t) throws MappingException, 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.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 JAXRJAXRException
- If a JAXR error occurs while populating the registryObjectjava.lang.Class<T> getBeanClass()
BeanMapper
is parameterized with.Class
for the bean