Class SearchFacetImpl
java.lang.Object
org.broadleafcommerce.core.search.domain.SearchFacetImpl
- All Implemented Interfaces:
Serializable,AdminMainEntity,MultiTenantCloneable<SearchFacet>,SearchFacet,SearchFacetAdminPresentation
@Entity
public class SearchFacetImpl
extends Object
implements SearchFacet, Serializable, AdminMainEntity, SearchFacetAdminPresentation
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.broadleafcommerce.core.search.domain.SearchFacetAdminPresentation
SearchFacetAdminPresentation.GroupName, SearchFacetAdminPresentation.GroupOrder, SearchFacetAdminPresentation.TabName, SearchFacetAdminPresentation.TabOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Booleanprotected IndexFieldTypeprotected Longprotected Stringprotected Stringprotected List<RequiredFacet>protected Booleanprotected Integerprotected List<SearchFacetRange>protected Booleanprotected BooleanFields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends SearchFacet>
CreateResponse<G>booleanGets whether or not you can multiselect values for this FacetThis String represents the FieldType for the given SearchFacet.getField()Returns the field associated with this facet.The main relationship to the rest of the search index entitiesgetId()Returns the internal idgetLabel()Gets the label of this SearchFacet.getName()Gets the name of this 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.Gets the display priority of this SearchFacet on search result pagesGets the applicable ranges for this search facet, if any are specified.Gets a boolean that specifies whether or not this SearchFacet should be displayed on search result pages in addition to category pagesGets whether or not this facet uses facet rangesinthashCode()voidsetCanMultiselect(Boolean canMultiselect) Sets whether or not you can multiselect values for this Facet.voidsetFieldType(IndexFieldType fieldType) voidSets the internal idvoidSets the labelvoidSets the namevoidsetRequiredFacets(List<RequiredFacet> requiredFacets) Sets the list of facets which this facet depends on.voidsetRequiresAllDependentFacets(Boolean requiresAllDependentFacets) Sets whether or not all dependent facets must be active, or if only one is necessaryvoidsetSearchDisplayPriority(Integer searchDisplayPriority) Sets the display priority on search result pagesvoidsetSearchFacetRanges(List<SearchFacetRange> searchFacetRanges) Sets the SearchFacetRanges Note: This method will set ALL search facet rangesvoidsetShowOnSearch(Boolean showOnSearch) Sets showOnSearchvoidsetUseFacetRanges(Boolean useFacetRanges) Sets useFacetRanges
-
Field Details
-
id
-
name
-
label
-
fieldType
-
showOnSearch
-
useFacetRanges
-
searchDisplayPriority
-
canMultiselect
-
searchFacetRanges
-
requiredFacets
-
requiresAllDependentFacets
-
-
Constructor Details
-
SearchFacetImpl
public SearchFacetImpl()
-
-
Method Details
-
getId
Description copied from interface:SearchFacetReturns the internal id- Specified by:
getIdin interfaceSearchFacet- Returns:
- the internal id
-
setId
Description copied from interface:SearchFacetSets the internal id- Specified by:
setIdin interfaceSearchFacet
-
getFieldType
Description copied from interface:SearchFacetThe main relationship to the rest of the search index entities- Specified by:
getFieldTypein interfaceSearchFacet
-
setFieldType
- Specified by:
setFieldTypein interfaceSearchFacet
-
getField
Description copied from interface:SearchFacetReturns the field associated with this facet.
This is a convenience method for
getFieldType().getIndexField().getField()- Specified by:
getFieldin interfaceSearchFacet- Returns:
- the fieldName
-
getFacetFieldType
Description copied from interface:SearchFacetThis String represents the FieldType for the given SearchFacet. This is the FieldType that will be used when this Field is indexed in Solr
This is a convience method for
getFieldType().getFieldType().getType()- Specified by:
getFacetFieldTypein interfaceSearchFacet- Returns:
- the String representing the FieldType of this SearchFacet
-
getName
Description copied from interface:SearchFacetGets the name of this SearchFacet. This is for admin naming purposes.- Specified by:
getNamein interfaceSearchFacet- Returns:
- the name
-
setName
Description copied from interface:SearchFacetSets the name- Specified by:
setNamein interfaceSearchFacet- See Also:
-
getLabel
Description copied from interface:SearchFacetGets the label of this SearchFacet. This is the label that will be used for the user-friendly display name of this facet- Specified by:
getLabelin interfaceSearchFacet- Returns:
- the label
-
setLabel
Description copied from interface:SearchFacetSets the label- Specified by:
setLabelin interfaceSearchFacet- See Also:
-
getShowOnSearch
Description copied from interface:SearchFacetGets a boolean that specifies whether or not this SearchFacet should be displayed on search result pages in addition to category pages- Specified by:
getShowOnSearchin interfaceSearchFacet- Returns:
- whether or not to display on search result pages
-
setShowOnSearch
Description copied from interface:SearchFacetSets showOnSearch- Specified by:
setShowOnSearchin interfaceSearchFacet- See Also:
-
getSearchDisplayPriority
Description copied from interface:SearchFacetGets the display priority of this SearchFacet on search result pages- Specified by:
getSearchDisplayPriorityin interfaceSearchFacet- Returns:
- the priority
-
setSearchDisplayPriority
Description copied from interface:SearchFacetSets the display priority on search result pages- Specified by:
setSearchDisplayPriorityin interfaceSearchFacet
-
getCanMultiselect
Description copied from interface:SearchFacetGets whether or not you can multiselect values for this Facet- Specified by:
getCanMultiselectin interfaceSearchFacet- Returns:
- the multiselect flag
-
setCanMultiselect
Description copied from interface:SearchFacetSets whether or not you can multiselect values for this Facet.- Specified by:
setCanMultiselectin interfaceSearchFacet
-
getUseFacetRanges
Description copied from interface:SearchFacetGets whether or not this facet uses facet ranges- Specified by:
getUseFacetRangesin interfaceSearchFacet- Returns:
- the useFacetRanges flag
-
setUseFacetRanges
Description copied from interface:SearchFacetSets useFacetRanges- Specified by:
setUseFacetRangesin interfaceSearchFacet- See Also:
-
getRequiredFacets
- Specified by:
getRequiredFacetsin interfaceSearchFacet- Returns:
- a list of SearchFacets that must have an active value set for this SearchFacet to be applicable.
- See Also:
-
setRequiredFacets
Description copied from interface:SearchFacetSets the list of facets which this facet depends on.- Specified by:
setRequiredFacetsin interfaceSearchFacet
-
getRequiresAllDependentFacets
Description copied from interface:SearchFacetThis 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:
getRequiresAllDependentFacetsin interfaceSearchFacet- Returns:
- whether the dependent facet list should be AND'ed together
- See Also:
-
setRequiresAllDependentFacets
Description copied from interface:SearchFacetSets whether or not all dependent facets must be active, or if only one is necessary- Specified by:
setRequiresAllDependentFacetsin interfaceSearchFacet
-
getSearchFacetRanges
Description copied from interface:SearchFacetGets 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:
getSearchFacetRangesin interfaceSearchFacet- Returns:
- the associated search facet ranges, if any
-
setSearchFacetRanges
Description copied from interface:SearchFacetSets the SearchFacetRanges Note: This method will set ALL search facet ranges- Specified by:
setSearchFacetRangesin interfaceSearchFacet- See Also:
-
createOrRetrieveCopyInstance
public <G extends SearchFacet> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceMultiTenantCloneable<SearchFacet>- Throws:
CloneNotSupportedException
-
equals
-
hashCode
public int hashCode() -
getMainEntityName
- Specified by:
getMainEntityNamein interfaceAdminMainEntity
-