Skip to content

Commit

Permalink
style: 정적 팩토리 메서드 네이밍 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
nuyh99 committed Nov 23, 2023
1 parent 8a9faff commit 9a36df8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ public KeywordsResponse findSessionIncludeRootKeywords(final Long sessionId) {

List<Keyword> keywords = keywordRepository.findBySessionIdAndParentIsNull(sessionId);

return KeywordsResponse.of(keywords);
return KeywordsResponse.from(keywords);
}

@Transactional(readOnly = true)
public KeywordsResponse newFindSessionIncludeRootKeywords() {
List<Keyword> keywords = keywordRepository.newFindByParentIsNull();

return KeywordsResponse.of(keywords);
return KeywordsResponse.from(keywords);
}

public void updateKeyword(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public KeywordsResponse findAllKeywordsWithProgress(final Long curriculumId, fin
final Map<Long, Integer> totalQuizCounts = getTotalQuizCounts();
final Map<Long, Integer> answeredQuizCounts = getAnsweredQuizCounts(memberId);

final KeywordsResponse keywordsResponse = KeywordsResponse.of(keywords);
final KeywordsResponse keywordsResponse = KeywordsResponse.from(keywords);
keywordsResponse.setProgress(totalQuizCounts, answeredQuizCounts);

return keywordsResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public KeywordsResponse(final List<KeywordResponse> data) {
this.data = data;
}

public static KeywordsResponse of(final List<Keyword> keywords) {
public static KeywordsResponse from(final List<Keyword> keywords) {
final List<KeywordResponse> keywordsResponse = keywords.stream()
.filter(Keyword::isRoot)
.map(KeywordResponse::createWithAllChildResponse)
Expand Down

0 comments on commit 9a36df8

Please sign in to comment.