Class ProcessDAOImpl

java.lang.Object
org.dspace.core.AbstractHibernateDAO<Process>
org.dspace.content.dao.impl.ProcessDAOImpl
All Implemented Interfaces:
ProcessDAO, GenericDAO<Process>

public class ProcessDAOImpl extends AbstractHibernateDAO<Process> implements ProcessDAO
Implementation class for ProcessDAO
  • Constructor Details

    • ProcessDAOImpl

      public ProcessDAOImpl()
  • Method Details

    • findAllSortByScript

      public List<Process> findAllSortByScript(Context context) throws SQLException
      Description copied from interface: ProcessDAO
      This method will return all the Process objects in the database in a list and it'll be sorted by script name
      Specified by:
      findAllSortByScript in interface ProcessDAO
      Parameters:
      context - The relevant DSpace context
      Returns:
      The list of all Process objects in the database sorted on scriptname
      Throws:
      SQLException - If something goes wrong
    • findAllSortByStartTime

      public List<Process> findAllSortByStartTime(Context context) throws SQLException
      Description copied from interface: ProcessDAO
      This method will return all the Process objects in the database in a list and it'll be sorted by start time. The most recent one will be shown first
      Specified by:
      findAllSortByStartTime in interface ProcessDAO
      Parameters:
      context - The relevant DSpace context
      Returns:
      The list of all Process objects in the database sorted by starttime
      Throws:
      SQLException - If something goes wrong
    • findAll

      public List<Process> findAll(Context context, int limit, int offset) throws SQLException
      Description copied from interface: ProcessDAO
      Returns a list of all Process objects in the database
      Specified by:
      findAll in interface ProcessDAO
      Parameters:
      context - The relevant DSpace context
      limit - The limit for the amount of Processes returned
      offset - The offset for the Processes to be returned
      Returns:
      The list of all Process objects in the Database
      Throws:
      SQLException - If something goes wrong
    • countRows

      public int countRows(Context context) throws SQLException
      Description copied from interface: ProcessDAO
      Returns the total amount of Process objects in the dataase
      Specified by:
      countRows in interface ProcessDAO
      Parameters:
      context - The relevant DSpace context
      Returns:
      An integer that describes the amount of Process objects in the database
      Throws:
      SQLException - If something goes wrong
    • search

      public List<Process> search(Context context, ProcessQueryParameterContainer processQueryParameterContainer, int limit, int offset) throws SQLException
      Description copied from interface: ProcessDAO
      Returns a list of all Processes in the database which match the given field requirements. If the requirements are not null, they will be combined with an AND operation.
      Specified by:
      search in interface ProcessDAO
      Parameters:
      context - The relevant DSpace context
      processQueryParameterContainer - The ProcessQueryParameterContainer containing all the values that the returned Process objects must adhere to
      limit - The limit for the amount of Processes returned
      offset - The offset for the Processes to be returned
      Returns:
      The list of all Processes which match the metadata requirements
      Throws:
      SQLException - If something goes wrong
    • countTotalWithParameters

      public int countTotalWithParameters(Context context, ProcessQueryParameterContainer processQueryParameterContainer) throws SQLException
      Description copied from interface: ProcessDAO
      Count all the processes which match the requirements. The requirements are evaluated like the search method.
      Specified by:
      countTotalWithParameters in interface ProcessDAO
      Parameters:
      context - The relevant DSpace context
      processQueryParameterContainer - The ProcessQueryParameterContainer containing all the values that the returned Process objects must adhere to
      Returns:
      The number of results matching the query
      Throws:
      SQLException - If something goes wrong
    • findByStatusAndCreationTimeOlderThan

      public List<Process> findByStatusAndCreationTimeOlderThan(Context context, List<ProcessStatus> statuses, Instant date) throws SQLException
      Description copied from interface: ProcessDAO
      Find all the processes with one of the given status and with a creation time older than the specified date.
      Specified by:
      findByStatusAndCreationTimeOlderThan in interface ProcessDAO
      Parameters:
      context - The relevant DSpace context
      statuses - the statuses of the processes to search for
      date - the creation date to search for
      Returns:
      The list of all Processes which match requirements
      Throws:
      SQLException - If something goes wrong
    • findByUser

      public List<Process> findByUser(Context context, EPerson user, int limit, int offset) throws SQLException
      Description copied from interface: ProcessDAO
      Returns a list of all Process objects in the database by the given user.
      Specified by:
      findByUser in interface ProcessDAO
      Parameters:
      context - The relevant DSpace context
      user - The user to search for
      limit - The limit for the amount of Processes returned
      offset - The offset for the Processes to be returned
      Returns:
      The list of all Process objects in the Database
      Throws:
      SQLException - If something goes wrong
    • countByUser

      public int countByUser(Context context, EPerson user) throws SQLException
      Description copied from interface: ProcessDAO
      Count all the processes which is related to the given user.
      Specified by:
      countByUser in interface ProcessDAO
      Parameters:
      context - The relevant DSpace context
      user - The user to search for
      Returns:
      The number of results matching the query
      Throws:
      SQLException - If something goes wrong