roomlevelmanager.java

来自「jdo开发实例,一个功能全面的oa系统」· Java 代码 · 共 55 行

JAVA
55
字号
package com.gzrealmap.oa.room.business;

/**
 * <p>Title: RealOA</p>
 * <p>Description: RealOA</p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: gzrealmap.com</p>
 * @author not attributable
 * @version 1.0
 */
import com.gzrealmap.oa.room.*;
import com.gzrealmap.lib.hibernate.HibernateUtil;
import java.io.*;

public class RoomLevelManager {
  public RoomLevelManager() {
  }
  public static void addRoomLevel(RoomLevelBean newRoomLevel) throws Exception {
       HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
       theHibernateUtil.create2Db(newRoomLevel);
     }

     public static RoomLevelBean findRoomLevel(Integer obj) throws Exception {
       HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
       return (RoomLevelBean) theHibernateUtil.findByPrimaryKey(RoomLevelBean.class,
           obj);
     }

     public static void updateRoomLevel(RoomLevelBean theUpdateRoomLevel) throws
         Exception {
       HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
       theHibernateUtil.update2Db(theUpdateRoomLevel);
     }

     public static void removeRoomLevel(RoomLevelBean theRemoveRoomLevel) throws
       Exception {
     HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
     theHibernateUtil.remove4Db(theRemoveRoomLevel);
   }
   /**
     * 增加一个Room
     */
   public static void addRoom(RoomBean newRoom) throws Exception {
     HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
     theHibernateUtil.create2Db(newRoom);
   }
   public static void addRoom2updateRoomLevel(RoomLevelBean theOneInDataBase, RoomBean theNewMany)
  throws Exception {
     theOneInDataBase.addRoom(theNewMany);
     theNewMany.setRoomLevelID(theOneInDataBase);
     addRoom(theNewMany);
     updateRoomLevel(theOneInDataBase);
    }

}

⌨️ 快捷键说明

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