courseejb.java
来自「100多M的J2EE培训内容」· Java 代码 · 共 51 行
JAVA
51 行
package day21ex.course;
import javax.ejb.*;
public abstract class CourseEJB implements EntityBean {
protected EntityContext ctx;
public CourseEJB() {
}
public abstract String getCourseId();
public abstract void setCourseId(String courseID);
public abstract String getName();
public abstract void setName(String name);
public abstract double getFee();
public abstract void setFee(double fee);
public void ejbActivate() {
System.out.println("ejbActivate() called.");
}
public void ejbRemove() {
System.out.println("ejbRemove() called.");
}
public void ejbPassivate() {
System.out.println("ejbPassivate () called.");
}
public void ejbLoad() {
System.out.println("ejbLoad() called.");
}
public void ejbStore() {
System.out.println("ejbStore() called.");
}
public void setEntityContext(EntityContext ctx) {
System.out.println("setEntityContext called");
this.ctx = ctx;
}
public void unsetEntityContext() {
System.out.println("unsetEntityContext called");
this.ctx = null;
}
public void ejbPostCreate(String courseID, String name, double fee) {
System.out.println("ejbPostCreate() called");
}
public String ejbCreate(String courseID, String name, double fee)
throws CreateException {
System.out.println("ejbCreate() called");
setCourseId(courseID);
setName(name);
setFee(fee);
return null;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?