KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > freeforums > user > UserBean


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

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

46
47      public String JavaDoc getUserName() throws RemoteException JavaDoc { return userName; }
48      public void setUserName(String JavaDoc userName) throws RemoteException JavaDoc { this.userName = userName; }
49
50      public String JavaDoc getPassword() throws RemoteException JavaDoc { return password; }
51      public void setPassword(String JavaDoc password) throws RemoteException JavaDoc { this.password = password; }
52
53      public String JavaDoc getRealName() throws RemoteException JavaDoc { return realName; }
54      public void setRealName(String JavaDoc realName) throws RemoteException JavaDoc { this.realName = realName; }
55
56      public String JavaDoc getEmailAddress() throws RemoteException JavaDoc { return emailAddress; }
57      public void setEmailAddress(String JavaDoc emailAddress) throws RemoteException JavaDoc { this.emailAddress = emailAddress; }
58
59      public boolean isSuperUser() throws RemoteException JavaDoc { return superUser; }
60      public void setSuperUser(boolean superUser) throws RemoteException JavaDoc { this.superUser = superUser; }
61
62
63  }
64
Popular Tags