Skip to content

Commit

Permalink
refactor(BoardHashtagPersistenceAdapter): repository 변수명 앞에 도메인명 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
mingmingmon committed Dec 22, 2024
1 parent c85f96b commit 1527242
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@
public class BoardHashtagPersistenceAdapter implements
RegisterBoardHashtagPort, RetrieveBoardHashtagPort {

private final BoardHashtagRepository boardHashtagRepository;
private final BoardHashtagRepository repository;
private final BoardHashtagMapper mapper;
@Override
public BoardHashtag save(BoardHashtag boardHashtag) {
BoardHashtagJpaEntity entity = mapper.toEntity(boardHashtag);
BoardHashtagJpaEntity savedEntity = boardHashtagRepository.save(entity);
BoardHashtagJpaEntity savedEntity = repository.save(entity);
return mapper.toDomain(savedEntity);
}

@Override
public List<BoardHashtag> getAllByBoardId(Long boardId) {
return boardHashtagRepository.findAllByBoardId(boardId).stream()
return repository.findAllByBoardId(boardId).stream()
.map(mapper::toDomain)
.collect(Collectors.toList());
}

@Override
public List<BoardHashtag> getAllIncludingDeletedByBoardId(Long boardId) {
return boardHashtagRepository.findAllIncludingDeletedByBoardId(boardId).stream()
return repository.findAllIncludingDeletedByBoardId(boardId).stream()
.map(mapper::toDomain)
.collect(Collectors.toList());
}

public List<Long> getBoardIdsByHashTagId(List<Long> hashtagIds, Pageable pageable) {
return boardHashtagRepository.getBoardIdsByHashTagId(hashtagIds, pageable);
return repository.getBoardIdsByHashTagId(hashtagIds, pageable);
}
}

0 comments on commit 1527242

Please sign in to comment.