Package org.ctan.site.stores
Class UserStopwordStore
java.lang.Object
io.dropwizard.hibernate.AbstractDAO<UserStopword>
The class
UserStopwordStore
contains the repository for user
stop words.-
Constructor Summary
ConstructorsConstructorDescriptionUserStopwordStore
(org.hibernate.SessionFactory sessionFactory) This is the constructor for theUserStopwordStore
. -
Method Summary
Modifier and TypeMethodDescriptiongetByStopword
(String stopword) The methodgetByStopword
provides means to find an user stop word by its value.protected jakarta.persistence.criteria.Root
<UserStopword> listQuery
(String term, jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<UserStopword> query) The methodlistQuery
provides means to construct a query for the list of entities for a search.map
(List<UserStopword> list) The methodmap
provides means to format a list for external use.boolean
The methodset
provides means to set a stop word to a new value.Methods inherited from class org.ctan.site.stores.base.AbstractStore
getById, 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
-
UserStopwordStore
public UserStopwordStore(org.hibernate.SessionFactory sessionFactory) This is the constructor for theUserStopwordStore
.- Parameters:
sessionFactory
- the session factory
-
-
Method Details
-
getByStopword
The methodgetByStopword
provides means to find an user stop word by its value.- Parameters:
stopword
- the stop word- Returns:
- the user stop word or
null
-
listQuery
protected jakarta.persistence.criteria.Root<UserStopword> listQuery(String term, jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<UserStopword> query) The methodlistQuery
provides means to construct a query for the list of entities for a search.- Specified by:
listQuery
in classAbstractStore<UserStopword>
- 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<UserStopword>
- Parameters:
list
- the list of entries- Returns:
- the formatted list
- See Also:
-
set
The methodset
provides means to set a stop word to a new value.- Parameters:
id
- he id of the stop wordvalue
- the new value- Returns:
true
iff the modification has been saved
-