Skip to content

Commit

Permalink
refactor: 사용하지 않는 Repository 로직 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
BGuga committed Mar 29, 2024
1 parent db8721d commit ece7fc7
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.festago.festival.repository;

import com.festago.festival.domain.FestivalQueryInfo;
import java.util.List;
import java.util.Optional;
import org.springframework.data.repository.Repository;

Expand All @@ -12,7 +11,5 @@ public interface FestivalInfoRepository extends Repository<FestivalQueryInfo, Lo
Optional<FestivalQueryInfo> findByFestivalId(Long festivalId);

void deleteByFestivalId(Long festivalId);

List<FestivalQueryInfo> findAll();
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.festago.common.exception.ErrorCode;
import com.festago.common.exception.NotFoundException;
import com.festago.festival.domain.Festival;
import java.util.List;
import java.util.Optional;
import org.springframework.data.repository.Repository;

Expand All @@ -17,10 +16,8 @@ default Festival getOrThrow(Long festivalId) {
boolean existsBySchoolId(Long schoolId);

Festival save(Festival festival);

Optional<Festival> findById(Long festivalId);

void deleteById(Long festivalId);

List<Festival> findAll();
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ public interface StageArtistRepository extends Repository<StageArtist, Long> {
Set<Long> findAllArtistIdByStageIdIn(@Param("stageIds") List<Long> stageIds);

void deleteByStageId(Long stageId);

List<StageArtist> findAll();
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.festago.stage.repository;

import com.festago.stage.domain.StageQueryInfo;
import java.util.List;
import java.util.Optional;
import org.springframework.data.repository.Repository;

Expand All @@ -12,6 +11,4 @@ public interface StageQueryInfoRepository extends Repository<StageQueryInfo, Lon
Optional<StageQueryInfo> findByStageId(Long stageId);

void deleteByStageId(Long stageId);

List<StageQueryInfo> findAll();
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,4 @@ public interface StageRepository extends Repository<Stage, Long>, StageRepositor
boolean existsByFestivalId(Long festivalId);

List<Stage> findAllByFestivalId(Long festivalId);

List<Stage> findAll();

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,4 @@ public Optional<FestivalQueryInfo> findByFestivalId(Long festivalId) {
public void deleteByFestivalId(Long festivalId) {
memory.entrySet().removeIf(it -> Objects.equals(it.getValue().getFestivalId(), festivalId));
}

@Override
public List<FestivalQueryInfo> findAll() {
return new ArrayList<>(memory.values());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,4 @@ public Optional<Festival> findById(Long festivalId) {
public void deleteById(Long festivalId) {
memory.remove(festivalId);
}

@Override
public List<Festival> findAll() {
return new ArrayList<>(memory.values());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,4 @@ public Set<Long> findAllArtistIdByStageIdIn(List<Long> stageIds) {
public void deleteByStageId(Long stageId) {
memory.entrySet().removeIf(entry -> Objects.equals(entry.getValue().getStageId(), stageId));
}

@Override
public List<StageArtist> findAll() {
return new ArrayList<>(memory.values());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ public List<Stage> findAllByFestivalId(Long festivalId) {
.toList();
}

@Override
public List<Stage> findAll() {
return new ArrayList<>(memory.values());
}

@Override
public List<Stage> findAllDetailByFestivalId(Long festivalId) {
return findAllByFestivalId(festivalId);
Expand Down

0 comments on commit ece7fc7

Please sign in to comment.