1 package org.jboss.docs.cmp2.crimeportal; 2 3 import java.util.Collection ; 4 import java.util.Iterator ; 5 import java.util.Set ; 6 import javax.ejb.CreateException ; 7 import javax.ejb.EntityBean ; 8 import javax.ejb.EntityContext ; 9 import javax.ejb.FinderException ; 10 11 public abstract class GangsterBean implements EntityBean 12 { 13 private EntityContext ctx; 14 15 public Integer ejbCreate(Integer id, String name, String nickName) 16 throws CreateException 17 { 18 setGangsterId(id); 19 setName(name); 20 setNickName(nickName); 21 return null; 22 } 23 24 public void ejbPostCreate(Integer id, String name, String nickName) { } 25 26 public abstract Integer getGangsterId(); 28 public abstract void setGangsterId(Integer gangsterId); 29 30 public abstract String getName(); 31 public abstract void setName(String name); 32 33 public abstract String getNickName(); 34 public abstract void setNickName(String nickName); 35 36 public abstract int getBadness(); 37 public abstract void setBadness(int badness); 38 39 public abstract Organization getOrganization(); 41 public abstract void setOrganization(Organization org); 42 43 public abstract Set getJobs(); 44 public abstract void setJobs(Set jobs); 45 46 public abstract Set ejbSelectBoss(String name) throws FinderException ; 48 49 public Set ejbHomeSelectBoss(String name) throws FinderException { 51 return ejbSelectBoss(name.trim()); 52 } 53 54 public void setEntityContext(EntityContext context) 56 { 57 ctx = context; 58 } 59 60 public void unsetEntityContext() 61 { 62 ctx = null; 63 } 64 65 public void ejbActivate() 66 { 67 } 68 69 public void ejbPassivate() 70 { 71 } 72 73 public void ejbRemove() 74 { 75 } 76 77 public void ejbStore() 78 { 79 } 80 81 public void ejbLoad() 82 { 83 } 84 } 85 | Popular Tags |