From 30dbd52aad0e65153db034cdb55f7f9a021bc8ba Mon Sep 17 00:00:00 2001 From: seokjin8678 Date: Wed, 3 Apr 2024 23:55:20 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EB=A9=94=EC=84=9C=EB=93=9C=20?= =?UTF-8?q?=EC=88=9C=EC=84=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../school/repository/SchoolRepository.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/src/main/java/com/festago/school/repository/SchoolRepository.java b/backend/src/main/java/com/festago/school/repository/SchoolRepository.java index a1cb30ef3..0895f8201 100644 --- a/backend/src/main/java/com/festago/school/repository/SchoolRepository.java +++ b/backend/src/main/java/com/festago/school/repository/SchoolRepository.java @@ -8,22 +8,22 @@ public interface SchoolRepository extends Repository { - default School getOrThrow(Long schoolId) { - return findById(schoolId) - .orElseThrow(() -> new NotFoundException(ErrorCode.SCHOOL_NOT_FOUND)); - } - School save(School school); Optional findById(Long id); void deleteById(Long id); + boolean existsById(Long id); + + default School getOrThrow(Long schoolId) { + return findById(schoolId) + .orElseThrow(() -> new NotFoundException(ErrorCode.SCHOOL_NOT_FOUND)); + } + boolean existsByDomain(String domain); boolean existsByName(String name); Optional findByName(String name); - - boolean existsById(Long id); }