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