1 package com.dotmarketing.portlets.webevents.model; 2 3 import com.dotmarketing.beans.Inode; 4 import com.dotmarketing.util.UtilMethods; 5 import com.dotmarketing.portlets.webevents.factories.WebEventFactory; 6 7 public class WebEventLocation extends Inode { 8 9 private static final long serialVersionUID = 1L; 10 11 private long webEventInode; private String city; private String state; private java.util.Date startDate; private java.util.Date endDate; private boolean showOnWeb; private boolean webRegActive; private String hotelName; private long hotelLink; private long pastEventLink; private float partnerPrice; private float nonPartnerPrice; private String shortDescription; private String textEmail; private boolean almostAtCapacity = false; private boolean full = false; private boolean defaultContractPartnerPrice = false; 29 public WebEventLocation() { 30 super.setType("web_event_location"); 31 } 32 33 36 public String getCity() { 37 return city; 38 } 39 40 43 public void setCity(String city) { 44 this.city = city; 45 } 46 47 50 public java.util.Date getEndDate() { 51 return endDate; 52 } 53 54 57 public void setEndDate(java.util.Date endDate) { 58 this.endDate = endDate; 59 } 60 61 64 public long getHotelLink() { 65 return hotelLink; 66 } 67 68 71 public void setHotelLink(long hotelLink) { 72 this.hotelLink = hotelLink; 73 } 74 75 78 public String getHotelName() { 79 return hotelName; 80 } 81 82 85 public void setHotelName(String hotelName) { 86 this.hotelName = hotelName; 87 } 88 89 92 public float getNonPartnerPrice() { 93 return nonPartnerPrice; 94 } 95 96 99 public void setNonPartnerPrice(float nonPartnerPrice) { 100 this.nonPartnerPrice = nonPartnerPrice; 101 } 102 103 106 public float getPartnerPrice() { 107 return partnerPrice; 108 } 109 110 113 public void setPartnerPrice(float partnerPrice) { 114 this.partnerPrice = partnerPrice; 115 } 116 117 120 public long getPastEventLink() { 121 return pastEventLink; 122 } 123 124 127 public void setPastEventLink(long pastEventLink) { 128 this.pastEventLink = pastEventLink; 129 } 130 131 134 public String getShortDescription() { 135 return shortDescription; 136 } 137 138 141 public void setShortDescription(String shortDescription) { 142 this.shortDescription = shortDescription; 143 } 144 145 148 public boolean isShowOnWeb() { 149 return showOnWeb; 150 } 151 152 155 public void setShowOnWeb(boolean showOnWeb) { 156 this.showOnWeb = showOnWeb; 157 } 158 159 162 public java.util.Date getStartDate() { 163 return startDate; 164 } 165 166 169 public void setStartDate(java.util.Date startDate) { 170 this.startDate = startDate; 171 } 172 173 176 public String getState() { 177 return state; 178 } 179 180 183 public void setState(String state) { 184 this.state = state; 185 } 186 187 190 public String getTextEmail() { 191 return textEmail; 192 } 193 194 197 public void setTextEmail(String textEmail) { 198 this.textEmail = textEmail; 199 } 200 201 204 public long getWebEventInode() { 205 return webEventInode; 206 } 207 208 211 public void setWebEventInode(long webEventInode) { 212 this.webEventInode = webEventInode; 213 } 214 215 218 public boolean isWebRegActive() { 219 return webRegActive; 220 } 221 222 225 public void setWebRegActive(boolean webRegActive) { 226 this.webRegActive = webRegActive; 227 } 228 229 public String toString() { 230 StringBuffer sb = new StringBuffer (); 231 WebEvent event = (WebEvent) WebEventFactory.getWebEvent(webEventInode); 232 java.util.Date startDate = this.getStartDate(); 233 java.util.Date endDate = this.getEndDate(); 234 String response = ""; 235 if (event.isInstitute()) { 236 response = UtilMethods.dateToLongHTMLDateRange(startDate,endDate); 237 sb.append(response); 238 sb.append(", "); 239 sb.append((UtilMethods.isSet(this.getHotelName())) ? this.getHotelName() + ", " : ""); 240 sb.append((UtilMethods.isSet(this.getCity())) ? this.getCity() + ", " : ""); 241 sb.append((UtilMethods.isSet(this.getState())) ? this.getState() : ""); 242 } 243 else { 244 sb.append(UtilMethods.dateToLongHTMLDateRange(this.getStartDate(),this.getEndDate())); 246 } 247 return sb.toString(); 248 249 } 250 251 public String toShortString() { 252 StringBuffer sb = new StringBuffer (); 253 WebEvent event = (WebEvent) WebEventFactory.getWebEvent(webEventInode); 254 java.util.Date startDate = this.getStartDate(); 255 java.util.Date endDate = this.getEndDate(); 256 String response = ""; 257 if (event.isInstitute()) { 258 response = UtilMethods.dateToLongHTMLDateRange(startDate,endDate); 259 sb.append(response); 260 sb.append(", "); 261 sb.append((UtilMethods.isSet(this.getCity())) ? this.getCity() + ", " : ""); 262 sb.append((UtilMethods.isSet(this.getState())) ? this.getState() : ""); 263 } 264 else { 265 sb.append(UtilMethods.dateToLongHTMLDateRange(this.getStartDate(),this.getEndDate())); 266 } 267 return sb.toString(); 268 269 } 270 271 public boolean isAlmostAtCapacity() { 272 return almostAtCapacity; 273 } 274 275 public void setAlmostAtCapacity(boolean almostAtCapacity) { 276 this.almostAtCapacity = almostAtCapacity; 277 } 278 279 public boolean isFull() { 280 return full; 281 } 282 283 public void setFull(boolean full) { 284 this.full = full; 285 } 286 287 public boolean isDefaultContractPartnerPrice() { 288 return defaultContractPartnerPrice; 289 } 290 291 public void setDefaultContractPartnerPrice(boolean defaultContractPartnerPrice) { 292 this.defaultContractPartnerPrice = defaultContractPartnerPrice; 293 } 294 } 295 | Popular Tags |