1 11 12 package freeforums.user; 13 14 import java.rmi.RemoteException ; 15 import javax.ejb.*; 16 17 public class ForumUserBean implements EntityBean { 18 19 transient private EntityContext context; 20 21 public ForumUserPK key; 22 public boolean administrator; 23 24 public ForumUserPK ejbCreate(ForumUserPK key, boolean administrator) { 25 26 this.key = key; 27 this.administrator = administrator; 28 return null; 29 30 } 31 32 public ForumUserPK ejbCreate(ForumUserPK key) { 33 34 this.key = key; 35 this.administrator = false; 36 return null; 37 38 } 39 40 public void ejbPostCreate(ForumUserPK key, boolean administrator) { } 41 public void ejbPostCreate(ForumUserPK key) { } 42 43 public void setEntityContext(EntityContext context) { this.context = context; } 44 45 public void unsetEntityContext() { context = null; } 46 47 public void ejbActivate() { } 48 public void ejbPassivate() { } 49 public void ejbLoad() { } 50 public void ejbStore() { } 51 public void ejbRemove() { } 52 53 56 57 public String getUserName() throws RemoteException { return key.userName; } 58 public void setUserName(String userName) throws RemoteException { key.userName = userName; } 59 60 public Integer getForumID() throws RemoteException { return key.forumID; } 61 public void setForumID(Integer forumID) throws RemoteException { key.forumID = forumID; } 62 63 public boolean isAdministrator() throws RemoteException { return administrator; } 64 public void setAdministrator(boolean administrator) throws RemoteException { this.administrator = administrator; } 65 66 } | Popular Tags |