Package com.logicaldoc.core.document
Interface DocumentNoteDAO
- All Superinterfaces:
- PersistentObjectDAO<DocumentNote>
- All Known Implementing Classes:
- HibernateDocumentNoteDAO
DAO for 
DocumentNote handling.- Since:
- 6.2
- Author:
- Matteo Caruso - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier and TypeMethodDescriptionintcopyAnnotations(long docId, String oldFileVersion, String newFileVersion) Copies all the notes not associated to a specific page from a given file version to anotherfindByDocId(long docId, String fileVersion) This method finds the list of document notes regarding a document with the given IDfindByDocIdAndType(long docId, String fileVersion, String type) This method finds the list of document notes regarding a document with the given ID and optionally filter on the typefindByDocIdAndTypes(long docId, String fileVersion, Collection<String> types) This method finds the list of document notes regarding a document with the given ID and optionally filter on a collection of typesfindByUserId(long userId) This method finds the list of document notes regarding posted by a specific uservoidstore(DocumentNote note, DocumentHistory transaction) Stores a note and saves the document's historyMethods inherited from interface com.logicaldoc.core.PersistentObjectDAObulkUpdate, delete, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store
- 
Method Details- 
storeStores a note and saves the document's history- Parameters:
- note- the note
- transaction- session informations
- Throws:
- PersistenceException- error at data layer
 
- 
findByDocIdThis method finds the list of document notes 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
- Throws:
- PersistenceException- Error in the database
 
- 
findByDocIdAndTypeList<DocumentNote> findByDocIdAndType(long docId, String fileVersion, String type) throws PersistenceException This method finds the list of document notes regarding a document with the given ID and optionally filter on the type- Parameters:
- docId- ID of the document
- fileVersion- indicates a specific file version, optional
- type- note type, optional
- Returns:
- The list of document note
- Throws:
- PersistenceException- Error in the database
 
- 
findByDocIdAndTypesList<DocumentNote> findByDocIdAndTypes(long docId, String fileVersion, Collection<String> types) throws PersistenceException This method finds the list of document notes regarding a document with the given ID and optionally filter on a collection of types- Parameters:
- docId- ID of the document
- fileVersion- indicates a specific file version, optional
- types- collection of admitted note types, optional
- Returns:
- The list of document note
- Throws:
- PersistenceException- Error in the database
 
- 
copyAnnotationsint 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 ID
- oldFileVersion- the old version
- newFileVersion- the version to copy to
- Returns:
- Number of copied notes
- Throws:
- PersistenceException- If an error occurs in the database
 
- 
findByUserIdThis 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
- Throws:
- PersistenceException- Errorin the database
 
 
-