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.PersonManager; 7 import org.enhydra.pim.business.PersonManagerI; 8 import org.enhydra.pim.business.api.OwnerI; 9 import org.enhydra.pim.business.api.PersonI; 10 import org.enhydra.pim.exception.EnhydraPimException; 11 12 import com.lutris.appserver.server.sql.ObjectId; 13 14 44 public abstract class PersonManagerBean implements PersonManagerI, javax.ejb.SessionBean { 45 46 private javax.ejb.SessionContext _ctx = null; 47 private PersonManager personManager = null; 48 49 public void setSessionContext(javax.ejb.SessionContext ctx){ 50 _ctx = ctx; 51 } 52 53 public void unsetSessionContext(){ 54 _ctx = null; 55 } 56 57 public void ejbActivate(){ 58 } 60 61 public void ejbPassivate(){ 62 } 64 65 66 public void ejbRemove(){ 67 personManager = null; 68 } 69 70 public void ejbCreate() throws javax.ejb.CreateException { 71 personManager = new PersonManager(); 72 } 73 74 75 78 public PersonI addPerson(PersonI person, OwnerI owner) throws EnhydraPimException { 79 return personManager.addPerson(person, owner); 81 } 82 85 public PersonI findPerson(BigDecimal handle) throws EnhydraPimException { 86 return personManager.findPerson(handle); 88 } 89 92 public PersonI findPerson(ObjectId oid) throws EnhydraPimException { 93 return personManager.findPerson(oid); 95 } 96 99 public Vector findPersonsByQuery(BigDecimal ownerhandle, String firstname, String lastname, String nicname, 100 String note, String contactType, String contactData) throws EnhydraPimException { 101 return personManager.findPersonsByQuery( ownerhandle, firstname, lastname, nicname, 103 note, contactType, contactData); 104 } 105 108 public Vector findPersonsByQuery(OwnerI owner, String firstname, String lastname, String nicname, String note, 109 String contactType, String contactData) throws EnhydraPimException { 110 return personManager.findPersonsByQuery( owner, firstname, lastname, nicname, note, 112 contactType, contactData); 113 } 114 117 public Vector getOwnerPersons(OwnerI owner) throws EnhydraPimException { 118 return personManager.getOwnerPersons( owner); 120 } 121 124 public PersonI newPerson(BigDecimal handle, OwnerI owner, String firstname, String lastname, String nicname, 125 String note){ 126 return personManager.newPerson( handle, owner, firstname, lastname, nicname, note) ; 128 } 129 132 public PersonI newPerson(OwnerI owner, String firstname, String lastname, String nicname, String note){ 133 return personManager.newPerson( owner, firstname, lastname, nicname, note); 135 } 136 139 public void removePerson(PersonI person) throws EnhydraPimException { 140 personManager.removePerson(person); 141 142 } 143 146 public PersonI updatePerson(PersonI person, OwnerI owner) throws EnhydraPimException { 147 return personManager.updatePerson( person, owner); 149 } 150 151 } | Popular Tags |