Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

메서드의 파라미터 타입을 추상화 타입으로 변경 #6

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

shine-17
Copy link
Collaborator

  • 메서드의 파라미터 타입을 추상화 타입으로 변경
  • service에서 mapper 제거 및 repository에서 mapper를 이용한 객체 변환 수행
  • 헝가리안 표기법 제거

service에서 mapper 제거 및 repository에서 mapper를 이용한 객체 변환 수행
@shine-17 shine-17 requested a review from f-lab-tomo December 15, 2024 14:39
@shine-17 shine-17 self-assigned this Dec 15, 2024
Copy link
Collaborator

@f-lab-tomo f-lab-tomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

소소한 코멘트는 적당히 검토해주시고, 승인 먼저 가겠습니다 ㅎ

this.bookMapper = bookMapper;
}

public static Map<Long, BookEntity> books = new HashMap<>(){{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개인적으론 이전 방식도 좋았습니다 ㅎㅎ

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전 방식이 books의 타입이 <Long, Book> 이었던 코드를 말씀하시는 건가요?! 테스트 객체지만 추후에 DB와는 Entity로 주고받기 때문에 미리 느낌을 보려고 변경해봤습니다 ㅎㅎ

import java.util.List;

public interface BookService {
// 도서 조회 (id)
Book findById(long bookId);

// 도서 목록 조회 (id list)
List<Book> findByIdList(List<Long> bookIdList);
List<Book> findByIdList(Collection<Long> bookIds);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

메서드 명도 같이 변경하면 좋겠네요

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드를 변경하면서 메서드명을 보고도 아무생각없이 지나쳤던 제 자신을 반성합니다... 😥

@shine-17 shine-17 merged commit d7e5d7c into main Dec 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants