KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > freeforums > forum > ForumBean


1 /*
2  * ForumBean.java
3  *
4  * FormBean implementation
5  *
6  * @author: Devraj Mukherjee
7  *
8  * Created: 23rd June 2001
9  *
10  */

11
12  package freeforums.forum;
13
14  import java.rmi.RemoteException JavaDoc;
15  import javax.ejb.*;
16
17  public class ForumBean implements EntityBean {
18
19      transient private EntityContext context;
20
21      public String JavaDoc forumName, forumDescription;
22      public Integer JavaDoc forumID;
23
24      public Integer JavaDoc ejbCreate(Integer JavaDoc forumID, String JavaDoc forumName, String JavaDoc forumDescription) throws CreateException {
25
26          this.forumID = forumID;
27          this.forumName = forumName;
28          this.forumDescription = forumDescription;
29          return null;
30
31      }
32
33      public void ejbPostCreate(Integer JavaDoc forumID, String JavaDoc forumName, String JavaDoc forumDescription) { }
34
35      public void setEntityContext(EntityContext context) { this.context = context; }
36
37      public void unsetEntityContext() { context = null; }
38
39      public void ejbActivate() { }
40      public void ejbPassivate() { }
41      public void ejbLoad() { }
42      public void ejbStore() { }
43      public void ejbRemove() { }
44
45      /* The following are the implementation of the method from the
46         Forum Remote interface
47       */

48
49      public String JavaDoc getForumName() throws RemoteException JavaDoc { return forumName; }
50      public void setForumName(String JavaDoc forumName) throws RemoteException JavaDoc { this.forumName = forumName; }
51
52      public String JavaDoc getForumDescription() throws RemoteException JavaDoc { return forumDescription; }
53      public void setForumDescription() throws RemoteException JavaDoc { this.forumDescription = forumDescription; }
54
55      public Integer JavaDoc getForumID() throws RemoteException JavaDoc { return forumID; }
56      public void setForumID(Integer JavaDoc forumID) throws RemoteException JavaDoc { this.forumID = forumID; }
57
58  }
59
Popular Tags