Class LicenseStore

All Implemented Interfaces:
IndexingStore

public class LicenseStore extends AbstractIndexingStore<License>
The class LicenseStore contains the repository for licenses.
  • Constructor Details

    • LicenseStore

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

    • count

      public Long count()
      The method count provides means to count the entities in the database.
      Overrides:
      count in class AbstractIndexingStore<License>
      Returns:
      the total number of entities
    • findAllByKeyOrNameStartingWith

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

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

      public License getByKey(String key)
      The method getByKey provides means to find an license by its key.
      Parameters:
      key - the key
      Returns:
      the license or null
    • listQuery

      protected jakarta.persistence.criteria.Root<License> listQuery(String term, jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<License> query)
      The method listQuery provides means to construct a query for the list of entities for a search.
      Specified by:
      listQuery in class AbstractStore<License>
      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<License> list)
      The method map provides means to format a list for external use.
      Specified by:
      map in class AbstractStore<License>
      Parameters:
      list - the list of entries
      Returns:
      the formatted list
      See Also: