Class ElementStubConverter<B>


public class ElementStubConverter<B> extends AssetManagerOMASConverter<B>
ElementStubConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) EntityProxy object into an ElementStub bean.
  • Constructor Details

    • ElementStubConverter

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

    • getNewBean

      public B getNewBean(Class<B> beanClass, Relationship relationship, boolean useEnd1, String methodName) throws PropertyServerException
      Using the supplied instances, return a new instance of the bean. This is used for beans that contain a combination of the properties from an relationship and that of a connected relationship.
      Parameters:
      beanClass - name of the class to create
      relationship - relationship containing the properties
      useEnd1 - should the
      methodName - calling method
      Returns:
      bean populated with properties from the instances supplied
      Throws:
      PropertyServerException - there is a problem instantiating the bean
    • getNewBeans

      public List<B> getNewBeans(Class<B> beanClass, List<Relationship> relationships, boolean useEnd1, String methodName) throws PropertyServerException
      Using the supplied instances, return list of new instances of the bean.
      Parameters:
      beanClass - name of the class to create
      relationships - list of relationships containing the properties
      useEnd1 - should the
      methodName - calling method
      Returns:
      bean populated with properties from the instances supplied
      Throws:
      PropertyServerException - there is a problem instantiating the bean
    • getNewBean

      public B getNewBean(Class<B> beanClass, EntityDetail entity, String methodName) throws PropertyServerException
      Using the supplied entity, return a new instance of the bean. This is used for most beans that have a one to one correspondence with the repository instances.
      Overrides:
      getNewBean in class OpenMetadataAPIGenericConverter<B>
      Parameters:
      beanClass - name of the class to create
      entity - entity containing the properties
      methodName - calling method
      Returns:
      bean populated with properties from the entity supplied
      Throws:
      PropertyServerException - there is a problem instantiating the bean
    • getNewBean

      public B getNewBean(Class<B> beanClass, EntityDetail entity, Relationship relationship, String methodName) throws PropertyServerException
      Using the supplied instances, return a new instance of the bean. This is used for beans that contain a combination of the properties from an entity and that of a connected relationship.
      Overrides:
      getNewBean in class OpenMetadataAPIGenericConverter<B>
      Parameters:
      beanClass - name of the class to create
      entity - entity containing the properties
      relationship - relationship containing the properties
      methodName - calling method
      Returns:
      bean populated with properties from the instances supplied
      Throws:
      PropertyServerException - there is a problem instantiating the bean