1 package org.kuali.mobility.events.entity; 2 3 import java.io.Serializable; 4 import java.util.ArrayList; 5 import java.util.List; 6 7 import com.thoughtworks.xstream.annotations.XStreamAlias; 8 import com.thoughtworks.xstream.annotations.XStreamImplicit; 9 import com.thoughtworks.xstream.annotations.XStreamOmitField; 10 11 @XStreamAlias("event") 12 public class UMEvent implements Serializable { 13 14 private static final long serialVersionUID = -7064576922502928297L; 15 private String id; 16 private String title; 17 private String subtitle; 18 private String description; 19 private String type; 20 private String typeId; 21 private String guid; 22 private String occurenceNotes; 23 private String timeBegin; 24 private String timeEnd; 25 private String dateBegin; 26 private String dateEnd; 27 private String lastModified; 28 private String permanentUrl; 29 private String buildingId; 30 private String buildingName; 31 private String room; 32 private String url; 33 34 private String tsBegin; 35 private String tsEnd; 36 37 @XStreamOmitField 38 private List<String> tags; 39 @XStreamAlias("sponsors") 40 @XStreamImplicit 41 private List<UMSponsor> sponsors; 42 43 public String getId() { 44 return id; 45 } 46 47 public void setId(String id) { 48 this.id = id; 49 } 50 51 public String getTitle() { 52 return title; 53 } 54 55 public void setTitle(String title) { 56 this.title = title; 57 } 58 59 public String getSubtitle() { 60 return subtitle; 61 } 62 63 public void setSubtitle(String subtitle) { 64 this.subtitle = subtitle; 65 } 66 67 public String getDescription() { 68 return description; 69 } 70 71 public void setDescription(String description) { 72 this.description = description; 73 } 74 75 public String getType() { 76 return type; 77 } 78 79 public void setType(String type) { 80 this.type = type; 81 } 82 83 public String getTypeId() { 84 return typeId; 85 } 86 87 public void setTypeId(String typeId) { 88 this.typeId = typeId; 89 } 90 91 public String getGuid() { 92 return guid; 93 } 94 95 public void setGuid(String guid) { 96 this.guid = guid; 97 } 98 99 public String getOccurenceNotes() { 100 return occurenceNotes; 101 } 102 103 public void setOccurenceNotes(String occurenceNotes) { 104 this.occurenceNotes = occurenceNotes; 105 } 106 107 public String getTimeBegin() { 108 return timeBegin; 109 } 110 111 public void setTimeBegin(String timeBegin) { 112 this.timeBegin = timeBegin; 113 } 114 115 public String getTimeEnd() { 116 return timeEnd; 117 } 118 119 public void setTimeEnd(String timeEnd) { 120 this.timeEnd = timeEnd; 121 } 122 123 public String getDateBegin() { 124 return dateBegin; 125 } 126 127 public void setDateBegin(String dateBegin) { 128 this.dateBegin = dateBegin; 129 } 130 131 public String getDateEnd() { 132 return dateEnd; 133 } 134 135 public void setDateEnd(String dateEnd) { 136 this.dateEnd = dateEnd; 137 } 138 139 public String getLastModified() { 140 return lastModified; 141 } 142 143 public void setLastModified(String lastModified) { 144 this.lastModified = lastModified; 145 } 146 147 public String getPermanentUrl() { 148 return permanentUrl; 149 } 150 151 public void setPermanentUrl(String permanentUrl) { 152 this.permanentUrl = permanentUrl; 153 } 154 155 public String getBuildingId() { 156 return buildingId; 157 } 158 159 public void setBuildingId(String buildingId) { 160 this.buildingId = buildingId; 161 } 162 163 public String getBuildingName() { 164 return buildingName; 165 } 166 167 public void setBuildingName(String buildingName) { 168 this.buildingName = buildingName; 169 } 170 171 public String getRoom() { 172 return room; 173 } 174 175 public void setRoom(String room) { 176 this.room = room; 177 } 178 179 public String getUrl() { 180 return url; 181 } 182 183 public void setUrl(String url) { 184 this.url = url; 185 } 186 187 public List<String> getTags() { 188 return tags; 189 } 190 191 public void addTag (String aTag) { 192 if (tags==null) { 193 tags = new ArrayList<String>(); 194 } 195 tags.add(aTag); 196 } 197 198 public void setTags(List<String> tags) { 199 this.tags = tags; 200 } 201 202 public List<UMSponsor> getSponsors() { 203 return sponsors; 204 } 205 206 public void setSponsors(List<UMSponsor> sponsors) { 207 this.sponsors = sponsors; 208 } 209 210 public void addSponsor(UMSponsor aSponsor) { 211 if (sponsors==null) { 212 sponsors = new ArrayList<UMSponsor>(); 213 } 214 sponsors.add(aSponsor); 215 } 216 217 @Override 218 public boolean equals(Object arg0) { 219 boolean isEqual = super.equals(arg0); 220 if (arg0 instanceof UMEvent) { 221 if (this.getId()!=null && this.getId().equals(((UMEvent) arg0).getId()) ) 222 isEqual = true; 223 } 224 return isEqual; 225 } 226 227 public String getTsBegin() { 228 return tsBegin; 229 } 230 231 public void setTsBegin(String tsBegin) { 232 this.tsBegin = tsBegin; 233 } 234 235 public String getTsEnd() { 236 return tsEnd; 237 } 238 239 public void setTsEnd(String tsEnd) { 240 this.tsEnd = tsEnd; 241 } 242 }