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 import java.util.Collection ; 31 32 33 50 public abstract class SimpleParentBean 51 implements EntityBean 52 { 53 Logger log = Logger.getLogger(SimpleParentBean.class); 54 private EntityContext ctx; 55 56 58 64 public abstract Long getId(); 65 public abstract void setId(Long id); 66 67 72 public abstract String getFirstName(); 73 76 public abstract void setFirstName(String firstName); 77 78 80 86 public abstract Collection getChildren1(); 87 90 public abstract void setChildren1(Collection children); 91 92 98 public abstract Collection getChildren2(); 99 102 public abstract void setChildren2(Collection children); 103 104 106 109 public Long ejbCreate(Long id, String firstName) 110 throws CreateException 111 { 112 setId(id); 113 setFirstName(firstName); 114 return null; 115 } 116 117 public void ejbPostCreate(Long id, String firstName) 118 { 119 } 120 121 124 public void setEntityContext(EntityContext ctx) 125 { 126 this.ctx = ctx; 127 } 128 129 132 public void unsetEntityContext() 133 { 134 this.ctx = null; 135 } 136 137 public void ejbActivate() {} 138 public void ejbLoad() {} 139 public void ejbPassivate() {} 140 public void ejbRemove() throws RemoveException {} 141 public void ejbStore() {} 142 } 143 | Popular Tags |