KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > portlets > webevents > model > WebEventLocation


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; //persistent
12
private String JavaDoc city; //persistent
13
private String JavaDoc state; //persistent
14
private java.util.Date JavaDoc startDate; //persistent
15
private java.util.Date JavaDoc endDate; //persistent
16
private boolean showOnWeb; //persistent
17
private boolean webRegActive; //persistent
18
private String JavaDoc hotelName; //persistent
19
private long hotelLink; //persistent
20
private long pastEventLink; //persistent
21
private float partnerPrice; //persistent
22
private float nonPartnerPrice; //persistent
23
private String JavaDoc shortDescription; //persistent
24
private String JavaDoc textEmail; //persistent
25
private boolean almostAtCapacity = false; //persistent
26
private boolean full = false; //persistent
27
private boolean defaultContractPartnerPrice = false; //persistent
28

29     public WebEventLocation() {
30         super.setType("web_event_location");
31     }
32
33     /**
34      * @return Returns the city.
35      */

36     public String JavaDoc getCity() {
37         return city;
38     }
39
40     /**
41      * @param city The city to set.
42      */

43     public void setCity(String JavaDoc city) {
44         this.city = city;
45     }
46
47     /**
48      * @return Returns the endDate.
49      */

50     public java.util.Date JavaDoc getEndDate() {
51         return endDate;
52     }
53
54     /**
55      * @param endDate The endDate to set.
56      */

57     public void setEndDate(java.util.Date JavaDoc endDate) {
58         this.endDate = endDate;
59     }
60
61     /**
62      * @return Returns the hotelLink.
63      */

64     public long getHotelLink() {
65         return hotelLink;
66     }
67
68     /**
69      * @param hotelLink The hotelLink to set.
70      */

71     public void setHotelLink(long hotelLink) {
72         this.hotelLink = hotelLink;
73     }
74
75     /**
76      * @return Returns the hotelName.
77      */

78     public String JavaDoc getHotelName() {
79         return hotelName;
80     }
81
82     /**
83      * @param hotelName The hotelName to set.
84      */

85     public void setHotelName(String JavaDoc hotelName) {
86         this.hotelName = hotelName;
87     }
88
89     /**
90      * @return Returns the nonPartnerPrice.
91      */

92     public float getNonPartnerPrice() {
93         return nonPartnerPrice;
94     }
95
96     /**
97      * @param nonPartnerPrice The nonPartnerPrice to set.
98      */

99     public void setNonPartnerPrice(float nonPartnerPrice) {
100         this.nonPartnerPrice = nonPartnerPrice;
101     }
102
103     /**
104      * @return Returns the partnerPrice.
105      */

106     public float getPartnerPrice() {
107         return partnerPrice;
108     }
109
110     /**
111      * @param partnerPrice The partnerPrice to set.
112      */

113     public void setPartnerPrice(float partnerPrice) {
114         this.partnerPrice = partnerPrice;
115     }
116
117     /**
118      * @return Returns the pastEventLink.
119      */

120     public long getPastEventLink() {
121         return pastEventLink;
122     }
123
124     /**
125      * @param pastEventLink The pastEventLink to set.
126      */

127     public void setPastEventLink(long pastEventLink) {
128         this.pastEventLink = pastEventLink;
129     }
130
131     /**
132      * @return Returns the shortDescription.
133      */

134     public String JavaDoc getShortDescription() {
135         return shortDescription;
136     }
137
138     /**
139      * @param shortDescription The shortDescription to set.
140      */

141     public void setShortDescription(String JavaDoc shortDescription) {
142         this.shortDescription = shortDescription;
143     }
144
145     /**
146      * @return Returns the showOnWeb.
147      */

148     public boolean isShowOnWeb() {
149         return showOnWeb;
150     }
151
152     /**
153      * @param showOnWeb The showOnWeb to set.
154      */

155     public void setShowOnWeb(boolean showOnWeb) {
156         this.showOnWeb = showOnWeb;
157     }
158
159     /**
160      * @return Returns the startDate.
161      */

162     public java.util.Date JavaDoc getStartDate() {
163         return startDate;
164     }
165
166     /**
167      * @param startDate The startDate to set.
168      */

169     public void setStartDate(java.util.Date JavaDoc startDate) {
170         this.startDate = startDate;
171     }
172
173     /**
174      * @return Returns the state.
175      */

176     public String JavaDoc getState() {
177         return state;
178     }
179
180     /**
181      * @param state The state to set.
182      */

183     public void setState(String JavaDoc state) {
184         this.state = state;
185     }
186
187     /**
188      * @return Returns the textEmail.
189      */

190     public String JavaDoc getTextEmail() {
191         return textEmail;
192     }
193
194     /**
195      * @param textEmail The textEmail to set.
196      */

197     public void setTextEmail(String JavaDoc textEmail) {
198         this.textEmail = textEmail;
199     }
200
201     /**
202      * @return Returns the webEventInode.
203      */

204     public long getWebEventInode() {
205         return webEventInode;
206     }
207
208     /**
209      * @param webEventInode The webEventInode to set.
210      */

211     public void setWebEventInode(long webEventInode) {
212         this.webEventInode = webEventInode;
213     }
214
215     /**
216      * @return Returns the webRegActive.
217      */

218     public boolean isWebRegActive() {
219         return webRegActive;
220     }
221
222     /**
223      * @param webRegActive The webRegActive to set.
224      */

225     public void setWebRegActive(boolean webRegActive) {
226         this.webRegActive = webRegActive;
227     }
228
229     public String JavaDoc toString() {
230         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
231         WebEvent event = (WebEvent) WebEventFactory.getWebEvent(webEventInode);
232         java.util.Date JavaDoc startDate = this.getStartDate();
233         java.util.Date JavaDoc endDate = this.getEndDate();
234         String JavaDoc 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.dateToLongHTMLDateTimeRange(this.getStartDate(),this.getEndDate()));
245
sb.append(UtilMethods.dateToLongHTMLDateRange(this.getStartDate(),this.getEndDate()));
246         }
247         return sb.toString();
248         
249     }
250
251     public String JavaDoc toShortString() {
252         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
253         WebEvent event = (WebEvent) WebEventFactory.getWebEvent(webEventInode);
254         java.util.Date JavaDoc startDate = this.getStartDate();
255         java.util.Date JavaDoc endDate = this.getEndDate();
256         String JavaDoc 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