1 11 12 package freeforums.forum; 13 14 import java.rmi.RemoteException ; 15 import javax.ejb.*; 16 17 public class ForumBean implements EntityBean { 18 19 transient private EntityContext context; 20 21 public String forumName, forumDescription; 22 public Integer forumID; 23 24 public Integer ejbCreate(Integer forumID, String forumName, String 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 forumID, String forumName, String 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 48 49 public String getForumName() throws RemoteException { return forumName; } 50 public void setForumName(String forumName) throws RemoteException { this.forumName = forumName; } 51 52 public String getForumDescription() throws RemoteException { return forumDescription; } 53 public void setForumDescription() throws RemoteException { this.forumDescription = forumDescription; } 54 55 public Integer getForumID() throws RemoteException { return forumID; } 56 public void setForumID(Integer forumID) throws RemoteException { this.forumID = forumID; } 57 58 } 59 | Popular Tags |