Package org.dspace.content.dao.impl
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 forProcessDAO
-
-
Constructor Summary
Constructors Constructor Description ProcessDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountByUser(Context context, EPerson user)Count all the processes which is related to the given user.intcountRows(Context context)Returns the total amount of Process objects in the dataaseintcountTotalWithParameters(Context context, ProcessQueryParameterContainer processQueryParameterContainer)Count all the processes which match the requirements.List<Process>findAll(Context context, int limit, int offset)Returns a list of all Process objects in the databaseList<Process>findAllSortByScript(Context context)This method will return all the Process objects in the database in a list and it'll be sorted by script nameList<Process>findAllSortByStartTime(Context context)This method will return all the Process objects in the database in a list and it'll be sorted by start time.List<Process>findByStatusAndCreationTimeOlderThan(Context context, List<ProcessStatus> statuses, Date date)Find all the processes with one of the given status and with a creation time older than the specified date.List<Process>findByUser(Context context, EPerson user, int limit, int offset)Returns a list of all Process objects in the database by the given user.List<Process>search(Context context, ProcessQueryParameterContainer processQueryParameterContainer, int limit, int offset)Returns a list of all Processes in the database which match the given field requirements.-
Methods inherited from class org.dspace.core.AbstractHibernateDAO
count, count, countLong, create, createQuery, delete, executeCriteriaQuery, findAll, findAll, findByID, findByID, findByX, findMany, findMany, findUnique, getCriteriaBuilder, getCriteriaQuery, getHibernateSession, iterate, list, list, list, list, save, singleResult, singleResult, uniqueResult, uniqueResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dspace.core.GenericDAO
create, delete, findAll, findAll, findByID, findByID, findMany, findUnique, save
-
-
-
-
Method Detail
-
findAllSortByScript
public List<Process> findAllSortByScript(Context context) throws SQLException
Description copied from interface:ProcessDAOThis method will return all the Process objects in the database in a list and it'll be sorted by script name- Specified by:
findAllSortByScriptin interfaceProcessDAO- 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:ProcessDAOThis 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:
findAllSortByStartTimein interfaceProcessDAO- 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:ProcessDAOReturns a list of all Process objects in the database- Specified by:
findAllin interfaceProcessDAO- Parameters:
context- The relevant DSpace contextlimit- The limit for the amount of Processes returnedoffset- 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:ProcessDAOReturns the total amount of Process objects in the dataase- Specified by:
countRowsin interfaceProcessDAO- 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:ProcessDAOReturns 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:
searchin interfaceProcessDAO- Parameters:
context- The relevant DSpace contextprocessQueryParameterContainer- TheProcessQueryParameterContainercontaining all the values that the returnedProcessobjects must adhere tolimit- The limit for the amount of Processes returnedoffset- 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:ProcessDAOCount all the processes which match the requirements. The requirements are evaluated like the search method.- Specified by:
countTotalWithParametersin interfaceProcessDAO- Parameters:
context- The relevant DSpace contextprocessQueryParameterContainer- TheProcessQueryParameterContainercontaining all the values that the returnedProcessobjects 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, Date date) throws SQLException
Description copied from interface:ProcessDAOFind all the processes with one of the given status and with a creation time older than the specified date.- Specified by:
findByStatusAndCreationTimeOlderThanin interfaceProcessDAO- Parameters:
context- The relevant DSpace contextstatuses- the statuses of the processes to search fordate- 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:ProcessDAOReturns a list of all Process objects in the database by the given user.- Specified by:
findByUserin interfaceProcessDAO- Parameters:
context- The relevant DSpace contextuser- The user to search forlimit- The limit for the amount of Processes returnedoffset- 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:ProcessDAOCount all the processes which is related to the given user.- Specified by:
countByUserin interfaceProcessDAO- Parameters:
context- The relevant DSpace contextuser- The user to search for- Returns:
- The number of results matching the query
- Throws:
SQLException- If something goes wrong
-
-