java.lang.Object
org.odpi.openmetadata.adapters.connectors.resource.jdbc.mappers.BaseMapper
org.odpi.openmetadata.adapters.repositoryservices.postgres.repositoryconnector.mappers.RepositoryMapper
org.odpi.openmetadata.adapters.repositoryservices.postgres.repositoryconnector.mappers.EntityMapper

public class EntityMapper extends RepositoryMapper
Map between an EntityDetail or EntityProxy object and a collection of database rows. This mapping can go in either direction.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EntityMapper(Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue> entityTableRow, List<Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue>> entityPropertiesTableRows, List<ClassificationMapper> classificationMappers, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName)
    Construct an entity mapper using the values from the database.
    EntityMapper(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entityDetail, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName)
    Construct an entity mapper using an OMRS instance.
    EntityMapper(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy entityProxy, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName)
    Construct an entity mapper using an OMRS instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the list of classification mappers that represent the classifications associated with this entity.
    org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail
    Construct an entity detail object using the values from the database.
    List<Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue>>
    Return the rows that describe the properties for this entity.
    org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy
    Construct an entity proxy object from the values from the database.
    Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue>
    Extract the entity table information from the entity object.
    List<Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue>>
    Return the rows that describe the properties for this entity.
    boolean
    Determine whether this entity is a proxy or not.
    JSON-style toString

    Methods inherited from class org.odpi.openmetadata.adapters.connectors.resource.jdbc.mappers.BaseMapper

    getBooleanPropertyFromColumn, getDatePropertyFromColumn, getLongPropertyFromColumn, getSerializableMapPropertyFromColumn, getStringArrayPropertyFromColumn, getStringPropertyFromColumn

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • EntityMapper

      public EntityMapper(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entityDetail, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName)
      Construct an entity mapper using an OMRS instance.
      Parameters:
      entityDetail - full entity
      repositoryHelper - repository helper
      repositoryName - repository name
    • EntityMapper

      public EntityMapper(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy entityProxy, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName)
      Construct an entity mapper using an OMRS instance.
      Parameters:
      entityProxy - entity proxy
      repositoryHelper - repository helper
      repositoryName - repository name
    • EntityMapper

      public EntityMapper(Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue> entityTableRow, List<Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue>> entityPropertiesTableRows, List<ClassificationMapper> classificationMappers, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName)
      Construct an entity mapper using the values from the database.
      Parameters:
      entityTableRow - row from the entity table
      entityPropertiesTableRows - rows from the entity properties table
      classificationMappers - mappers representing the entity's classifications
      repositoryHelper - repository helper
      repositoryName - repository name
  • Method Details

    • isProxy

      public boolean isProxy() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Determine whether this entity is a proxy or not.
      Returns:
      boolean
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - mapping problem
    • getEntityDetail

      public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getEntityDetail() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Construct an entity detail object using the values from the database.
      Returns:
      full entity description or null if the entity is not available
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - problem mapping the properties
    • getEntityProxy

      public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy getEntityProxy() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Construct an entity proxy object from the values from the database.
      Returns:
      entity proxy description
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - problem mapping the properties
    • getEntityTableRow

      public Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue> getEntityTableRow() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Extract the entity table information from the entity object.
      Returns:
      entity table row for this entity
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - problem mapping the properties
    • getEntityPropertiesTableRows

      public List<Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue>> getEntityPropertiesTableRows() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Return the rows that describe the properties for this entity.
      Returns:
      property rows
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - problem mapping the properties
    • getUniquePropertiesTableRows

      public List<Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue>> getUniquePropertiesTableRows() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Return the rows that describe the properties for this entity. This version allows an entity proxy's properties to be stored if the entity detail is not available.
      Returns:
      property rows
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - problem mapping the properties
    • getClassificationMappers

      public List<ClassificationMapper> getClassificationMappers()
      Return the list of classification mappers that represent the classifications associated with this entity.
      Returns:
      list of classification mappers or null
    • toString

      public String toString()
      JSON-style toString
      Overrides:
      toString in class Object
      Returns:
      string of property names and values for this enum