1 2 package org.objectweb.jac.samples.contacts; 3 4 import java.util.Date ; 5 import java.util.Vector ; 6 import java.util.List ; 7 8 public class Person { 9 String lastName; 10 String firstName; 11 String phone; 12 String notes; 13 Date lastContact; 14 Date contactAgain; 15 16 public Person() { 17 } 18 19 public Person(String lastName, String firstName, String phone, 20 String email) { 21 this.lastName = lastName; 22 this.firstName = firstName; 23 this.phone = phone; 24 this.email = email; 25 } 26 27 public String toString() { 28 return (lastName==null?"":lastName)+" "+(firstName==null?"":firstName); 29 } 30 31 List actions = new Vector (); 32 33 37 public List getActions() { 38 return actions; 39 } 40 41 45 public void addAction(Action action) { 46 actions.add(action); 47 } 48 49 53 public void removeAction(Action action) { 54 actions.remove(action); 55 } 56 57 61 public Date getLastContact() { 62 return lastContact; 63 } 64 65 69 public void setLastContact(Date v) { 70 this.lastContact = v; 71 } 72 73 74 78 public Date getContactAgain() { 79 return contactAgain; 80 } 81 82 86 public void setContactAgain(Date v) { 87 this.contactAgain = v; 88 } 89 90 94 public String getNotes() { 95 return notes; 96 } 97 98 102 public void setNotes(String v) { 103 this.notes = v; 104 } 105 106 110 public void setLastName( String lastName ) { 111 this.lastName = lastName; 112 } 113 114 118 public String getLastName() { 119 return lastName; 120 } 121 122 126 public void setFirstName( String firstName ) { 127 this.firstName = firstName; 128 } 129 130 134 public String getFirstName() { 135 return firstName; 136 } 137 138 142 public void setPhone( String phone ) { 143 this.phone = phone; 144 } 145 146 150 public String getPhone() { 151 return phone; 152 } 153 154 String position; 155 156 160 public String getPosition() { 161 return position; 162 } 163 164 168 public void setPosition(String v) { 169 this.position = v; 170 } 171 172 String email; 173 174 178 public String getEmail() { 179 return email; 180 } 181 182 186 public void setEmail(String v) { 187 this.email = v; 188 } 189 190 191 Company company; 192 193 197 public Company getCompany() { 198 return company; 199 } 200 201 205 public void setCompany(Company v) { 206 this.company = v; 207 } 208 209 boolean mailing; 210 211 215 public boolean isMailing() { 216 return mailing; 217 } 218 219 223 public void setMailing(boolean v) { 224 this.mailing = v; 225 } 226 227 } 228 229 | Popular Tags |