Website

It stores all the data of a user’s website and its products.

Properties



products    Entity

Stores the products of the website.

Methods



addProduct(product)    boolean

Add the given product to the products


getProduct(productId)    Product

Returns the product with the given id.


getAllProduct()    Iterable<Product>

Returns all the product


deleteProduct(productId)    boolean

Deletes a product with the productId


selectProduct(productId)    Product

Selects a product with the given id


getSelectedProduct(productId)    Product

Returns the selected product


toJson(productId)    string

Converts the instance of the Website class into a JSON string. The products are stored in the JSON in the CSV format. Returns the JSON string at the end of the function.

Read more