usersejb.java
来自「员工福利信息登记系统的意义 我国的福利包括社会福利和员工福利两个部分」· Java 代码 · 共 74 行
JAVA
74 行
package enroll.Usersjb;
import java.util.*;
import javax.ejb.*;
public class UsersEJB implements EntityBean
{
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//这是一个基于Entity Bean的Bean Class,这个Entity Bean是基于
//Container-managed Persistence的Entity Bean,用来对UsersTBL表进行操作
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public String users_id;
public String name;
public String password;
private EntityContext context;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//定义回调方法(CallBack Methods)
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public void setEntityContext(EntityContext context)
{
this.context = context;
}
public void unsetEntityContext()
{
context = null;
}
public String ejbCreate(String users_id, String name,String password) throws DuplicateKeyException, CreateException
{
this.users_id = users_id;
this.name = name;
this.name = name;
this.password=password;
}
public void ejbPostCreate(String users_id, String name,String password)
{}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void ejbLoad()
{}
public void ejbStore()
{}
public void ejbActivate()
{
users_id = (String)context.getPrimaryKey();
}
public void ejbPassivate()
{
users_id = null;
name = null;
password=null;
}
public void ejbRemove()
{}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?