Package com.logicaldoc.core.document.dao
Interface DocumentNoteDAO
-
- All Superinterfaces:
PersistentObjectDAO<DocumentNote>
- All Known Implementing Classes:
HibernateDocumentNoteDAO
public interface DocumentNoteDAO extends PersistentObjectDAO<DocumentNote>
DAO forDocumentNote
handling.- Since:
- 6.2
- Author:
- Matteo Caruso - LogicalDOC
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
copyAnnotations(long docId, String oldFileVersion, String newFileVersion)
Copies all the notes not associated to a specific page from a given file version to anotherList<DocumentNote>
findByDocId(long docId, String fileVersion)
This method finds the list of document note regarding a document with the given IDList<DocumentNote>
findByUserId(long userId)
This method finds the list of document notes regarding posted by a specific userboolean
store(DocumentNote note, DocumentHistory transaction)
-
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, store
-
-
-
-
Method Detail
-
store
boolean store(DocumentNote note, DocumentHistory transaction) throws PersistenceException
- Throws:
PersistenceException
-
findByDocId
List<DocumentNote> findByDocId(long docId, String fileVersion)
This method finds the list of document note regarding a document with the given ID- Parameters:
docId
- ID of the document.fileVersion
- indicates a specific file version, optional- Returns:
- The list of document note
-
copyAnnotations
int copyAnnotations(long docId, String oldFileVersion, String newFileVersion) throws PersistenceException
Copies all the notes not associated to a specific page from a given file version to another- Parameters:
docId
- The document IDoldFileVersion
- the old versionnewFileVersion
- the version to copy to- Returns:
- Number of copied notes
- Throws:
PersistenceException
- If an error occurs in the database
-
findByUserId
List<DocumentNote> findByUserId(long userId)
This method finds the list of document notes regarding posted by a specific user- Parameters:
userId
- ID of the user- Returns:
- The list of document notes ordered by descending date
-
-