1 16 package org.apache.cocoon.forms.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 private Boolean enable; 40 41 private Collection contacts = new ArrayList (); 42 private Collection drinks = new ArrayList (); 43 44 47 public Sex getSex() { 48 return sex; 49 } 50 51 54 public void setSex(Sex sex) { 55 this.sex = sex; 56 } 57 58 public Form2Bean() { 59 } 60 61 public String getEmail() { 62 return email; 63 } 64 65 public void setEmail(String email) { 66 this.email = email; 67 } 68 69 public String getPhoneCountry() { 70 return phoneCountry; 71 } 72 73 public void setPhoneCountry(String phoneCountry) { 74 this.phoneCountry = phoneCountry; 75 } 76 77 public String getPhoneZone() { 78 return phoneZone; 79 } 80 81 public void setPhoneZone(String phoneZone) { 82 this.phoneZone = phoneZone; 83 } 84 85 public String getPhoneNumber() { 86 return phoneNumber; 87 } 88 89 public void setPhoneNumber(String phoneNumber) { 90 this.phoneNumber = phoneNumber; 91 } 92 93 public String getIpAddress() { 94 return ipAddress; 95 } 96 97 public void setIpAddress(String ipAddress) { 98 this.ipAddress = ipAddress; 99 } 100 101 public Date getBirthday() { 102 return birthday; 103 } 104 105 public void setBirthday(Date birthday) { 106 this.birthday = birthday; 107 } 108 109 public int getaNumber() { 110 return aNumber; 111 } 112 113 public void setaNumber(int aNumber) { 114 this.aNumber = aNumber; 115 } 116 117 public boolean isChoose() { 118 return choose; 119 } 120 121 public void setChoose(boolean choose) { 122 this.choose = choose; 123 } 124 125 public Boolean getEnable() { 126 return enable; 127 } 128 129 public void setEnable(Boolean enable) { 130 this.enable = enable; 131 } 132 133 public Collection getDrinks() { 134 return drinks; 135 } 136 137 public void setDrinks(Collection drinks) { 138 this.drinks = drinks; 139 } 140 141 public void addDrink(String drink) { 142 drinks.add(drink); 143 } 144 145 public Collection getContacts() { 146 return contacts; 147 } 148 149 public void setContacts(Collection contacts) { 150 this.contacts = contacts; 151 } 152 153 public void addContact(Contact contact) { 154 contacts.add(contact); 155 } 156 157 public String toString() { 158 return "email = " + email + ", phoneCountry = " + phoneCountry + ", phoneZone = " + phoneZone + ", phoneNumber = " + phoneNumber + ", ipAddress = " + ipAddress + ", contacts = " + contacts.toString(); 159 } 160 } 161 | Popular Tags |