Interface AppMapper
public interface AppMapper
Mapper interface for converting between entity classes and their corresponding DTOs.
Uses MapStruct for automatic mapping.
Each entity has a pair of methods: one to convert to a DTO and one to convert back to an entity.
This interface is configured as a Spring component with componentModel = "spring".
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiontoDTO(CreditCard creditCard) toDTO(ShoppingCart shoppingCart) toDTO(ShoppingItem shoppingItem) toEntity(CategoryDTO dto) toEntity(CreditCardDTO dto) toEntity(CustomerDTO dto) toEntity(ProductDTO dto) toEntity(ShoppingCartDTO dto) toEntity(ShoppingItemDTO dto)
-
Method Details
-
toDTO
ProductDTO toDTO(Product product) throws EmptyNameException, EmptyBrandException, IncorrectPriceException -
toEntity
Product toEntity(ProductDTO dto) throws EmptyNameException, EmptyBrandException, IncorrectPriceException -
toDTO
-
toEntity
-
toDTO
- Throws:
EmptyNameException
-
toEntity
- Throws:
EmptyNameException
-
toDTO
-
toEntity
-
toDTO
-
toEntity
-
toDTO
-
toEntity
-
toDTO
ShoppingCartDTO toDTO(ShoppingCart shoppingCart) throws EmptyProductException, IncorrectQuantityException, IncorrectPriceException -
toEntity
-
toDTO
ShoppingItemDTO toDTO(ShoppingItem shoppingItem) throws EmptyProductException, IncorrectQuantityException -
toEntity
-