1 22 package org.jboss.test.cmp2.fkmapping.ejb; 23 24 import javax.ejb.EntityContext ; 25 import javax.ejb.EntityBean ; 26 import javax.ejb.EJBException ; 27 import javax.ejb.RemoveException ; 28 import javax.ejb.CreateException ; 29 import java.rmi.RemoteException ; 30 import java.util.Collection ; 31 32 49 public abstract class InstituteEntityBean 50 implements EntityBean 51 { 52 private EntityContext ctx; 54 55 62 public abstract String getInstituteId(); 63 public abstract void setInstituteId(String instituteId); 64 65 70 public abstract String getDescription(); 71 public abstract void setDescription(String description); 72 73 80 public abstract Collection getDepartments(); 81 84 public abstract void setDepartments(Collection departments); 85 86 90 public InstitutePK ejbCreate(String instituteId, String descr) 91 throws CreateException 92 { 93 setInstituteId(instituteId); 94 setDescription(descr); 95 return null; 96 } 97 98 public void ejbPostCreate(String instituteId, String descr) {} 99 100 public void ejbActivate() throws EJBException , RemoteException {} 101 public void ejbLoad() throws EJBException , RemoteException {} 102 public void ejbPassivate() throws EJBException , RemoteException {} 103 public void ejbRemove() throws RemoveException , EJBException , RemoteException {} 104 public void ejbStore() throws EJBException , RemoteException {} 105 public void setEntityContext(EntityContext ctx) throws EJBException , RemoteException 106 { 107 this.ctx = ctx; 108 } 109 public void unsetEntityContext() throws EJBException , RemoteException 110 { 111 this.ctx = null; 112 } 113 } 114 | Popular Tags |