1 package ch.busyboxes.agoo.dao;
2
3 import java.util.List;
4
5 import ch.busyboxes.agoo.model.WatchedFile;
6
7 /**
8 * Interface for accessing watched files
9 *
10 * @author julien@busyboxes.ch
11 */
12 public interface WatchedFileDAO {
13
14 /**
15 * Gets a watched file by ID
16 *
17 * @param fileId the watched file ID
18 * @return the watched file
19 */
20 public WatchedFile getWatchedFileById(Long fileId);
21
22 /**
23 * Saves the given watched file
24 *
25 * @param file the watched file to be saved
26 */
27 public void saveWatchedFile(WatchedFile file);
28
29 /**
30 * Returns the total number of files watched
31 *
32 * @return total number of files watched
33 */
34 public long getTotalFilesWatched();
35
36 /**
37 * Returns the files associated with the given folder using paging
38 *
39 * @param folderId the folder's id
40 * @param filesPerPage the number of files per page
41 * @param page the page number
42 * @return the list of watched files
43 */
44 public List<WatchedFile> getWatchedFilesByFolderPaged(Long folderId,
45 int filesPerPage, int page);
46
47 }