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

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.persistence.mapper.impl.BaseObjectFactory<T>
      extended by com.softwareag.centrasite.appl.framework.persistence.mapper.impl.ClassifiedInstancesObjectFactory<T>
All Implemented Interfaces:
ObjectFactory<T>

public class ClassifiedInstancesObjectFactory<T extends RegistryBean>
extends BaseObjectFactory<T>

Implementation of the ObjectFactory interface for handing ClassifiedInstances annotations. Determines the actual bean type based on classifications on the RegistryObject.


Constructor Summary
ClassifiedInstancesObjectFactory()
           
 
Method Summary
 javax.xml.registry.infomodel.RegistryObject createRegistryObject(RegistryBean registryBean)
          Creates RegistryObject instance from the given RegistryBean based on configuration.
static javax.xml.registry.infomodel.Classification findClassification(javax.xml.registry.infomodel.RegistryObject registryObject, ClassifiedInstance classificationAnnotation, PersistenceContext context)
          Finds the specified with the ClassifiedInstance annotation classification on the given registry object.
 
Methods inherited from class com.softwareag.centrasite.appl.framework.persistence.mapper.impl.BaseObjectFactory
createInstance, createRegistryBean, getBaseBeanClass, getContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassifiedInstancesObjectFactory

public ClassifiedInstancesObjectFactory()
Method Detail

createRegistryObject

public javax.xml.registry.infomodel.RegistryObject createRegistryObject(RegistryBean registryBean)
                                                                 throws MappingException,
                                                                        javax.xml.registry.JAXRException
Creates RegistryObject instance from the given RegistryBean based on configuration. Additionally adds classification based on the specified in the ClassifiedInstances annotation concept path.

Specified by:
createRegistryObject in interface ObjectFactory<T extends RegistryBean>
Overrides:
createRegistryObject in class BaseObjectFactory<T extends RegistryBean>
Returns:
Newly created registry object.
Throws:
MappingException
javax.xml.registry.JAXRException

findClassification

public static javax.xml.registry.infomodel.Classification findClassification(javax.xml.registry.infomodel.RegistryObject registryObject,
                                                                             ClassifiedInstance classificationAnnotation,
                                                                             PersistenceContext context)
                                                                      throws javax.xml.registry.JAXRException
Finds the specified with the ClassifiedInstance annotation classification on the given registry object.

Throws:
javax.xml.registry.JAXRException