Class TicketStore

java.lang.Object
io.dropwizard.hibernate.AbstractDAO<Ticket>
org.ctan.site.stores.TicketStore

public class TicketStore extends io.dropwizard.hibernate.AbstractDAO<Ticket>
The class TicketStore contains the repository for tickets.
  • Constructor Details

    • TicketStore

      public TicketStore(@NonNull @NonNull org.hibernate.SessionFactory sessionFactory)
      This is the constructor for the PkgStore.
      Parameters:
      sessionFactory - the session factory
  • Method Details

    • createDeleteTicket

      public Ticket createDeleteTicket(String account)
      Create a new removal ticket.
      Parameters:
      account - the user name
      Returns:
      the new ticket
    • createPasswordTicket

      public Ticket createPasswordTicket(String account)
      Create a new password ticket.
      Parameters:
      account - the user name
      Returns:
      the new ticket
    • createRegisterTicket

      public Ticket createRegisterTicket(String account)
      Create a new registration ticket.
      Parameters:
      account - the user name
      Returns:
      the new ticket
    • findAllByAccount

      public List<Ticket> findAllByAccount(String account)
      The method findAllByAccount provides means to find a list of all tickets by their account name.
      Parameters:
      account - the account name
      Returns:
      the list of tickets
    • getByKey

      public Ticket getByKey(@NonNull @NonNull String key)
      The method getByKey provides means to find an ticket by its key.
      Parameters:
      key - the ticket key
      Returns:
      the user or null
    • list

      public GeneralPage list(String term, int page, int pageSize, String orderBy, boolean asc)
      The method list provides means to extract a page of items.
      Parameters:
      term - the search term
      page - the current page
      pageSize - the page size
      orderBy - the name or the column to sort by
      asc - the indicator for ascending/descending sort order
      Returns:
      the page
    • remove

      public boolean remove(String key)
      The method remove provides means to delete a ticket.
      Parameters:
      key - the ticket key
      Returns:
      true iff the removing succeeded
    • remove

      public boolean remove(Ticket t)
      The method remove provides means to delete a ticket.
      Parameters:
      t - the ticket
      Returns:
      true iff the removing succeeded
    • save

      public Ticket save(Ticket ticket)
      The method save provides means to persist a ticket.
      Parameters:
      ticket - the ticket to save
      Returns:
      the ticket