deptbean.java

来自「This project mainly deals with automatin」· Java 代码 · 共 82 行

JAVA
82
字号
package packIC;

import java.rmi.*;
import javax.ejb.*;

public class DeptBean implements EntityBean
{
EntityContext ectxt;
public int sno,deptno;
public String deptname,location,depthead;

public  DeptPK ejbCreate(int sno,int deptno, String deptname,String location,String depthead) throws CreateException,RemoteException
	{
System.out.println(" in create");
         this.sno=sno; 
	 this.deptno=deptno;
	 this.deptname=deptname;
	 this.location=location;
         this.depthead=depthead;
                  
          DeptPK pk=new DeptPK();
          pk.deptname=deptname;
          return pk;

	}//end Create 

public void ejbPostCreate( int sno,int deptno, String deptname,String location,String depthead) throws CreateException,RemoteException
	{
System.out.println(" in postcreate");
	}
public void setEntityContext(EntityContext ectxt)
	{
	this.ectxt=ectxt;
System.out.println(" in set entiy");
	}
public void unsetEntityContext()
	{
	ectxt=null;
System.out.println(" in unset entiy");
	}

public void ejbActivate(){System.out.println(" in act");}
public void ejbPassivate(){System.out.println(" in pass");}
public void ejbLoad(){System.out.println(" in load");}
public void ejbStore(){System.out.println(" in set store");}
public void ejbRemove()
{
System.out.println(" in remove");
}


public void setSno(int sno )
{
 this.sno=sno;
}
public int getSno()
{
 return sno;
}
public void setDeptno(int deptno )
{
 this.deptno=deptno;
}

public int getDeptno()
{
 return deptno;
}


public void setDeptname(String deptname){ this.deptname=deptname;}
public String getDeptname(){ return deptname;}


public void setLocation(String location){ this.location=location;}
public String getLocation(){ return location;}

public void setDepthead(String depthead ){ this.depthead=depthead;}
public String getDepthead(){ return depthead;}

  
}//end class

⌨️ 快捷键说明

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