1 16 package org.apache.roller.pojos; 17 18 import java.io.Serializable ; 19 import java.util.ArrayList ; 20 import java.util.Collection ; 21 import java.util.Date ; 22 import java.util.List ; 23 24 29 public class PlanetSubscriptionData extends PersistentObject 30 implements Serializable , Comparable 31 { 32 33 protected String id; 34 35 36 protected String title; 37 38 39 protected String author; 40 41 42 protected String feedUrl; 43 44 45 protected String siteUrl; 46 47 48 protected Date lastUpdated; 49 50 51 protected List entries = new ArrayList (); 52 53 54 protected int inboundlinks = 0; 55 56 57 protected int inboundblogs = 0; 58 59 protected List groupAssocs = new ArrayList (); 60 61 63 69 public List getGroupSubscriptionAssocs() 70 { 71 return groupAssocs; 72 } 73 public void setGroupSubscriptionAssocs(List groupAssocs) 74 { 75 this.groupAssocs = groupAssocs; 76 } 77 78 83 public String getId() 84 { 85 return id; 86 } 87 public void setId(String id) 88 { 89 this.id = id; 90 } 91 96 public List getEntries() 97 { 98 return entries; 99 } 100 private void setEntries(List entries) 101 { 102 this.entries = entries; 103 } 104 108 public String getFeedURL() 109 { 110 return feedUrl; 111 } 112 public void setFeedURL(String feedUrl) 113 { 114 this.feedUrl = feedUrl; 115 } 116 120 public Date getLastUpdated() 121 { 122 return lastUpdated; 123 } 124 public void setLastUpdated(Date lastUpdated) 125 { 126 this.lastUpdated = lastUpdated; 127 } 128 132 public String getSiteURL() 133 { 134 return siteUrl; 135 } 136 public void setSiteURL(String siteUrl) 137 { 138 this.siteUrl = siteUrl; 139 } 140 144 public String getTitle() 145 { 146 return title; 147 } 148 public void setTitle(String title) 149 { 150 this.title = title; 151 } 152 156 public String getAuthor() 157 { 158 return author; 159 } 160 public void setAuthor(String author) 161 { 162 this.author = author; 163 } 164 168 public int getInboundlinks() 169 { 170 return inboundlinks; 171 } 172 public void setInboundlinks(int inboundlinks) 173 { 174 this.inboundlinks = inboundlinks; 175 } 176 180 public int getInboundblogs() 181 { 182 return inboundblogs; 183 } 184 public void setInboundblogs(int inboundblogs) 185 { 186 this.inboundblogs = inboundblogs; 187 } 188 189 192 public String getName() { 193 return title; 194 } 195 public void setName(String name) { 196 } 198 201 public String getURL() { 202 return siteUrl; 203 } 204 public void setURL(String url) { 205 } 207 208 210 212 public void setData(PersistentObject vo) 213 { 214 } 216 218 public int compareTo(Object o) 219 { 220 PlanetSubscriptionData other = (PlanetSubscriptionData)o; 221 return getFeedURL().compareTo(other.getFeedURL()); 222 } 223 224 public boolean equals(Object other) { 225 226 if(this == other) return true; 227 if(!(other instanceof PlanetSubscriptionData)) return false; 228 229 final PlanetSubscriptionData that = (PlanetSubscriptionData) other; 230 return this.feedUrl.equals(that.getFeedURL()); 231 } 232 233 public int hashCode() { 234 return this.feedUrl.hashCode(); 235 } 236 237 public void addEntry(PlanetEntryData entry) 238 { 239 this.getEntries().add(entry); 240 } 241 242 public void addEntries(Collection newEntries) 243 { 244 this.getEntries().addAll(newEntries); 245 } 246 247 public void purgeEntries() 248 { 249 this.getEntries().clear(); 250 } 251 } 252 | Popular Tags |