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
Modifier and TypeMethodDescriptionreadAllSearchFacets(FieldEntity entityType) Returns all SearchFacets that are tagged with showOnSearch for the given entity type<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.readSearchFacetForField(Field field) Returns a SearchFacet for the given field, if one existsreadSearchFacetRangesForSearchFacet(SearchFacet searchFacet) Returns a list of SearchFacetRanges for a given SearchFacetsave(SearchFacet searchFacet) Persist to the data layer.
-
Method Details
-
readDistinctValuesForField
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 Listof these values. - Parameters:
fieldName-fieldValueClass-- Returns:
- the distinct values for the field
-
readAllSearchFacets
Returns all SearchFacets that are tagged with showOnSearch for the given entity type- Returns:
- the facets to display on searches
-
save
Persist to the data layer.- Parameters:
searchFacet- the instance to persist- Returns:
- the instance after it has been persisted
-
readSearchFacetForField
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
Returns a list of SearchFacetRanges for a given SearchFacet- Parameters:
searchFacet- the SearchFacet to use- Returns:
- the SearchFacetRanges for the given SearchFacet
-