org.broadleafcommerce.core.search.domain
Class SearchFacetImpl

java.lang.Object
  extended by org.broadleafcommerce.core.search.domain.SearchFacetImpl
All Implemented Interfaces:
Serializable, SearchFacet

@Entity
public class SearchFacetImpl
extends Object
implements SearchFacet, Serializable

See Also:
Serialized Form

Field Summary
protected  Boolean canMultiselect
           
protected  Field field
           
protected  Long id
           
protected  String label
           
protected  List<RequiredFacet> requiredFacets
           
protected  Boolean requiresAllDependentFacets
           
protected  Integer searchDisplayPriority
           
protected  List<SearchFacetRange> searchFacetRanges
           
protected  Boolean showOnSearch
           
 
Constructor Summary
SearchFacetImpl()
           
 
Method Summary
 boolean equals(Object obj)
           
 Boolean getCanMultiselect()
          Gets whether or not you can multiselect values for this Facet
 Field getField()
          Returns the field associated with this facet.
 Long getId()
          Returns the internal id
 String getLabel()
          Gets the label of this SearchFacet.
 List<RequiredFacet> getRequiredFacets()
           
 Boolean getRequiresAllDependentFacets()
          This boolean controls whether or not this particular facet requires one of the dependent facets to be active, or if it requires all of the dependent facets to be active.
 Integer getSearchDisplayPriority()
          Gets the display priority of this SearchFacet on search result pages
 List<SearchFacetRange> getSearchFacetRanges()
          Gets the applicable ranges for this search facet, if any are specified.
 Boolean getShowOnSearch()
          Gets a boolean that specifies whether or not this SearchFacet should be displayed on search result pages in addition to category pages
 void setCanMultiselect(Boolean canMultiselect)
          Sets whether or not you can multiselect values for this Facet.
 void setField(Field field)
          Sets the field associated with this facet.
 void setId(Long id)
          Sets the internal id
 void setLabel(String label)
          Sets the label
 void setRequiredFacets(List<RequiredFacet> requiredFacets)
          Sets the list of facets which this facet depends on.
 void setRequiresAllDependentFacets(Boolean requiresAllDependentFacets)
          Sets whether or not all dependent facets must be active, or if only one is necessary
 void setSearchDisplayPriority(Integer searchDisplayPriority)
          Sets the display priority on search result pages
 void setSearchFacetRanges(List<SearchFacetRange> searchFacetRanges)
          Sets the SearchFacetRanges Note: This method will set ALL search facet ranges
 void setShowOnSearch(Boolean showOnSearch)
          Sets showOnSearch
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected Long id

field

protected Field field

label

protected String label

showOnSearch

protected Boolean showOnSearch

searchDisplayPriority

protected Integer searchDisplayPriority

canMultiselect

protected Boolean canMultiselect

searchFacetRanges

protected List<SearchFacetRange> searchFacetRanges

requiredFacets

protected List<RequiredFacet> requiredFacets

requiresAllDependentFacets

protected Boolean requiresAllDependentFacets
Constructor Detail

SearchFacetImpl

public SearchFacetImpl()
Method Detail

getId

public Long getId()
Description copied from interface: SearchFacet
Returns the internal id

Specified by:
getId in interface SearchFacet
Returns:
the internal id

setId

public void setId(Long id)
Description copied from interface: SearchFacet
Sets the internal id

Specified by:
setId in interface SearchFacet

getField

public Field getField()
Description copied from interface: SearchFacet
Returns the field associated with this facet.

Specified by:
getField in interface SearchFacet
Returns:
the fieldName

setField

public void setField(Field field)
Description copied from interface: SearchFacet
Sets the field associated with this facet.

Specified by:
setField in interface SearchFacet
See Also:
#getFieldName()

getLabel

public String getLabel()
Description copied from interface: SearchFacet
Gets the label of this SearchFacet. This is the label that will be used for the user-friendly display name of this facet

