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
ConstructorDescriptionRelationshipMapper
(Map<String, JDBCDataValue> relationshipTableRow, List<Map<String, JDBCDataValue>> relationshipPropertiesTableRows, EntityMapper end1Mapper, EntityMapper end2Mapper, OMRSRepositoryHelper repositoryHelper, String repositoryName) Construct a relationship mapper using the values from the database.RelationshipMapper
(Relationship relationship, 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.Construct 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.repositoryservices.postgres.repositoryconnector.mappers.RepositoryMapper
extractValuesFromInstanceAuditHeader, extractValuesFromInstanceHeader, fillInstanceAuditHeader, fillInstanceHeader, getInstanceProperties, getUniqueProperties
Methods inherited from class org.odpi.openmetadata.adapters.connectors.resource.jdbc.mappers.BaseMapper
getBooleanPropertyFromColumn, getDatePropertyFromColumn, getLongPropertyFromColumn, getSerializableMapPropertyFromColumn, getStringArrayPropertyFromColumn, getStringPropertyFromColumn, setUpBooleanValueInRow, setUpDateValueInRow, setUpLongValueInRow, setUpSerializableMapValueInRow, setUpStringArrayValueInRow, setUpStringValueInRow
-
Constructor Details
-
RelationshipMapper
public RelationshipMapper(Relationship relationship, OMRSRepositoryHelper repositoryHelper, String repositoryName) Construct a relationship mapper using an OMRS instance.- Parameters:
relationship
- relationshiprepositoryHelper
- repository helperrepositoryName
- repository name
-
RelationshipMapper
public RelationshipMapper(Map<String, JDBCDataValue> relationshipTableRow, List<Map<String, JDBCDataValue>> relationshipPropertiesTableRows, EntityMapper end1Mapper, EntityMapper end2Mapper, 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
Construct a relationship object using the values from the database.- Returns:
- relationship description
- Throws:
RepositoryErrorException
- problem mapping the properties
-
getRelationshipTableRow
Extract the relationship table information from the relationship object.- Returns:
- table row for this relationship
- Throws:
RepositoryErrorException
- problem mapping the properties
-
getRelationshipPropertiesTableRows
public List<Map<String,JDBCDataValue>> getRelationshipPropertiesTableRows() throws RepositoryErrorExceptionReturn the rows that describe the properties for this relationship.- Returns:
- property rows
- Throws:
RepositoryErrorException
- problem mapping the properties
-
getEnd1Mapper
Return the mapper for the entity proxy at end 1 of the relationship.- Returns:
- mapper
- Throws:
RepositoryErrorException
- problem mapping the properties
-
getEnd2Mapper
Return the mapper for the entity proxy at end 2 of the relationship.- Returns:
- mapper
- Throws:
RepositoryErrorException
- problem mapping the properties
-
toString
JSON-style toString
-