Class PkgStore

java.lang.Object
io.dropwizard.hibernate.AbstractDAO<Pkg>
All Implemented Interfaces:
IndexingStore

public class PkgStore extends AbstractIndexingStore<Pkg>
The class PkgStore contains the repository for authors.
  • Constructor Details

    • PkgStore

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

    • findAll

      public List<Pkg> findAll()
      The method findAll collects all packages.
      Overrides:
      findAll in class AbstractIndexingStore<Pkg>
      Returns:
      a list of packages
    • findAllByKeyStartingWith

      public List<Pkg> findAllByKeyStartingWith(String s)
      The method findAllByKeyStartingWith collects all packages where the key has a given prefix.
      Parameters:
      s - the prefix or null
      Returns:
      the list of matching packages
    • findAllByNameStartingWith

      public List<Pkg> findAllByNameStartingWith(String s)
      The method findAllByNameStartingWith collects all packages where the name has a given prefix.
      Parameters:
      s - the prefix or null
      Returns:
      the list of matching packages
    • getByCtanPath

      public Pkg getByCtanPath(String path)
      The method getByCtanPath provides means to retrieve a package by its CTAN location.
      Parameters:
      path - the CTAN path
      Returns:
      the package or null
    • getByKey

      public Pkg getByKey(String id)
      The method getByKey provides means to retrieve a package by its key.
      Parameters:
      id - the id
      Returns:
      the package or null
    • listQuery

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