Class ODFConverter<B>


  • public abstract class ODFConverter<B>
    extends OCFConverter<B>
    ODFConverter provides the generic methods for the Data Manager beans converters. Generic classes have limited knowledge of the classes these are working on and this means creating a new instance of a class from within a generic is a little involved. This class provides the generic method for creating and initializing a Data Manager bean.
    • Constructor Detail

      • ODFConverter

        public ODFConverter​(OMRSRepositoryHelper repositoryHelper,
                            String serviceName,
                            String serverName)
        Constructor
        Parameters:
        repositoryHelper - helper object to parse entity
        serviceName - name of this component
        serverName - name of this server
    • Method Detail

      • getMetadataElementHeader

        protected ElementHeader getMetadataElementHeader​(Class<B> beanClass,
                                                         EntityDetail entity,
                                                         String methodName)
                                                  throws PropertyServerException
        Extract the properties from the entity.
        Parameters:
        beanClass - name of the class to create
        entity - entity containing the properties
        methodName - calling method
        Returns:
        filled out element header
        Throws:
        PropertyServerException - there is a problem in the use of the generic handlers because the converter has been configured with a type of bean that is incompatible with the handler
      • getAnnotationBean

        protected Annotation getAnnotationBean​(Class<B> beanClass,
                                               EntityDetail primaryEntity,
                                               List<EntityDetail> supplementaryEntities,
                                               List<Relationship> relationships,
                                               String methodName)
                                        throws PropertyServerException
        Using the supplied instances, return a new instance of the Connection bean. It may be a Connection or a VirtualConnection.
        Parameters:
        beanClass - class of bean that has been requested
        primaryEntity - entity that is the root of the cluster of entities that make up the content of the bean
        supplementaryEntities - entities connected to the primary entity by the relationships
        relationships - relationships linking the entities
        methodName - calling method
        Returns:
        bean populated with properties from the instances supplied in the constructor
        Throws:
        PropertyServerException - there is a problem instantiating the bean