Class Category

  • All Implemented Interfaces:
    Serializable

    public class Category
    extends Object
    implements Serializable
    A structure containing all the info necessary for a category details page or section shown in a commerce-facing app (as opposed to a PIM UI).
    Author:
    Nathan Moore (nathandmoore)
    See Also:
    Serialized Form
    • Constructor Detail

      • Category

        public Category()
    • Method Detail

      • addAttribute

        public void addAttribute​(String name,
                                 Object value)
        Takes in any additional attributes passed in the request not matching any defined properties.
        Parameters:
        name - Name of the additional attribute
        value - Value of the additional attribute
      • getAttribute

        public Map<String,​Object> getAttribute()
        Return any additional attributes passed in the request not matching any defined properties.
        Returns:
        any additional attributes passed in the request not matching any defined properties.
      • getId

        public String getId()
        The context ID of the category.
        Returns:
        the context ID of the category
      • getProducts

        public SimplePage<Product> getProducts()
        A page of Products belonging to the category. To configure the page pass paging params to the endpoint.
        Returns:
        A page of Products belonging to the category.
      • getAttributes

        public Map<String,​Object> getAttributes()
        Map holding any additional attributes passed in the request not matching any defined properties.
      • setId

        public void setId​(String id)
        The context ID of the category.
        Parameters:
        id - the context ID of the category
      • setProducts

        public void setProducts​(SimplePage<Product> products)
        A page of Products belonging to the category. To configure the page pass paging params to the endpoint.
        Parameters:
        products - A page of Products belonging to the category.
      • setAttributes

        public void setAttributes​(Map<String,​Object> attributes)
        Map holding any additional attributes passed in the request not matching any defined properties.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object