Class CollectionConverter<B>

java.lang.Object
org.odpi.openmetadata.frameworks.governanceaction.converters.OpenMetadataConverterBase<B>
org.odpi.openmetadata.frameworks.governanceaction.converters.CollectionConverter<B>

public class CollectionConverter<B> extends OpenMetadataConverterBase<B>
CollectionConverter generates a CollectionElement from a Collection entity
  • Constructor Details

    • CollectionConverter

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

    • getNewBean

      public B getNewBean(Class<B> beanClass, OpenMetadataElement openMetadataElement, String methodName) throws PropertyServerException
      Using the supplied openMetadataElement, 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 OpenMetadataConverterBase<B>
      Parameters:
      beanClass - name of the class to create
      openMetadataElement - openMetadataElement containing the properties
      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, RelatedMetadataElement relatedMetadataElement, String methodName) throws PropertyServerException
      Using the supplied openMetadataElement, 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 OpenMetadataConverterBase<B>
      Parameters:
      beanClass - name of the class to create
      relatedMetadataElement - the properties of an open metadata element plus details of the relationship used to navigate to it
      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, OpenMetadataElement element, OpenMetadataRelationship 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 element and that of a connected relationship.
      Overrides:
      getNewBean in class OpenMetadataConverterBase<B>
      Parameters:
      beanClass - name of the class to create
      element - element 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