Package com.cyran.tp.server.products
Class ProductsUtils
java.lang.Object
com.cyran.tp.server.products.ProductsUtils
public class ProductsUtils
extends java.lang.Object
Utils for managing products instances
- Author:
- Jakub Perdek
-
Constructor Summary
Constructors Constructor Description ProductsUtils()
-
Method Summary
Modifier and Type Method Description static ProductsDTO[]
productsToDtoMapping(Products[] products)
Creates UserDTO instances from Product instancesstatic ProductsDTO[]
productsToDtoMapping(java.util.List<Products> products)
Creates ProductDTO instances from list of Product instancesstatic ProductsDTO
productToDtoMapping(Products product)
Creates UserDTO instance from Product instance
-
Constructor Details
-
ProductsUtils
public ProductsUtils()
-
-
Method Details
-
productsToDtoMapping
Creates UserDTO instances from Product instances- Parameters:
products
- - array of products instances- Returns:
- array of ProductsDTO instances created from Product instances
-
productsToDtoMapping
Creates ProductDTO instances from list of Product instances- Parameters:
products
- - list of product instances- Returns:
- array of ProductsDTO instances created from Product instances
-
productToDtoMapping
Creates UserDTO instance from Product instance- Parameters:
product
- - product instance- Returns:
- roductsDTO instance created from product (Products class) instance
-