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 49 public abstract class ComplexParentBean 50 implements EntityBean 51 { 52 Logger log = Logger.getLogger(ComplexParentBean.class); 53 private EntityContext ctx; 54 55 57 63 public abstract Long getId1(); 64 public abstract void setId1(Long id); 65 66 72 public abstract Long getId2(); 73 public abstract void setId2(Long id); 74 75 80 public abstract String getFirstName(); 81 84 public abstract void setFirstName(String firstName); 85 86 88 94 public abstract Collection getChildren1(); 95 98 public abstract void setChildren1(Collection children); 99 100 106 public abstract Collection getChildren2(); 107 110 public abstract void setChildren2(Collection children); 111 112 114 117 public ComplexParentPK ejbCreate(Long id1, Long id2, String firstName) 118 throws CreateException 119 { 120 setId1(id1); 121 setId2(id2); 122 setFirstName(firstName); 123 return null; 124 } 125 126 public void ejbPostCreate(Long id1, Long id2, String firstName) 127 { 128 } 129 130 133 public void setEntityContext(EntityContext ctx) 134 { 135 this.ctx = ctx; 136 } 137 138 141 public void unsetEntityContext() 142 { 143 this.ctx = null; 144 } 145 146 public void ejbActivate() {} 147 public void ejbLoad() {} 148 public void ejbPassivate() {} 149 public void ejbRemove() throws RemoveException {} 150 public void ejbStore() {} 151 } 152 | Popular Tags |