# Uses of Class
com.logicaldoc.core.document.Version

Packages that use Version
Package
Description
com.logicaldoc.core.document
Contains the definitions of `Document` and `Version` as well as other related objects

## Uses of Version in com.logicaldoc.core.document

Methods in com.logicaldoc.core.document that return Version
Modifier and Type
Method
Description
`static Version`
Version.`create(Document document, User user, String comment, DocumentEvent event, boolean release)`
Factory method that creates a Version and replicate all given document's properties.
The new version and fileVersion will be set in both Document and Version
Important: The created Version is not persistent
`Version`
DocumentManager.`deleteVersion(long versionId, DocumentHistory transaction)`
Deletes a specific version.
`Version`
HibernateVersionDAO.`findByFileVersion(long docId, String fileVersion)`
`Version`
VersionDAO.`findByFileVersion(long docId, String fileVersion)`
This method finds a the first version with the given fileVersion
`Version`
HibernateVersionDAO.`findByVersion(long docId, String version)`
`Version`
VersionDAO.`findByVersion(long docId, String version)`
This method finds a version by the document's ID an the version code.
Methods in com.logicaldoc.core.document that return types with arguments of type Version
Modifier and Type
Method
Description
`List<Version>`
HibernateVersionDAO.`findByDocId(long docId)`
`List<Version>`
VersionDAO.`findByDocId(long docId)`
Finds all versions of the given document
Methods in com.logicaldoc.core.document with parameters of type Version
Modifier and Type
Method
Description
`int`
Version.`compareTo(Version other)`
`void`
HibernateVersionDAO.`initialize(Version version)`
`void`
HibernateVersionDAO.`store(Version version)`
This method persists the given version.
`void`
HibernateVersionDAO.`updateDigest(Version version)`
`void`
VersionDAO.`updateDigest(Version version)`
Updates the version's digest (SHA-1)
Method parameters in com.logicaldoc.core.document with type arguments of type Version
Modifier and Type
Method
Description
`void`
HibernateVersionDAO.`deleteAll(Collection<Version> entities, int code)`
Constructors in com.logicaldoc.core.document with parameters of type Version
Modifier
Constructor
Description
``
`Version(Version source)`