KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.jboss.docs.cmp2.crimeportal;
2
3 import java.util.Set JavaDoc;
4 import javax.ejb.CreateException JavaDoc;
5 import javax.ejb.EntityBean JavaDoc;
6 import javax.ejb.EntityContext JavaDoc;
7
8 public abstract class JobBean implements EntityBean JavaDoc
9 {
10    private EntityContext JavaDoc ctx;
11
12    public String JavaDoc ejbCreate(String JavaDoc name)
13       throws CreateException JavaDoc
14    {
15       setName(name);
16       return null;
17    }
18
19    public void ejbPostCreate(String JavaDoc name)
20    {
21    }
22
23    // CMP field accessors -----------------------------------------------------
24
public abstract String JavaDoc getName();
25    public abstract void setName(String JavaDoc name);
26
27    public abstract double getScore();
28    public abstract void setScore(double param);
29
30
31    public abstract double getSetupCost();
32    public abstract void setSetupCost(double setupCost);
33
34    // CMR field accessors -----------------------------------------------------
35
public abstract Set JavaDoc getGangsters();
36     public abstract void setGangsters(Set JavaDoc gangsters);
37    
38    // EJB callbacks -----------------------------------------------------------
39
public void setEntityContext(EntityContext JavaDoc context)
40    {
41       ctx = context;
42    }
43
44    public void unsetEntityContext()
45    {
46       ctx = null;
47    }
48
49    public void ejbActivate()
50    {
51    }
52
53    public void ejbPassivate()
54    {
55    }
56
57    public void ejbRemove()
58    {
59    }
60
61    public void ejbStore()
62    {
63    }
64
65    public void ejbLoad()
66    {
67    }
68
69
70 }
71
Popular Tags