📄 carappmanager.java
字号:
package com.gzrealmap.oa.car.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.car.*;
import com.gzrealmap.lib.hibernate.HibernateUtil;
import java.io.*;
public class CarAppManager {
public CarAppManager() {
}
public static void addCarApp(CarAppBean newCarApp) throws Exception {
HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
theHibernateUtil.create2Db(newCarApp);
}
public static CarAppBean findCarApp(Integer obj) throws Exception {
HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
return (CarAppBean) theHibernateUtil.findByPrimaryKey(CarAppBean.class,
obj);
}
public static void updateCarApp(CarAppBean theUpdateCarApp) throws
Exception {
HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
theHibernateUtil.update2Db(theUpdateCarApp);
}
public static void removeCarApp(CarAppBean theRemoveCarApp) throws
Exception {
HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
theHibernateUtil.remove4Db(theRemoveCarApp);
}
/*public static void main(String[] args) throws Exception{
new CarAppManager();
CarAppBean driver = new CarAppBean();
driver.setCarAppID(111);
driver.setUserID(123);
addCarApp(driver);
}
*/
/**
* 增加一个CarApp
*/
public static void addCarAppUser(CarAppUserBean newCarAppUser) throws Exception {
HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
theHibernateUtil.create2Db(newCarAppUser);
}
public static void addCarAppUser2CarApp(CarAppBean theOneInDataBase, CarAppUserBean theNewMany)
throws Exception {
theOneInDataBase.addCarAppUser(theNewMany);
theNewMany.setCarAppID(theOneInDataBase);
addCarAppUser(theNewMany);
updateCarApp(theOneInDataBase);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -