KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > portlets > jobs > struts > JobsForm


1 package com.dotmarketing.portlets.jobs.struts;
2
3 import java.io.Serializable JavaDoc;
4 import java.text.SimpleDateFormat JavaDoc;
5
6 import javax.servlet.http.HttpServletRequest JavaDoc;
7
8 import org.apache.commons.lang.builder.ToStringBuilder;
9 import org.apache.struts.action.ActionErrors;
10 import org.apache.struts.action.ActionMapping;
11 import org.apache.struts.validator.ValidatorForm;
12
13 import com.dotmarketing.util.Logger;
14 import com.liferay.portal.util.Constants;
15
16 /** @author Hibernate CodeGenerator */
17 public class JobsForm extends ValidatorForm implements Serializable JavaDoc {
18
19     /** persistent field */
20     private long inode;
21
22     /** persistent field */
23     private String JavaDoc organization;
24
25     /** persistent field */
26     private String JavaDoc name;
27
28     /** nullable persistent field */
29     private String JavaDoc title;
30
31     /** persistent field */
32     private String JavaDoc streetaddress1;
33
34     /** nullable persistent field */
35     private String JavaDoc streetaddress2;
36
37     /** persistent field */
38     private String JavaDoc city;
39
40     /** nullable persistent field */
41     private String JavaDoc state;
42
43     /** nullable persistent field */
44     private String JavaDoc zip;
45
46     /** nullable persistent field */
47     private String JavaDoc phone;
48
49     /** nullable persistent field */
50     private String JavaDoc fax;
51
52     /** nullable persistent field */
53     private String JavaDoc email;
54
55     /** persistent field */
56     private String JavaDoc jobtitle;
57
58     /** nullable persistent field */
59     private String JavaDoc joblocation;
60
61     /** nullable persistent field */
62     private String JavaDoc salary;
63
64     /** nullable persistent field */
65     private String JavaDoc description;
66
67     /** nullable persistent field */
68     private String JavaDoc requirements;
69
70     /** nullable persistent field */
71     private String JavaDoc contactinfo;
72
73     /** nullable persistent field */
74     private String JavaDoc cctype;
75
76     /** nullable persistent field */
77     private String JavaDoc ccnum;
78
79     /** nullable persistent field */
80     private String JavaDoc ccexp;
81     
82     
83     private java.util.List JavaDoc paymentmethods;
84     
85     private String JavaDoc webexpirationdate;
86     
87     private java.util.Date JavaDoc expdate;
88     
89     private boolean active;
90     
91     private boolean premiumlisting;
92     
93     private boolean blind;
94
95     /** persistent field */
96    // private java.util.Date entrydate;
97

98     /** full constructor */
99
100     /** default constructor */
101     public JobsForm() {
102         paymentmethods = new java.util.ArrayList JavaDoc();
103         paymentmethods.add("Invoice Me");
104         paymentmethods.add("Visa");
105         paymentmethods.add("Master Card");
106         paymentmethods.add("American Express");
107         //expdate = new java.util.Date();
108
this.cctype = "";
109     }
110
111
112     public long getInode() {
113         return this.inode;
114     }
115
116     public void setInode(long inode) {
117         this.inode = inode;
118     }
119     public java.lang.String JavaDoc getOrganization() {
120         return this.organization;
121     }
122
123     public void setOrganization(java.lang.String JavaDoc organization) {
124         this.organization = organization;
125     }
126     public java.lang.String JavaDoc getName() {
127         return this.name;
128     }
129
130     public void setName(java.lang.String JavaDoc name) {
131         this.name = name;
132     }
133     public java.lang.String JavaDoc getTitle() {
134         return this.title;
135     }
136
137     public void setTitle(java.lang.String JavaDoc title) {
138         this.title = title;
139     }
140     public java.lang.String JavaDoc getStreetaddress1() {
141         return this.streetaddress1;
142     }
143
144     public void setStreetaddress1(java.lang.String JavaDoc streetaddress1) {
145         this.streetaddress1 = streetaddress1;
146     }
147     public java.lang.String JavaDoc getStreetaddress2() {
148         return this.streetaddress2;
149     }
150
151     public void setStreetaddress2(java.lang.String JavaDoc streetaddress2) {
152         this.streetaddress2 = streetaddress2;
153     }
154     public java.lang.String JavaDoc getCity() {
155         return this.city;
156     }
157
158     public void setCity(java.lang.String JavaDoc city) {
159         this.city = city;
160     }
161     public java.lang.String JavaDoc getState() {
162         return this.state;
163     }
164
165     public void setState(java.lang.String JavaDoc state) {
166         this.state = state;
167     }
168     public java.lang.String JavaDoc getZip() {
169         return this.zip;
170     }
171
172     public void setZip(java.lang.String JavaDoc zip) {
173         this.zip = zip;
174     }
175     public java.lang.String JavaDoc getPhone() {
176         return this.phone;
177     }
178
179     public void setPhone(java.lang.String JavaDoc phone) {
180         this.phone = phone;
181     }
182     public java.lang.String JavaDoc getFax() {
183         return this.fax;
184     }
185
186     public void setFax(java.lang.String JavaDoc fax) {
187         this.fax = fax;
188     }
189     public java.lang.String JavaDoc getEmail() {
190         return this.email;
191     }
192
193     public void setEmail(java.lang.String JavaDoc email) {
194         this.email = email;
195     }
196     public java.lang.String JavaDoc getJobtitle() {
197         return this.jobtitle;
198     }
199
200     public void setJobtitle(java.lang.String JavaDoc jobtitle) {
201         this.jobtitle = jobtitle;
202     }
203     public java.lang.String JavaDoc getJoblocation() {
204         return this.joblocation;
205     }
206
207     public void setJoblocation(java.lang.String JavaDoc joblocation) {
208         this.joblocation = joblocation;
209     }
210     public java.lang.String JavaDoc getSalary() {
211         return this.salary;
212     }
213
214     public void setSalary(java.lang.String JavaDoc salary) {
215         this.salary = salary;
216     }
217     public java.lang.String JavaDoc getDescription() {
218         return this.description;
219     }
220
221     public void setDescription(java.lang.String JavaDoc description) {
222         this.description = description;
223     }
224     public java.lang.String JavaDoc getRequirements() {
225         return this.requirements;
226     }
227
228     public void setRequirements(java.lang.String JavaDoc requirements) {
229         this.requirements = requirements;
230     }
231     public java.lang.String JavaDoc getContactinfo() {
232         return this.contactinfo;
233     }
234
235     public void setContactinfo(java.lang.String JavaDoc contactinfo) {
236         this.contactinfo = contactinfo;
237     }
238     public java.lang.String JavaDoc getCctype() {
239         return this.cctype;
240     }
241
242     public void setCctype(java.lang.String JavaDoc cctype) {
243         this.cctype = cctype;
244     }
245     public java.lang.String JavaDoc getCcnum() {
246         return this.ccnum;
247     }
248
249     public void setCcnum(java.lang.String JavaDoc ccnum) {
250         this.ccnum = ccnum;
251     }
252     public java.lang.String JavaDoc getCcexp() {
253         return this.ccexp;
254     }
255
256     public void setCcexp(java.lang.String JavaDoc ccexp) {
257         this.ccexp = ccexp;
258     }
259
260     public String JavaDoc toString() {
261         return ToStringBuilder.reflectionToString(this);
262     }
263
264     /**
265      * Returns the webexpirationdate.
266      * @return String
267      */

268     public String JavaDoc getWebexpirationdate() {
269         if(expdate!=null)
270                     this.webexpirationdate = new SimpleDateFormat JavaDoc("MM/dd/yyyy").format(this.expdate);
271         return webexpirationdate;
272     }
273
274     /**
275      * Sets the webexpirationdate.
276      * @param webexpirationdate The webexpirationdate to set
277      */

278     public void setWebexpirationdate(String JavaDoc webexpirationdate) {
279         this.webexpirationdate = webexpirationdate;
280         try {
281             expdate = new SimpleDateFormat JavaDoc("MM/dd/yyyy").parse(webexpirationdate);
282         } catch(java.text.ParseException JavaDoc ex) {
283         }
284     }
285
286     /**
287      * Returns the expirationdate.
288      * @return java.util.Date
289      */

290     public java.util.Date JavaDoc getExpdate() {
291         return expdate;
292     }
293
294     /**
295      * Sets the expirationdate.
296      * @param expirationdate The expirationdate to set
297      */

298     public void setExpdate(java.util.Date JavaDoc expirationdate) {
299         this.expdate = expirationdate;
300     }
301
302     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
303         if (request.getParameter("cmd")!=null &&
304             ((request.getParameter("cmd").equalsIgnoreCase(Constants.ADD)) ||
305                 (request.getParameter("cmd").equalsIgnoreCase(Constants.UPDATE)))) {
306             Logger.debug(this, "Jobs Form validation!!!!!!" + mapping.getForward());
307             return super.validate(mapping, request);
308         }
309         if (request.getParameter("dispatch")!=null && (request.getParameter("dispatch").equalsIgnoreCase("save"))) {
310             Logger.debug(this, "Jobs Form validation!!!!!!" + mapping.getForward());
311             return super.validate(mapping, request);
312         }
313         return null;
314     }
315
316     /**
317      * Returns the paymentmethods.
318      * @return java.util.List
319      */

320     public java.util.List JavaDoc getPaymentmethods() {
321         return paymentmethods;
322     }
323
324     /**
325      * Sets the paymentmethods.
326      * @param paymentmethods The paymentmethods to set
327      */

328     public void setPaymentmethods(java.util.List JavaDoc paymentmethods) {
329         this.paymentmethods = paymentmethods;
330     }
331
332
333     /**
334      * @return Returns the active.
335      */

336     public boolean isActive() {
337         return active;
338     }
339     /**
340      * @param active The active to set.
341      */

342     public void setActive(boolean active) {
343         this.active = active;
344     }
345     /**
346      * @return Returns the blind.
347      */

348     public boolean isBlind() {
349         return blind;
350     }
351     /**
352      * @param blind The blind to set.
353      */

354     public void setBlind(boolean blind) {
355         this.blind = blind;
356     }
357     /**
358      * @return Returns the premiumlisting.
359      */

360     public boolean isPremiumlisting() {
361         return premiumlisting;
362     }
363     /**
364      * @param premiumlisting The premiumlisting to set.
365      */

366     public void setPremiumlisting(boolean premiumlisting) {
367         this.premiumlisting = premiumlisting;
368     }
369 }
370
Popular Tags