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 31 48 public abstract class ExamenationEntityBean 49 implements EntityBean 50 { 51 private EntityContext ctx; 53 54 61 public abstract String getExamId(); 62 public abstract void setExamId(String examId); 63 64 69 public abstract String getSubject(); 70 73 public abstract void setSubject(String subject); 74 75 80 public abstract String getDepartmentCode(); 81 84 public abstract void setDepartmentCode(String deptCode); 85 86 91 public abstract String getDepartmentCode2(); 92 95 public abstract void setDepartmentCode2(String deptCode); 96 97 102 public abstract long getGroupNumber(); 103 106 public abstract void setGroupNumber(long groupNum); 107 108 124 public abstract GroupLocal getGroup(); 125 128 public abstract void setGroup(GroupLocal group); 129 130 134 public ExamenationPK ejbCreate(String examId, String subject, String deptCode, long groupNum) 135 throws CreateException 136 { 137 setExamId(examId); 138 setSubject(subject); 139 setDepartmentCode(deptCode); 140 setDepartmentCode2("X"+deptCode); 141 setGroupNumber(groupNum); 142 return null; 143 } 144 145 public void ejbPostCreate(String examId, String subject, String deptCode, long groupNum) {} 146 147 public void ejbActivate() throws EJBException , RemoteException {} 148 public void ejbLoad() throws EJBException , RemoteException {} 149 public void ejbPassivate() throws EJBException , RemoteException {} 150 public void ejbRemove() throws RemoveException , EJBException , RemoteException {} 151 public void ejbStore() throws EJBException , RemoteException {} 152 public void setEntityContext(EntityContext ctx) throws EJBException , RemoteException 153 { 154 this.ctx = ctx; 155 } 156 public void unsetEntityContext() throws EJBException , RemoteException 157 { 158 this.ctx = null; 159 } 160 } 161 | Popular Tags |