1 22 package org.jboss.test.cmp2.readonly; 23 24 import java.util.Collection ; 25 import javax.ejb.CreateException ; 26 import javax.ejb.EntityBean ; 27 import javax.ejb.EntityContext ; 28 29 public abstract class PublisherBean implements EntityBean { 30 transient private EntityContext ctx; 31 32 public PublisherBean() {} 33 34 public Integer ejbCreate(Integer id) throws CreateException { 35 setId(id); 36 return null; 37 } 38 39 public void ejbPostCreate(Integer id) { 40 } 41 42 public abstract Integer getId(); 43 public abstract void setId(Integer id); 44 45 public abstract String getName(); 46 public abstract void setName(String name); 47 48 public abstract Collection getBooks(); 49 public abstract void setBooks(Collection books); 50 51 public void setEntityContext(EntityContext ctx) { 52 this.ctx = ctx; 53 } 54 55 public void unsetEntityContext() { 56 this.ctx = null; 57 } 58 59 public void ejbActivate() { 60 } 61 62 public void ejbPassivate() { 63 } 64 65 public void ejbLoad() { 66 } 67 68 public void ejbStore() { 69 } 70 71 public void ejbRemove() { 72 } 73 } 74 | Popular Tags |