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 DepartmentEntityBean 50 implements EntityBean 51 { 52 private EntityContext ctx; 54 55 62 public abstract String getDepartmentCode(); 63 public abstract void setDepartmentCode(String deptCode); 64 65 71 public abstract String getDepartmentCode2(); 72 public abstract void setDepartmentCode2(String deptCode); 73 74 79 public abstract String getDescription(); 80 public abstract void setDescription(String description); 81 82 92 public abstract InstituteLocal getInstitute(); 93 96 public abstract void setInstitute(InstituteLocal institute); 97 98 104 public abstract Collection getGroups(); 105 108 public abstract void setGroups(Collection groups); 109 110 116 public abstract Collection getStudents(); 117 120 public abstract void setStudents(Collection students); 121 122 126 public DepartmentPK ejbCreate(String deptCode, String descr) 127 throws CreateException 128 { 129 setDepartmentCode(deptCode); 130 setDepartmentCode2("X"+deptCode); 131 setDescription(descr); 132 return null; 133 } 134 135 public void ejbPostCreate(String deptCode, String descr) {} 136 137 public void ejbActivate() throws EJBException , RemoteException {} 138 public void ejbLoad() throws EJBException , RemoteException {} 139 public void ejbPassivate() throws EJBException , RemoteException {} 140 public void ejbRemove() throws RemoveException , EJBException , RemoteException {} 141 public void ejbStore() throws EJBException , RemoteException {} 142 public void setEntityContext(EntityContext ctx) throws EJBException , RemoteException 143 { 144 this.ctx = ctx; 145 } 146 public void unsetEntityContext() throws EJBException , RemoteException 147 { 148 this.ctx = null; 149 } 150 } 151 | Popular Tags |