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.NoteManager; 7 import org.enhydra.pim.business.NoteManagerI; 8 import org.enhydra.pim.business.api.NoteI; 9 import org.enhydra.pim.business.api.OwnerI; 10 import org.enhydra.pim.exception.EnhydraPimException; 11 12 import com.lutris.appserver.server.sql.ObjectId; 13 14 44 public abstract class NoteManagerBean implements NoteManagerI, javax.ejb.SessionBean { 45 46 private javax.ejb.SessionContext _ctx = null; 47 private NoteManager noteManager = 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 noteManager= null; 68 } 69 70 public void ejbCreate() throws javax.ejb.CreateException { 71 noteManager = new NoteManager(); 72 } 73 74 75 78 public NoteI addNote(NoteI note, OwnerI owner) throws EnhydraPimException { 79 return noteManager.addNote( note, owner); 81 } 82 85 public NoteI findNote(BigDecimal handle) throws EnhydraPimException { 86 return noteManager.findNote(handle); 88 } 89 92 public NoteI findNote(ObjectId oid) throws EnhydraPimException { 93 return noteManager.findNote(oid); 95 } 96 99 public Vector getOwnerNotes(OwnerI owner) throws EnhydraPimException { 100 return noteManager.getOwnerNotes(owner); 102 } 103 106 public void removeNote(NoteI note) throws EnhydraPimException { 107 noteManager.removeNote(note); 108 109 } 110 113 public NoteI updateNote(NoteI note, OwnerI owner) throws EnhydraPimException { 114 return noteManager.updateNote(note, owner); 116 } 117 118 119 } | Popular Tags |