1 41 package com.mvnforum.db; 42 43 import java.sql.Date ; 44 import java.sql.Timestamp ; 45 import java.util.Collection ; 46 import java.util.Iterator ; 47 48 import javax.servlet.http.HttpServletRequest ; 49 import javax.servlet.http.HttpServletResponse ; 50 51 import com.mvnforum.MVNForumGlobal; 52 import net.myvietnam.mvncore.security.Encoder; 53 import net.myvietnam.mvncore.service.BinaryStorage; 54 import net.myvietnam.mvncore.util.*; 55 import net.myvietnam.mvncore.web.URLResolverFactory; 56 57 70 public class MemberBean { 71 public static final int MEMBER_STATUS_ENABLE = 0; 72 public static final int MEMBER_STATUS_DISABLE = 1; 73 74 public static final int MEMBER_GENDER_FEMALE = 0; 75 public static final int MEMBER_GENDER_MALE = 1; 76 77 public static final int MEMBER_EMAIL_INVISIBLE = 0; 78 public static final int MEMBER_EMAIL_VISIBLE = 1; 79 80 public static final int MEMBER_NAME_INVISIBLE = 0; 81 public static final int MEMBER_NAME_VISIBLE = 1; 82 83 public static final String MEMBER_ACTIVATECODE_ACTIVATED = "activated"; 84 85 public static final String MEMBER_AVATAR_USING_UPLOAD = "uploaded"; 86 87 private int memberID; 88 private String memberName; 89 private String memberFirstEmail; 90 private String memberEmail; 91 private int memberEmailVisible; 92 private int memberNameVisible; 93 private String memberFirstIP; 94 private String memberLastIP; 95 private int memberViewCount; 96 private int memberPostCount; 97 private Timestamp memberCreationDate; 98 private Timestamp memberModifiedDate; 99 private Timestamp memberExpireDate; 100 private Timestamp memberLastLogon; 101 private int memberOption; 102 private int memberStatus; 103 private String memberActivateCode; 104 private int memberMessageCount; 105 private int memberMessageOption; 106 private int memberPostsPerPage; 107 private int memberWarnCount; 108 private int memberVoteCount; 109 private int memberVoteTotalStars; 110 private int memberRewardPoints; 111 private String memberTitle; 112 private double memberTimeZone; 113 private String memberSignature; 114 private String memberAvatar; 115 private String memberSkin; 116 private String memberLanguage; 117 private String memberFirstname; 118 private String memberLastname; 119 private int memberGender; 120 private Date memberBirthday; 121 private String memberAddress; 122 private String memberCity; 123 private String memberState; 124 private String memberCountry; 125 private String memberPhone; 126 private String memberMobile; 127 private String memberFax; 128 private String memberCareer; 129 private String memberHomepage; 130 private String memberYahoo; 131 private String memberAol; 132 private String memberIcq; 133 private String memberMsn; 134 private String memberCoolLink1; 135 private String memberCoolLink2; 136 137 public int getMemberID() { 138 return memberID; 139 } 140 public void setMemberID(int memberID) { 141 this.memberID = memberID; 142 } 143 144 public String getMemberName() { 145 return memberName; 146 } 147 public void setMemberName(String memberName) { 148 this.memberName = memberName; 149 } 150 151 public String getMemberFirstEmail() { 152 return memberFirstEmail; 153 } 154 public void setMemberFirstEmail(String memberFirstEmail) { 155 this.memberFirstEmail = StringUtil.getEmptyStringIfNull(memberFirstEmail); 156 } 157 158 public String getMemberEmail() { 159 return memberEmail; 160 } 161 public void setMemberEmail(String memberEmail) { 162 this.memberEmail = StringUtil.getEmptyStringIfNull(memberEmail); 163 } 164 165 public int getMemberEmailVisible() { 166 return memberEmailVisible; 167 } 168 public void setMemberEmailVisible(int memberEmailVisible) { 169 this.memberEmailVisible = memberEmailVisible; 170 } 171 172 public int getMemberNameVisible() { 173 return memberNameVisible; 174 } 175 public void setMemberNameVisible(int memberNameVisible) { 176 this.memberNameVisible = memberNameVisible; 177 } 178 179 public String getMemberFirstIP() { 180 return memberFirstIP; 181 } 182 public void setMemberFirstIP(String memberFirstIP) { 183 this.memberFirstIP = StringUtil.getEmptyStringIfNull(memberFirstIP); 184 } 185 186 public String getMemberLastIP() { 187 return memberLastIP; 188 } 189 public void setMemberLastIP(String memberLastIP) { 190 this.memberLastIP = StringUtil.getEmptyStringIfNull(memberLastIP); 191 } 192 193 public int getMemberViewCount() { 194 return memberViewCount; 195 } 196 public void setMemberViewCount(int memberViewCount) { 197 this.memberViewCount = memberViewCount; 198 } 199 200 public int getMemberPostCount() { 201 return memberPostCount; 202 } 203 public void setMemberPostCount(int memberPostCount) { 204 this.memberPostCount = memberPostCount; 205 } 206 207 public Timestamp getMemberCreationDate() { 208 return memberCreationDate; 209 } 210 public void setMemberCreationDate(Timestamp memberCreationDate) { 211 this.memberCreationDate = memberCreationDate; 212 } 213 214 public Timestamp getMemberModifiedDate() { 215 return memberModifiedDate; 216 } 217 public void setMemberModifiedDate(Timestamp memberModifiedDate) { 218 this.memberModifiedDate = memberModifiedDate; 219 } 220 221 public Timestamp getMemberExpireDate() { 222 return memberExpireDate; 223 } 224 public void setMemberExpireDate(Timestamp memberExpireDate) { 225 this.memberExpireDate = memberExpireDate; 226 } 227 228 public Timestamp getMemberLastLogon() { 229 return memberLastLogon; 230 } 231 public void setMemberLastLogon(Timestamp memberLastLogon) { 232 this.memberLastLogon = memberLastLogon; 233 } 234 235 public int getMemberOption() { 236 return memberOption; 237 } 238 public void setMemberOption(int memberOption) { 239 this.memberOption = memberOption; 240 } 241 242 public int getMemberStatus() { 243 return memberStatus; 244 } 245 public void setMemberStatus(int memberStatus) { 246 this.memberStatus = memberStatus; 247 } 248 249 public String getMemberActivateCode() { 250 return memberActivateCode; 251 } 252 public void setMemberActivateCode(String memberActivateCode) { 253 this.memberActivateCode = StringUtil.getEmptyStringIfNull(memberActivateCode); 254 } 255 256 public int getMemberMessageCount() { 257 return memberMessageCount; 258 } 259 public void setMemberMessageCount(int memberMessageCount) { 260 this.memberMessageCount = memberMessageCount; 261 } 262 263 public int getMemberMessageOption() { 264 return memberMessageOption; 265 } 266 public void setMemberMessageOption(int memberMessageOption) { 267 this.memberMessageOption = memberMessageOption; 268 } 269 270 public int getMemberPostsPerPage() { 271 return memberPostsPerPage; 272 } 273 public void setMemberPostsPerPage(int memberPostsPerPage) { 274 this.memberPostsPerPage = memberPostsPerPage; 275 } 276 277 public int getMemberWarnCount() { 278 return memberWarnCount; 279 } 280 public void setMemberWarnCount(int memberWarnCount) { 281 this.memberWarnCount = memberWarnCount; 282 } 283 284 public int getMemberVoteCount() { 285 return memberVoteCount; 286 } 287 public void setMemberVoteCount(int memberVoteCount) { 288 this.memberVoteCount = memberVoteCount; 289 } 290 291 public int getMemberVoteTotalStars() { 292 return memberVoteTotalStars; 293 } 294 public void setMemberVoteTotalStars(int memberVoteTotalStars) { 295 this.memberVoteTotalStars = memberVoteTotalStars; 296 } 297 298 public int getMemberRewardPoints() { 299 return memberRewardPoints; 300 } 301 public void setMemberRewardPoints(int memberRewardPoints) { 302 this.memberRewardPoints = memberRewardPoints; 303 } 304 305 public String getMemberTitle() { 306 return memberTitle; 307 } 308 public void setMemberTitle(String memberTitle) { 309 this.memberTitle = StringUtil.getEmptyStringIfNull(memberTitle); 310 } 311 312 public double getMemberTimeZone() { 313 return memberTimeZone; 314 } 315 public void setMemberTimeZone(double memberTimeZone) { 316 this.memberTimeZone = memberTimeZone; 317 } 318 319 public String getMemberSignature() { 320 return memberSignature; 321 } 322 public void setMemberSignature(String memberSignature) { 323 this.memberSignature = StringUtil.getEmptyStringIfNull(memberSignature); 324 } 325 326 public String getMemberAvatar() { 327 return memberAvatar; 328 } 329 public void setMemberAvatar(String memberAvatar) { 330 this.memberAvatar = StringUtil.getEmptyStringIfNull(memberAvatar); 331 } 332 333 public String getMemberSkin() { 334 return memberSkin; 335 } 336 public void setMemberSkin(String memberSkin) { 337 this.memberSkin = StringUtil.getEmptyStringIfNull(memberSkin); 338 } 339 340 public String getMemberLanguage() { 341 return memberLanguage; 342 } 343 public void setMemberLanguage(String memberLanguage) { 344 this.memberLanguage = StringUtil.getEmptyStringIfNull(memberLanguage); 345 } 346 347 public String getMemberFirstname() { 348 return memberFirstname; 349 } 350 public void setMemberFirstname(String memberFirstname) { 351 this.memberFirstname = StringUtil.getEmptyStringIfNull(memberFirstname); 352 } 353 354 public String getMemberLastname() { 355 return memberLastname; 356 } 357 public void setMemberLastname(String memberLastname) { 358 this.memberLastname = StringUtil.getEmptyStringIfNull(memberLastname); 359 } 360 361 public int getMemberGender() { 362 return memberGender; 363 } 364 public void setMemberGender(int memberGender) { 365 this.memberGender = memberGender; 366 } 367 368 public Date getMemberBirthday() { 369 return memberBirthday; 370 } 371 public void setMemberBirthday(Date memberBirthday) { 372 this.memberBirthday = memberBirthday; 373 } 374 375 public String getMemberAddress() { 376 return memberAddress; 377 } 378 public void setMemberAddress(String memberAddress) { 379 this.memberAddress = StringUtil.getEmptyStringIfNull(memberAddress); 380 } 381 382 public String getMemberCity() { 383 return memberCity; 384 } 385 public void setMemberCity(String memberCity) { 386 this.memberCity = StringUtil.getEmptyStringIfNull(memberCity); 387 } 388 389 public String getMemberState() { 390 return memberState; 391 } 392 public void setMemberState(String memberState) { 393 this.memberState = StringUtil.getEmptyStringIfNull(memberState); 394 } 395 396 public String getMemberCountry() { 397 return memberCountry; 398 } 399 public void setMemberCountry(String memberCountry) { 400 this.memberCountry = StringUtil.getEmptyStringIfNull(memberCountry); 401 } 402 403 public String getMemberPhone() { 404 return memberPhone; 405 } 406 public void setMemberPhone(String memberPhone) { 407 this.memberPhone = StringUtil.getEmptyStringIfNull(memberPhone); 408 } 409 410 public String getMemberMobile() { 411 return memberMobile; 412 } 413 public void setMemberMobile(String memberMobile) { 414 this.memberMobile = StringUtil.getEmptyStringIfNull(memberMobile); 415 } 416 417 public String getMemberFax() { 418 return memberFax; 419 } 420 public void setMemberFax(String memberFax) { 421 this.memberFax = StringUtil.getEmptyStringIfNull(memberFax); 422 } 423 424 public String getMemberCareer() { 425 return memberCareer; 426 } 427 public void setMemberCareer(String memberCareer) { 428 this.memberCareer = StringUtil.getEmptyStringIfNull(memberCareer); 429 } 430 431 public String getMemberHomepage() { 432 return memberHomepage; 433 } 434 public void setMemberHomepage(String memberHomepage) { 435 this.memberHomepage = StringUtil.getEmptyStringIfNull(memberHomepage); 436 } 437 438 public String getMemberYahoo() { 439 return memberYahoo; 440 } 441 public void setMemberYahoo(String memberYahoo) { 442 this.memberYahoo = StringUtil.getEmptyStringIfNull(memberYahoo); 443 } 444 445 public String getMemberAol() { 446 return memberAol; 447 } 448 public void setMemberAol(String memberAol) { 449 this.memberAol = StringUtil.getEmptyStringIfNull(memberAol); 450 } 451 452 public String getMemberIcq() { 453 return memberIcq; 454 } 455 public void setMemberIcq(String memberIcq) { 456 this.memberIcq = StringUtil.getEmptyStringIfNull(memberIcq); 457 } 458 459 public String getMemberMsn() { 460 return memberMsn; 461 } 462 public void setMemberMsn(String memberMsn) { 463 this.memberMsn = StringUtil.getEmptyStringIfNull(memberMsn); 464 } 465 466 public String getMemberCoolLink1() { 467 return memberCoolLink1; 468 } 469 public void setMemberCoolLink1(String memberCoolLink1) { 470 this.memberCoolLink1 = StringUtil.getEmptyStringIfNull(memberCoolLink1); 471 } 472 473 public String getMemberCoolLink2() { 474 return memberCoolLink2; 475 } 476 public void setMemberCoolLink2(String memberCoolLink2) { 477 this.memberCoolLink2 = StringUtil.getEmptyStringIfNull(memberCoolLink2); 478 } 479 480 public String getXML() { 481 StringBuffer xml = new StringBuffer (1024); 482 xml.append("<MemberSection>\n"); 483 xml.append(" <Rows>\n"); 484 xml.append(" <Row>\n"); 485 xml.append(" <Column>\n"); 486 xml.append(" <Name>MemberID</Name>\n"); 487 xml.append(" <Value>").append(String.valueOf(memberID)).append("</Value>\n"); 488 xml.append(" </Column>\n"); 489 xml.append(" <Column>\n"); 490 xml.append(" <Name>MemberName</Name>\n"); 491 xml.append(" <Value>").append(String.valueOf(memberName)).append("</Value>\n"); 492 xml.append(" </Column>\n"); 493 xml.append(" <Column>\n"); 494 xml.append(" <Name>MemberFirstEmail</Name>\n"); 495 xml.append(" <Value>").append(String.valueOf(memberFirstEmail)).append("</Value>\n"); 496 xml.append(" </Column>\n"); 497 xml.append(" <Column>\n"); 498 xml.append(" <Name>MemberEmail</Name>\n"); 499 xml.append(" <Value>").append(String.valueOf(memberEmail)).append("</Value>\n"); 500 xml.append(" </Column>\n"); 501 xml.append(" <Column>\n"); 502 xml.append(" <Name>MemberEmailVisible</Name>\n"); 503 xml.append(" <Value>").append(String.valueOf(memberEmailVisible)).append("</Value>\n"); 504 xml.append(" </Column>\n"); 505 xml.append(" <Column>\n"); 506 xml.append(" <Name>MemberNameVisible</Name>\n"); 507 xml.append(" <Value>").append(String.valueOf(memberNameVisible)).append("</Value>\n"); 508 xml.append(" </Column>\n"); 509 xml.append(" <Column>\n"); 510 xml.append(" <Name>MemberFirstIP</Name>\n"); 511 xml.append(" <Value>").append(String.valueOf(memberFirstIP)).append("</Value>\n"); 512 xml.append(" </Column>\n"); 513 xml.append(" <Column>\n"); 514 xml.append(" <Name>MemberLastIP</Name>\n"); 515 xml.append(" <Value>").append(String.valueOf(memberLastIP)).append("</Value>\n"); 516 xml.append(" </Column>\n"); 517 xml.append(" <Column>\n"); 518 xml.append(" <Name>MemberViewCount</Name>\n"); 519 xml.append(" <Value>").append(String.valueOf(memberViewCount)).append("</Value>\n"); 520 xml.append(" </Column>\n"); 521 xml.append(" <Column>\n"); 522 xml.append(" <Name>MemberPostCount</Name>\n"); 523 xml.append(" <Value>").append(String.valueOf(memberPostCount)).append("</Value>\n"); 524 xml.append(" </Column>\n"); 525 xml.append(" <Column>\n"); 526 xml.append(" <Name>MemberCreationDate</Name>\n"); 527 xml.append(" <Value>").append(String.valueOf(memberCreationDate)).append("</Value>\n"); 528 xml.append(" </Column>\n"); 529 xml.append(" <Column>\n"); 530 xml.append(" <Name>MemberModifiedDate</Name>\n"); 531 xml.append(" <Value>").append(String.valueOf(memberModifiedDate)).append("</Value>\n"); 532 xml.append(" </Column>\n"); 533 xml.append(" <Column>\n"); 534 xml.append(" <Name>MemberExpireDate</Name>\n"); 535 xml.append(" <Value>").append(String.valueOf(memberExpireDate)).append("</Value>\n"); 536 xml.append(" </Column>\n"); 537 xml.append(" <Column>\n"); 538 xml.append(" <Name>MemberLastLogon</Name>\n"); 539 xml.append(" <Value>").append(String.valueOf(memberLastLogon)).append("</Value>\n"); 540 xml.append(" </Column>\n"); 541 xml.append(" <Column>\n"); 542 xml.append(" <Name>MemberOption</Name>\n"); 543 xml.append(" <Value>").append(String.valueOf(memberOption)).append("</Value>\n"); 544 xml.append(" </Column>\n"); 545 xml.append(" <Column>\n"); 546 xml.append(" <Name>MemberStatus</Name>\n"); 547 xml.append(" <Value>").append(String.valueOf(memberStatus)).append("</Value>\n"); 548 xml.append(" </Column>\n"); 549 xml.append(" <Column>\n"); 550 xml.append(" <Name>MemberActivateCode</Name>\n"); 551 xml.append(" <Value>").append(String.valueOf(memberActivateCode)).append("</Value>\n"); 552 xml.append(" </Column>\n"); 553 xml.append(" <Column>\n"); 554 xml.append(" <Name>MemberMessageCount</Name>\n"); 555 xml.append(" <Value>").append(String.valueOf(memberMessageCount)).append("</Value>\n"); 556 xml.append(" </Column>\n"); 557 xml.append(" <Column>\n"); 558 xml.append(" <Name>MemberMessageOption</Name>\n"); 559 xml.append(" <Value>").append(String.valueOf(memberMessageOption)).append("</Value>\n"); 560 xml.append(" </Column>\n"); 561 xml.append(" <Column>\n"); 562 xml.append(" <Name>MemberPostsPerPage</Name>\n"); 563 xml.append(" <Value>").append(String.valueOf(memberPostsPerPage)).append("</Value>\n"); 564 xml.append(" </Column>\n"); 565 xml.append(" <Column>\n"); 566 xml.append(" <Name>MemberWarnCount</Name>\n"); 567 xml.append(" <Value>").append(String.valueOf(memberWarnCount)).append("</Value>\n"); 568 xml.append(" </Column>\n"); 569 xml.append(" <Column>\n"); 570 xml.append(" <Name>MemberVoteCount</Name>\n"); 571 xml.append(" <Value>").append(String.valueOf(memberVoteCount)).append("</Value>\n"); 572 xml.append(" </Column>\n"); 573 xml.append(" <Column>\n"); 574 xml.append(" <Name>MemberVoteTotalStars</Name>\n"); 575 xml.append(" <Value>").append(String.valueOf(memberVoteTotalStars)).append("</Value>\n"); 576 xml.append(" </Column>\n"); 577 xml.append(" <Column>\n"); 578 xml.append(" <Name>MemberRewardPoints</Name>\n"); 579 xml.append(" <Value>").append(String.valueOf(memberRewardPoints)).append("</Value>\n"); 580 xml.append(" </Column>\n"); 581 xml.append(" <Column>\n"); 582 xml.append(" <Name>MemberTitle</Name>\n"); 583 xml.append(" <Value>").append(String.valueOf(memberTitle)).append("</Value>\n"); 584 xml.append(" </Column>\n"); 585 xml.append(" <Column>\n"); 586 xml.append(" <Name>MemberTimeZone</Name>\n"); 587 xml.append(" <Value>").append(String.valueOf(memberTimeZone)).append("</Value>\n"); 588 xml.append(" </Column>\n"); 589 xml.append(" <Column>\n"); 590 xml.append(" <Name>MemberSignature</Name>\n"); 591 xml.append(" <Value>").append(String.valueOf(memberSignature)).append("</Value>\n"); 592 xml.append(" </Column>\n"); 593 xml.append(" <Column>\n"); 594 xml.append(" <Name>MemberAvatar</Name>\n"); 595 xml.append(" <Value>").append(String.valueOf(memberAvatar)).append("</Value>\n"); 596 xml.append(" </Column>\n"); 597 xml.append(" <Column>\n"); 598 xml.append(" <Name>MemberSkin</Name>\n"); 599 xml.append(" <Value>").append(String.valueOf(memberSkin)).append("</Value>\n"); 600 xml.append(" </Column>\n"); 601 xml.append(" <Column>\n"); 602 xml.append(" <Name>MemberLanguage</Name>\n"); 603 xml.append(" <Value>").append(String.valueOf(memberLanguage)).append("</Value>\n"); 604 xml.append(" </Column>\n"); 605 xml.append(" <Column>\n"); 606 xml.append(" <Name>MemberFirstname</Name>\n"); 607 xml.append(" <Value>").append(String.valueOf(memberFirstname)).append("</Value>\n"); 608 xml.append(" </Column>\n"); 609 xml.append(" <Column>\n"); 610 xml.append(" <Name>MemberLastname</Name>\n"); 611 xml.append(" <Value>").append(String.valueOf(memberLastname)).append("</Value>\n"); 612 xml.append(" </Column>\n"); 613 xml.append(" <Column>\n"); 614 xml.append(" <Name>MemberGender</Name>\n"); 615 xml.append(" <Value>").append(String.valueOf(memberGender)).append("</Value>\n"); 616 xml.append(" </Column>\n"); 617 xml.append(" <Column>\n"); 618 xml.append(" <Name>MemberBirthday</Name>\n"); 619 xml.append(" <Value>").append(String.valueOf(memberBirthday)).append("</Value>\n"); 620 xml.append(" </Column>\n"); 621 xml.append(" <Column>\n"); 622 xml.append(" <Name>MemberAddress</Name>\n"); 623 xml.append(" <Value>").append(String.valueOf(memberAddress)).append("</Value>\n"); 624 xml.append(" </Column>\n"); 625 xml.append(" <Column>\n"); 626 xml.append(" <Name>MemberCity</Name>\n"); 627 xml.append(" <Value>").append(String.valueOf(memberCity)).append("</Value>\n"); 628 xml.append(" </Column>\n"); 629 xml.append(" <Column>\n"); 630 xml.append(" <Name>MemberState</Name>\n"); 631 xml.append(" <Value>").append(String.valueOf(memberState)).append("</Value>\n"); 632 xml.append(" </Column>\n"); 633 xml.append(" <Column>\n"); 634 xml.append(" <Name>MemberCountry</Name>\n"); 635 xml.append(" <Value>").append(String.valueOf(memberCountry)).append("</Value>\n"); 636 xml.append(" </Column>\n"); 637 xml.append(" <Column>\n"); 638 xml.append(" <Name>MemberPhone</Name>\n"); 639 xml.append(" <Value>").append(String.valueOf(memberPhone)).append("</Value>\n"); 640 xml.append(" </Column>\n"); 641 xml.append(" <Column>\n"); 642 xml.append(" <Name>MemberMobile</Name>\n"); 643 xml.append(" <Value>").append(String.valueOf(memberMobile)).append("</Value>\n"); 644 xml.append(" </Column>\n"); 645 xml.append(" <Column>\n"); 646 xml.append(" <Name>MemberFax</Name>\n"); 647 xml.append(" <Value>").append(String.valueOf(memberFax)).append("</Value>\n"); 648 xml.append(" </Column>\n"); 649 xml.append(" <Column>\n"); 650 xml.append(" <Name>MemberCareer</Name>\n"); 651 xml.append(" <Value>").append(String.valueOf(memberCareer)).append("</Value>\n"); 652 xml.append(" </Column>\n"); 653 xml.append(" <Column>\n"); 654 xml.append(" <Name>MemberHomepage</Name>\n"); 655 xml.append(" <Value>").append(String.valueOf(memberHomepage)).append("</Value>\n"); 656 xml.append(" </Column>\n"); 657 xml.append(" <Column>\n"); 658 xml.append(" <Name>MemberYahoo</Name>\n"); 659 xml.append(" <Value>").append(String.valueOf(memberYahoo)).append("</Value>\n"); 660 xml.append(" </Column>\n"); 661 xml.append(" <Column>\n"); 662 xml.append(" <Name>MemberAol</Name>\n"); 663 xml.append(" <Value>").append(String.valueOf(memberAol)).append("</Value>\n"); 664 xml.append(" </Column>\n"); 665 xml.append(" <Column>\n"); 666 xml.append(" <Name>MemberIcq</Name>\n"); 667 xml.append(" <Value>").append(String.valueOf(memberIcq)).append("</Value>\n"); 668 xml.append(" </Column>\n"); 669 xml.append(" <Column>\n"); 670 xml.append(" <Name>MemberMsn</Name>\n"); 671 xml.append(" <Value>").append(String.valueOf(memberMsn)).append("</Value>\n"); 672 xml.append(" </Column>\n"); 673 xml.append(" <Column>\n"); 674 xml.append(" <Name>MemberCoolLink1</Name>\n"); 675 xml.append(" <Value>").append(String.valueOf(memberCoolLink1)).append("</Value>\n"); 676 xml.append(" </Column>\n"); 677 xml.append(" <Column>\n"); 678 xml.append(" <Name>MemberCoolLink2</Name>\n"); 679 xml.append(" <Value>").append(String.valueOf(memberCoolLink2)).append("</Value>\n"); 680 xml.append(" </Column>\n"); 681 xml.append(" </Row>\n"); 682 xml.append(" </Rows>\n"); 683 xml.append("</MemberSection>\n"); 684 return xml.toString(); 685 } 686 687 public static String getXML(Collection objMemberBeans) { 688 StringBuffer xml = new StringBuffer (1024); 689 Iterator iterator = objMemberBeans.iterator(); 690 xml.append("<MemberSection>\n"); 691 xml.append(" <Rows>\n"); 692 while (iterator.hasNext()) { 693 MemberBean objMemberBean = (MemberBean)iterator.next(); 694 xml.append(" <Row>\n"); 695 xml.append(" <Column>\n"); 696 xml.append(" <Name>MemberID</Name>\n"); 697 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberID)).append("</Value>\n"); 698 xml.append(" </Column>\n"); 699 xml.append(" <Column>\n"); 700 xml.append(" <Name>MemberName</Name>\n"); 701 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberName)).append("</Value>\n"); 702 xml.append(" </Column>\n"); 703 xml.append(" <Column>\n"); 704 xml.append(" <Name>MemberFirstEmail</Name>\n"); 705 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberFirstEmail)).append("</Value>\n"); 706 xml.append(" </Column>\n"); 707 xml.append(" <Column>\n"); 708 xml.append(" <Name>MemberEmail</Name>\n"); 709 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberEmail)).append("</Value>\n"); 710 xml.append(" </Column>\n"); 711 xml.append(" <Column>\n"); 712 xml.append(" <Name>MemberEmailVisible</Name>\n"); 713 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberEmailVisible)).append("</Value>\n"); 714 xml.append(" </Column>\n"); 715 xml.append(" <Column>\n"); 716 xml.append(" <Name>MemberNameVisible</Name>\n"); 717 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberNameVisible)).append("</Value>\n"); 718 xml.append(" </Column>\n"); 719 xml.append(" <Column>\n"); 720 xml.append(" <Name>MemberFirstIP</Name>\n"); 721 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberFirstIP)).append("</Value>\n"); 722 xml.append(" </Column>\n"); 723 xml.append(" <Column>\n"); 724 xml.append(" <Name>MemberLastIP</Name>\n"); 725 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberLastIP)).append("</Value>\n"); 726 xml.append(" </Column>\n"); 727 xml.append(" <Column>\n"); 728 xml.append(" <Name>MemberViewCount</Name>\n"); 729 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberViewCount)).append("</Value>\n"); 730 xml.append(" </Column>\n"); 731 xml.append(" <Column>\n"); 732 xml.append(" <Name>MemberPostCount</Name>\n"); 733 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberPostCount)).append("</Value>\n"); 734 xml.append(" </Column>\n"); 735 xml.append(" <Column>\n"); 736 xml.append(" <Name>MemberCreationDate</Name>\n"); 737 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberCreationDate)).append("</Value>\n"); 738 xml.append(" </Column>\n"); 739 xml.append(" <Column>\n"); 740 xml.append(" <Name>MemberModifiedDate</Name>\n"); 741 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberModifiedDate)).append("</Value>\n"); 742 xml.append(" </Column>\n"); 743 xml.append(" <Column>\n"); 744 xml.append(" <Name>MemberExpireDate</Name>\n"); 745 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberExpireDate)).append("</Value>\n"); 746 xml.append(" </Column>\n"); 747 xml.append(" <Column>\n"); 748 xml.append(" <Name>MemberLastLogon</Name>\n"); 749 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberLastLogon)).append("</Value>\n"); 750 xml.append(" </Column>\n"); 751 xml.append(" <Column>\n"); 752 xml.append(" <Name>MemberOption</Name>\n"); 753 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberOption)).append("</Value>\n"); 754 xml.append(" </Column>\n"); 755 xml.append(" <Column>\n"); 756 xml.append(" <Name>MemberStatus</Name>\n"); 757 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberStatus)).append("</Value>\n"); 758 xml.append(" </Column>\n"); 759 xml.append(" <Column>\n"); 760 xml.append(" <Name>MemberActivateCode</Name>\n"); 761 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberActivateCode)).append("</Value>\n"); 762 xml.append(" </Column>\n"); 763 xml.append(" <Column>\n"); 764 xml.append(" <Name>MemberMessageCount</Name>\n"); 765 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberMessageCount)).append("</Value>\n"); 766 xml.append(" </Column>\n"); 767 xml.append(" <Column>\n"); 768 xml.append(" <Name>MemberMessageOption</Name>\n"); 769 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberMessageOption)).append("</Value>\n"); 770 xml.append(" </Column>\n"); 771 xml.append(" <Column>\n"); 772 xml.append(" <Name>MemberPostsPerPage</Name>\n"); 773 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberPostsPerPage)).append("</Value>\n"); 774 xml.append(" </Column>\n"); 775 xml.append(" <Column>\n"); 776 xml.append(" <Name>MemberWarnCount</Name>\n"); 777 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberWarnCount)).append("</Value>\n"); 778 xml.append(" </Column>\n"); 779 xml.append(" <Column>\n"); 780 xml.append(" <Name>MemberVoteCount</Name>\n"); 781 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberVoteCount)).append("</Value>\n"); 782 xml.append(" </Column>\n"); 783 xml.append(" <Column>\n"); 784 xml.append(" <Name>MemberVoteTotalStars</Name>\n"); 785 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberVoteTotalStars)).append("</Value>\n"); 786 xml.append(" </Column>\n"); 787 xml.append(" <Column>\n"); 788 xml.append(" <Name>MemberRewardPoints</Name>\n"); 789 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberRewardPoints)).append("</Value>\n"); 790 xml.append(" </Column>\n"); 791 xml.append(" <Column>\n"); 792 xml.append(" <Name>MemberTitle</Name>\n"); 793 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberTitle)).append("</Value>\n"); 794 xml.append(" </Column>\n"); 795 xml.append(" <Column>\n"); 796 xml.append(" <Name>MemberTimeZone</Name>\n"); 797 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberTimeZone)).append("</Value>\n"); 798 xml.append(" </Column>\n"); 799 xml.append(" <Column>\n"); 800 xml.append(" <Name>MemberSignature</Name>\n"); 801 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberSignature)).append("</Value>\n"); 802 xml.append(" </Column>\n"); 803 xml.append(" <Column>\n"); 804 xml.append(" <Name>MemberAvatar</Name>\n"); 805 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberAvatar)).append("</Value>\n"); 806 xml.append(" </Column>\n"); 807 xml.append(" <Column>\n"); 808 xml.append(" <Name>MemberSkin</Name>\n"); 809 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberSkin)).append("</Value>\n"); 810 xml.append(" </Column>\n"); 811 xml.append(" <Column>\n"); 812 xml.append(" <Name>MemberLanguage</Name>\n"); 813 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberLanguage)).append("</Value>\n"); 814 xml.append(" </Column>\n"); 815 xml.append(" <Column>\n"); 816 xml.append(" <Name>MemberFirstname</Name>\n"); 817 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberFirstname)).append("</Value>\n"); 818 xml.append(" </Column>\n"); 819 xml.append(" <Column>\n"); 820 xml.append(" <Name>MemberLastname</Name>\n"); 821 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberLastname)).append("</Value>\n"); 822 xml.append(" </Column>\n"); 823 xml.append(" <Column>\n"); 824 xml.append(" <Name>MemberGender</Name>\n"); 825 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberGender)).append("</Value>\n"); 826 xml.append(" </Column>\n"); 827 xml.append(" <Column>\n"); 828 xml.append(" <Name>MemberBirthday</Name>\n"); 829 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberBirthday)).append("</Value>\n"); 830 xml.append(" </Column>\n"); 831 xml.append(" <Column>\n"); 832 xml.append(" <Name>MemberAddress</Name>\n"); 833 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberAddress)).append("</Value>\n"); 834 xml.append(" </Column>\n"); 835 xml.append(" <Column>\n"); 836 xml.append(" <Name>MemberCity</Name>\n"); 837 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberCity)).append("</Value>\n"); 838 xml.append(" </Column>\n"); 839 xml.append(" <Column>\n"); 840 xml.append(" <Name>MemberState</Name>\n"); 841 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberState)).append("</Value>\n"); 842 xml.append(" </Column>\n"); 843 xml.append(" <Column>\n"); 844 xml.append(" <Name>MemberCountry</Name>\n"); 845 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberCountry)).append("</Value>\n"); 846 xml.append(" </Column>\n"); 847 xml.append(" <Column>\n"); 848 xml.append(" <Name>MemberPhone</Name>\n"); 849 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberPhone)).append("</Value>\n"); 850 xml.append(" </Column>\n"); 851 xml.append(" <Column>\n"); 852 xml.append(" <Name>MemberMobile</Name>\n"); 853 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberMobile)).append("</Value>\n"); 854 xml.append(" </Column>\n"); 855 xml.append(" <Column>\n"); 856 xml.append(" <Name>MemberFax</Name>\n"); 857 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberFax)).append("</Value>\n"); 858 xml.append(" </Column>\n"); 859 xml.append(" <Column>\n"); 860 xml.append(" <Name>MemberCareer</Name>\n"); 861 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberCareer)).append("</Value>\n"); 862 xml.append(" </Column>\n"); 863 xml.append(" <Column>\n"); 864 xml.append(" <Name>MemberHomepage</Name>\n"); 865 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberHomepage)).append("</Value>\n"); 866 xml.append(" </Column>\n"); 867 xml.append(" <Column>\n"); 868 xml.append(" <Name>MemberYahoo</Name>\n"); 869 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberYahoo)).append("</Value>\n"); 870 xml.append(" </Column>\n"); 871 xml.append(" <Column>\n"); 872 xml.append(" <Name>MemberAol</Name>\n"); 873 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberAol)).append("</Value>\n"); 874 xml.append(" </Column>\n"); 875 xml.append(" <Column>\n"); 876 xml.append(" <Name>MemberIcq</Name>\n"); 877 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberIcq)).append("</Value>\n"); 878 xml.append(" </Column>\n"); 879 xml.append(" <Column>\n"); 880 xml.append(" <Name>MemberMsn</Name>\n"); 881 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberMsn)).append("</Value>\n"); 882 xml.append(" </Column>\n"); 883 xml.append(" <Column>\n"); 884 xml.append(" <Name>MemberCoolLink1</Name>\n"); 885 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberCoolLink1)).append("</Value>\n"); 886 xml.append(" </Column>\n"); 887 xml.append(" <Column>\n"); 888 xml.append(" <Name>MemberCoolLink2</Name>\n"); 889 xml.append(" <Value>").append(String.valueOf(objMemberBean.memberCoolLink2)).append("</Value>\n"); 890 xml.append(" </Column>\n"); 891 xml.append(" </Row>\n"); 892 } xml.append(" </Rows>\n"); 894 xml.append("</MemberSection>\n"); 895 return xml.toString(); 896 } 897 898 903 public String getMemberGenderString() { 904 if (memberGender == 1) return "Male"; 905 return "Female"; 906 } 907 908 public String getMemberAvatar_processed(HttpServletRequest request, HttpServletResponse response) { 909 if (memberAvatar.length() == 0) { return ""; 911 } 912 String retMemberAvatar = memberAvatar; 913 if (retMemberAvatar.equals(MemberBean.MEMBER_AVATAR_USING_UPLOAD) || 914 retMemberAvatar.startsWith(BinaryStorage.BINARY_STORAGE)|| 915 retMemberAvatar.startsWith(MVNForumGlobal.UPLOADED_AVATAR_DIR)) { 916 retMemberAvatar = "getavatar?memberid=" + memberID; 918 retMemberAvatar = URLResolverFactory.getURLResolver().encodeURL(request, response, retMemberAvatar); 919 } else { 920 if (memberAvatar.startsWith("/mvnplugin")) { 922 retMemberAvatar = ParamUtil.getContextPath() + memberAvatar; 924 } 925 } 926 return retMemberAvatar; 927 } 928 929 public String getMemberHomepage_http() { 930 if (memberHomepage == null) memberHomepage = ""; 931 return Encoder.filterUrl(memberHomepage); 932 939 } 940 941 public String getMemberCoolLink1_http() { 942 if (memberCoolLink1 == null) memberCoolLink1 = ""; 943 return Encoder.filterUrl(memberCoolLink1); 944 951 } 952 953 public String getMemberCoolLink2_http() { 954 if (memberCoolLink2 == null) memberCoolLink2 = ""; 955 return Encoder.filterUrl(memberCoolLink2); 956 963 } 964 965 public String getMemberCreationDate_short() { 966 return DateUtil.getDateDDMMYYYY(memberCreationDate); 967 } 968 969 public String getMemberExpireDate_short() { 970 return DateUtil.getDateDDMMYYYY(memberExpireDate); 971 } 972 973 public boolean isInvisible() { 974 return (this.memberNameVisible == MEMBER_NAME_INVISIBLE); 975 } 976 977 public boolean showEmail() { 978 return (this.memberEmailVisible == MEMBER_EMAIL_VISIBLE); 979 } 980 981 public void init() { 982 Timestamp now = DateUtil.getCurrentGMTTimestamp(); 984 setMemberName(""); 985 setMemberEmail(""); 986 setMemberEmailVisible(MEMBER_EMAIL_INVISIBLE); 987 setMemberNameVisible(MEMBER_NAME_VISIBLE); 988 setMemberViewCount(0); 989 setMemberPostCount(0); 990 setMemberCreationDate(now); 991 setMemberLastLogon(now); 992 setMemberOption(0); 993 setMemberStatus(MEMBER_STATUS_ENABLE); 994 setMemberWarnCount(0); 995 setMemberVoteCount(0); 996 setMemberVoteTotalStars(0); 997 setMemberRewardPoints(0); 998 setMemberTitle(""); 999 setMemberSignature(""); 1000 setMemberAvatar(""); 1001 setMemberFirstname(""); 1002 setMemberLastname(""); 1003 setMemberGender(MEMBER_GENDER_MALE); 1004 setMemberBirthday(new java.sql.Date (0)); 1005 setMemberAddress(""); 1006 setMemberCity(""); 1007 setMemberState(""); 1008 setMemberCountry(""); 1009 setMemberPhone(""); 1010 setMemberMobile(""); 1011 setMemberFax(""); 1012 setMemberCareer(""); 1013 setMemberHomepage(""); 1014 setMemberYahoo(""); 1015 setMemberAol(""); 1016 setMemberIcq(""); 1017 setMemberMsn(""); 1018 setMemberCoolLink1(""); 1019 setMemberCoolLink2(""); 1020 setMemberActivateCode(""); 1021 1022 } 1023} 1025 1026 | Popular Tags |