Package org.ctan.site.stores
Class MessageStore
java.lang.Object
io.dropwizard.hibernate.AbstractDAO<Message>
The class
MessageStore
contains the repository for system
messages.-
Constructor Summary
ConstructorsConstructorDescriptionMessageStore
(org.hibernate.SessionFactory sessionFactory) This is the constructor for theMessageStore
. -
Method Summary
Modifier and TypeMethodDescriptionThe methodfindAllCurent
provides means to retrieve the currently valid messages.protected jakarta.persistence.criteria.Root
<Message> listQuery
(String term, jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<Message> 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
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
-
MessageStore
public MessageStore(org.hibernate.SessionFactory sessionFactory) This is the constructor for theMessageStore
.- Parameters:
sessionFactory
- the session factory
-
-
Method Details
-
findAllCurrent
The methodfindAllCurent
provides means to retrieve the currently valid messages.- Returns:
- the list of current messages
-
listQuery
protected jakarta.persistence.criteria.Root<Message> listQuery(String term, jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<Message> query) The methodlistQuery
provides means to construct a query for the list of entities for a search.- Specified by:
listQuery
in classAbstractStore<Message>
- 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<Message>
- Parameters:
list
- the list of entries- Returns:
- the formatted list
- See Also:
-