public class FolderDAO extends HibernateRepository<Folder>
Folder objects in the database.| Constructor and Description |
|---|
FolderDAO() |
| Modifier and Type | Method and Description |
|---|---|
Folder |
addFolderContents(Folder folder,
List<Entry> entrys) |
List<Folder> |
filterByName(String token,
int limit) |
Folder |
get(long id)
Retrieves stored folder by locally unique identifier
|
List<Folder> |
getCanEditFolders(Account account,
Set<Group> accountGroups)
Retrieves folders that the specified account owns, or has write privileges on based on the permissions
|
List<Long> |
getEntryIds(Folder folder)
Retrieve the list of ids of entries contained in a folder.
|
List<Long> |
getFolderContentIds(long folderId,
EntryType type,
boolean visibleOnly)
Retrieves the ids of any entries that are contained in the specified folder; optionally filtered by entry type
|
List<Folder> |
getFoldersByOwner(Account account)
|
List<Folder> |
getFoldersByType(FolderType type) |
Long |
getFolderSize(long id,
String filter,
boolean visibleOnly)
Retrieves the count of the number of contents in the folder.
|
Folder |
removeFolderEntries(Folder folder,
List<Long> entries)
Removes, from the list of entries in the specified folder, those whose ids match the ids passed in the
parameter
|
List<Entry> |
retrieveFolderContents(long folderId,
PageParameters pageParameters,
boolean visibleOnly)
Retrieves list of entries that conforms to the parameters
|
create, currentSession, delete, get, getBuilder, updatepublic Folder get(long id)
id - locally unique identifier for folderDAOExceptionpublic Folder removeFolderEntries(Folder folder, List<Long> entries)
folder - folder to remove entries fromentries - unique identifiers for list of entries to remove from the folderpublic Long getFolderSize(long id, String filter, boolean visibleOnly)
id - unique folder identifierfilter - optional filter for entry fieldsvisibleOnly - if true, counts only entries with visibility "OK"public List<Long> getFolderContentIds(long folderId, EntryType type, boolean visibleOnly)
folderId - unique folder identifiertype - optional filter for entries. If null, all entries will be retrievedpublic List<Entry> retrieveFolderContents(long folderId, PageParameters pageParameters, boolean visibleOnly)
folderId - unique identifier for folder whose entries are being retrievedpageParameters - paging paramsvisibleOnly - whether to only include entries with "OK" visibilityDAOException - on Exception retrievingpublic List<Folder> getFoldersByOwner(Account account)
account - owner accountDAOExceptionpublic List<Folder> getFoldersByType(FolderType type)
public List<Folder> getCanEditFolders(Account account, Set<Group> accountGroups)
account - account that is expected to have write privileges on the folders that are returnedaccountGroups - groups that account belongs to that is expected to have write privilegesDAOExceptionpublic List<Long> getEntryIds(Folder folder)
folder - folder whose entries are being retrievedCopyright © 2017. All rights reserved.