Class QAEventsDAOImpl

java.lang.Object
org.dspace.core.AbstractHibernateDAO<QAEventProcessed>
org.dspace.qaevent.dao.impl.QAEventsDAOImpl
All Implemented Interfaces:
GenericDAO<QAEventProcessed>, QAEventsDAO

public class QAEventsDAOImpl extends AbstractHibernateDAO<QAEventProcessed> implements QAEventsDAO
Implementation of QAEventsDAO that store processed events using an SQL DBMS.
Author:
Andrea Bollini (andrea.bollini at 4science.it)
  • Constructor Details

    • QAEventsDAOImpl

      public QAEventsDAOImpl()
  • Method Details

    • findAll

      public List<QAEventProcessed> findAll(Context context) throws SQLException
      Description copied from interface: QAEventsDAO
      Returns all the stored QAEventProcessed entities.
      Specified by:
      findAll in interface QAEventsDAO
      Parameters:
      context - the DSpace context
      Returns:
      the found entities
      Throws:
      SQLException - if an SQL error occurs
    • storeEvent

      public boolean storeEvent(Context context, String checksum, EPerson eperson, Item item)
      Description copied from interface: QAEventsDAO
      Store an event related to the given checksum.
      Specified by:
      storeEvent in interface QAEventsDAO
      Parameters:
      context - the DSpace context
      checksum - the checksum of the event to be store
      eperson - the eperson who handle the event
      item - the item related to the event
      Returns:
      true if the creation is completed with success, false otherwise
    • isEventStored

      public boolean isEventStored(Context context, String checksum) throws SQLException
      Description copied from interface: QAEventsDAO
      Check if an event with the given checksum is already stored.
      Specified by:
      isEventStored in interface QAEventsDAO
      Parameters:
      context - the DSpace context
      checksum - the checksum to search for
      Returns:
      true if the given checksum is related to an already stored event, false otherwise
      Throws:
      SQLException - if an SQL error occurs
    • searchByEventId

      public List<QAEventProcessed> searchByEventId(Context context, String eventId, Integer start, Integer size) throws SQLException
      Description copied from interface: QAEventsDAO
      Search a page of quality assurance broker events by notification ID.
      Specified by:
      searchByEventId in interface QAEventsDAO
      Parameters:
      context - the DSpace context
      eventId - the event id
      start - the start index
      size - the size to be applied
      Returns:
      the processed events
      Throws:
      SQLException - if an SQL error occurs
    • findByItem

      public List<QAEventProcessed> findByItem(Context context, Item item) throws SQLException
      Description copied from interface: QAEventsDAO
      Returns the stored QAEventProcessed entities by item.
      Specified by:
      findByItem in interface QAEventsDAO
      Parameters:
      context - the DSpace context
      item - the item to search for
      Returns:
      the found entities
      Throws:
      SQLException - if an SQL error occurs
    • findByEPerson

      public List<QAEventProcessed> findByEPerson(Context context, EPerson ePerson) throws SQLException
      Description copied from interface: QAEventsDAO
      Returns the stored QAEventProcessed entities by eperson.
      Specified by:
      findByEPerson in interface QAEventsDAO
      Parameters:
      context - the DSpace context
      ePerson - the ePerson to search for
      Returns:
      the found entities
      Throws:
      SQLException - if an SQL error occurs