Skip to content

Commit

Permalink
MET-6199 sonar recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
jeortizquan committed Nov 4, 2024
1 parent becd07d commit 7da37ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ public interface RecordLogRepository extends JpaRepository<RecordLogEntity, Long
* @param datasetId the dataset id
* @return the total de bias counter by dataset id
*/
@Query("SELECT coalesce(count(rle.recordId), 0) FROM RecordLogEntity rle WHERE rle.recordId.datasetId = ?1 AND rle.step = 'NORMALIZE'")
@Query("SELECT coalesce(count(rle.recordId), 0) FROM RecordLogEntity rle "
+ "WHERE rle.recordId.datasetId = ?1 AND rle.step = 'NORMALIZE'")
int getTotalDeBiasCounterByDatasetId(String datasetId);

/**
Expand All @@ -133,6 +134,7 @@ public interface RecordLogRepository extends JpaRepository<RecordLogEntity, Long
* @param datasetId the dataset id
* @return the progress de bias counter by dataset id
*/
@Query("SELECT coalesce(count(rle.recordId), 0) FROM RecordLogEntity rle WHERE rle.recordId.datasetId = ?1 AND rle.step = 'DEBIAS' AND rle.status = 'SUCCESS'")
@Query("SELECT coalesce(count(rle.recordId), 0) FROM RecordLogEntity rle "
+ "WHERE rle.recordId.datasetId = ?1 AND rle.step = 'DEBIAS' AND rle.status = 'SUCCESS'")
int getProgressDeBiasCounterByDatasetId(String datasetId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

import eu.europeana.metis.debias.detect.model.response.Tag;
import eu.europeana.metis.debias.detect.model.response.ValueDetection;
import eu.europeana.metis.sandbox.common.Status;
import eu.europeana.metis.sandbox.common.Step;
import eu.europeana.metis.sandbox.domain.Record.RecordBuilder;
import eu.europeana.metis.sandbox.domain.RecordInfo;
import eu.europeana.metis.sandbox.dto.debias.DeBiasReportDto;
import eu.europeana.metis.sandbox.dto.debias.DeBiasStatusDto;
import eu.europeana.metis.sandbox.entity.DatasetEntity;
import eu.europeana.metis.sandbox.entity.RecordLogEntity;
import eu.europeana.metis.sandbox.entity.debias.DatasetDeBiasEntity;
import eu.europeana.metis.sandbox.entity.debias.RecordDeBiasDetailEntity;
import eu.europeana.metis.sandbox.entity.debias.RecordDeBiasMainEntity;
Expand All @@ -25,7 +23,6 @@
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Set;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down

0 comments on commit 7da37ed

Please sign in to comment.