-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: 도메인 영역 기기토큰 레포지토리 추가 * feat: 도메인 기기토큰 레포지토리의 구현체 추가 * feat: 기기토큰 레포지토리 메서드 중 누락된 메서드 추가 * refactor: 서비스 레이어에서 도메인 영역 기기토큰 레포지토리 사용하도록 변경 * refactor: 누락된 final 추가 * test: 테스트에서 도메인 영역의 기기토큰 레포지토리 사용하도록 변경 * refactor: 레포지토리명에 맞춰 변수명 변경 * refactor: 테스트 픽스처에서 도메인 영역의 사용자 레포지토리 사용하도록 변경 * test: 기기토큰 레포지토리 구현체 테스트 추가 * chore: 질문에 대한 todo 주석 추가 * style: 개행 추가 * refactor: jpaQueryFactory 파라미터명 통일 * refactor: 필드 순서 변경 * refactor: given절 추가 * refactor: jpa 레포지토리 저장 테스트 메서드에서 엔티티 매니저 사용하는 코드 삭제 * refactor: 불필요한 필드 삭제 * refactor: 테스트에서 도메인 레포지토리 사용하도록 변경 * refactor: 불필요한 todo 삭제
- Loading branch information
Showing
36 changed files
with
293 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...d/ddang/src/main/java/com/ddang/ddang/device/domain/repository/DeviceTokenRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.ddang.ddang.device.domain.repository; | ||
|
||
import com.ddang.ddang.device.domain.DeviceToken; | ||
|
||
import java.util.Optional; | ||
|
||
public interface DeviceTokenRepository { | ||
|
||
DeviceToken save(final DeviceToken deviceToken); | ||
|
||
Optional<DeviceToken> findByUserId(final Long userId); | ||
|
||
void deleteByUserId(final Long id); | ||
} |
30 changes: 30 additions & 0 deletions
30
...ain/java/com/ddang/ddang/device/infrastructure/persistence/DeviceTokenRepositoryImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.ddang.ddang.device.infrastructure.persistence; | ||
|
||
import com.ddang.ddang.device.domain.DeviceToken; | ||
import com.ddang.ddang.device.domain.repository.DeviceTokenRepository; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.util.Optional; | ||
|
||
@Repository | ||
@RequiredArgsConstructor | ||
public class DeviceTokenRepositoryImpl implements DeviceTokenRepository { | ||
|
||
private final JpaDeviceTokenRepository jpaDeviceTokenRepository; | ||
|
||
@Override | ||
public DeviceToken save(final DeviceToken deviceToken) { | ||
return jpaDeviceTokenRepository.save(deviceToken); | ||
} | ||
|
||
@Override | ||
public Optional<DeviceToken> findByUserId(final Long userId) { | ||
return jpaDeviceTokenRepository.findByUserId(userId); | ||
} | ||
|
||
@Override | ||
public void deleteByUserId(final Long id) { | ||
jpaDeviceTokenRepository.deleteByUserId(id); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.