Class RelationshipMapper
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
Map between a relationship object and a collection of database rows.
This mapping can go in either direction.
-
Constructor Summary
ConstructorsConstructorDescriptionRelationshipMapper(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 TypeMethodDescriptionReturn 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.RelationshipConstruct a relationship object using the values from the database.Return the rows that describe the properties for this relationship.Extract the relationship table information from the relationship object.toString()JSON-style toStringMethods inherited from class org.odpi.openmetadata.adapters.connectors.resource.jdbc.mappers.BaseMapper
getBooleanPropertyFromColumn, getDatePropertyFromColumn, getLongPropertyFromColumn, getSerializableMapPropertyFromColumn, getStringArrayPropertyFromColumn, getStringPropertyFromColumn
-
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- relationshiprepositoryHelper- repository helperrepositoryName- 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 tablerelationshipPropertiesTableRows- rows from the relationship properties tableend1Mapper- entity mapper for the end1 proxyend2Mapper- entity mapper for the end2 proxyrepositoryHelper- repository helperrepositoryName- repository name
-
-
Method Details
-
getRelationship
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship() throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorExceptionConstruct 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.RepositoryErrorExceptionExtract 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.RepositoryErrorExceptionReturn 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.RepositoryErrorExceptionReturn 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.RepositoryErrorExceptionReturn 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
JSON-style toString
-