Package com.cyran.tp.server.products
Class ProductsDTO
java.lang.Object
com.cyran.tp.server.products.ProductsDTO
public class ProductsDTO
extends java.lang.Object
Class for Product representation
- Author:
- Jakub Perdek
-
Constructor Summary
Constructors Constructor Description ProductsDTO()
Creates empty product instanceProductsDTO(java.lang.String name, java.lang.String description, java.lang.Double price)
Creates instance with name, description and price of productProductsDTO(java.lang.String name, java.lang.String description, java.lang.String url, java.lang.Double price)
Creates instance with name, description and price of product -
Method Summary
Modifier and Type Method Description java.lang.String
getDescription()
Gets description from product instancejava.lang.Integer
getId()
Gets id from product instancejava.lang.String
getName()
Gets name from product instancejava.lang.Double
getPrice()
Gets price from product instancejava.lang.String
getUrl()
Gets url from product instancevoid
setDescription(java.lang.String description)
Sets description from product instancevoid
setId(java.lang.Integer id)
Sets id from product instancevoid
setName(java.lang.String name)
Sets name from product instancevoid
setPrice(java.lang.Double price)
Sets price from product instancevoid
setUrl(java.lang.String url)
Sets url from product instance
-
Constructor Details
-
ProductsDTO
public ProductsDTO(java.lang.String name, java.lang.String description, java.lang.Double price)Creates instance with name, description and price of product- Parameters:
name
- - name from product instancedescription
- - description from product instanceprice
- - price from product instance
-
ProductsDTO
public ProductsDTO(java.lang.String name, java.lang.String description, java.lang.String url, java.lang.Double price)Creates instance with name, description and price of product- Parameters:
name
- - name from product instancedescription
- - description from product instanceurl
- - url from product instanceprice
- - price from product instance
-
ProductsDTO
public ProductsDTO()Creates empty product instance
-
-
Method Details
-
setId
public void setId(java.lang.Integer id)Sets id from product instance- Parameters:
id
- - id from product
-
getId
public java.lang.Integer getId()Gets id from product instance- Returns:
- id from product instance
-
getName
public java.lang.String getName()Gets name from product instance- Returns:
- name from product instance
-
setName
public void setName(java.lang.String name)Sets name from product instance- Parameters:
name
- from product instance
-
getDescription
public java.lang.String getDescription()Gets description from product instance- Returns:
- description from product instance
-
setDescription
public void setDescription(java.lang.String description)Sets description from product instance- Parameters:
description
- from product instance
-
getUrl
public java.lang.String getUrl()Gets url from product instance- Returns:
- url from product instance
-
setUrl
public void setUrl(java.lang.String url)Sets url from product instance- Parameters:
url
- - url from product instance
-
getPrice
public java.lang.Double getPrice()Gets price from product instance- Returns:
- price - price from product instance
-
setPrice
public void setPrice(java.lang.Double price)Sets price from product instance- Parameters:
price
- - price from product instance
-