1 package org.enhydra.pim.ejb.session; 2 3 import java.math.BigDecimal ; 4 import java.util.Vector ; 5 6 import org.enhydra.pim.business.ContactManager; 7 import org.enhydra.pim.business.ContactManagerI; 8 import org.enhydra.pim.business.api.ContactI; 9 import org.enhydra.pim.business.api.ContactTypeI; 10 import org.enhydra.pim.business.api.PersonI; 11 import org.enhydra.pim.exception.EnhydraPimException; 12 13 import com.lutris.appserver.server.sql.ObjectId; 14 15 45 public abstract class ContactManagerBean implements ContactManagerI, javax.ejb.SessionBean { 46 47 private javax.ejb.SessionContext _ctx = null; 48 private ContactManagerI contactManager = null; 49 50 public void setSessionContext(javax.ejb.SessionContext ctx){ 51 _ctx = ctx; 52 } 53 54 public void unsetSessionContext(){ 55 _ctx = null; 56 } 57 58 public void ejbActivate(){ 59 } 60 61 public void ejbPassivate(){ 62 } 63 64 65 public void ejbRemove(){ 66 contactManager= null; 67 } 68 69 public void ejbCreate() throws javax.ejb.CreateException { 70 contactManager = new ContactManager(); 71 } 72 73 public ContactI newContact(String contact_data, ContactTypeI contact_type, PersonI person, String note) { 74 return contactManager.newContact(contact_data, contact_type, person, note); 75 } 76 77 public ContactI newContact(BigDecimal handle, String contact_data, ContactTypeI contact_type, PersonI person, String note) { 78 return contactManager.newContact(handle, contact_data, contact_type, person, note); 79 } 80 81 public ContactI addContact(ContactI contact, PersonI person, ContactTypeI cType) throws EnhydraPimException { 82 return contactManager.addContact(contact, person, cType); 83 } 84 85 public ContactI updateContact(ContactI contact) throws EnhydraPimException { 86 return contactManager.updateContact(contact); 87 } 88 89 public Vector getPersonContacts(PersonI person) throws EnhydraPimException { 90 return contactManager.getPersonContacts(person); 91 } 92 93 public void removeContact(ContactI contact) throws EnhydraPimException { 94 contactManager.removeContact(contact); 95 96 } 97 98 public ContactI findContact(ObjectId oid) throws EnhydraPimException { 99 return contactManager.findContact(oid); 100 } 101 102 public ContactI findContact(BigDecimal handle) throws EnhydraPimException { 103 return contactManager.findContact(handle); 104 } 105 106 } | Popular Tags |