Package org.dspace.content.dao
Interface ProcessDAO
- All Superinterfaces:
GenericDAO<Process>
- All Known Implementing Classes:
ProcessDAOImpl
This is the Data Access Object for the
Process object-
Method Summary
Modifier and TypeMethodDescriptionintcountByUser(Context context, EPerson user) Count all the processes which is related to the given user.intReturns the total amount of Process objects in the dataaseintcountTotalWithParameters(Context context, ProcessQueryParameterContainer processQueryParameterContainer) Count all the processes which match the requirements.Returns a list of all Process objects in the databasefindAllSortByScript(Context context) This method will return all the Process objects in the database in a list and it'll be sorted by script namefindAllSortByStartTime(Context context) This method will return all the Process objects in the database in a list and it'll be sorted by start time.findByStatusAndCreationTimeOlderThan(Context context, List<ProcessStatus> statuses, Instant date) Find all the processes with one of the given status and with a creation time older than the specified date.findByUser(Context context, EPerson user, int limit, int offset) Returns a list of all Process objects in the database by the given user.search(Context context, ProcessQueryParameterContainer processQueryParameterContainer, int limit, int offset) Returns a list of all Processes in the database which match the given field requirements.
-
Method Details
-
findAllSortByScript
This method will return all the Process objects in the database in a list and it'll be sorted by script name- 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
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- 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
Returns a list of all Process objects in the database- 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
Returns the total amount of Process objects in the dataase- 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
List<Process> search(Context context, ProcessQueryParameterContainer processQueryParameterContainer, int limit, int offset) throws SQLException 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.- 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
int countTotalWithParameters(Context context, ProcessQueryParameterContainer processQueryParameterContainer) throws SQLException Count all the processes which match the requirements. The requirements are evaluated like the search method.- 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
List<Process> findByStatusAndCreationTimeOlderThan(Context context, List<ProcessStatus> statuses, Instant date) throws SQLException Find all the processes with one of the given status and with a creation time older than the specified date.- 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
Returns a list of all Process objects in the database by the given user.- 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
Count all the processes which is related to the given user.- 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
-