From 909c6414f167018161e2627932cbda359c7ecccb Mon Sep 17 00:00:00 2001 From: Ramon Trekovanicz Date: Thu, 19 Sep 2024 20:07:19 +0200 Subject: [PATCH] fix: backend checkstyle --- .../com/greenfoxacademy/backend/models/ClinicAddress.java | 6 +++++- .../com/greenfoxacademy/backend/models/ClinicDetails.java | 5 ++++- .../main/java/com/greenfoxacademy/backend/models/Vet.java | 5 ++++- .../backend/services/user/vet/VetServiceImpl.java | 4 ++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicAddress.java b/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicAddress.java index c07c95e..63ea4f2 100644 --- a/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicAddress.java +++ b/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicAddress.java @@ -1,6 +1,10 @@ package com.greenfoxacademy.backend.models; -import jakarta.persistence.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import lombok.Data; /** diff --git a/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicDetails.java b/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicDetails.java index b3a2c94..1e1b3e8 100644 --- a/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicDetails.java +++ b/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicDetails.java @@ -1,6 +1,9 @@ package com.greenfoxacademy.backend.models; -import jakarta.persistence.*; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import lombok.Data; /** diff --git a/backend/src/main/java/com/greenfoxacademy/backend/models/Vet.java b/backend/src/main/java/com/greenfoxacademy/backend/models/Vet.java index 08f807c..a1ede20 100644 --- a/backend/src/main/java/com/greenfoxacademy/backend/models/Vet.java +++ b/backend/src/main/java/com/greenfoxacademy/backend/models/Vet.java @@ -1,6 +1,9 @@ package com.greenfoxacademy.backend.models; -import jakarta.persistence.*; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; import java.util.Collection; import java.util.List; import lombok.AllArgsConstructor; diff --git a/backend/src/main/java/com/greenfoxacademy/backend/services/user/vet/VetServiceImpl.java b/backend/src/main/java/com/greenfoxacademy/backend/services/user/vet/VetServiceImpl.java index 04a26fe..e4a44a4 100644 --- a/backend/src/main/java/com/greenfoxacademy/backend/services/user/vet/VetServiceImpl.java +++ b/backend/src/main/java/com/greenfoxacademy/backend/services/user/vet/VetServiceImpl.java @@ -33,9 +33,9 @@ public VetListResponseDto getAll(String word) { List clinicAddressList = clinicAddressRepository .findAllByZipContainingOrCityContainingOrStreetContaining( - word , word, word); + word, word, word); - vetList.addAll( clinicAddressList.stream() + vetList.addAll(clinicAddressList.stream() .map(a -> a.getClinicDetails().getVet()).toList()); vetList.addAll(clinicDetailsRepository.findAllByClinicNameContaining(word)