Specified by:
getLabel in interface SearchFacet
Returns:
the label

setLabel

public void setLabel(String label)
Description copied from interface: SearchFacet
Sets the label

Specified by:
setLabel in interface SearchFacet
See Also:
SearchFacet.getLabel()

getShowOnSearch

public Boolean getShowOnSearch()
Description copied from interface: SearchFacet
Gets a boolean that specifies whether or not this SearchFacet should be displayed on search result pages in addition to category pages

Specified by:
getShowOnSearch in interface SearchFacet
Returns:
whether or not to display on search result pages

setShowOnSearch

public void setShowOnSearch(Boolean showOnSearch)
Description copied from interface: SearchFacet
Sets showOnSearch

Specified by:
setShowOnSearch in interface SearchFacet
See Also:
SearchFacet.getShowOnSearch()

getSearchDisplayPriority

public Integer getSearchDisplayPriority()
Description copied from interface: SearchFacet
Gets the display priority of this SearchFacet on search result pages

Specified by:
getSearchDisplayPriority in interface SearchFacet
Returns:
the priority

setSearchDisplayPriority

public void setSearchDisplayPriority(Integer searchDisplayPriority)
Description copied from interface: SearchFacet
Sets the display priority on search result pages

Specified by:
setSearchDisplayPriority in interface SearchFacet

getCanMultiselect

public Boolean getCanMultiselect()
Description copied from interface: SearchFacet
Gets whether or not you can multiselect values for this Facet

Specified by:
getCanMultiselect in interface SearchFacet
Returns:
the multiselect flag

setCanMultiselect

public void setCanMultiselect(Boolean canMultiselect)
Description copied from interface: SearchFacet
Sets whether or not you can multiselect values for this Facet.

Specified by:
setCanMultiselect in interface SearchFacet

getRequiredFacets

public List<RequiredFacet> getRequiredFacets()
Specified by:
getRequiredFacets in interface SearchFacet
Returns:
a list of SearchFacets that must have an active value set for this SearchFacet to be applicable.
See Also:
SearchFacet.getRequiresAllDependentFacets()

setRequiredFacets

public void setRequiredFacets(List<RequiredFacet> requiredFacets)
Description copied from interface: SearchFacet
Sets the list of facets which this facet depends on.

Specified by:
setRequiredFacets in interface SearchFacet

getRequiresAllDependentFacets

public Boolean getRequiresAllDependentFacets()
Description copied from interface: SearchFacet
This boolean controls whether or not this particular facet requires one of the dependent facets to be active, or if it requires all of the dependent facets to be active.

Specified by:
getRequiresAllDependentFacets in interface SearchFacet
Returns:
whether the dependent facet list should be AND'ed together
See Also:
SearchFacet.getRequiredFacets()

setRequiresAllDependentFacets

public void setRequiresAllDependentFacets(Boolean requiresAllDependentFacets)
Description copied from interface: SearchFacet
Sets whether or not all dependent facets must be active, or if only one is necessary

Specified by:
setRequiresAllDependentFacets in interface SearchFacet

getSearchFacetRanges

public List<SearchFacetRange> getSearchFacetRanges()
Description copied from interface: SearchFacet
Gets the applicable ranges for this search facet, if any are specified. For example, the SearchFacet that interacts with "Manufacturers" might not have any ranges defined (as it would depend on the manufacturers that are in the result list), but a facet on "Price" might have predefined ranges (such as 0-5, 5-10, 10-20).

Specified by:
getSearchFacetRanges in interface SearchFacet
Returns:
the associated search facet ranges, if any

setSearchFacetRanges

public void setSearchFacetRanges(List<SearchFacetRange> searchFacetRanges)
Description copied from interface: SearchFacet
Sets the SearchFacetRanges Note: This method will set ALL search facet ranges

Specified by:
setSearchFacetRanges in interface SearchFacet
See Also:
SearchFacet.getSearchFacetRanges()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2013. All Rights Reserved.