1 17 18 package org.objectweb.jac.samples.photos; 19 20 import org.objectweb.jac.lib.Attachment; 21 import java.util.Date ; 22 import java.util.List ; 23 import java.util.Vector ; 24 25 public class Photo { 26 27 public Photo() { 28 title = "untitled"; 29 image = null; 30 } 31 32 public Photo (String title, Attachment image) { 33 this.title = title; 34 this.image = image; 35 } 36 37 40 Person author; 41 public Person getAuthor() { 42 return author; 43 } 44 public void setAuthor(Person author) { 45 this.author = author; 46 } 47 48 51 Attachment image; 52 public void setImage(Attachment image) { 53 this.image = image; 54 } 55 public Attachment getImage() { 56 return image; 57 } 58 59 62 String title = ""; 63 public String getTitle() { 64 return title; 65 } 66 public void setTitle( String title ) { 67 this.title = title; 68 } 69 70 73 Date date = new Date (); 74 public Date getDate() { 75 return date; 76 } 77 public void setDate(Date v) { 78 this.date = v; 79 } 80 81 84 int rate = 5; 85 public int getRate() { 86 return rate; 87 } 88 public void setRate(int rate) { 89 this.rate = rate; 90 } 91 92 95 List comments = new Vector (); 96 public List getComments() { 97 return comments; 98 } 99 public void addComment(Comment comment) { 100 comments.add(comment); 101 } 102 } 103 | Popular Tags |