⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trainappmanager.java

📁 jdo开发实例,一个功能全面的oa系统
💻 JAVA
字号:
package com.gzrealmap.oa.train.bussiness;

/**
 * <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.train.*;
import com.gzrealmap.oa.room.*;
import com.gzrealmap.lib.hibernate.HibernateUtil;
import java.io.*;

public class TrainAppManager {
  public TrainAppManager() {
  }
  public static void addTrainApp(TrainAppBean newTrainApp) throws Exception {
    HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
    theHibernateUtil.create2Db(newTrainApp);
  }

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

  public static void updateTrainApp(TrainAppBean theUpdateTrainApp) throws
      Exception {
    HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
    theHibernateUtil.update2Db(theUpdateTrainApp);
  }

  public static void removeTrainApp(TrainAppBean theRemoveTrainApp) throws
    Exception {
  HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
  theHibernateUtil.remove4Db(theRemoveTrainApp);
}
/**
   * 增加一个RoomDetail
   */
 public static void addRoomDetail(RoomDetailBean newRoomDetail) throws Exception {
   HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
   theHibernateUtil.create2Db(newRoomDetail);
 }
 public static void addRoomDetail2RoomApp(TrainAppBean theOneInDataBase, RoomDetailBean theNewMany)
throws Exception {
   theOneInDataBase.addRoomDetail(theNewMany);
   theNewMany.setTrainAppID(theOneInDataBase);
   addRoomDetail(theNewMany);
   updateTrainApp(theOneInDataBase);
  }

  /**
        * 增加一个TrainClass
        */

    public static void addTrainClass(TrainClassBean newTrainClass) throws Exception {
      HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
      theHibernateUtil.create2Db(newTrainClass);
    }
    public static void addTrainClass2TrainApp(TrainAppBean theOneInDataBase, TrainClassBean theNewMany)
   throws Exception {
      theOneInDataBase.addTrainClass(theNewMany);
      theNewMany.setTrainAppID(theOneInDataBase);
      addTrainClass(theNewMany);
      updateTrainApp(theOneInDataBase);
     }

     /**
       * 增加一个TrainFee
       */

   public static void addTrainFee(TrainFeeBean newTrainFee) throws Exception {
     HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
     theHibernateUtil.create2Db(newTrainFee);
   }
   public static void addTrainFee2TrainApp(TrainAppBean theOneInDataBase, TrainFeeBean theNewMany)
  throws Exception {
     theOneInDataBase.addTrainFee(theNewMany);
     theNewMany.setTrainAppID(theOneInDataBase);
     addTrainFee(theNewMany);
     updateTrainApp(theOneInDataBase);
    }
    /**
          * 增加一个TrainMember
          */

      public static void addTrainMember(TrainMemberBean newTrainMember) throws Exception {
        HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
        theHibernateUtil.create2Db(newTrainMember);
      }
      public static void addTrainMember2TrainApp(TrainAppBean theOneInDataBase, TrainMemberBean theNewMany)
     throws Exception {
        theOneInDataBase.addTrainMember(theNewMany);
        theNewMany.setTrainAppID(theOneInDataBase);
        addTrainMember(theNewMany);
        updateTrainApp(theOneInDataBase);
       }



}

⌨️ 快捷键说明

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