Interface SearchFacetDao

All Known Implementing Classes:
SearchFacetDaoImpl

public interface SearchFacetDao
DAO used to interact with the database search facets
Author:
Andre Azzolini (apazzolini)
  • Method Details

    • 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(FieldEntity entityType)
      Returns all SearchFacets that are tagged with showOnSearch for the given entity type
      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
    • readSearchFacetForField

      SearchFacet readSearchFacetForField(Field field)
      Returns a SearchFacet for the given field, if one exists
      Parameters:
      field - the field to find a SearchFacet for
      Returns:
      the SearchFacet for the given field
    • readSearchFacetRangesForSearchFacet

      List<SearchFacetRange> readSearchFacetRangesForSearchFacet(SearchFacet searchFacet)
      Returns a list of SearchFacetRanges for a given SearchFacet
      Parameters:
      searchFacet - the SearchFacet to use
      Returns:
      the SearchFacetRanges for the given SearchFacet