Class SearchRedirectDaoImpl

java.lang.Object
org.broadleafcommerce.core.search.redirect.dao.SearchRedirectDaoImpl
All Implemented Interfaces:
SearchRedirectDao

@Repository("blSearchRedirectDao") public class SearchRedirectDaoImpl extends Object implements SearchRedirectDao
Created by ppatel.
  • Field Details

    • em

      protected jakarta.persistence.EntityManager em
    • isNullActiveStartDateActive

      @Value("${searchRedirect.is.null.activeStartDate.active:false}") protected boolean isNullActiveStartDateActive
    • currentDateResolution

      @Value("${query.dateResolution.searchredirect:10000}") protected Long currentDateResolution
    • cachedDate

      protected Date cachedDate
  • Constructor Details

    • SearchRedirectDaoImpl

      public SearchRedirectDaoImpl()
  • Method Details

    • getCurrentDateAfterFactoringInDateResolution

      protected Date getCurrentDateAfterFactoringInDateResolution()
    • findSearchRedirectBySearchTerm

      public SearchRedirect findSearchRedirectBySearchTerm(String searchTerm)
      Specified by:
      findSearchRedirectBySearchTerm in interface SearchRedirectDao
    • buildFindSearchRedirectBySearchTermCriteria

      protected jakarta.persistence.criteria.CriteriaQuery<SearchRedirect> buildFindSearchRedirectBySearchTermCriteria(String searchTerm)
    • getCurrentDateResolution

      public Long getCurrentDateResolution()
      Description copied from interface: SearchRedirectDao
      Returns the number of milliseconds that the current date/time will be cached for queries before refreshing. This aids in query caching, otherwise every query that utilized current date would be different and caching would be ineffective.
      Specified by:
      getCurrentDateResolution in interface SearchRedirectDao
      Returns:
      the milliseconds to cache the current date/time
    • setCurrentDateResolution

      public void setCurrentDateResolution(Long currentDateResolution)
      Description copied from interface: SearchRedirectDao
      Sets the number of milliseconds that the current date/time will be cached for queries before refreshing. This aids in query caching, otherwise every query that utilized current date would be different and caching would be ineffective.
      Specified by:
      setCurrentDateResolution in interface SearchRedirectDao
      Parameters:
      currentDateResolution - the milliseconds to cache the current date/time