Interface TicketDAO

All Superinterfaces:
PersistentObjectDAO<Ticket>
All Known Implementing Classes:
HibernateTicketDAO

public interface TicketDAO extends PersistentObjectDAO<Ticket>
DAO for Ticket handling.
Author:
Michael Scholz, Marco Meschieri
  • Method Details

    • deleteByTicketId

      boolean deleteByTicketId(String ticketId)
      This method deletes a download ticket.
      Parameters:
      ticketId - ID of the ticket which should be delete.
      Returns:
      if the tickets have been deleted
    • deleteByDocId

      boolean deleteByDocId(long docId)
      This method deletes all tickets of the specified document.
      Parameters:
      docId - ID of the document
      Returns:
      if the ticket has been deleted
    • deleteExpired

      void deleteExpired()
      Deletes all expired tickets
    • findByTicketId

      Ticket findByTicketId(String ticketId)
      This finds a ticket by its identifier
      Parameters:
      ticketId - The ticket id
      Returns:
      Ticket with given ticket id
    • store

      void store(Ticket ticket, DocumentHistory transaction) throws PersistenceException
      This method persists the download ticket object and insert a new document history entry
      Parameters:
      ticket - the ticket to store
      transaction - entry to log the event
      Throws:
      PersistenceException - error at database level