Package org.ctan.site.stores
Class StopwordStore
java.lang.Object
io.dropwizard.hibernate.AbstractDAO<Stopword>
The class
StopwordStore
contains the repository for guest book
stop words.-
Constructor Summary
ConstructorsConstructorDescriptionStopwordStore
(org.hibernate.SessionFactory sessionFactory) This is the constructor for theStopwordStore
. -
Method Summary
Modifier and TypeMethodDescriptionThe methodgetById
provides means to retrieve the stopword by id.protected jakarta.persistence.criteria.Root
<Stopword> listQuery
(String term, jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<Stopword> query) The methodlistQuery
provides means to construct a query for the list of entities for a search.The methodmap
provides means to format a list for external use.Methods inherited from class org.ctan.site.stores.base.AbstractStore
list, remove, remove, remove, save
Methods inherited from class io.dropwizard.hibernate.AbstractDAO
criteriaQuery, currentSession, get, getEntityClass, initialize, list, list, namedQuery, namedTypedQuery, persist, query, uniqueResult, uniqueResult
-
Constructor Details
-
StopwordStore
public StopwordStore(org.hibernate.SessionFactory sessionFactory) This is the constructor for theStopwordStore
.- Parameters:
sessionFactory
- the session factory
-
-
Method Details
-
getById
The methodgetById
provides means to retrieve the stopword by id.- Overrides:
getById
in classAbstractStore<Stopword>
- Parameters:
id
- the id- Returns:
- the Stopword or
null
-
listQuery
protected jakarta.persistence.criteria.Root<Stopword> listQuery(String term, jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<Stopword> query) The methodlistQuery
provides means to construct a query for the list of entities for a search.- Specified by:
listQuery
in classAbstractStore<Stopword>
- Parameters:
term
- the search termcb
- the criteria builderquery
- the query- Returns:
- the root
- See Also:
-
map
The methodmap
provides means to format a list for external use.- Specified by:
map
in classAbstractStore<Stopword>
- Parameters:
list
- the list of entries- Returns:
- the formatted list
- See Also:
-