?? hotelmanager.java
字號:
package com.xc.hotelmanager.hotel.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.hotel.model.*;import com.xc.hotelmanager.hotel.control.session.*;import com.xc.hotelmanager.hotel.exception.HotelManagerException;public class HotelManager { static HotelManager instance = null; private SB_hotelmanager manager=null; private HotelManager(){ try{ manager = com.xc.hotelmanager.hotel.control.EjbGetter. getSB_HotelManagerHome().create(); } catch(Exception ex){ } } public static HotelManager getInstance(){ if (instance == null) { instance = new HotelManager(); } return instance; } public int FindEmptyRoom(String type) throws HotelManagerException{ try{ return manager.FindEmptyRoom(type); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public String ResRoom(Reservation res, int num, String type)throws HotelManagerException{ String s=null; try{ //System.out.println(manager.ResRoom(res,num,type)); return manager.ResRoom(res,num,type); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public void CancleResByDate(String id) throws HotelManagerException{ try{ manager.CancleResByDate(id); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public Collection SearchRes(String str) throws HotelManagerException{ try{ return manager.SearchRes(str); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public Collection getAllRoom() throws HotelManagerException{ try{ return manager.getAllRoom(); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public Collection getAllRoomType() throws HotelManagerException{ try{ return manager.getAllRoomType(); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public String getRoomtype(String id) throws HotelManagerException{ try{ return manager.getRoomtype(id); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public int getRoomprice(String id) throws HotelManagerException{ try{ return manager.getRoomprice(id); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public Collection getAllRes() throws HotelManagerException { try{ return manager.getAllRes(); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public void CancleRes(String id) throws HotelManagerException{ try{ manager.CancleRes(id); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public Collection getRoomByType(String type) throws HotelManagerException{ try{ return manager.getRoomByType(type); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public RoomType addRmtype(RoomType roomtype) throws HotelManagerException{ try{ return manager.addRmtype(roomtype); } catch (java.rmi.RemoteException rex) { throw new HotelManagerException(rex.getMessage()); } } public RoomType saveRoomType(RoomType roomtype) throws HotelManagerException { try { return manager.saveRoomType(roomtype); } catch (java.rmi.RemoteException rex) { throw new HotelManagerException(rex.getMessage()); } }public RoomType loadRoomType(String rtypeid) throws HotelManagerException { RoomType result = null; try{ result = manager.loadRoomType(rtypeid); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } return result; }public void removeRoomType(String rtypeid) throws HotelManagerException { try{ manager.removeRoomType(rtypeid); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public static void main(String[] args) { try{ HotelManager m=HotelManager.getInstance(); } catch(Exception ex){ System.out.println(ex.getMessage()); } } public Collection getRoomByType1(String type) throws HotelManagerException{ try{ return manager.getRoomByType(type); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); }} public int getRoompriceById(String roomid) throws HotelManagerException { try{ return manager.getRoompriceById(roomid); } catch(java.rmi.RemoteException rex){ throw new HotelManagerException(rex.getMessage()); } } public Room addRoom(Room room) throws HotelManagerException { try{ return manager.addRoom(room); } catch (java.rmi.RemoteException rex) { throw new HotelManagerException(rex.getMessage()); } }public void ResetRstust(String id) throws HotelManagerException { try{ manager.ResetRstust(id); } catch(Exception ex){ System.out.println(ex.getMessage()); } }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -