Class HibernateTicketDAO

    • Constructor Detail

      • HibernateTicketDAO

        public HibernateTicketDAO()
    • Method Detail

      • store

        public boolean store​(Ticket entity,
                             DocumentHistory transaction)
        Description copied from interface: TicketDAO
        This method persists the download ticket object and insert a new document history entry
        Specified by:
        store in interface TicketDAO
        Parameters:
        entity - the ticket to store
        transaction - entry to log the event
        Returns:
        True if successfully stored in a database
      • findByTicketId

        public Ticket findByTicketId​(String ticketid)
        Description copied from interface: TicketDAO
        This finds a ticket by its identifier
        Specified by:
        findByTicketId in interface TicketDAO
        Parameters:
        ticketid - The ticket id
        Returns:
        Ticket with given ticket id
      • deleteByDocId

        public boolean deleteByDocId​(long docId)
        Description copied from interface: TicketDAO
        This method deletes all tickets of the specified document.
        Specified by:
        deleteByDocId in interface TicketDAO
        Parameters:
        docId - ID of the document
        Returns:
        if the ticket has been deleted
      • setContextProperties

        public void setContextProperties​(ContextProperties contextProperties)
      • deleteExpired

        public void deleteExpired()
        Description copied from interface: TicketDAO
        Deletes all expired tickets
        Specified by:
        deleteExpired in interface TicketDAO
      • setDocumentDAO

        public void setDocumentDAO​(DocumentDAO documentDAO)