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

📄 usermanager.java

📁 用j2ee开发的一个旅店管理系统
💻 JAVA
字号:
package com.xc.hotelmanager.user.control.proxy;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * <p>Company: </p> * @author not attributable * @version 1.0 */import java.util.*;import com.xc.hotelmanager.user.model.*;import com.xc.hotelmanager.user.control.session.*;import com.xc.hotelmanager.user.exception.UserManagerException;import com.xc.hotelmanager.user.control.EjbGetter1;import com.xc.hotelmanager.user.control.entity.*;public class UserManager {  static UserManager instance = null;    private SB_usermanager manager=null;    private UserManager(){        try{            manager = com.xc.hotelmanager.user.control.EjbGetter1.                      getSB_UserManagerHome().create();        }        catch(Exception ex){        }    }    public static  UserManager getInstance(){        if (instance == null) {            instance = new UserManager();        }        return instance;    }    public static void main(String[] args) {          try{              UserManager m=UserManager.getInstance();      }      catch(Exception ex){          System.out.println(ex.getMessage());      }      }   public String Login(String uid,String upwd) throws UserManagerException{     try{           return manager.Login(uid,upwd);      }      catch(java.rmi.RemoteException rex){          throw new UserManagerException(rex.getMessage());      }   }   public Collection getAllEmp() throws UserManagerException{   try{     Collection result = manager. getAllEmp();     return result;   }   catch(Exception rex){     throw new UserManagerException(rex.getMessage());   } } public void removeEmp(String emid) throws UserManagerException {     try{       manager.removeEmp(emid);     }     catch(java.rmi.RemoteException rex){       throw new UserManagerException(rex.getMessage());     }   }   public Emp addEmp(Emp employee) throws UserManagerException{        try{          return manager.addEmp(employee);        }        catch (java.rmi.RemoteException rex) {        throw new UserManagerException(rex.getMessage());        }    }   public Emp SaveEmp(Emp employee) throws UserManagerException{      try {        return  manager.saveEmp(employee) ;      }      catch (java.rmi.RemoteException rex) {        throw new UserManagerException(rex.getMessage());      }    }    public Emp loadEmp(String emid) throws UserManagerException {    Emp result = null;    try{      result = manager.loadEmp(emid);    }    catch(java.rmi.RemoteException rex){      throw new UserManagerException(rex.getMessage());    }    return result;  }  public Hoteluser addHoteluser(Hoteluser hoteluser) throws UserManagerException{        try{          return manager.addHoteluser(hoteluser);        }        catch (java.rmi.RemoteException rex) {        throw new UserManagerException(rex.getMessage());        }    }public Collection getAllHoteluser() throws UserManagerException{  try{    Collection result = manager.getAllHoteluser();    return result;  }  catch(Exception rex){    throw new UserManagerException(rex.getMessage());  }}public Hoteluser loadHoteluser(String userid) throws UserManagerException {   Hoteluser result = null;   try{     result = manager.loadHoteluser(userid);   }   catch(java.rmi.RemoteException rex){     throw new UserManagerException(rex.getMessage());   }   return result; }public void removeHoteluser(String userid) throws UserManagerException {     try{       manager.removeHoteluser(userid);     }     catch(java.rmi.RemoteException rex){       throw new UserManagerException(rex.getMessage());     }   } public Hoteluser saveHoteluser(Hoteluser hoteluser) throws UserManagerException{      try {        return  manager.saveHoteluser(hoteluser) ;      }      catch (java.rmi.RemoteException rex) {        throw new UserManagerException(rex.getMessage());      }    }public String getuserid(String userid) throws UserManagerException{        try{              return manager.getuserid(userid);         }         catch(java.rmi.RemoteException rex){             throw new UserManagerException(rex.getMessage());         }      }}

⌨️ 快捷键说明

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