Skip to content

Commit

Permalink
chore: 메서드 순서 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
seokjin8678 committed Apr 3, 2024
1 parent 6a5171b commit 30dbd52
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@

public interface SchoolRepository extends Repository<School, Long> {

default School getOrThrow(Long schoolId) {
return findById(schoolId)
.orElseThrow(() -> new NotFoundException(ErrorCode.SCHOOL_NOT_FOUND));
}

School save(School school);

Optional<School> 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<School> findByName(String name);

boolean existsById(Long id);
}

0 comments on commit 30dbd52

Please sign in to comment.