1 22 package org.jboss.test.cmp2.fkmapping.ejb; 23 24 25 import javax.ejb.EntityBean ; 26 import javax.ejb.EntityContext ; 27 import javax.ejb.RemoveException ; 28 import javax.ejb.CreateException ; 29 30 31 48 public abstract class ParentCMPBean 49 implements EntityBean 50 { 51 private EntityContext ctx; 53 54 61 public abstract Long getId(); 62 public abstract void setId(Long id); 63 64 70 public abstract String getFirstName(); 71 public abstract void setFirstName(String name); 72 73 78 public ParentPK ejbCreate(Long parentId, String firstName) 79 throws CreateException 80 { 81 setId(parentId); 82 setFirstName(firstName); 83 return null; 84 } 85 86 public void ejbPostCreate(Long parentId, String firstName) 87 { 88 } 89 90 93 public void setEntityContext(EntityContext ctx) 94 { 95 this.ctx = ctx; 96 } 97 98 101 public void unsetEntityContext() 102 { 103 this.ctx = null; 104 } 105 106 public void ejbActivate() {} 107 public void ejbLoad() {} 108 public void ejbPassivate() {} 109 public void ejbRemove() throws RemoveException {} 110 public void ejbStore() {} 111 } 112 | Popular Tags |