Package com.logicaldoc.core.document.dao
Interface VersionDAO
-
- All Superinterfaces:
PersistentObjectDAO<Version>
- All Known Implementing Classes:
HibernateVersionDAO
public interface VersionDAO extends PersistentObjectDAO<Version>
This class is a DAO-service for versions.- Version:
- 4.5
- Author:
- Marco Meschieri - LogicalDOC
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Version>
findByDocId(long docId)
Finds all versions of the given documentVersion
findByFileVersion(long docId, String fileVersion)
This method finds a the first version with the given fileVersionVersion
findByVersion(long docId, String version)
This method finds a version by the document's ID an the version code.boolean
store(Version version)
This method persists the given version.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, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString
-
-
-
-
Method Detail
-
findByVersion
Version findByVersion(long docId, String version)
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
-
findByFileVersion
Version findByFileVersion(long docId, String fileVersion)
This method finds a the first version with the given fileVersion- Parameters:
docId
- ID of the documentfileVersion
- the fileVersion code- Returns:
- the found version
-
findByDocId
List<Version> findByDocId(long docId)
Finds all versions of the given document- Parameters:
docId
- The document's id- Returns:
- The list of versions ordered by descending date
-
store
boolean store(Version version)
This method persists the given version. Checks if is necessary to delete some document versions reading the context property 'document.maxversions' and the maxVersions property of the owning workspace.- Specified by:
store
in interfacePersistentObjectDAO<Version>
- Parameters:
version
- version to be stored.- Returns:
- True if successfully stored in a database.
-
updateDigest
void updateDigest(Version version)
Updates the version's digest (SHA-1)- Parameters:
version
- The version to be processed
-
-