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 methodfindAllByAccountprovides means to find a list of all tickets by their account name.The methodgetByKeyprovides means to find an ticket by its key.The methodlistprovides means to extract a page of items.booleanThe methodremoveprovides means to delete a ticket.booleanThe methodremoveprovides means to delete a ticket.The methodsaveprovides 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 methodfindAllByAccountprovides means to find a list of all tickets by their account name.- Parameters:
account- the account name- Returns:
- the list of tickets
-
get
The methodgetByKeyprovides means to find an ticket by its key.- Parameters:
key- the ticket key- Returns:
- the user or
null
-
list
The methodlistprovides 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 methodremoveprovides means to delete a ticket.- Parameters:
key- the ticket key- Returns:
trueiff the removing succeeded
-
remove
The methodremoveprovides means to delete a ticket.- Parameters:
t- the ticket- Returns:
trueiff the removing succeeded
-
save
The methodsaveprovides means to persist a ticket.- Parameters:
ticket- the ticket to save- Returns:
- the ticket
-