org.broadleafcommerce.core.search.dao
Class SearchFacetDaoImpl

java.lang.Object
  extended by org.broadleafcommerce.core.search.dao.SearchFacetDaoImpl
All Implemented Interfaces:
SearchFacetDao

@Repository(value="blSearchFacetDao")
public class SearchFacetDaoImpl
extends Object
implements SearchFacetDao


Field Summary
protected  javax.persistence.EntityManager em
           
protected  EntityConfiguration entityConfiguration
           
 
Constructor Summary
SearchFacetDaoImpl()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

em

protected javax.persistence.EntityManager em

entityConfiguration

protected EntityConfiguration entityConfiguration
Constructor Detail

SearchFacetDaoImpl

public SearchFacetDaoImpl()
Method Detail

readAllSearchFacets

public List<SearchFacet> readAllSearchFacets()
Description copied from interface: SearchFacetDao
Returns all SearchFacets that are tagged with showOnSearch

Specified by:
readAllSearchFacets in interface SearchFacetDao
Returns:
the facets to display on searches

readDistinctValuesForField

public <T> List<T> readDistinctValuesForField(String fieldName,
                                              Class<T> fieldValueClass)
Description copied from interface: SearchFacetDao
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.

Specified by:
readDistinctValuesForField in interface SearchFacetDao
Returns:
the distinct values for the field


Copyright © 2012. All Rights Reserved.