1 package ch.busyboxes.agoo.model;
2
3 import java.util.List;
4
5 import javax.persistence.Basic;
6 import javax.persistence.CascadeType;
7 import javax.persistence.Entity;
8 import javax.persistence.FetchType;
9 import javax.persistence.GeneratedValue;
10 import javax.persistence.Id;
11 import javax.persistence.OneToMany;
12 import javax.persistence.Table;
13
14
15
16
17
18
19
20 @Entity
21 @Table(name = "agoo_watched_folders")
22 public class WatchedFolder {
23
24
25 @Id
26 @GeneratedValue
27 private Long id;
28
29
30 @Basic
31 private String folderPath;
32
33
34 @OneToMany(mappedBy = "watchedFolder", fetch = FetchType.EAGER, cascade = {CascadeType.REMOVE})
35 private List<WatchedFile> watchedFiles;
36
37
38
39
40
41
42 public Long getId() {
43 return id;
44 }
45
46
47
48
49
50
51 public String getFolderPath() {
52 return folderPath;
53 }
54
55
56
57
58
59
60 public void setFolderPath(String folderPath) {
61 this.folderPath = folderPath;
62 }
63
64
65
66
67
68
69 public List<WatchedFile> getWatchedFiles() {
70 return watchedFiles;
71 }
72
73
74
75
76
77
78 public void setWatchedFiles(List<WatchedFile> watchedFiles) {
79 this.watchedFiles = watchedFiles;
80 }
81
82
83 }