📄 agencybean.java
字号:
package web;
import java.rmi.*;
import java.util.* ;
import javax.ejb.* ;
import javax.naming.* ;
import agency.*;
public class AgencyBean
{
Agency agency;
public String getAgencyName() throws RemoteException {
return agency.getAgencyName();
}
public Collection findAllApplicants() throws RemoteException {
return agency.findAllApplicants();
}
public void createApplicant(String login, String name, String email) throws RemoteException, DuplicateException, CreateException{
agency.createApplicant(login,name,email);
}
public void deleteApplicant (String login) throws RemoteException, NotFoundException{
agency.deleteApplicant(login);
}
public Collection findAllCustomers() throws RemoteException {
return agency.findAllCustomers();
}
public void createCustomer(String login, String name, String email) throws RemoteException, DuplicateException, CreateException{
agency.createCustomer(login,name,email);
}
public void deleteCustomer (String login) throws RemoteException, NotFoundException {
agency.deleteCustomer(login);
}
public Collection getLocations() throws RemoteException {
return agency.getLocations();
}
public String getLocationDescription(String name) throws RemoteException, NotFoundException {
return agency.getLocationDescription(name);
}
public void updateLocation(String name, String description) throws RemoteException, NotFoundException {
agency.updateLocation(name,description);
}
public void addLocation(String name, String description) throws RemoteException, DuplicateException {
agency.addLocation(name,description);
}
public void removeLocation(String name) throws RemoteException, NotFoundException {
agency.removeLocation(name);
}
public Collection getSkills() throws RemoteException {
return agency.getSkills();
}
public String getSkillDescription(String name) throws RemoteException, NotFoundException {
return agency.getSkillDescription(name);
}
public void updateSkill(String name, String description) throws RemoteException, NotFoundException {
agency.updateSkill(name,description);
}
public void addSkill(String name, String description) throws RemoteException, DuplicateException {
agency.addSkill(name,description);
}
public void removeSkill(String name) throws RemoteException, NotFoundException {
agency.removeSkill(name);
}
public List select(String table) throws RemoteException {
return agency.select(table);
}
public AgencyBean () throws NamingException, RemoteException, CreateException {
InitialContext ic = null;
ic = new InitialContext();
AgencyHome agencyHome = (AgencyHome)ic.lookup("java:comp/env/ejb/Agency");
agency = agencyHome.create();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -