1 package org.enhydra.pim.business.base; 2 3 import java.math.BigDecimal ; 4 import java.util.Vector ; 5 import org.enhydra.pim.business.ContactManager; 6 import org.enhydra.pim.business.api.ContactI; 7 import org.enhydra.pim.business.api.OwnerI; 8 import org.enhydra.pim.business.api.PersonI; 9 import org.enhydra.pim.exception.EnhydraPimException; 10 11 16 public class Person extends BasePimImpl implements PersonI ,java.io.Serializable { 17 18 private OwnerI owner = null; 19 20 private String firstname = null; 21 22 private String lastname = null; 23 24 private String nicname = null; 25 26 private String note = null; 27 28 35 public Person(OwnerI owner, String firstname, String lastname, String nicname, String note) { 36 super(null); 37 this.owner = owner; 38 this.firstname = firstname; 39 this.lastname = lastname; 40 this.nicname = nicname; 41 this.note = note; 42 } 43 44 52 public Person(BigDecimal handle, OwnerI owner, String firstname, String lastname, String nicname, String note) { 53 super(handle); 54 this.owner = owner; 55 this.firstname = firstname; 56 this.lastname = lastname; 57 this.nicname = nicname; 58 this.note = note; 59 } 60 61 public void clean() { 62 super.clean(); 63 this.owner = null; 64 this.firstname = null; 65 this.lastname = null; 66 this.nicname = null; 67 this.note = null; 68 } 69 70 76 public void setFirstname(String _firstname) { 77 firstname = _firstname; 78 } 79 80 85 public String getFirstname() { 86 return firstname; 87 } 88 89 95 public void setLastname(String _lastname) { 96 lastname = _lastname; 97 } 98 99 104 public String getLastname() { 105 return lastname; 106 } 107 108 114 public void setNicname(String _nicname) { 115 nicname = _nicname; 116 } 117 118 123 public String getNicname() { 124 return nicname; 125 } 126 127 133 public void setNote(String _note) { 134 note = _note; 135 } 136 137 142 public String getNote() { 143 return note; 144 } 145 146 152 public void setOwner(OwnerI _owner) { 153 this.owner = _owner; 154 } 155 156 161 public OwnerI getOwner() { 162 return this.owner; 163 } 164 165 171 public Vector getContacts() throws EnhydraPimException { 172 ContactManager cMan = new ContactManager(); 173 return cMan.getPersonContacts(this); 174 } 175 176 183 public void addContact(ContactI _contact) throws EnhydraPimException { 184 ContactManager cMan = new ContactManager(); 185 cMan.addContact(_contact,this,_contact.getContact_type()); 186 } 187 188 195 public void removeContact(ContactI _contact) throws EnhydraPimException { 196 ContactManager cMan = new ContactManager(); 197 cMan.removeContact(_contact); 198 199 } 200 201 } | Popular Tags |