1 22 package org.jboss.test.cmp2.fkstackoverflow.ejb; 23 24 import org.jboss.logging.Logger; 25 26 import javax.ejb.EntityBean ; 27 import javax.ejb.EntityContext ; 28 import javax.ejb.RemoveException ; 29 import javax.ejb.CreateException ; 30 31 32 49 public abstract class ChildEntityBean 50 implements EntityBean 51 { 52 Logger log = Logger.getLogger(ChildEntityBean.class); 53 private EntityContext ctx; 54 55 57 63 public abstract Long getId(); 64 public abstract void setId(Long id); 65 66 71 public abstract String getFirstName(); 72 public abstract void setFirstName(String name); 73 74 79 public abstract Long getSimpleParentId(); 80 83 public abstract void setSimpleParentId(Long parentId); 84 85 90 public abstract Long getComplexParentId1(); 91 94 public abstract void setComplexParentId1(Long parentId); 95 96 101 public abstract Long getComplexParentId2(); 102 105 public abstract void setComplexParentId2(Long parentId); 106 107 109 119 public abstract SimpleParentLocal getSimpleParent1(); 120 123 public abstract void setSimpleParent1(SimpleParentLocal parent); 124 125 135 public abstract SimpleParentLocal getSimpleParent2(); 136 139 public abstract void setSimpleParent2(SimpleParentLocal parent); 140 141 154 public abstract ComplexParentLocal getComplexParent1(); 155 158 public abstract void setComplexParent1(ComplexParentLocal parent); 159 160 173 public abstract ComplexParentLocal getComplexParent2(); 174 177 public abstract void setComplexParent2(ComplexParentLocal parent); 178 179 181 185 public Long ejbCreate(Long childId, String firstName, Long parentId) 186 throws CreateException 187 { 188 setId(childId); 189 setFirstName(firstName); 190 setSimpleParentId(parentId); 191 return null; 192 } 193 194 public void ejbPostCreate(Long childId, String firstName, Long parentId) 195 { 196 } 197 198 201 public void setEntityContext(EntityContext ctx) 202 { 203 this.ctx = ctx; 204 } 205 206 209 public void unsetEntityContext() 210 { 211 this.ctx = null; 212 } 213 214 public void ejbActivate() {} 215 public void ejbLoad() {} 216 public void ejbPassivate() {} 217 public void ejbRemove() throws RemoveException {} 218 public void ejbStore() {} 219 } 220 | Popular Tags |