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

📄 foldertypemanager.java

📁 jdo开发实例,一个功能全面的oa系统
💻 JAVA
字号:
package com.gzrealmap.oa.dossier.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.dossier.*;
import com.gzrealmap.lib.hibernate.HibernateUtil;
import java.io.*;

public class FolderTypeManager {
  public FolderTypeManager() {
  }
  public static void addFolderType(FolderTypeBean newFolderType) throws Exception {
    HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
    theHibernateUtil.create2Db(newFolderType);
  }

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

  public static void updateFolderType(FolderTypeBean theUpdateFolderType) throws
      Exception {
    HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
    theHibernateUtil.update2Db(theUpdateFolderType);
  }

  public static void removeFolderType(FolderTypeBean theRemoveFolderType) throws
    Exception {
  HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
  theHibernateUtil.remove4Db(theRemoveFolderType);
}
/**
   * 增加一个Folder
   */
 public static void addFolder(FolderBean newFolder) throws Exception {
   HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
   theHibernateUtil.create2Db(newFolder);
 }
 public static void addFolder2FolderType(FolderTypeBean theOneInDataBase, FolderBean theNewMany)
throws Exception {
   theOneInDataBase.addFolder(theNewMany);
   theNewMany.setFolderTypeID(theOneInDataBase);
   addFolder(theNewMany);
   updateFolderType(theOneInDataBase);
  }


}

⌨️ 快捷键说明

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