?? usermanager.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 + -