📄 roomappmanager.java
字号:
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 RoomAppManager {
public RoomAppManager() {
}
public static void addRoomApp(RoomAppBean newRoomApp) throws Exception {
HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
theHibernateUtil.create2Db(newRoomApp);
}
public static RoomAppBean findRoomApp(Integer obj) throws Exception {
HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
return (RoomAppBean) theHibernateUtil.findByPrimaryKey(RoomAppBean.class,
obj);
}
public static void updateRoomApp(RoomAppBean theUpdateRoomApp) throws
Exception {
HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
theHibernateUtil.update2Db(theUpdateRoomApp);
}
public static void removeRoomApp(RoomAppBean theRemoveRoomApp) throws
Exception {
HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
theHibernateUtil.remove4Db(theRemoveRoomApp);
}
/**
* 增加一个RoomDetail
*/
public static void addRoomDetail(RoomDetailBean newRoomDetail) throws Exception {
HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
theHibernateUtil.create2Db(newRoomDetail);
}
public static void addRoomDetail2RoomApp(RoomAppBean theOneInDataBase, RoomDetailBean theNewMany)
throws Exception {
theOneInDataBase.addRoomDetail(theNewMany);
theNewMany.setRoomAppID(theOneInDataBase);
addRoomDetail(theNewMany);
updateRoomApp(theOneInDataBase);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -