diff --git a/src/main/java/com/telepigeon/server/repository/ProfileRepository.java b/src/main/java/com/telepigeon/server/repository/ProfileRepository.java index 7a1dea1..9baec81 100644 --- a/src/main/java/com/telepigeon/server/repository/ProfileRepository.java +++ b/src/main/java/com/telepigeon/server/repository/ProfileRepository.java @@ -4,7 +4,6 @@ import com.telepigeon.server.domain.Room; import com.telepigeon.server.domain.User; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; import java.util.List; import java.util.Optional; @@ -17,7 +16,4 @@ public interface ProfileRepository extends JpaRepository { boolean existsByUserAndRoom(User user, Room room); List findAllByUserId(Long userId); - - @Query("select count(p) from Profile p where p.room = :room and p.isDeleted = :isDeleted") - int countByRoomAndIsDeleted(Room room, boolean isDeleted); } diff --git a/src/main/java/com/telepigeon/server/service/profile/ProfileRetriever.java b/src/main/java/com/telepigeon/server/service/profile/ProfileRetriever.java index cfd06d3..7e79500 100644 --- a/src/main/java/com/telepigeon/server/service/profile/ProfileRetriever.java +++ b/src/main/java/com/telepigeon/server/service/profile/ProfileRetriever.java @@ -47,9 +47,4 @@ public List findByUserId(final long userId) { public List findAll() { return profileRepository.findAll(); } - - public int countByRoomAndIsDeleted(final Room room, final boolean isDeleted) { - return profileRepository.countByRoomAndIsDeleted(room, isDeleted); - } - }