Package org.ctan.site.stores
Class TicketStore
java.lang.Object
io.dropwizard.hibernate.AbstractDAO<Ticket>
org.ctan.site.stores.TicketStore
The class
TicketStore
contains the repository for tickets.-
Constructor Summary
ConstructorsConstructorDescriptionTicketStore
(@NonNull org.hibernate.SessionFactory sessionFactory) This is the constructor for thePkgStore
. -
Method Summary
Modifier and TypeMethodDescriptioncreateDeleteTicket
(String account) Create a new removal ticket.createPasswordTicket
(String account) Create a new password ticket.createRegisterTicket
(String account) Create a new registration ticket.findAllByAccount
(String account) The methodfindAllByAccount
provides means to find a list of all tickets by their account name.The methodgetByKey
provides means to find an ticket by its key.The methodlist
provides means to extract a page of items.boolean
The methodremove
provides means to delete a ticket.boolean
The methodremove
provides means to delete a ticket.The methodsave
provides means to persist a ticket.Methods inherited from class io.dropwizard.hibernate.AbstractDAO
criteriaQuery, currentSession, get, getEntityClass, initialize, list, list, namedQuery, namedTypedQuery, persist, query, uniqueResult, uniqueResult
-
Constructor Details
-
TicketStore
public TicketStore(@NonNull @NonNull org.hibernate.SessionFactory sessionFactory) This is the constructor for thePkgStore
.- Parameters:
sessionFactory
- the session factory
-
-
Method Details
-
createDeleteTicket
Create a new removal ticket.- Parameters:
account
- the user name- Returns:
- the new ticket
-
createPasswordTicket
Create a new password ticket.- Parameters:
account
- the user name- Returns:
- the new ticket
-
createRegisterTicket
Create a new registration ticket.- Parameters:
account
- the user name- Returns:
- the new ticket
-
findAllByAccount
The methodfindAllByAccount
provides means to find a list of all tickets by their account name.- Parameters:
account
- the account name- Returns:
- the list of tickets
-
getByKey
The methodgetByKey
provides means to find an ticket by its key.- Parameters:
key
- the ticket key- Returns:
- the user or
null
-
list
The methodlist
provides means to extract a page of items.- Parameters:
term
- the search termpage
- the current pagepageSize
- the page sizeorderBy
- the name or the column to sort byasc
- the indicator for ascending/descending sort order- Returns:
- the page
-
remove
The methodremove
provides means to delete a ticket.- Parameters:
key
- the ticket key- Returns:
true
iff the removing succeeded
-
remove
The methodremove
provides means to delete a ticket.- Parameters:
t
- the ticket- Returns:
true
iff the removing succeeded
-
save
The methodsave
provides means to persist a ticket.- Parameters:
ticket
- the ticket to save- Returns:
- the ticket
-