org.broadleafcommerce.core.search.dao
Interface SearchFacetDao

All Known Implementing Classes:
SearchFacetDaoImpl

public interface SearchFacetDao

DAO used to interact with the database search facets

Author:
Andre Azzolini (apazzolini)

Method Summary
 List<SearchFacet> readAllSearchFacets()
          Returns all SearchFacets that are tagged with showOnSearch
<T> List<T>
readDistinctValuesForField(String fieldName, Class<T> fieldValueClass)
          Returns the distinct values for the given fieldName inside of the search clas sas a list of the specified type.
 SearchFacet save(SearchFacet searchFacet)
          Persist to the data layer.
 

Method Detail

readDistinctValuesForField

<T> List<T> readDistinctValuesForField(String fieldName,
                                       Class<T> fieldValueClass)
Returns the distinct values for the given fieldName inside of the search clas sas a list of the specified type. For example, reading the distinct values for "manufacturer" in the ProductImpl class and specifying the value class as String would search the ProductImpl entity's distinct manufacturers and return a List of these values.

Parameters:
fieldName -
fieldValueClass -
Returns:
the distinct values for the field

readAllSearchFacets

List<SearchFacet> readAllSearchFacets()
Returns all SearchFacets that are tagged with showOnSearch

Returns:
the facets to display on searches

save

SearchFacet save(SearchFacet searchFacet)
Persist to the data layer.

Parameters:
searchFacet - the instance to persist
Returns:
the instance after it has been persisted


Copyright © 2013. All Rights Reserved.