Class Facet
- java.lang.Object
-
- com.broadleafcommerce.search.api.domain.Facet
-
- All Implemented Interfaces:
Serializable
public class Facet extends Object implements Serializable
This represents an available search facet and its filtering options. This can represent any property that is filterable. For example, this could represent an item like Color, Manufacturer, Price, etc.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description Facet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
Integer
getDisplayOrder()
Order in which to display this facet on a list of facets.String
getFacetRule()
The rule required to be met for this facet to be active.String
getLabel()
A value intended for display on a UI.String
getName()
Name to use to identify the facet.List<FacetRange>
getRanges()
The different range options available for filtering on this search facet.int
hashCode()
boolean
isMultiSelect()
Determines whether or not this facet allows multiple values to be selected.boolean
isRanged()
Designates whether or not this facet is ranged.boolean
isRuledFacet()
void
setDisplayOrder(Integer displayOrder)
Order in which to display this facet on a list of facets.void
setFacetRule(String facetRule)
The rule required to be met for this facet to be active.void
setLabel(String label)
A value intended for display on a UI.void
setMultiSelect(boolean multiSelect)
Determines whether or not this facet allows multiple values to be selected.void
setName(String name)
Name to use to identify the facet.void
setRanged(boolean ranged)
Designates whether or not this facet is ranged.void
setRanges(List<FacetRange> ranges)
The different range options available for filtering on this search facet.String
toString()
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
isRuledFacet
public boolean isRuledFacet()
-
getLabel
public String getLabel()
A value intended for display on a UI. For example, "Manufacturer", "Price", "Category", etc.- Returns:
- displayable label for this facet
-
getName
public String getName()
Name to use to identify the facet. Typically, this should correspond to aFieldDefinition.getAbbreviation()
.- Returns:
- Name to use to identify the facet.
-
getDisplayOrder
public Integer getDisplayOrder()
Order in which to display this facet on a list of facets. A lower number indicates this item will occur earlier in the returned facet list.- Returns:
- order in which this facet should appear in a list
-
isMultiSelect
public boolean isMultiSelect()
Determines whether or not this facet allows multiple values to be selected.- Returns:
- can multiple options of this facet be selected?
-
isRanged
public boolean isRanged()
Designates whether or not this facet is ranged. For example price might be a ranged facet ($0.00-49.99, $50.00-99.99, etc), or date ranges.- Returns:
- is this a ranged facet?
-
getRanges
public List<FacetRange> getRanges()
The different range options available for filtering on this search facet.- Returns:
- available range options for this facet
-
getFacetRule
public String getFacetRule()
The rule required to be met for this facet to be active. This is by default a SpEL expression, but may be any expression language.- Returns:
- The facet rule.
- See Also:
- Spring SpEL documentation
-
setLabel
public void setLabel(String label)
A value intended for display on a UI. For example, "Manufacturer", "Price", "Category", etc.- Parameters:
label
- displayable label for this facet
-
setName
public void setName(String name)
Name to use to identify the facet. Typically, this should correspond to aFieldDefinition.getAbbreviation()
.- Parameters:
name
- Name to use to identify the facet.
-
setDisplayOrder
public void setDisplayOrder(Integer displayOrder)
Order in which to display this facet on a list of facets. A lower number indicates this item will occur earlier in the returned facet list.- Parameters:
displayOrder
- order in which this facet should appear in a list
-
setMultiSelect
public void setMultiSelect(boolean multiSelect)
Determines whether or not this facet allows multiple values to be selected.- Parameters:
multiSelect
- can multiple options of this facet be selected?
-
setRanged
public void setRanged(boolean ranged)
Designates whether or not this facet is ranged. For example price might be a ranged facet ($0.00-49.99, $50.00-99.99, etc), or date ranges.- Parameters:
ranged
- is this a ranged facet?
-
setRanges
public void setRanges(List<FacetRange> ranges)
The different range options available for filtering on this search facet.- Parameters:
ranges
- available range options for this facet
-
setFacetRule
public void setFacetRule(String facetRule)
The rule required to be met for this facet to be active. This is by default a SpEL expression, but may be any expression language.- Parameters:
facetRule
- The rule to evaluate.- See Also:
- Spring SpEL documentation
-
canEqual
protected boolean canEqual(Object other)
-
-