Package com.logicaldoc.core.document.dao
Class HibernateDocumentDAO
- java.lang.Object
-
- com.logicaldoc.core.HibernatePersistentObjectDAO<Document>
-
- com.logicaldoc.core.document.dao.HibernateDocumentDAO
-
- All Implemented Interfaces:
DocumentDAO,PersistentObjectDAO<Document>
public class HibernateDocumentDAO extends HibernatePersistentObjectDAO<Document> implements DocumentDAO
Hibernate implementation ofDocumentDAO- Since:
- 3.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanarchive(long docId, DocumentHistory transaction)Archives a documentvoidcleanExpiredTransactions()Cleans all references to expired transactions.voidcleanUnexistingUniqueTags()Cleans the ld_uniquetag table removing no more used tagslongcomputeTotalSize(Long tenantId, Long userId, boolean computeDeleted)Obtains the total size of the repository, that is the sum of sizes of all documents and their versionslongcount(Long tenantId, boolean computeDeleted, boolean computeArchived)Counts the number of documentslongcountByIndexed(int indexed)Counts the number of documents in a given indexation status(@seeAbstractDocument.getIndexed()booleandelete(long docId, int delCode, DocumentHistory transaction)This method deletes the document object and insert a new document history entry.booleandelete(long docId, DocumentHistory transaction)Shortcut for delete(docId, 1, transaction)voiddeleteAll(Collection<Document> documents, int delCode, DocumentHistory transaction)Deletes all documents form the database and modifies the custom ids of all documentsvoiddeleteAll(Collection<Document> documents, DocumentHistory transaction)Shortcut for deleteAll(documents, 1, transaction)booleandeleteOrphaned(long deleteUserId)This method deletes the documents into deleted folders.List<Long>findAliasIds(long docId)Gets the ids of all aliases associated to the document with the given docIdList<String>findAllTags(String firstLetter, Long tenantId)Searches for all tags,List<Document>findArchivedByFolder(long folderId)Finds archived documents in a folder (direct childeren only)DocumentfindByCustomId(String customId, long tenantId)This method finds a document by the custom ID.List<Document>findByFileNameAndParentFolderId(Long folderId, String fileName, Long excludeId, Long tenantId, Integer max)Finds that document that lies under a specific folder (given by the id) an with a given fileName(like operator is used)List<Document>findByFolder(long folderId, Integer max)Finds all documents direct children of the given folder.List<Document>findByIds(Long[] ids, Integer max)Finds all documents whose id is included in the given pool of idsList<Document>findByIndexed(int indexed)Finds all documents by the indexed state.List<Document>findByLockUserAndStatus(Long userId, Integer status)Finds all document of the specified status and locked by the specified userDocumentfindByPath(String path, long tenantId)Finds a document by it's full pathList<Long>findByUserId(long userId)Finds all documents for an user.List<Document>findByUserIdAndTag(long userId, String tag, Integer max)Finds authorized documents for a user having a specified tag.List<Document>findDeleted(long userId, Integer maxHits)Finds all deleted docs of a specific user.List<Long>findDeletedDocIds()Gets the collection of deleted document idsList<Document>findDeletedDocs()Finds the list of deleted documents.List<Long>findDocIdByFolder(long folderId, Integer max)Finds all document ids inside the given folder.List<Long>findDocIdByTag(String tag)This method finds all Doc Ids by a tag.List<Long>findDocIdByUserIdAndTag(long userId, String tag)Finds authorized documents ids for a user having a specified tag.DocumentfindDocument(long docId)This method finds a document by the ID and if it is an alias the referenced document is returned instead.List<String>findDuplicatedDigests(Long tenantId, Long folderId)Retrieves the list of duplicated checksumsList<Document>findLastDownloadsByUserId(long userId, int maxResults)Finds the last downloaded documents by the given userList<Document>findLastModifiedByUserId(long userId, int maxElements)Finds a max number of documents last modified by an user.List<Document>findLinkedDocuments(long docId, String linkType, Integer direction)This method enlists documents linked to the given document.Collection<Long>findPublishedIds(Collection<Long> folderIds)Finds all document ids inside the specified folders that are published in the current date.List<String>findTags(long docId)Retrieves the alphabetically ordered list of all the document's tagsMap<String,Long>findTags(String firstLetter, Long tenantId)Selects all tags and counts the occurrences.List<TagCloud>getTagCloud(long tenantId, int maxTags)Gets the tag cloud for the given tenantList<TagCloud>getTagCloud(String sid)Gets the tag cloud for the given tenantFoldergetWorkspace(long docId)Retrieves, the workspace where the document(or alias) is storedvoidinitialize(Document doc)Doesn't do anything by defaultvoidinsertNewUniqueTags()Puts into ld_uniquetag the new unique tagsvoidmakeImmutable(long docId, DocumentHistory transaction)Marks the document, with the given docId, as immutable.voidrestore(long docId, long folderId, DocumentHistory transaction)Restores a previously deleted documentvoidsaveDocumentHistory(Document doc, DocumentHistory transaction)Saves a document's historyvoidsetConfig(ContextProperties config)voidsetDocumentHistoryDAO(DocumentHistoryDAO documentHistoryDAO)voidsetFolderDAO(FolderDAO folderDAO)voidsetLinkDAO(DocumentLinkDAO linkDAO)voidsetListenerManager(DocumentListenerManager listenerManager)voidsetNoteDAO(DocumentNoteDAO noteDAO)voidsetPassword(long docId, String password, DocumentHistory transaction)Protects the document with a password.voidsetStorer(Storer storer)voidsetTenantDAO(TenantDAO tenantDAO)voidsetUserDAO(UserDAO userDAO)voidsetVersionDAO(VersionDAO versionDAO)booleanstore(Document doc)This method persists the entity objectbooleanstore(Document doc, DocumentHistory transaction)This method persists the document object and insert a new document history entryvoidunarchive(long docId, DocumentHistory transaction)Restores a previously archived documentvoidunsetPassword(long docId, DocumentHistory transaction)Removes the password protection from the document.voidupdateCountUniqueTags()Updates the count of the unique tagsvoidupdateDigest(Document doc)Updates the document's digest (SHA-1)-
Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, getSessionFactory, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, setSessionFactory
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString
-
-
-
-
Method Detail
-
setListenerManager
public void setListenerManager(DocumentListenerManager listenerManager)
-
setVersionDAO
public void setVersionDAO(VersionDAO versionDAO)
-
setLinkDAO
public void setLinkDAO(DocumentLinkDAO linkDAO)
-
setUserDAO
public void setUserDAO(UserDAO userDAO)
-
setDocumentHistoryDAO
public void setDocumentHistoryDAO(DocumentHistoryDAO documentHistoryDAO)
-
archive
public boolean archive(long docId, DocumentHistory transaction)Description copied from interface:DocumentDAOArchives a document- Specified by:
archivein interfaceDocumentDAO- Parameters:
docId- identifier of the documenttransaction- entry to log the event- Returns:
- true if document has been archived
-
unarchive
public void unarchive(long docId, DocumentHistory transaction)Description copied from interface:DocumentDAORestores a previously archived document- Specified by:
unarchivein interfaceDocumentDAO- Parameters:
docId- Ids of the document to be restoredtransaction- entry to log the event
-
delete
public boolean delete(long docId, DocumentHistory transaction)Description copied from interface:DocumentDAOShortcut for delete(docId, 1, transaction)- Specified by:
deletein interfaceDocumentDAO- Parameters:
docId- identifier of the documenttransaction- entry to log the event- Returns:
- True if successfully deleted from the database.
-
delete
public boolean delete(long docId, int delCode, DocumentHistory transaction)Description copied from interface:DocumentDAOThis method deletes the document object and insert a new document history entry.- Specified by:
deletein interfaceDocumentDAO- Parameters:
docId- The id of the document to deletedelCode- The deletion codetransaction- entry to log the event- Returns:
- True if successfully deleted from the database.
-
findByUserId
public List<Long> findByUserId(long userId)
Description copied from interface:DocumentDAOFinds all documents for an user.- Specified by:
findByUserIdin interfaceDocumentDAO- Parameters:
userId- ID of the user.- Returns:
- Collection of all documentId required for the specified user.
-
findByLockUserAndStatus
public List<Document> findByLockUserAndStatus(Long userId, Integer status)
Description copied from interface:DocumentDAOFinds all document of the specified status and locked by the specified user- Specified by:
findByLockUserAndStatusin interfaceDocumentDAO- Parameters:
userId- The user id(optional)status- The status code(optional)- Returns:
- Collection of all Documents locked by the specified user and of the specified status.
-
findDocIdByTag
public List<Long> findDocIdByTag(String tag)
Description copied from interface:DocumentDAOThis method finds all Doc Ids by a tag.- Specified by:
findDocIdByTagin interfaceDocumentDAO- Parameters:
tag- Tag of the document.- Returns:
- Document with specified tag.
-
store
public boolean store(Document doc) throws PersistenceException
Description copied from interface:PersistentObjectDAOThis method persists the entity object- Specified by:
storein interfacePersistentObjectDAO<Document>- Overrides:
storein classHibernatePersistentObjectDAO<Document>- Parameters:
doc- entity to be stored- Returns:
- True if successfully stored in a database
- Throws:
PersistenceException- raised in case of errors in the database
-
store
public boolean store(Document doc, DocumentHistory transaction) throws PersistenceException
Description copied from interface:DocumentDAOThis method persists the document object and insert a new document history entry- Specified by:
storein interfaceDocumentDAO- Parameters:
doc- the documenttransaction- entry to log the event- Returns:
- True if successfully stored in a database
- Throws:
PersistenceException- raised in case of database errors
-
updateDigest
public void updateDigest(Document doc) throws PersistenceException
Description copied from interface:DocumentDAOUpdates the document's digest (SHA-1)- Specified by:
updateDigestin interfaceDocumentDAO- Parameters:
doc- The document to be processed- Throws:
PersistenceException- raised in case of database errors
-
findLastModifiedByUserId
public List<Document> findLastModifiedByUserId(long userId, int maxElements)
Description copied from interface:DocumentDAOFinds a max number of documents last modified by an user.- Specified by:
findLastModifiedByUserIdin interfaceDocumentDAO- Parameters:
userId- ID of the user.maxElements- maximum number of returned elements- Returns:
- Collection of the last documents changed by the specified user.
-
findTags
public List<String> findTags(long docId)
Description copied from interface:DocumentDAORetrieves the alphabetically ordered list of all the document's tags- Specified by:
findTagsin interfaceDocumentDAO- Parameters:
docId- identifier of the document- Returns:
- list of the document's tags
-
findTags
public Map<String,Long> findTags(String firstLetter, Long tenantId)
Description copied from interface:DocumentDAOSelects all tags and counts the occurrences.- Specified by:
findTagsin interfaceDocumentDAO- Parameters:
firstLetter- the first lettertenantId- identifier of the tenant- Returns:
- the map tag - count
-
findAllTags
public List<String> findAllTags(String firstLetter, Long tenantId)
Description copied from interface:DocumentDAOSearches for all tags,- Specified by:
findAllTagsin interfaceDocumentDAO- Parameters:
firstLetter- Optional first letter hinttenantId- ID of the tenant to search in- Returns:
- The list of all tags in the system
-
findByUserIdAndTag
public List<Document> findByUserIdAndTag(long userId, String tag, Integer max)
Description copied from interface:DocumentDAOFinds authorized documents for a user having a specified tag.- Specified by:
findByUserIdAndTagin interfaceDocumentDAO- Parameters:
userId- ID of the usertag- Tag of the documentmax- Optional, defines the maximum records number- Returns:
- Collection of found documents
-
findDocIdByUserIdAndTag
public List<Long> findDocIdByUserIdAndTag(long userId, String tag)
Description copied from interface:DocumentDAOFinds authorized documents ids for a user having a specified tag.- Specified by:
findDocIdByUserIdAndTagin interfaceDocumentDAO- Parameters:
userId- ID of the user.tag- Tag of the document- Returns:
- Set of found ids.
-
findLastDownloadsByUserId
public List<Document> findLastDownloadsByUserId(long userId, int maxResults)
Description copied from interface:DocumentDAOFinds the last downloaded documents by the given user- Specified by:
findLastDownloadsByUserIdin interfaceDocumentDAO- Parameters:
userId- id of the usermaxResults- maximum number of returned elements- Returns:
- list of documents
-
findDocIdByFolder
public List<Long> findDocIdByFolder(long folderId, Integer max)
Description copied from interface:DocumentDAOFinds all document ids inside the given folder.- Specified by:
findDocIdByFolderin interfaceDocumentDAO- Parameters:
folderId- Folder identifiermax- Optional, maximum number of returned elements- Returns:
- Collection of all document id in the folder.
-
findByFolder
public List<Document> findByFolder(long folderId, Integer max)
Description copied from interface:DocumentDAOFinds all documents direct children of the given folder.- Specified by:
findByFolderin interfaceDocumentDAO- Parameters:
folderId- Folder identifiermax- Optional, defines the maximum records number- Returns:
- Collection of all documents in the folder.
-
findArchivedByFolder
public List<Document> findArchivedByFolder(long folderId)
Description copied from interface:DocumentDAOFinds archived documents in a folder (direct childeren only)- Specified by:
findArchivedByFolderin interfaceDocumentDAO- Parameters:
folderId- identifier of the folder- Returns:
- list of documents
-
findLinkedDocuments
public List<Document> findLinkedDocuments(long docId, String linkType, Integer direction)
Description copied from interface:DocumentDAOThis method enlists documents linked to the given document.Important: The attribute
directiondefines the search logic as follows:- 1: docId will be compared to link's document1
- 2: docId will be compared to link's document2
- null: docId will be compared to both document1 and document2
- Specified by:
findLinkedDocumentsin interfaceDocumentDAO- Parameters:
docId- All documents linked to this one will be searchedlinkType- Type of the link (optional)direction- if 1 docId will be compared to link's document1, id 2 docId will be compared to link's document2, if null docId will be compared to both document1 and document2 of the link.- Returns:
- The collection of linked documents
-
findByFileNameAndParentFolderId
public List<Document> findByFileNameAndParentFolderId(Long folderId, String fileName, Long excludeId, Long tenantId, Integer max)
Description copied from interface:DocumentDAOFinds that document that lies under a specific folder (given by the id) an with a given fileName(like operator is used)- Specified by:
findByFileNameAndParentFolderIdin interfaceDocumentDAO- Parameters:
folderId- The folder id (it can be null).fileName- name of the file or a part of it (you can use SQL % jolly chars, eg: contract.pdf, %ontrac%)excludeId- Optional id of a document that must not be consideredtenantId- Optional id of the tenantmax- Optional maximum number of returned elements- Returns:
- The list of documents with the given fileName. If the folder id is null, the searched document can belong to any folder in the repository.
-
initialize
public void initialize(Document doc)
Description copied from class:HibernatePersistentObjectDAODoesn't do anything by default- Specified by:
initializein interfaceDocumentDAO- Specified by:
initializein interfacePersistentObjectDAO<Document>- Overrides:
initializein classHibernatePersistentObjectDAO<Document>- Parameters:
doc- The entity to be initialised
-
findDeletedDocIds
public List<Long> findDeletedDocIds()
Description copied from interface:DocumentDAOGets the collection of deleted document ids- Specified by:
findDeletedDocIdsin interfaceDocumentDAO- Returns:
- collection of document identifiers
-
findDeletedDocs
public List<Document> findDeletedDocs()
Description copied from interface:DocumentDAOFinds the list of deleted documents.Attention: The returned objects are not fully operative and are populated with a minimal set of data.
- Specified by:
findDeletedDocsin interfaceDocumentDAO- Returns:
- the list of documents
-
computeTotalSize
public long computeTotalSize(Long tenantId, Long userId, boolean computeDeleted)
Description copied from interface:DocumentDAOObtains the total size of the repository, that is the sum of sizes of all documents and their versions- Specified by:
computeTotalSizein interfaceDocumentDAO- Parameters:
tenantId- identifier of the tenant(optional)userId- identifier of the publisher user (optional)computeDeleted- If true, even deleted documents are considered- Returns:
- the total size expressed in bytes
-
count
public long count(Long tenantId, boolean computeDeleted, boolean computeArchived)
Description copied from interface:DocumentDAOCounts the number of documents- Specified by:
countin interfaceDocumentDAO- Parameters:
tenantId- The tenant to search incomputeDeleted- If true, even deleted documents are consideredcomputeArchived- If true, even archived documents are considered- Returns:
- number of documents
-
findByIndexed
public List<Document> findByIndexed(int indexed)
Description copied from interface:DocumentDAOFinds all documents by the indexed state. Order by ascending lastModifed- Specified by:
findByIndexedin interfaceDocumentDAO- Parameters:
indexed- the indexed property- Returns:
- Collection of all documents
-
restore
public void restore(long docId, long folderId, DocumentHistory transaction) throws PersistenceExceptionDescription copied from interface:DocumentDAORestores a previously deleted document- Specified by:
restorein interfaceDocumentDAO- Parameters:
docId- Id of the document to be restoredfolderId- Id of the folder the document will be restored intotransaction- entry to log the event- Throws:
PersistenceException- raised in case of database errors
-
findByCustomId
public Document findByCustomId(String customId, long tenantId)
Description copied from interface:DocumentDAOThis method finds a document by the custom ID.- Specified by:
findByCustomIdin interfaceDocumentDAO- Parameters:
customId- custom ID of the document.tenantId- ID of the contained tenant.- Returns:
- Document with given ID.
-
makeImmutable
public void makeImmutable(long docId, DocumentHistory transaction)Description copied from interface:DocumentDAOMarks the document, with the given docId, as immutable. Unlocks the document if it was locked.- Specified by:
makeImmutablein interfaceDocumentDAO- Parameters:
docId- identifier of the documenttransaction- entry to log the event
-
deleteAll
public void deleteAll(Collection<Document> documents, DocumentHistory transaction)
Description copied from interface:DocumentDAOShortcut for deleteAll(documents, 1, transaction)- Specified by:
deleteAllin interfaceDocumentDAO- Parameters:
documents- the documentstransaction- the current session
-
deleteAll
public void deleteAll(Collection<Document> documents, int delCode, DocumentHistory transaction)
Description copied from interface:DocumentDAODeletes all documents form the database and modifies the custom ids of all documents- Specified by:
deleteAllin interfaceDocumentDAO- Parameters:
documents- The documents to be deleteddelCode- The deletion codetransaction- entry to log the event
-
setNoteDAO
public void setNoteDAO(DocumentNoteDAO noteDAO)
-
setStorer
public void setStorer(Storer storer)
-
saveDocumentHistory
public void saveDocumentHistory(Document doc, DocumentHistory transaction)
Description copied from interface:DocumentDAOSaves a document's history- Specified by:
saveDocumentHistoryin interfaceDocumentDAO- Parameters:
doc- the documenttransaction- the current session
-
countByIndexed
public long countByIndexed(int indexed)
Description copied from interface:DocumentDAOCounts the number of documents in a given indexation status(@seeAbstractDocument.getIndexed()- Specified by:
countByIndexedin interfaceDocumentDAO- Parameters:
indexed- the indexation status to check- Returns:
- number of documents
-
findAliasIds
public List<Long> findAliasIds(long docId)
Description copied from interface:DocumentDAOGets the ids of all aliases associated to the document with the given docId- Specified by:
findAliasIdsin interfaceDocumentDAO- Parameters:
docId- identifier of the document- Returns:
- list of identifiers of aliases
-
findDeleted
public List<Document> findDeleted(long userId, Integer maxHits)
Description copied from interface:DocumentDAOFinds all deleted docs of a specific user.- Specified by:
findDeletedin interfaceDocumentDAO- Parameters:
userId- The user that performed the deletionmaxHits- Optional, defines the max number of returned elements- Returns:
- The documents list
-
setConfig
public void setConfig(ContextProperties config)
-
setFolderDAO
public void setFolderDAO(FolderDAO folderDAO)
-
findByIds
public List<Document> findByIds(Long[] ids, Integer max)
Description copied from interface:DocumentDAOFinds all documents whose id is included in the given pool of ids- Specified by:
findByIdsin interfaceDocumentDAO- Parameters:
ids- identifiers of the documentsmax- Optional, maximum number of returned elements- Returns:
- list of documents
-
deleteOrphaned
public boolean deleteOrphaned(long deleteUserId)
Description copied from interface:DocumentDAOThis method deletes the documents into deleted folders.- Specified by:
deleteOrphanedin interfaceDocumentDAO- Parameters:
deleteUserId- The id of the user that performs the deleting.- Returns:
- True if successfully deleted from the database.
-
findPublishedIds
public Collection<Long> findPublishedIds(Collection<Long> folderIds)
Description copied from interface:DocumentDAOFinds all document ids inside the specified folders that are published in the current date.- Specified by:
findPublishedIdsin interfaceDocumentDAO- Parameters:
folderIds- Set of folder ids in which the method will search- Returns:
- List of published document ids
-
cleanExpiredTransactions
public void cleanExpiredTransactions() throws PersistenceExceptionDescription copied from interface:DocumentDAOCleans all references to expired transactions. If no lock is found for a document referencing a given transaction, the transactionId will be set to null.- Specified by:
cleanExpiredTransactionsin interfaceDocumentDAO- Throws:
PersistenceException- raised in case of database errors
-
setTenantDAO
public void setTenantDAO(TenantDAO tenantDAO)
-
cleanUnexistingUniqueTags
public void cleanUnexistingUniqueTags()
Description copied from interface:DocumentDAOCleans the ld_uniquetag table removing no more used tags- Specified by:
cleanUnexistingUniqueTagsin interfaceDocumentDAO
-
insertNewUniqueTags
public void insertNewUniqueTags()
Description copied from interface:DocumentDAOPuts into ld_uniquetag the new unique tags- Specified by:
insertNewUniqueTagsin interfaceDocumentDAO
-
updateCountUniqueTags
public void updateCountUniqueTags()
Description copied from interface:DocumentDAOUpdates the count of the unique tags- Specified by:
updateCountUniqueTagsin interfaceDocumentDAO
-
getTagCloud
public List<TagCloud> getTagCloud(long tenantId, int maxTags)
Description copied from interface:DocumentDAOGets the tag cloud for the given tenant- Specified by:
getTagCloudin interfaceDocumentDAO- Parameters:
tenantId- identifier of the tenantmaxTags- maximum number of returned elements- Returns:
- list of tag clouds
-
getTagCloud
public List<TagCloud> getTagCloud(String sid)
Description copied from interface:DocumentDAOGets the tag cloud for the given tenant- Specified by:
getTagCloudin interfaceDocumentDAO- Parameters:
sid- identifier of the session- Returns:
- list of tag clouds
-
findDocument
public Document findDocument(long docId)
Description copied from interface:DocumentDAOThis method finds a document by the ID and if it is an alias the referenced document is returned instead.- Specified by:
findDocumentin interfaceDocumentDAO- Parameters:
docId- ID of the document(or the alias)- Returns:
- Document with given ID.
-
getWorkspace
public Folder getWorkspace(long docId)
Description copied from interface:DocumentDAORetrieves, the workspace where the document(or alias) is stored- Specified by:
getWorkspacein interfaceDocumentDAO- Parameters:
docId- identifier of a document- Returns:
- the parent workspace
-
setPassword
public void setPassword(long docId, String password, DocumentHistory transaction) throws PersistenceExceptionDescription copied from interface:DocumentDAOProtects the document with a password. The same password is replicated to all the versions- Specified by:
setPasswordin interfaceDocumentDAO- Parameters:
docId- ID of the documentpassword- The new password in cleartransaction- history informations- Throws:
PersistenceException- raised in case of database errors
-
unsetPassword
public void unsetPassword(long docId, DocumentHistory transaction) throws PersistenceExceptionDescription copied from interface:DocumentDAORemoves the password protection from the document. The same action is replicated to all the versions- Specified by:
unsetPasswordin interfaceDocumentDAO- Parameters:
docId- ID of the documenttransaction- session informations- Throws:
PersistenceException- raised in case of database errors
-
findByPath
public Document findByPath(String path, long tenantId)
Description copied from interface:DocumentDAOFinds a document by it's full path- Specified by:
findByPathin interfaceDocumentDAO- Parameters:
path- The path comprehensive of the file nametenantId- The tenant- Returns:
- the found document
-
findDuplicatedDigests
public List<String> findDuplicatedDigests(Long tenantId, Long folderId)
Description copied from interface:DocumentDAORetrieves the list of duplicated checksums- Specified by:
findDuplicatedDigestsin interfaceDocumentDAO- Parameters:
tenantId- identifier of the tenantfolderId- identifier of the folder- Returns:
- list of duplicated digests
-
-