lockerbean.java

来自「本书中的源代码是以JBuilder工程形式组织的」· Java 代码 · 共 51 行

JAVA
51
字号
package cmpsample;import javax.ejb.*;import java.util.Collection;abstract public class LockerBean implements EntityBean {  EntityContext entityContext;  public java.lang.Integer ejbCreate(java.lang.Integer id) throws CreateException {    setId(id);    return null;  }  public void ejbPostCreate(java.lang.Integer id) throws CreateException {    /**@todo Complete this method*/  }  public void ejbRemove() throws RemoveException {    /**@todo Complete this method*/  }  public abstract void setId(java.lang.Integer id);  public abstract void setLockername(java.lang.String lockername);  public abstract void setStudent(cmpsample.Student student);  public abstract java.lang.Integer getId();  public abstract java.lang.String getLockername();  public abstract cmpsample.Student getStudent();  public void ejbLoad() {    /**@todo Complete this method*/  }  public void ejbStore() {    /**@todo Complete this method*/  }  public void ejbActivate() {    /**@todo Complete this method*/  }  public void ejbPassivate() {    /**@todo Complete this method*/  }  public void unsetEntityContext() {    this.entityContext = null;  }  public void setEntityContext(EntityContext entityContext) {    this.entityContext = entityContext;  }  public String getStuInfo() {    String t=null;   try {     Student stuRemote = getStudent();     t="student id=" + stuRemote.getStuid() + " student name = " + stuRemote.getStuname();   }catch (Exception e){}   return t;  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?