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 methodgetByIdprovides 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 methodlistQueryprovides means to construct a query for the list of entities for a search.The methodmapprovides means to format a list for external use.Methods inherited from class org.ctan.site.stores.base.AbstractStore
list, remove, remove, remove, saveMethods 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 methodgetByIdprovides means to retrieve the stopword by id.- Overrides:
getByIdin 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 methodlistQueryprovides means to construct a query for the list of entities for a search.- Specified by:
listQueryin classAbstractStore<Stopword>- Parameters:
term- the search termcb- the criteria builderquery- the query- Returns:
- the root
- See Also:
-
map
The methodmapprovides means to format a list for external use.- Specified by:
mapin classAbstractStore<Stopword>- Parameters:
list- the list of entries- Returns:
- the formatted list
- See Also:
-