1 22 package org.jboss.test.entitydepends.ejb; 23 24 25 import javax.ejb.EntityBean ; 26 import javax.ejb.EntityContext ; 27 import javax.ejb.RemoveException ; 28 import javax.ejb.CreateException ; 29 30 31 35 public abstract class ABean implements EntityBean 36 { 37 private EntityContext ctx; 38 39 public abstract Long getId(); 40 public abstract void setId(Long id); 41 42 public abstract String getName(); 43 public abstract void setName(String name); 44 45 public Long ejbCreate(Long id, String name) 46 throws CreateException 47 { 48 setId(id); 49 setName(name); 50 return null; 51 } 52 53 public void ejbPostCreate(Long id, String name) 54 { 55 } 56 57 60 public void setEntityContext(EntityContext ctx) 61 { 62 this.ctx = ctx; 63 } 64 65 68 public void unsetEntityContext() 69 { 70 this.ctx = null; 71 } 72 73 public void ejbActivate() 74 { 75 } 76 77 public void ejbLoad() 78 { 79 } 80 81 public void ejbPassivate() 82 { 83 } 84 85 public void ejbRemove() throws RemoveException 86 { 87 } 88 89 public void ejbStore() 90 { 91 } 92 } 93 | Popular Tags |