teacherejb.java

来自「精通Java核心技术源代码」· Java 代码 · 共 84 行

JAVA
84
字号
// ==================== Program Discription ==========================
//   程序名称:示例18-13 : TeacherEJB.java
//   程序目的:实体Bean实现类
// ==============================================================
import java.rmi.RemoteException;
import javax.ejb.*;

public abstract class TeacherEJB implements EntityBean
{
    /**
     * Attributes declaration
    */
    public EntityContext EJB_Context;   
       
    
    public String ejbCreate    (String id) throws CreateException 
    { 
 		setId(id);
 		return null;    
    }
    
    public void ejbPostCreate    (String id) throws CreateException 
    { 

    }
    
    
    public void ejbActivate    ()  
    { 

    }
    
    
    public void ejbPassivate    ()  
    { 

    }
    
    
    public void ejbLoad    ()  
    { 

    }
    
    
    public void ejbStore    ()  
    { 

    }
    
    
    public void ejbRemove    () throws RemoveException 
    { 

    }
    
    
    public void setEntityContext    (EntityContext ctx)  
    { 

    }
    
    
    public void unsetEntityContext    ()  
    { 

    }    
    
    public abstract String getDegree    (); 
    public abstract void setDegree    (String newDegree); 
    public abstract java.util.Collection getStudents    (); 
      
    public abstract void setStudents    (java.util.Collection newStudents); 
    public abstract String getDepartment    ();     
   
    public abstract void setDepartment    (String newDepartment); 
    
   
    public abstract Address getAddress    (); 
    
    public abstract void setAddress    (Address newAddress); 
    public abstract String getId();
    public abstract void setId(String id);
}

⌨️ 快捷键说明

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