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 instance
    ProductsDTO​(java.lang.String name, java.lang.String description, java.lang.Double price)
    Creates instance with name, description and price of product
    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
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getDescription()
    Gets description from product instance
    java.lang.Integer getId()
    Gets id from product instance
    java.lang.String getName()
    Gets name from product instance
    java.lang.Double getPrice()
    Gets price from product instance
    java.lang.String getUrl()
    Gets url from product instance
    void setDescription​(java.lang.String description)
    Sets description from product instance
    void setId​(java.lang.Integer id)
    Sets id from product instance
    void setName​(java.lang.String name)
    Sets name from product instance
    void setPrice​(java.lang.Double price)
    Sets price from product instance
    void setUrl​(java.lang.String url)
    Sets url from product instance

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 instance
      description - - description from product instance
      price - - 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 instance
      description - - description from product instance
      url - - url from product instance
      price - - 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