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.TaskManager; 7 import org.enhydra.pim.business.TaskManagerI; 8 import org.enhydra.pim.business.api.OwnerI; 9 import org.enhydra.pim.business.api.TaskI; 10 import org.enhydra.pim.exception.EnhydraPimException; 11 12 import com.lutris.appserver.server.sql.ObjectId; 13 14 15 45 public abstract class TaskManagerBean implements TaskManagerI, javax.ejb.SessionBean { 46 47 private javax.ejb.SessionContext _ctx = null; 48 private TaskManager taskManager = 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 } 61 62 public void ejbPassivate(){ 63 } 65 66 67 public void ejbRemove(){ 68 taskManager = null; 69 } 70 71 public void ejbCreate() throws javax.ejb.CreateException { 72 taskManager = new TaskManager(); 73 } 74 75 76 77 80 public TaskI addTask(TaskI task, OwnerI owner) throws EnhydraPimException { 81 return taskManager.addTask(task, owner); 83 } 84 87 public TaskI findTask(BigDecimal handle) throws EnhydraPimException { 88 return taskManager.findTask(handle); 90 } 91 94 public TaskI findTask(ObjectId oid) throws EnhydraPimException { 95 return taskManager.findTask(oid); 97 } 98 101 public Vector getOwnerTasks(OwnerI owner) throws EnhydraPimException { 102 return taskManager.getOwnerTasks(owner); 104 } 105 108 public void removeTask(TaskI task) throws EnhydraPimException { 109 taskManager.removeTask(task); 110 111 } 112 115 public TaskI updateTask(TaskI task, OwnerI owner) throws EnhydraPimException { 116 return taskManager.updateTask(task, owner); 118 } 119 120 } | Popular Tags |