Package com.hybris.merchandising.model
Class Facet
- java.lang.Object
-
- com.hybris.merchandising.model.Facet
-
- All Implemented Interfaces:
java.io.Serializable
public class Facet extends java.lang.Object implements java.io.SerializableThis object is the list of facets that the user has selected in the UI to narrow down the search of products- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Facet()Creates a new instance of an ItemFacet with an empty list of values.Facet(java.lang.String code, java.lang.String name)Creates a new instance of an ItemFacet with a specified code and name.Facet(java.lang.String code, java.lang.String name, java.util.List<java.lang.String> values)Creates a new instance of an ItemFacet with a specific code, name and initial values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(java.lang.String value)Adds a specified facet value to the list of values represented by this current facet.booleanequals(java.lang.Object object)java.lang.StringgetCode()java.lang.StringgetName()java.util.List<java.lang.String>getValues()inthashCode()voidsetCode(java.lang.String code)voidsetName(java.lang.String name)voidsetValues(java.util.List<java.lang.String> values)java.lang.StringtoString()
-
-
-
Constructor Detail
-
Facet
public Facet()
Creates a new instance of an ItemFacet with an empty list of values.
-
Facet
public Facet(java.lang.String code, java.lang.String name)Creates a new instance of an ItemFacet with a specified code and name.- Parameters:
code- a String containing the code for the specific facet.name- the name of the specific facet.
-
Facet
public Facet(java.lang.String code, java.lang.String name, java.util.List<java.lang.String> values)Creates a new instance of an ItemFacet with a specific code, name and initial values.- Parameters:
code- a String containing the code for the specific facet.name- the name of the specific facet.values- a list of the values we want to store against this facet.
-
-
Method Detail
-
setCode
public void setCode(java.lang.String code)
-
getCode
public java.lang.String getCode()
-
setName
public void setName(java.lang.String name)
-
getName
public java.lang.String getName()
-
setValues
public void setValues(java.util.List<java.lang.String> values)
-
addValue
public void addValue(java.lang.String value)
Adds a specified facet value to the list of values represented by this current facet.- Parameters:
value- the facet value to add to the list.
-
getValues
public java.util.List<java.lang.String> getValues()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-