1 16 package org.apache.cocoon.woody.samples; 17 18 import java.util.ArrayList ; 19 import java.util.Collection ; 20 import java.util.Date ; 21 22 27 public class Form2Bean { 28 private String email; 29 30 private String phoneCountry; 31 private String phoneZone; 32 private String phoneNumber; 33 34 private String ipAddress; 35 private Date birthday; 36 private int aNumber; 37 private boolean choose; 38 private Sex sex; 39 40 private Collection contacts = new ArrayList (); 41 private Collection drinks = new ArrayList (); 42 43 46 public Sex getSex() { 47 return sex; 48 } 49 50 53 public void setSex(Sex sex) { 54 this.sex = sex; 55 } 56 57 public Form2Bean() { 58 } 59 60 public String getEmail() { 61 return email; 62 } 63 64 public void setEmail(String email) { 65 this.email = email; 66 } 67 68 public String getPhoneCountry() { 69 return phoneCountry; 70 } 71 72 public void setPhoneCountry(String phoneCountry) { 73 this.phoneCountry = phoneCountry; 74 } 75 76 public String getPhoneZone() { 77 return phoneZone; 78 } 79 80 public void setPhoneZone(String phoneZone) { 81 this.phoneZone = phoneZone; 82 } 83 84 public String getPhoneNumber() { 85 return phoneNumber; 86 } 87 88 public void setPhoneNumber(String phoneNumber) { 89 this.phoneNumber = phoneNumber; 90 } 91 92 public String getIpAddress() { 93 return ipAddress; 94 } 95 96 public void setIpAddress(String ipAddress) { 97 this.ipAddress = ipAddress; 98 } 99 100 public Date getBirthday() { 101 return birthday; 102 } 103 104 public void setBirthday(Date birthday) { 105 this.birthday = birthday; 106 } 107 108 public int getaNumber() { 109 return aNumber; 110 } 111 112 public void setaNumber(int aNumber) { 113 this.aNumber = aNumber; 114 } 115 116 public boolean isChoose() { 117 return choose; 118 } 119 120 public void setChoose(boolean choose) { 121 this.choose = choose; 122 } 123 124 public Collection getDrinks() { 125 return drinks; 126 } 127 128 public void setDrinks(Collection drinks) { 129 this.drinks = drinks; 130 } 131 132 public void addDrink(String drink) { 133 drinks.add(drink); 134 } 135 136 public Collection getContacts() { 137 return contacts; 138 } 139 140 public void setContacts(Collection contacts) { 141 this.contacts = contacts; 142 } 143 144 public void addContact(Contact contact) { 145 contacts.add(contact); 146 } 147 148 public String toString() { 149 return "email = " + email + ", phoneCountry = " + phoneCountry + ", phoneZone = " + phoneZone + ", phoneNumber = " + phoneNumber + ", ipAddress = " + ipAddress + ", contacts = " + contacts.toString(); 150 } 151 } 152 | Popular Tags |