From b4c0e4b7909985b4d8770d229c2e9a4838381ca9 Mon Sep 17 00:00:00 2001 From: Vladysl <45620393+Vladysl@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:10:39 +0300 Subject: [PATCH] 77_spec - Rename Relationship to DataRelationship data entity for naming consistency (#1661) --- gradle/libs.versions.toml | 2 +- .../mapper/ingestion/IngestionMapperImpl.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ff4667e8f..29ca76dd3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ spring-starter-cloud = '3.1.0' spring-starter-bootstrap = '3.1.0' reactor-extra = '3.5.1' micrometer-registry-prometheus = '1.9.0' -ingestion-contract-server = '0.1.39' +ingestion-contract-server = '0.1.40' oddrn-generator-java = '0.1.21' odd-integration-manifests = '0.0.6' apache-collections = '4.4' diff --git a/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/mapper/ingestion/IngestionMapperImpl.java b/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/mapper/ingestion/IngestionMapperImpl.java index 9779c8036..02adfdf15 100644 --- a/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/mapper/ingestion/IngestionMapperImpl.java +++ b/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/mapper/ingestion/IngestionMapperImpl.java @@ -32,6 +32,7 @@ import org.opendatadiscovery.oddplatform.ingestion.contract.model.DataInput; import org.opendatadiscovery.oddplatform.ingestion.contract.model.DataQualityTest; import org.opendatadiscovery.oddplatform.ingestion.contract.model.DataQualityTestRun; +import org.opendatadiscovery.oddplatform.ingestion.contract.model.DataRelationship; import org.opendatadiscovery.oddplatform.ingestion.contract.model.DataSet; import org.opendatadiscovery.oddplatform.ingestion.contract.model.DataSetField; import org.opendatadiscovery.oddplatform.ingestion.contract.model.DataSetFieldType; @@ -39,7 +40,6 @@ import org.opendatadiscovery.oddplatform.ingestion.contract.model.DataTransformerRun; import org.opendatadiscovery.oddplatform.ingestion.contract.model.ERDRelationship; import org.opendatadiscovery.oddplatform.ingestion.contract.model.GraphRelationship; -import org.opendatadiscovery.oddplatform.ingestion.contract.model.Relationship; import org.opendatadiscovery.oddplatform.ingestion.contract.model.Tag; import org.opendatadiscovery.oddplatform.model.tables.pojos.DataEntityPojo; import org.opendatadiscovery.oddplatform.service.ingestion.DatasetVersionHashCalculator; @@ -99,7 +99,7 @@ public class IngestionMapperImpl implements IngestionMapper { Pair.of(de -> de.getDataQualityTestRun() != null, DATA_QUALITY_TEST_RUN), Pair.of(de -> de.getDataEntityGroup() != null, DATA_ENTITY_GROUP), Pair.of(de -> de.getDataInput() != null, DATA_INPUT), - Pair.of(de -> de.getDataEntityRelationship() != null, DATA_RELATIONSHIP) + Pair.of(de -> de.getDataRelationship() != null, DATA_RELATIONSHIP) ); @Override @@ -152,7 +152,7 @@ public DataEntityIngestionDto createIngestionDto(final DataEntity dataEntity, fi } if (entityClasses.contains(DATA_RELATIONSHIP)) { - builder = builder.dataRelationshipDto(createDataRelationship(dataEntity.getDataEntityRelationship())); + builder = builder.dataRelationshipDto(createDataRelationship(dataEntity.getDataRelationship())); } return builder.build(); @@ -310,9 +310,9 @@ private DataInputIngestionDto createDataInput(final DataInput dataInput) { ); } - private DataRelationshipDto createDataRelationship(final Relationship relationship) { + private DataRelationshipDto createDataRelationship(final DataRelationship relationship) { final DataRelationshipDetailsDto dataRelationshipDetailsDto = - Relationship.RelationshipTypeEnum.ERD == relationship.getRelationshipType() + DataRelationship.RelationshipTypeEnum.ERD == relationship.getRelationshipType() ? new DataRelationshipDetailsDto( erdRelationIngestionMapper.mapERDRelation((ERDRelationship) relationship.getDetails()), null)