KickJava   Java API By Example, From Geeks To Geeks.

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


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