⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usersejb.java

📁 员工福利信息登记系统的意义 我国的福利包括社会福利和员工福利两个部分
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -