KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > docs > cmp2 > crimeportal > GangsterBean


1 package org.jboss.docs.cmp2.crimeportal;
2
3 import java.util.Collection JavaDoc;
4 import java.util.Iterator JavaDoc;
5 import java.util.Set JavaDoc;
6 import javax.ejb.CreateException JavaDoc;
7 import javax.ejb.EntityBean JavaDoc;
8 import javax.ejb.EntityContext JavaDoc;
9 import javax.ejb.FinderException JavaDoc;
10
11 public abstract class GangsterBean implements EntityBean JavaDoc
12 {
13    private EntityContext JavaDoc ctx;
14
15    public Integer JavaDoc ejbCreate(Integer JavaDoc id, String JavaDoc name, String JavaDoc nickName)
16          throws CreateException JavaDoc
17    {
18       setGangsterId(id);
19       setName(name);
20       setNickName(nickName);
21       return null;
22    }
23
24    public void ejbPostCreate(Integer JavaDoc id, String JavaDoc name, String JavaDoc nickName) { }
25
26    // CMP field accessors -----------------------------------------------------
27
public abstract Integer JavaDoc getGangsterId();
28    public abstract void setGangsterId(Integer JavaDoc gangsterId);
29
30    public abstract String JavaDoc getName();
31    public abstract void setName(String JavaDoc name);
32
33    public abstract String JavaDoc getNickName();
34    public abstract void setNickName(String JavaDoc nickName);
35
36    public abstract int getBadness();
37    public abstract void setBadness(int badness);
38
39    // CMR field accessors -----------------------------------------------------
40
public abstract Organization getOrganization();
41     public abstract void setOrganization(Organization org);
42
43    public abstract Set JavaDoc getJobs();
44     public abstract void setJobs(Set JavaDoc jobs);
45
46    // ejbSelect methods -------------------------------------------------------
47
public abstract Set JavaDoc ejbSelectBoss(String JavaDoc name) throws FinderException JavaDoc;
48
49    // ejbHome methods ---------------------------------------------------------
50
public Set JavaDoc ejbHomeSelectBoss(String JavaDoc name) throws FinderException JavaDoc {
51       return ejbSelectBoss(name.trim());
52    }
53
54    // EJB callbacks -----------------------------------------------------------
55
public void setEntityContext(EntityContext JavaDoc 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