Package com.logicaldoc.core.document.dao
Interface BookmarkDAO
-
- All Superinterfaces:
PersistentObjectDAO<Bookmark>
- All Known Implementing Classes:
HibernateBookmarkDAO
public interface BookmarkDAO extends PersistentObjectDAO<Bookmark>
DAO service for bookmarks- Since:
- 5.2
- Author:
- Matteo Caruso - LogicalDOC
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Long>
findBookmarkedDocs(long userId)
Finds the identifiers of the docs bookmarked by the given userList<Bookmark>
findByUserId(long userId)
Finds all bookmarks for the given user idBookmark
findByUserIdAndDocId(long userId, long docId)
Finds all bookmarks for the given user id and the given document's identifierBookmark
findByUserIdAndFolderId(long userId, long folderId)
Finds the bookmark for the given user id and the given folder idboolean
isDocBookmarkedByUser(long docId, long userId)
Checks if the document is bookmarked by a user-
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
-
findByUserId
List<Bookmark> findByUserId(long userId)
Finds all bookmarks for the given user id- Parameters:
userId
- ID of the user- Returns:
- Collection of all bookmarks for the specified user ordered by position
-
findBookmarkedDocs
List<Long> findBookmarkedDocs(long userId)
Finds the identifiers of the docs bookmarked by the given user- Parameters:
userId
- identifier of the user- Returns:
- list of document identifiers
-
isDocBookmarkedByUser
boolean isDocBookmarkedByUser(long docId, long userId)
Checks if the document is bookmarked by a user- Parameters:
docId
- identifier of the documentuserId
- identifier of the user- Returns:
- true id the document was bookmarked
-
findByUserIdAndDocId
Bookmark findByUserIdAndDocId(long userId, long docId)
Finds all bookmarks for the given user id and the given document's identifier- Parameters:
userId
- ID of the userdocId
- ID of the document- Returns:
- The bookmark
-
findByUserIdAndFolderId
Bookmark findByUserIdAndFolderId(long userId, long folderId)
Finds the bookmark for the given user id and the given folder id- Parameters:
userId
- ID of the userfolderId
- ID of the folder- Returns:
- The bookmark
-
-