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 methodgetByStopwordprovides 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 methodlistQueryprovides means to construct a query for the list of entities for a search.map(List<UserStopword> list) The methodmapprovides means to format a list for external use.booleanThe methodsetprovides means to set a stop word to a new value.Methods inherited from class org.ctan.site.stores.base.AbstractStore
get, 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
-
UserStopwordStore
public UserStopwordStore(org.hibernate.SessionFactory sessionFactory) This is the constructor for theUserStopwordStore.- Parameters:
sessionFactory- the session factory
-
-
Method Details
-
getByStopword
The methodgetByStopwordprovides 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 methodlistQueryprovides means to construct a query for the list of entities for a search.- Specified by:
listQueryin classAbstractStore<UserStopword>- 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<UserStopword>- Parameters:
list- the list of entries- Returns:
- the formatted list
- See Also:
-
set
The methodsetprovides means to set a stop word to a new value.- Parameters:
id- he id of the stop wordvalue- the new value- Returns:
trueiff the modification has been saved
-