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.RelationshipMapper

public class RelationshipMapper extends RepositoryMapper
Map between a relationship object and a collection of database rows. This mapping can go in either direction.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RelationshipMapper(Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue> relationshipTableRow, List<Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue>> relationshipPropertiesTableRows, EntityMapper end1Mapper, EntityMapper end2Mapper, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName)
    Construct a relationship mapper using the values from the database.
    RelationshipMapper(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName)
    Construct a relationship mapper using an OMRS instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the mapper for the entity proxy at end 1 of the relationship.
    Return the mapper for the entity proxy at end 2 of the relationship.
    org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship
    Construct a relationship 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 relationship.
    Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue>
    Extract the relationship table information from the relationship object.
    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

    • RelationshipMapper

      public RelationshipMapper(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName)
      Construct a relationship mapper using an OMRS instance.
      Parameters:
      relationship - relationship
      repositoryHelper - repository helper
      repositoryName - repository name
    • RelationshipMapper

      public RelationshipMapper(Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue> relationshipTableRow, List<Map<String,org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue>> relationshipPropertiesTableRows, EntityMapper end1Mapper, EntityMapper end2Mapper, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName)
      Construct a relationship mapper using the values from the database.
      Parameters:
      relationshipTableRow - row from the relationship table
      relationshipPropertiesTableRows - rows from the relationship properties table
      end1Mapper - entity mapper for the end1 proxy
      end2Mapper - entity mapper for the end2 proxy
      repositoryHelper - repository helper
      repositoryName - repository name
  • Method Details

    • getRelationship

      public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Construct a relationship object using the values from the database.
      Returns:
      relationship description
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - problem mapping the properties
    • getRelationshipTableRow

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

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

      public EntityMapper getEnd1Mapper() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Return the mapper for the entity proxy at end 1 of the relationship.
      Returns:
      mapper
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - problem mapping the properties
    • getEnd2Mapper

      public EntityMapper getEnd2Mapper() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Return the mapper for the entity proxy at end 2 of the relationship.
      Returns:
      mapper
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - problem mapping the properties
    • toString

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