Skip to content

Commit

Permalink
Style: ProductsDtoMapper의 클래스명, 메서드명 변경
Browse files Browse the repository at this point in the history
- ProductsDtoMapper 클래스의 이름을 DomainDtoMapper로 변경
- DomainDtoMapper에서 두개의 도메인 객체를 참조하기 때문에 메서드명에 사용되었던 Domain이라는 단어를 실제 도메인 객체 이름으로 변경했습니다.
  • Loading branch information
Louie-03 committed Apr 26, 2022
1 parent 5ff762d commit 95511a7
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -8,16 +8,16 @@
import sidedish.com.domain.Product;

@Component
public class ProductsDtoMapper {
public class DomainDtoMapper {

public List<ProductBasicTypeResponse> toProductsBasicTypeResponseFromDomain(
public List<ProductBasicTypeResponse> toProductsBasicTypeResponseFromProducts(
List<Product> products) {
return products.stream()
.map(this::toProductMealTypeResponseFromDomain)
.map(this::toProductMealTypeResponseFromProduct)
.collect(Collectors.toList());
}

private ProductBasicTypeResponse toProductMealTypeResponseFromDomain(
private ProductBasicTypeResponse toProductMealTypeResponseFromProduct(
Product product) {
return new ProductBasicTypeResponse(
product.getId(),
Expand All @@ -29,7 +29,7 @@ private ProductBasicTypeResponse toProductMealTypeResponseFromDomain(
product.getDiscountPolicy().getPolicyName());
}

public ProductDetailTypeResponse toProductDetailTypeFromDomain(
public ProductDetailTypeResponse toProductDetailTypeFromProduct(
Product product) {
return new ProductDetailTypeResponse(
product.getId(),
Expand Down

0 comments on commit 95511a7

Please sign in to comment.