001: /*
002: * $Header: /cvsroot/mvnforum/mvnforum/contrib/phpbb2mvnforum/src/org/mvnforum/phpbb2mvnforum/db/MemberBean.java,v 1.6 2007/01/15 10:27:34 dungbtm Exp $
003: * $Author: dungbtm $
004: * $Revision: 1.6 $
005: * $Date: 2007/01/15 10:27:34 $
006: *
007: * ====================================================================
008: *
009: * Copyright (C) 2002-2007 by MyVietnam.net
010: *
011: * All copyright notices regarding mvnForum MUST remain
012: * intact in the scripts and in the outputted HTML.
013: * The "powered by" text/logo with a link back to
014: * http://www.mvnForum.com and http://www.MyVietnam.net in
015: * the footer of the pages MUST remain visible when the pages
016: * are viewed on the internet or intranet.
017: *
018: * This program is free software; you can redistribute it and/or modify
019: * it under the terms of the GNU General Public License as published by
020: * the Free Software Foundation; either version 2 of the License, or
021: * any later version.
022: *
023: * This program is distributed in the hope that it will be useful,
024: * but WITHOUT ANY WARRANTY; without even the implied warranty of
025: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
026: * GNU General Public License for more details.
027: *
028: * You should have received a copy of the GNU General Public License
029: * along with this program; if not, write to the Free Software
030: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
031: *
032: * Support can be obtained from support forums at:
033: * http://www.mvnForum.com/mvnforum/index
034: *
035: * Correspondence and Marketing Questions can be sent to:
036: * info at MyVietnam net
037: *
038: * @author: Minh Nguyen
039: * @author: Mai Nguyen
040: */
041: package org.mvnforum.phpbb2mvnforum.db;
042:
043: import java.sql.Date;
044: import java.sql.Timestamp;
045:
046: import net.myvietnam.mvncore.util.StringUtil;
047:
048: import org.w3c.dom.Document;
049: import org.w3c.dom.Element;
050: import org.w3c.dom.Node;
051:
052: /*
053: * Included columns: MemberID, MemberName, MemberFirstEmail, MemberEmail, MemberEmailVisible,
054: * MemberNameVisible, MemberFirstIP, MemberLastIP, MemberViewCount, MemberPostCount,
055: * MemberCreationDate, MemberModifiedDate, MemberLastLogon, MemberOption, MemberStatus,
056: * MemberActivateCode, MemberMessageCount, MemberMessageOption, MemberPostsPerPage, MemberWarnCount,
057: * MemberVoteCount, MemberVoteTotalStars, MemberRewardPoints, MemberTitle, MemberTimeZone,
058: * MemberSignature, MemberAvatar, MemberSkin, MemberLanguage, MemberFirstname,
059: * MemberLastname, MemberGender, MemberBirthday, MemberAddress, MemberCity,
060: * MemberState, MemberCountry, MemberPhone, MemberMobile, MemberFax,
061: * MemberCareer, MemberHomepage, MemberYahoo, MemberAol, MemberIcq,
062: * MemberMsn, MemberCoolLink1, MemberCoolLink2
063: * Excluded columns: MemberPassword, MemberTempPassword
064: */
065: public class MemberBean {
066:
067: private int memberID;
068: private String memberName;
069: private String memberFirstEmail;
070: private String memberEmail;
071: private String memberPassword;
072: private String memberTempPassword;
073: private int memberEmailVisible;
074: private int memberNameVisible;
075: private String memberFirstIP;
076: private String memberLastIP;
077: private int memberViewCount;
078: private int memberPostCount;
079: private Timestamp memberCreationDate;
080: private Timestamp memberModifiedDate;
081: private Timestamp memberExpireDate;
082: private Timestamp memberLastLogon;
083: private int memberOption;
084: private int memberStatus;
085: private String memberActivateCode;
086: private int memberMessageCount;
087: private int memberMessageOption;
088: private int memberPostsPerPage;
089: private int memberWarnCount;
090: private int memberVoteCount;
091: private int memberVoteTotalStars;
092: private int memberRewardPoints;
093: private String memberTitle;
094: private double memberTimeZone;
095: private String memberSignature;
096: private String memberAvatar;
097: private String memberSkin;
098: private String memberLanguage;
099: private String memberFirstname;
100: private String memberLastname;
101: private int memberGender;
102: private Date memberBirthday;
103: private String memberAddress;
104: private String memberCity;
105: private String memberState;
106: private String memberCountry;
107: private String memberPhone;
108: private String memberMobile;
109: private String memberFax;
110: private String memberCareer;
111: private String memberHomepage;
112: private String memberYahoo;
113: private String memberAol;
114: private String memberIcq;
115: private String memberMsn;
116: private String memberCoolLink1;
117: private String memberCoolLink2;
118:
119: public int getMemberID() {
120: return memberID;
121: }
122:
123: public void setMemberID(int memberID) {
124: this .memberID = memberID;
125: }
126:
127: public String getMemberName() {
128: return memberName;
129: }
130:
131: public void setMemberName(String memberName) {
132: this .memberName = memberName;
133: }
134:
135: public String getMemberFirstEmail() {
136: return memberFirstEmail;
137: }
138:
139: public void setMemberFirstEmail(String memberFirstEmail) {
140: this .memberFirstEmail = StringUtil
141: .getEmptyStringIfNull(memberFirstEmail);
142: }
143:
144: public String getMemberEmail() {
145: return memberEmail;
146: }
147:
148: public void setMemberEmail(String memberEmail) {
149: this .memberEmail = StringUtil.getEmptyStringIfNull(memberEmail);
150: }
151:
152: public int getMemberEmailVisible() {
153: return memberEmailVisible;
154: }
155:
156: public void setMemberEmailVisible(int memberEmailVisible) {
157: this .memberEmailVisible = memberEmailVisible;
158: }
159:
160: public int getMemberNameVisible() {
161: return memberNameVisible;
162: }
163:
164: public void setMemberNameVisible(int memberNameVisible) {
165: this .memberNameVisible = memberNameVisible;
166: }
167:
168: public String getMemberFirstIP() {
169: return memberFirstIP;
170: }
171:
172: public void setMemberFirstIP(String memberFirstIP) {
173: this .memberFirstIP = StringUtil
174: .getEmptyStringIfNull(memberFirstIP);
175: }
176:
177: public String getMemberLastIP() {
178: return memberLastIP;
179: }
180:
181: public void setMemberLastIP(String memberLastIP) {
182: this .memberLastIP = StringUtil
183: .getEmptyStringIfNull(memberLastIP);
184: }
185:
186: public int getMemberViewCount() {
187: return memberViewCount;
188: }
189:
190: public void setMemberViewCount(int memberViewCount) {
191: this .memberViewCount = memberViewCount;
192: }
193:
194: public int getMemberPostCount() {
195: return memberPostCount;
196: }
197:
198: public void setMemberPostCount(int memberPostCount) {
199: this .memberPostCount = memberPostCount;
200: }
201:
202: public Timestamp getMemberCreationDate() {
203: return memberCreationDate;
204: }
205:
206: public void setMemberCreationDate(Timestamp memberCreationDate) {
207: this .memberCreationDate = memberCreationDate;
208: }
209:
210: public Timestamp getMemberModifiedDate() {
211: return memberModifiedDate;
212: }
213:
214: public void setMemberModifiedDate(Timestamp memberModifiedDate) {
215: this .memberModifiedDate = memberModifiedDate;
216: }
217:
218: public Timestamp getMemberExpireDate() {
219: return memberExpireDate;
220: }
221:
222: public void setMemberExpireDate(Timestamp memberExpireDate) {
223: this .memberExpireDate = memberExpireDate;
224: }
225:
226: public Timestamp getMemberLastLogon() {
227: return memberLastLogon;
228: }
229:
230: public void setMemberLastLogon(Timestamp memberLastLogon) {
231: this .memberLastLogon = memberLastLogon;
232: }
233:
234: public int getMemberOption() {
235: return memberOption;
236: }
237:
238: public void setMemberOption(int memberOption) {
239: this .memberOption = memberOption;
240: }
241:
242: public int getMemberStatus() {
243: return memberStatus;
244: }
245:
246: public void setMemberStatus(int memberStatus) {
247: this .memberStatus = memberStatus;
248: }
249:
250: public String getMemberActivateCode() {
251: return memberActivateCode;
252: }
253:
254: public void setMemberActivateCode(String memberActivateCode) {
255: this .memberActivateCode = StringUtil
256: .getEmptyStringIfNull(memberActivateCode);
257: }
258:
259: public int getMemberMessageCount() {
260: return memberMessageCount;
261: }
262:
263: public void setMemberMessageCount(int memberMessageCount) {
264: this .memberMessageCount = memberMessageCount;
265: }
266:
267: public int getMemberMessageOption() {
268: return memberMessageOption;
269: }
270:
271: public void setMemberMessageOption(int memberMessageOption) {
272: this .memberMessageOption = memberMessageOption;
273: }
274:
275: public int getMemberPostsPerPage() {
276: return memberPostsPerPage;
277: }
278:
279: public void setMemberPostsPerPage(int memberPostsPerPage) {
280: this .memberPostsPerPage = memberPostsPerPage;
281: }
282:
283: public int getMemberWarnCount() {
284: return memberWarnCount;
285: }
286:
287: public void setMemberWarnCount(int memberWarnCount) {
288: this .memberWarnCount = memberWarnCount;
289: }
290:
291: public int getMemberVoteCount() {
292: return memberVoteCount;
293: }
294:
295: public void setMemberVoteCount(int memberVoteCount) {
296: this .memberVoteCount = memberVoteCount;
297: }
298:
299: public int getMemberVoteTotalStars() {
300: return memberVoteTotalStars;
301: }
302:
303: public void setMemberVoteTotalStars(int memberVoteTotalStars) {
304: this .memberVoteTotalStars = memberVoteTotalStars;
305: }
306:
307: public int getMemberRewardPoints() {
308: return memberRewardPoints;
309: }
310:
311: public void setMemberRewardPoints(int memberRewardPoints) {
312: this .memberRewardPoints = memberRewardPoints;
313: }
314:
315: public String getMemberTitle() {
316: return memberTitle;
317: }
318:
319: public void setMemberTitle(String memberTitle) {
320: this .memberTitle = StringUtil.getEmptyStringIfNull(memberTitle);
321: }
322:
323: public double getMemberTimeZone() {
324: return memberTimeZone;
325: }
326:
327: public void setMemberTimeZone(double memberTimeZone) {
328: this .memberTimeZone = memberTimeZone;
329: }
330:
331: public String getMemberSignature() {
332: return memberSignature;
333: }
334:
335: public void setMemberSignature(String memberSignature) {
336: this .memberSignature = StringUtil
337: .getEmptyStringIfNull(memberSignature);
338: }
339:
340: public String getMemberAvatar() {
341: return memberAvatar;
342: }
343:
344: public void setMemberAvatar(String memberAvatar) {
345: this .memberAvatar = StringUtil
346: .getEmptyStringIfNull(memberAvatar);
347: }
348:
349: public String getMemberSkin() {
350: return memberSkin;
351: }
352:
353: public void setMemberSkin(String memberSkin) {
354: this .memberSkin = StringUtil.getEmptyStringIfNull(memberSkin);
355: }
356:
357: public String getMemberLanguage() {
358: return memberLanguage;
359: }
360:
361: public void setMemberLanguage(String memberLanguage) {
362: this .memberLanguage = StringUtil
363: .getEmptyStringIfNull(memberLanguage);
364: }
365:
366: public String getMemberFirstname() {
367: return memberFirstname;
368: }
369:
370: public void setMemberFirstname(String memberFirstname) {
371: this .memberFirstname = StringUtil
372: .getEmptyStringIfNull(memberFirstname);
373: }
374:
375: public String getMemberLastname() {
376: return memberLastname;
377: }
378:
379: public void setMemberLastname(String memberLastname) {
380: this .memberLastname = StringUtil
381: .getEmptyStringIfNull(memberLastname);
382: }
383:
384: public int getMemberGender() {
385: return memberGender;
386: }
387:
388: public void setMemberGender(int memberGender) {
389: this .memberGender = memberGender;
390: }
391:
392: public Date getMemberBirthday() {
393: return memberBirthday;
394: }
395:
396: public void setMemberBirthday(Date memberBirthday) {
397: this .memberBirthday = memberBirthday;
398: }
399:
400: public String getMemberAddress() {
401: return memberAddress;
402: }
403:
404: public void setMemberAddress(String memberAddress) {
405: this .memberAddress = StringUtil
406: .getEmptyStringIfNull(memberAddress);
407: }
408:
409: public String getMemberCity() {
410: return memberCity;
411: }
412:
413: public void setMemberCity(String memberCity) {
414: this .memberCity = StringUtil.getEmptyStringIfNull(memberCity);
415: }
416:
417: public String getMemberState() {
418: return memberState;
419: }
420:
421: public void setMemberState(String memberState) {
422: this .memberState = StringUtil.getEmptyStringIfNull(memberState);
423: }
424:
425: public String getMemberCountry() {
426: return memberCountry;
427: }
428:
429: public void setMemberCountry(String memberCountry) {
430: this .memberCountry = StringUtil
431: .getEmptyStringIfNull(memberCountry);
432: }
433:
434: public String getMemberPhone() {
435: return memberPhone;
436: }
437:
438: public void setMemberPhone(String memberPhone) {
439: this .memberPhone = StringUtil.getEmptyStringIfNull(memberPhone);
440: }
441:
442: public String getMemberMobile() {
443: return memberMobile;
444: }
445:
446: public void setMemberMobile(String memberMobile) {
447: this .memberMobile = StringUtil
448: .getEmptyStringIfNull(memberMobile);
449: }
450:
451: public String getMemberFax() {
452: return memberFax;
453: }
454:
455: public void setMemberFax(String memberFax) {
456: this .memberFax = StringUtil.getEmptyStringIfNull(memberFax);
457: }
458:
459: public String getMemberCareer() {
460: return memberCareer;
461: }
462:
463: public void setMemberCareer(String memberCareer) {
464: this .memberCareer = StringUtil
465: .getEmptyStringIfNull(memberCareer);
466: }
467:
468: public String getMemberHomepage() {
469: return memberHomepage;
470: }
471:
472: public void setMemberHomepage(String memberHomepage) {
473: this .memberHomepage = StringUtil
474: .getEmptyStringIfNull(memberHomepage);
475: }
476:
477: public String getMemberYahoo() {
478: return memberYahoo;
479: }
480:
481: public void setMemberYahoo(String memberYahoo) {
482: this .memberYahoo = StringUtil.getEmptyStringIfNull(memberYahoo);
483: }
484:
485: public String getMemberAol() {
486: return memberAol;
487: }
488:
489: public void setMemberAol(String memberAol) {
490: this .memberAol = StringUtil.getEmptyStringIfNull(memberAol);
491: }
492:
493: public String getMemberIcq() {
494: return memberIcq;
495: }
496:
497: public void setMemberIcq(String memberIcq) {
498: this .memberIcq = StringUtil.getEmptyStringIfNull(memberIcq);
499: }
500:
501: public String getMemberMsn() {
502: return memberMsn;
503: }
504:
505: public void setMemberMsn(String memberMsn) {
506: this .memberMsn = StringUtil.getEmptyStringIfNull(memberMsn);
507: }
508:
509: public String getMemberCoolLink1() {
510: return memberCoolLink1;
511: }
512:
513: public void setMemberCoolLink1(String memberCoolLink1) {
514: this .memberCoolLink1 = StringUtil
515: .getEmptyStringIfNull(memberCoolLink1);
516: }
517:
518: public String getMemberCoolLink2() {
519: return memberCoolLink2;
520: }
521:
522: public void setMemberCoolLink2(String memberCoolLink2) {
523: this .memberCoolLink2 = StringUtil
524: .getEmptyStringIfNull(memberCoolLink2);
525: }
526:
527: public void getBeanDocument(Document doc, Element element) {
528:
529: Element category = doc.createElement("Category");
530: element.appendChild(category);
531:
532: category.appendChild(getNode(doc, "MemberID", String
533: .valueOf(memberID)));
534: category.appendChild(getNode(doc, "MemberName", String
535: .valueOf(memberName)));
536: category.appendChild(getNode(doc, "MemberPassword", String
537: .valueOf(memberPassword)));
538: category.appendChild(getNode(doc, "MemberFirstEmail", String
539: .valueOf(memberFirstEmail)));
540: category.appendChild(getNode(doc, "MemberEmail", String
541: .valueOf(memberEmail)));
542: category.appendChild(getNode(doc, "MemberEmailVisible", String
543: .valueOf(memberEmailVisible)));
544: category.appendChild(getNode(doc, "MemberNameVisible", String
545: .valueOf(memberNameVisible)));
546: category.appendChild(getNode(doc, "MemberFirstIP", String
547: .valueOf(memberFirstIP)));
548: category.appendChild(getNode(doc, "MemberLastIP", String
549: .valueOf(memberLastIP)));
550: category.appendChild(getNode(doc, "MemberViewCount", String
551: .valueOf(memberViewCount)));
552: category.appendChild(getNode(doc, "MemberPostCount", String
553: .valueOf(memberPostCount)));
554: category.appendChild(getNode(doc, "MemberCreationDate", String
555: .valueOf(memberCreationDate)));
556: category.appendChild(getNode(doc, "MemberModifiedDate", String
557: .valueOf(memberModifiedDate)));
558: category.appendChild(getNode(doc, "MemberExpireDate", String
559: .valueOf(memberExpireDate)));
560: category.appendChild(getNode(doc, "MemberLastLogon", String
561: .valueOf(memberLastLogon)));
562: category.appendChild(getNode(doc, "MemberOption", String
563: .valueOf(memberOption)));
564: category.appendChild(getNode(doc, "MemberStatus", String
565: .valueOf(memberStatus)));
566: category.appendChild(getNode(doc, "MemberActivateCode", String
567: .valueOf(memberActivateCode)));
568: category.appendChild(getNode(doc, "MemberTempPassword", String
569: .valueOf(memberTempPassword)));
570: category.appendChild(getNode(doc, "MemberMessageCount", String
571: .valueOf(memberMessageCount)));
572: category.appendChild(getNode(doc, "MemberMessageOption", String
573: .valueOf(memberMessageOption)));
574: category.appendChild(getNode(doc, "MemberPostsPerPage", String
575: .valueOf(memberPostsPerPage)));
576: category.appendChild(getNode(doc, "MemberWarnCount", String
577: .valueOf(memberWarnCount)));
578: category.appendChild(getNode(doc, "MemberVoteCount", String
579: .valueOf(memberVoteCount)));
580: category.appendChild(getNode(doc, "MemberVoteTotalStars",
581: String.valueOf(memberVoteTotalStars)));
582: category.appendChild(getNode(doc, "MemberRewardPoints", String
583: .valueOf(memberRewardPoints)));
584: category.appendChild(getNode(doc, "MemberTitle", String
585: .valueOf(memberTitle)));
586: category.appendChild(getNode(doc, "MemberTimeZone", String
587: .valueOf(memberTimeZone)));
588: category.appendChild(getNode(doc, "MemberSignature", String
589: .valueOf(memberSignature)));
590: category.appendChild(getNode(doc, "MemberAvatar", String
591: .valueOf(memberAvatar)));
592: category.appendChild(getNode(doc, "MemberSkin", String
593: .valueOf(memberSkin)));
594: category.appendChild(getNode(doc, "MemberLanguage", String
595: .valueOf(memberLanguage)));
596: category.appendChild(getNode(doc, "MemberTempPassword", String
597: .valueOf(memberTempPassword)));
598: category.appendChild(getNode(doc, "MemberFirstname", String
599: .valueOf(memberFirstname)));
600: category.appendChild(getNode(doc, "MemberLastname", String
601: .valueOf(memberLastname)));
602: category.appendChild(getNode(doc, "MemberGender", String
603: .valueOf(memberGender)));
604: category.appendChild(getNode(doc, "MemberBirthday", String
605: .valueOf(memberBirthday)));
606: category.appendChild(getNode(doc, "MemberAddress", String
607: .valueOf(memberAddress)));
608: category.appendChild(getNode(doc, "MemberCity", String
609: .valueOf(memberCity)));
610: category.appendChild(getNode(doc, "MemberState", String
611: .valueOf(memberState)));
612: category.appendChild(getNode(doc, "MemberCountry", String
613: .valueOf(memberCountry)));
614: category.appendChild(getNode(doc, "MemberPhone", String
615: .valueOf(memberPhone)));
616: category.appendChild(getNode(doc, "MemberMobile", String
617: .valueOf(memberMobile)));
618: category.appendChild(getNode(doc, "MemberFax", String
619: .valueOf(memberFax)));
620: category.appendChild(getNode(doc, "MemberCareer", String
621: .valueOf(memberCareer)));
622: category.appendChild(getNode(doc, "MemberHomepage", String
623: .valueOf(memberHomepage)));
624: category.appendChild(getNode(doc, "MemberYahoo", String
625: .valueOf(memberYahoo)));
626: category.appendChild(getNode(doc, "MemberAol", String
627: .valueOf(memberAol)));
628: category.appendChild(getNode(doc, "MemberIcq", String
629: .valueOf(memberIcq)));
630: category.appendChild(getNode(doc, "MemberMsn", String
631: .valueOf(memberMsn)));
632: category.appendChild(getNode(doc, "MemberCoolLink1", String
633: .valueOf(memberCoolLink1)));
634: category.appendChild(getNode(doc, "MemberCoolLink2", String
635: .valueOf(memberCoolLink2)));
636: }
637:
638: public static Node getNode(Document doc, String childName,
639: String childValue) {
640: Element child = doc.createElement(childName);
641: child.appendChild(doc.createTextNode(childValue));
642: return child;
643: }
644:
645: public String getMemberPassword() {
646: return memberPassword;
647: }
648:
649: public void setMemberPassword(String memberPassword) {
650: this .memberPassword = memberPassword;
651: }
652:
653: public String getMemberTempPassword() {
654: return memberTempPassword;
655: }
656:
657: public void setMemberTempPassword(String memberTempPassword) {
658: this .memberTempPassword = memberTempPassword;
659: }
660: } //end of class MemberBean
|