Package com.logicaldoc.core.document
Interface VersionDAO
- All Superinterfaces:
PersistentObjectDAO<Version>
- All Known Implementing Classes:
HibernateVersionDAO
This class is a DAO-service for versions.
- Version:
- 4.5
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
Method Summary
Modifier and TypeMethodDescriptionfindByDocId
(long docId) Finds all versions of the given documentfindByFileVersion
(long docId, String fileVersion) This method finds a the first version with the given fileVersionfindByVersion
(long docId, String version) This method finds a version by the document's ID an the version code.void
updateDigest
(Version version) Updates the version's digest (SHA-1)Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, store
-
Method Details
-
findByVersion
This method finds a version by the document's ID an the version code.- Parameters:
docId
- ID of the documentversion
- the version code- Returns:
- the found version
- Throws:
PersistenceException
- Error in the database
-
findByFileVersion
This method finds a the first version with the given fileVersion- Parameters:
docId
- ID of the documentfileVersion
- the fileVersion code- Returns:
- the found version
- Throws:
PersistenceException
- Error in the database
-
findByDocId
Finds all versions of the given document- Parameters:
docId
- The document's id- Returns:
- The list of versions ordered by descending date
- Throws:
PersistenceException
- Error in the database
-
updateDigest
Updates the version's digest (SHA-1)- Parameters:
version
- The version to be processed
-