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 Summary

    Constructors
    Constructor
    Description
    TicketStore(@NonNull org.hibernate.SessionFactory sessionFactory)
    This is the constructor for the PkgStore.
  • Method Summary

    Modifier and Type
    Method
    Description
    createDeleteTicket(@NotNull String account)
    Create a new removal ticket.
    createPasswordTicket(@NotNull String account)
    Create a new password ticket.
    createRegisterTicket(@NotNull String account)
    Create a new registration ticket.
    The method findAllByAccount provides means to find a list of all tickets by their account name.
    get(@NonNull String key)
    The method getByKey provides means to find an ticket by its key.
    list(String term, int page, int pageSize, String orderBy, boolean asc)
    The method list provides means to extract a page of items.
    boolean
    The method remove provides means to delete a ticket.
    boolean
    The method remove provides means to delete a ticket.
    save(Ticket ticket)
    The method save 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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(@NotNull @NotNull String account)
      Create a new removal ticket.
      Parameters:
      account - the user name
      Returns:
      the new ticket
    • createPasswordTicket

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

      public Ticket createRegisterTicket(@NotNull @NotNull 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
    • get

      public Ticket get(@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