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 methodfindAllCurentprovides 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 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
getById, 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
-
MessageStore
public MessageStore(org.hibernate.SessionFactory sessionFactory) This is the constructor for theMessageStore.- Parameters:
sessionFactory- the session factory
-
-
Method Details
-
findAllCurrent
The methodfindAllCurentprovides 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 methodlistQueryprovides means to construct a query for the list of entities for a search.- Specified by:
listQueryin classAbstractStore<Message>- 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<Message>- Parameters:
list- the list of entries- Returns:
- the formatted list
- See Also:
-