OSDN Git Service

Merge branch 'master' into dev20110528_setting_reduce
[coroid/inqubus.git] / frontend / src / yukihane / inqubus / model / Target.java
1 package yukihane.inqubus.model;
2
3 import java.io.File;
4 import java.util.ArrayList;
5 import java.util.Collection;
6
7 public class Target {
8
9     public static Collection<Target> from(Collection<File> data) {
10         Collection<Target> list = new ArrayList<Target>(data.size());
11         for(File f : data){
12             list.add(new Target(f));
13         }
14         return list;
15     }
16
17     public static Target fromId(String movieId) {
18         return new Target(movieId);
19     }
20
21     private Location movie;
22     private Location comment;
23     private Location ownerComment;
24     private Status status;
25
26     private Target(File f) {
27         movie = new Location(f);
28     }
29
30     private Target(String movieId) {
31         movie = new Location(movieId);
32     }
33
34     public Location getComment() {
35         return comment;
36     }
37
38     public void setComment(Location comment) {
39         this.comment = comment;
40     }
41
42     public Location getMovie() {
43         return movie;
44     }
45
46     public void setMovie(Location movie) {
47         this.movie = movie;
48     }
49
50     public Location getOwnerComment() {
51         return ownerComment;
52     }
53
54     public void setOwnerComment(Location ownerComment) {
55         this.ownerComment = ownerComment;
56     }
57
58     public Status getStatus() {
59         return status;
60     }
61
62     public void setStatus(Status status) {
63         this.status = status;
64     }
65
66 }