1 2 3 24 package com.geinuke.vo; 25 26 import java.io.Serializable ; 27 import java.util.ArrayList ; 28 import java.util.Date ; 29 import java.util.GregorianCalendar ; 30 31 public class TopicVO implements Serializable { 32 public final static String TOPIC_NEWS="NEWS"; 33 public final static String TOPIC_DOWNLOADS="DOWNLOADS"; 34 public final static String TOPIC_FORUMS="FORUMS"; 35 protected int tId=-1; 36 protected int eLink=-1; protected String topicType=null; 38 protected ArrayList comments=null; 39 protected String name=null; 40 protected String image=null; 41 protected String text=null; 42 protected int counter=0; 43 protected long lastModTime=0; 44 protected long creationTime=0; 45 protected UserVO author=null; 46 protected long lastVisit=0; 47 48 51 public int getCounter() { 52 return counter; 53 } 54 55 58 public boolean hasNewContent() { 59 return this.lastModTime>this.lastVisit; 60 } 61 64 public void setCounter(int counter) { 65 this.counter = counter; 66 } 67 70 public String getImage() { 71 return image; 72 } 73 76 public void setImage(String image) { 77 this.image = image; 78 } 79 82 public String getName() { 83 return name; 84 } 85 88 public void setName(String name) { 89 this.name = name; 90 } 91 94 public String getText() { 95 return text; 96 } 97 100 public void setText(String text) { 101 this.text = text; 102 } 103 106 public int getTId() { 107 return tId; 108 } 109 112 public void setTId(int id) { 113 tId = id; 114 } 115 public int getELink() { 116 return eLink; 117 } 118 public void setELink(int link) { 119 eLink = link; 120 } 121 124 public ArrayList getComments() { 125 return comments; 126 } 127 130 public void setComments(ArrayList comments) { 131 this.comments = comments; 132 } 133 136 public String getTopicType() { 137 return topicType; 138 } 139 142 public void setTopicType(String topicType) { 143 this.topicType = topicType; 144 } 145 148 public long getCreationTime() { 149 return creationTime; 150 } 151 154 public void setCreationTime(long creationTime) { 155 this.creationTime = creationTime; 156 } 157 160 public long getLastModTime() { 161 return lastModTime; 162 } 163 164 public GregorianCalendar getLastDateTime() { 165 GregorianCalendar gc=null; 166 Date d=new Date (this.lastModTime); 167 gc=new GregorianCalendar (); 168 gc.setTime(d); 169 return gc; 170 } 171 172 public GregorianCalendar getCreationDateTime() { 173 GregorianCalendar gc=null; 174 Date d=new Date (this.creationTime); 175 gc=new GregorianCalendar (); 176 gc.setTime(d); 177 return gc; 178 } 179 180 181 184 public void setLastModTime(long lastModTime) { 185 this.lastModTime = lastModTime; 186 } 187 public UserVO getAuthor() { 188 return author; 189 } 190 public void setAuthor(UserVO author) { 191 this.author = author; 192 } 193 public long getLastVisit() { 194 return lastVisit; 195 } 196 public void setLastVisit(long lastVisit) { 197 this.lastVisit = lastVisit; 198 } 199 } 200 | Popular Tags |