Class TopicStore

All Implemented Interfaces:
IndexingStore

public class TopicStore extends AbstractIndexingStore<Topic>
The class TopicStore contains the repository for topics.
  • Constructor Details

    • TopicStore

      public TopicStore(org.hibernate.SessionFactory sessionFactory, IndexingSession indexingSession)
      This is the constructor for the TopicStore.
      Parameters:
      sessionFactory - the session factory
      indexingSession - the indexing session
  • Method Details

    • findAllByKeyOrTitleContaining

      public List<Topic> findAllByKeyOrTitleContaining(String s, String locale)
      The method findAllByKeyOrTitleContaining provides means to search for topics.
      Parameters:
      s - the string contained in the name
      locale - the language
      Returns:
      the list of licenses ordered by the key
    • findAllByKeyStartingWith

      public List<Topic> findAllByKeyStartingWith(@NonNull @NonNull String pattern)
      The method findAllByKeyStartingWith provides means to retrieve topics where the sort text is starting with a given string. The comparison is done case-insensitive.
      Parameters:
      pattern - the initial segment
      Returns:
      the list of topics ordered by the sort text
    • getByKey

      public Topic getByKey(@NonNull @NonNull String key)
      The method getByKey provides means to find an topic by its key.
      Parameters:
      key - the (non-null) key
      Returns:
      the topic or null
    • indexType

      protected IndexType indexType()
      The method indexType provides means to retrieve the index type.
      Specified by:
      indexType in class AbstractIndexingStore<Topic>
      Returns:
      the index type
      See Also:
    • listQuery

      protected jakarta.persistence.criteria.Root<Topic> listQuery(String term, jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<Topic> query)
      The method listQuery provides means to construct a query for the list of entities for a search.
      Specified by:
      listQuery in class AbstractStore<Topic>
      Parameters:
      term - the search term
      cb - the criteria builder
      query - the query
      Returns:
      the root
      See Also:
    • map

      protected List<Map<String,Object>> map(List<Topic> list)
      The method map provides means to format a list for external use.
      Specified by:
      map in class AbstractStore<Topic>
      Parameters:
      list - the list of entries
      Returns:
      the formatted list
      See Also: