1 22 package org.jboss.test.cmp2.optimisticlock.bug1006723.testentity; 23 24 25 import javax.ejb.EntityBean ; 26 import javax.ejb.CreateException ; 27 import javax.ejb.EntityContext ; 28 import java.util.Collection ; 29 import java.util.Collections ; 30 31 public abstract class EntityABean implements EntityBean { 32 33 public Long getOID(){ 34 return getOIDCMP(); 35 } 36 37 public void addEntityB(EntityBLocal entityB) throws Exception { 38 if (entityB == null) 39 throw new Exception ("An entity B must be specified."); 40 getEntityBsCMR().add(entityB); 41 } 42 43 public Collection listEntityBs(){ 44 return Collections.unmodifiableCollection(getEntityBsCMR()); 45 } 46 47 public abstract void setOIDCMP(Long oID); 48 49 public abstract Long getOIDCMP(); 50 51 public abstract void setEntityBsCMR(Collection entityBs); 52 53 public abstract Collection getEntityBsCMR(); 54 55 public Long ejbCreate(Long id) throws CreateException { 56 setOIDCMP(id); 57 return id; 58 } 59 60 public void ejbPostCreate(Long id) throws CreateException {} 61 62 public void ejbActivate(){} 63 64 public void ejbPassivate(){} 65 66 public void ejbLoad(){} 67 68 public void ejbStore(){} 69 70 public void ejbRemove(){} 71 72 public void setEntityContext(EntityContext context){} 73 74 public void unsetEntityContext(){} 75 76 } | Popular Tags |