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

refactor : Bookmark 목록 조회 로직 수정 #14

Open
1 task
hye-inA opened this issue Feb 18, 2025 · 0 comments
Open
1 task

refactor : Bookmark 목록 조회 로직 수정 #14

hye-inA opened this issue Feb 18, 2025 · 0 comments
Labels

Comments

@hye-inA
Copy link
Member

hye-inA commented Feb 18, 2025

📌 Description ( 작업 상세 내용 )

상세 내용 도메인JPA의 상속 전략(Inheritance Strategy)을 사용

현재 사용 중인 방식 (클래스 타입으로 구분)

: 현재 구조에서는 Detail 추상 클래스를 상속받는 LaundryDetail, RecyclingDetail 등의 구체적인 엔티티 클래스를 사용하고 있습

if (detail instanceof LaundryDetail) {
    // LaundryDetail 관련 로직
} else if (detail instanceof RecyclingDetail) {
    // RecyclingDetail 관련 로직
}

TODO

  • 서비스 로직에서 타입 체크 시 instanceof를 사용하는 것보다는 더 객체지향적인 방법을 고려
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant