allfoldermanager.java

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

JAVA
57
字号
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 AllFolderManager {
  public AllFolderManager() {
  }
  public static void addAllFolder(AllFolderBean newAllFolder) throws Exception {
     HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
     theHibernateUtil.create2Db(newAllFolder);
   }

   public static AllFolderBean findAllFolder(String obj) throws Exception {
     HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
     return (AllFolderBean) theHibernateUtil.findByPrimaryKey(AllFolderBean.class,
         obj);
   }

   public static void updateAllFolder(AllFolderBean theUpdateAllFolder) throws
       Exception {
     HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
     theHibernateUtil.update2Db(theUpdateAllFolder);
   }

   public static void removeAllFolder(AllFolderBean theRemoveAllFolder) throws
     Exception {
   HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
   theHibernateUtil.remove4Db(theRemoveAllFolder);
 }
 /**
    * 增加一个Folder
    */

   public static void addFolder(FolderBean newFolder) throws Exception {
    HibernateUtil theHibernateUtil = HibernateUtil.getInstance();
    theHibernateUtil.create2Db(newFolder);
  }
    public static void addFolder2AllFolder(AllFolderBean theOneInDataBase, FolderBean theNewMany)
 throws Exception {
      theOneInDataBase.addFolder(theNewMany);
      theNewMany.setAllFolderID(theOneInDataBase);
      addFolder(theNewMany);
      updateAllFolder(theOneInDataBase);
     }


}

⌨️ 快捷键说明

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