Package com.logicaldoc.core.document
Class HibernateBookmarkDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Bookmark>
com.logicaldoc.core.document.HibernateBookmarkDAO
- All Implemented Interfaces:
- BookmarkDAO,- PersistentObjectDAO<Bookmark>
@Repository("bookmarkDAO")
public class HibernateBookmarkDAO
extends HibernatePersistentObjectDAO<Bookmark>
implements BookmarkDAO
Hibernate implementation of 
BookmarkDAO- Since:
- 5.2
- Author:
- Matteo Caruso - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfindBookmarkedDocs(long userId) Finds the identifiers of the docs bookmarked by the given userfindByUserId(long userId) Finds all bookmarks for the given user idfindByUserIdAndDocId(long userId, long docId) Finds all bookmarks for the given user id and the given document's identifierfindByUserIdAndFolderId(long userId, long folderId) Finds the bookmark for the given user id and the given folder idbooleanisDocBookmarkedByUser(long docId, long userId) Checks if the document is bookmarked by a userMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAObulkUpdate, 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, setSessionFactory, storeMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
- 
Constructor Details- 
HibernateBookmarkDAOpublic HibernateBookmarkDAO()
 
- 
- 
Method Details- 
findByUserIdDescription copied from interface:BookmarkDAOFinds all bookmarks for the given user id- Specified by:
- findByUserIdin interface- BookmarkDAO
- Parameters:
- userId- ID of the user
- Returns:
- Collection of all bookmarks for the specified user ordered by position
- Throws:
- PersistenceException- Error in the database
 
- 
findByUserIdAndDocIdDescription copied from interface:BookmarkDAOFinds all bookmarks for the given user id and the given document's identifier- Specified by:
- findByUserIdAndDocIdin interface- BookmarkDAO
- Parameters:
- userId- ID of the user
- docId- ID of the document
- Returns:
- The bookmark
- Throws:
- PersistenceException- Error in the database
 
- 
findByUserIdAndFolderIdDescription copied from interface:BookmarkDAOFinds the bookmark for the given user id and the given folder id- Specified by:
- findByUserIdAndFolderIdin interface- BookmarkDAO
- Parameters:
- userId- ID of the user
- folderId- ID of the folder
- Returns:
- The bookmark
- Throws:
- PersistenceException- Error in the database
 
- 
findBookmarkedDocsDescription copied from interface:BookmarkDAOFinds the identifiers of the docs bookmarked by the given user- Specified by:
- findBookmarkedDocsin interface- BookmarkDAO
- Parameters:
- userId- identifier of the user
- Returns:
- list of document identifiers
- Throws:
- PersistenceException- Error in the database
 
- 
isDocBookmarkedByUserDescription copied from interface:BookmarkDAOChecks if the document is bookmarked by a user- Specified by:
- isDocBookmarkedByUserin interface- BookmarkDAO
- Parameters:
- docId- identifier of the document
- userId- identifier of the user
- Returns:
- true id the document was bookmarked
- Throws:
- PersistenceException- Error in the database
 
 
-