📄 postbean.java
字号:
package com.bitterjava.bbs.ejb;
import java.rmi.RemoteException;
import java.security.Identity;
import java.util.Properties;
import javax.ejb.*;
/**
* This is an Entity Bean class with CMP fields
*/
public class PostBean implements EntityBean {
public String author;
public String boardName;
private javax.ejb.EntityContext entityContext = null;
final static long serialVersionUID = 3206093459760846163L;
public String subject;
public String text;
public int threadID;
public int postID;
public java.sql.Date date;
/**
* This method was generated for supporting the associations.
* @return java.util.Vector
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
protected java.util.Vector _getLinks() {
java.util.Vector links = new java.util.Vector();
return links;
}
/**
* This method was generated for supporting the associations.
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
protected void _initLinks() {}
/**
* This method was generated for supporting the associations.
* @exception java.rmi.RemoteException The exception description.
* @exception javax.ejb.RemoveException The exception description.
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
protected void _removeLinks() throws java.rmi.RemoteException, javax.ejb.RemoveException {
java.util.Enumeration links = _getLinks().elements();
while (links.hasMoreElements()) {
try {
((com.ibm.ivj.ejb.associations.interfaces.Link) (links.nextElement())).remove();
}
catch (javax.ejb.FinderException e) {} //Consume Finder error since I am going away
}
}
/**
* ejbActivate method comment
* @exception java.rmi.RemoteException The exception description.
*/
public void ejbActivate() throws java.rmi.RemoteException {
_initLinks();
}
/**
* ejbCreate method for a CMP entity bean
* @param argBoardName java.lang.String
* @param argMessageId int
* @param argThreadID int
* @exception javax.ejb.CreateException The exception description.
* @exception java.rmi.RemoteException The exception description.
*/
public void ejbCreate(java.lang.String argBoardName, int argPostID, int argThreadID) throws javax.ejb.CreateException, java.rmi.RemoteException {
_initLinks();
// All CMP fields should be initialized here.
boardName = argBoardName;
postID = argPostID;
threadID = argThreadID;
author = "";
subject = "";
text = "";
date = new java.sql.Date(new java.util.Date().getTime());
}
/**
* ejbLoad method comment
* @exception java.rmi.RemoteException The exception description.
*/
public void ejbLoad() throws java.rmi.RemoteException {
_initLinks();
}
/**
* ejbPassivate method comment
* @exception java.rmi.RemoteException The exception description.
*/
public void ejbPassivate() throws java.rmi.RemoteException {}
/**
* ejbPostCreate method for a CMP entity bean
* @param argBoardName java.lang.String
* @param argMessageId int
* @param argThreadID int
* @exception java.rmi.RemoteException The exception description.
*/
public void ejbPostCreate(java.lang.String argBoardName, int argMessageId, int argThreadID) throws java.rmi.RemoteException {}
/**
* ejbRemove method comment
* @exception java.rmi.RemoteException The exception description.
* @exception javax.ejb.RemoveException The exception description.
*/
public void ejbRemove() throws java.rmi.RemoteException, javax.ejb.RemoveException {
_removeLinks();
}
/**
* ejbStore method comment
* @exception java.rmi.RemoteException The exception description.
*/
public void ejbStore() throws java.rmi.RemoteException {}
/**
* Getter method for author
* @return java.lang.String
*/
public java.lang.String getAuthor() {
return author;
}
/**
* Getter method for date
*/
public java.sql.Date getDate() {
return date;
}
/**
* getEntityContext method comment
* @return javax.ejb.EntityContext
*/
public javax.ejb.EntityContext getEntityContext() {
return entityContext;
}
/**
* Insert the method's description here.
* Creation date: (9/25/2001 2:09:14 PM)
* @return int
*/
public int getPostID() {
return postID;
}
/**
* Getter method for subject
* @return java.lang.String
*/
public java.lang.String getSubject() {
return subject;
}
/**
* Getter method for text
* @return java.lang.String
*/
public java.lang.String getText() {
return text;
}
/**
* Setter method for author
* @param newValue java.lang.String
*/
public void setAuthor(java.lang.String newValue) {
this.author = newValue;
}
/**
* Setter method for date
*/
public void setDate(java.sql.Date newValue) {
this.date = newValue;
}
/**
* setEntityContext method comment
* @param ctx javax.ejb.EntityContext
* @exception java.rmi.RemoteException The exception description.
*/
public void setEntityContext(javax.ejb.EntityContext ctx) throws java.rmi.RemoteException {
entityContext = ctx;
}
/**
* Setter method for subject
* @param newValue java.lang.String
*/
public void setSubject(java.lang.String newValue) {
this.subject = newValue;
}
/**
* Setter method for text
* @param newValue java.lang.String
*/
public void setText(java.lang.String newValue) {
this.text = newValue;
}
/**
* unsetEntityContext method comment
* @exception java.rmi.RemoteException The exception description.
*/
public void unsetEntityContext() throws java.rmi.RemoteException {
entityContext = null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -