KickJava   Java API By Example, From Geeks To Geeks.

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


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.struts.action.ActionErrors;
9 import org.apache.struts.action.ActionMapping;
10 import org.apache.struts.validator.ValidatorForm;
11
12 import com.dotmarketing.util.Logger;
13 import com.liferay.portal.util.Constants;
14 /**
15  * @author will
16  *
17  * To change this generated comment edit the template variable "typecomment":
18  * Window>Preferences>Java>Templates.
19  * To enable and disable the creation of type comments go to
20  * Window>Preferences>Java>Code Generation.
21  */

22 public class SearchfirmForm extends ValidatorForm implements Serializable JavaDoc{
23
24      /** persistent field */
25     private long inode;
26
27     /** nullable persistent field */
28     private String JavaDoc name;
29     
30     private String JavaDoc organization;
31
32     /** nullable persistent field */
33     private String JavaDoc title;
34
35     /** nullable persistent field */
36     private String JavaDoc streetaddress1;
37
38     /** nullable persistent field */
39     private String JavaDoc streetaddress2;
40
41     /** nullable persistent field */
42     private String JavaDoc phone;
43
44     /** nullable persistent field */
45     private String JavaDoc fax;
46
47     /** nullable persistent field */
48     private String JavaDoc email;
49
50     /** nullable persistent field */
51     private String JavaDoc url;
52
53     /** nullable persistent field */
54     private String JavaDoc description;
55
56     /** nullable persistent field */
57     private String JavaDoc contactinfo;
58
59     /** nullable persistent field */
60     private String JavaDoc cctype;
61
62     /** nullable persistent field */
63     private String JavaDoc ccnum;
64
65     /** nullable persistent field */
66     private String JavaDoc ccexp;
67     
68     /** nullable persistent field */
69     private java.util.Date JavaDoc expirationdate;
70     
71     private String JavaDoc webexpirationdate;
72
73     /** persistent field */
74     private boolean linking;
75     
76     private boolean active;
77     
78     /** default constructor */
79     public SearchfirmForm() {
80         this.cctype = "";
81     }
82
83     public long getInode() {
84         return this.inode;
85     }
86
87     public void setInode(long inode) {
88         this.inode = inode;
89     }
90     public java.lang.String JavaDoc getName() {
91         return this.name;
92     }
93
94     public void setName(java.lang.String JavaDoc name) {
95         this.name = name;
96     }
97     public java.lang.String JavaDoc getTitle() {
98         return this.title;
99     }
100
101     public void setTitle(java.lang.String JavaDoc title) {
102         this.title = title;
103     }
104     public java.lang.String JavaDoc getStreetaddress1() {
105         return this.streetaddress1;
106     }
107
108     public void setStreetaddress1(java.lang.String JavaDoc streetaddress1) {
109         this.streetaddress1 = streetaddress1;
110     }
111     public java.lang.String JavaDoc getStreetaddress2() {
112         return this.streetaddress2;
113     }
114
115     public void setStreetaddress2(java.lang.String JavaDoc streetaddress2) {
116         this.streetaddress2 = streetaddress2;
117     }
118     public java.lang.String JavaDoc getPhone() {
119         return this.phone;
120     }
121
122     public void setPhone(java.lang.String JavaDoc phone) {
123         this.phone = phone;
124     }
125     public java.lang.String JavaDoc getFax() {
126         return this.fax;
127     }
128
129     public void setFax(java.lang.String JavaDoc fax) {
130         this.fax = fax;
131     }
132     public java.lang.String JavaDoc getEmail() {
133         return this.email;
134     }
135
136     public void setEmail(java.lang.String JavaDoc email) {
137         this.email = email;
138     }
139     public java.lang.String JavaDoc getUrl() {
140         return this.url;
141     }
142
143     public void setUrl(java.lang.String JavaDoc url) {
144         this.url = url;
145     }
146     public java.lang.String JavaDoc getDescription() {
147         return this.description;
148     }
149
150     public void setDescription(java.lang.String JavaDoc description) {
151         this.description = description;
152     }
153     public java.lang.String JavaDoc getContactinfo() {
154         return this.contactinfo;
155     }
156
157     public void setContactinfo(java.lang.String JavaDoc contactinfo) {
158         this.contactinfo = contactinfo;
159     }
160     public java.lang.String JavaDoc getCctype() {
161         return this.cctype;
162     }
163
164     public void setCctype(java.lang.String JavaDoc cctype) {
165         this.cctype = cctype;
166     }
167     public java.lang.String JavaDoc getCcnum() {
168         return this.ccnum;
169     }
170
171     public void setCcnum(java.lang.String JavaDoc ccnum) {
172         this.ccnum = ccnum;
173     }
174     public java.lang.String JavaDoc getCcexp() {
175         return this.ccexp;
176     }
177
178     public void setCcexp(java.lang.String JavaDoc ccexp) {
179         this.ccexp = ccexp;
180     }
181     
182     public java.util.Date JavaDoc getExpirationdate() {
183         return this.expirationdate;
184     }
185
186     public void setExpirationdate(java.util.Date JavaDoc expirationdate) {
187         this.expirationdate = expirationdate;
188         if(expirationdate != null)
189             this.webexpirationdate = new SimpleDateFormat JavaDoc("MM/dd/yyyy").format(this.expirationdate);
190     }
191     
192     public String JavaDoc getWebexpirationdate() {
193         return this.webexpirationdate;
194     }
195
196     public void setWebexpirationdate(String JavaDoc webexpirationdate) {
197         this.webexpirationdate = webexpirationdate;
198         try {
199             this.expirationdate = new SimpleDateFormat JavaDoc().parse(webexpirationdate);
200         } catch(java.text.ParseException JavaDoc ex) {
201         }
202     }
203
204     /**
205      * Returns the organization.
206      * @return String
207      */

208     public String JavaDoc getOrganization() {
209         return organization;
210     }
211
212     /**
213      * Sets the organization.
214      * @param organization The organization to set
215      */

216     public void setOrganization(String JavaDoc organization) {
217         this.organization = organization;
218     }
219
220
221     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
222         if(request.getParameter("cmd")!=null &&
223             ((request.getParameter("cmd").equalsIgnoreCase(Constants.ADD)) ||
224                 (request.getParameter("cmd").equalsIgnoreCase(Constants.UPDATE)))) {
225             Logger.debug(this, "Search Firm Form validation!!!!!!" + mapping.getForward());
226             return super.validate(mapping, request);
227         }
228         if (request.getParameter("dispatch")!=null && (request.getParameter("dispatch").equalsIgnoreCase("save"))) {
229             Logger.debug(this, "Search Firm Form validation!!!!!!" + mapping.getForward());
230             return super.validate(mapping, request);
231         }
232         return null;
233     }
234     
235     
236     /**
237      * @return Returns the active.
238      */

239     public boolean isActive() {
240         return active;
241     }
242     /**
243      * @param active The active to set.
244      */

245     public void setActive(boolean active) {
246         this.active = active;
247     }
248     /**
249      * @return Returns the linking.
250      */

251     public boolean isLinking() {
252         return linking;
253     }
254     /**
255      * @param linking The linking to set.
256      */

257     public void setLinking(boolean linking) {
258         this.linking = linking;
259     }
260 }
261
Popular Tags