Class ContentSearch.ContentSearchContext

java.lang.Object
org.apache.ofbiz.content.content.ContentSearch.ContentSearchContext
Enclosing class:
ContentSearch

public static class ContentSearch.ContentSearchContext extends Object
The type Content search context.
  • Constructor Details

    • ContentSearchContext

      public ContentSearchContext(Delegator delegator, String visitId)
  • Method Details

    • getDelegator

      public Delegator getDelegator()
      Gets delegator.
      Returns:
      the delegator
    • addContentSearchConstraints

      public void addContentSearchConstraints(List<? extends ContentSearch.ContentSearchConstraint> contentSearchConstraintList)
      Add content search constraints.
      Parameters:
      contentSearchConstraintList - the content search constraint list
    • setResultSortOrder

      public void setResultSortOrder(ContentSearch.ResultSortOrder resultSortOrder)
      Sets result sort order.
      Parameters:
      resultSortOrder - the result sort order
    • setResultOffset

      public void setResultOffset(Integer resultOffset)
      Sets result offset.
      Parameters:
      resultOffset - the result offset
    • setMaxResults

      public void setMaxResults(Integer maxResults)
      Sets max results.
      Parameters:
      maxResults - the max results
    • getTotalResults

      public Integer getTotalResults()
      Gets total results.
      Returns:
      the total results
    • doSearch

      public ArrayList<String> doSearch()
      Do search array list.
      Returns:
      the array list
    • finishKeywordConstraints

      public void finishKeywordConstraints()
      Finish keyword constraints.
    • doQuery

      public EntityListIterator doQuery(Delegator delegator)
      Parameters:
      delegator - the delegator
      Returns:
      EntityListIterator representing the result of the query: NOTE THAT THIS MUST BE CLOSED WHEN YOU ARE DONE WITH IT (preferably in a finally block), AND DON'T LEAVE IT OPEN TOO LONG BECAUSE IT WILL MAINTAIN A DATABASE CONNECTION.
    • makeContentIdList

      public ArrayList<String> makeContentIdList(EntityListIterator eli)
      Make content id list array list.
      Parameters:
      eli - the eli
      Returns:
      the array list
    • saveSearchResultInfo

      public void saveSearchResultInfo(Long numResults, Double secondsTotal)
      Save search result info.
      Parameters:
      numResults - the num results
      secondsTotal - the seconds total