Package org.dspace.versioning.dao
Interface VersionDAO
- All Superinterfaces:
GenericDAO<Version>
- All Known Implementing Classes:
VersionDAOImpl
Database Access Object interface class for the Version object.
The implementation of this class is responsible for all database calls for the Version object and is autowired by
spring
This class should only be accessed from a single service and should never be exposed outside of the API
- Author:
- kevinvandevelde at atmire.com
-
Method Summary
Modifier and TypeMethodDescriptionintcountVersionsByHistoryWithItem(Context context, VersionHistory versionHistory) This method count versions of an version history that have items assigned.findByItem(Context context, Item item) findVersionsWithItems(Context context, VersionHistory versionHistory, int offset, int limit) This method returns all versions of an version history that have items assigned.int
-
Method Details
-
findByItem
- Throws:
SQLException
-
findVersionsWithItems
List<Version> findVersionsWithItems(Context context, VersionHistory versionHistory, int offset, int limit) throws SQLException This method returns all versions of an version history that have items assigned. We do not delete versions to keep version numbers stable. To remove a version we set the item, date, summary and eperson null. This method returns only versions that aren't soft deleted and have items assigned.- Parameters:
context- The relevant DSpace Context.versionHistory- version historyoffset- the position of the first result to returnlimit- paging limit- Returns:
- all versions of an version history that have items assigned.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
getNextVersionNumber
- Throws:
SQLException
-
countVersionsByHistoryWithItem
int countVersionsByHistoryWithItem(Context context, VersionHistory versionHistory) throws SQLException This method count versions of an version history that have items assigned. We do not delete versions to keep version numbers stable. To remove a version we set the item, date, summary and eperson null. This method returns only versions that aren't soft deleted and have items assigned.- Parameters:
context- The relevant DSpace Context.versionHistory- Version history- Returns:
- Total versions of an version history that have items assigned.
- Throws:
SQLException- If database error
-