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

📄 inputapplyforeignkeyviewdao.java

📁 hibernate应用测试,初学hibernate 的会员可以看看.
💻 JAVA
字号:
package com.dao;

import java.util.List;
import java.sql.SQLException;

import com.tool.pagetool.*;
import com.bean.*;
public class InputApplyForeignkeyViewDAO extends PageDAO{
    private boolean toActive=false;
    public static List selectAllInputApplyForeignkeyView() throws SQLException {
        return sqlMapper.queryForList("selectAllInputApplyForeignkeyView");
   }

  public InputApplyForeignkeyViewDAO(){}

  public InputApplyForeignkeyViewDAO(boolean toActive){
      this.toActive=toActive;
  }

   public static InputApplyForeignkeyView selectInputApplyForeignkeyViewByinApId(int id) throws SQLException {
       return (InputApplyForeignkeyView) sqlMapper.queryForObject("selectInputApplyForeignkeyViewByinApId",       new Integer(id));
   }

   public static void insertInputApplyForeignkeyView(InputApplyForeignkeyView inputapplyforeignkeyview) throws SQLException {
      sqlMapper.insert("insertInputApplyForeignkeyView", inputapplyforeignkeyview);
   }

   public static void updateInputApplyForeignkeyView(InputApplyForeignkeyView inputapplyforeignkeyview) throws SQLException {
       sqlMapper.update("updateInputApplyForeignkeyView", inputapplyforeignkeyview);
   }

   public static void deleteInputApplyForeignkeyViewByinApId(int id) throws SQLException {
        sqlMapper.delete("deleteInputApplyForeignkeyViewByinApId", new Integer(id));
    }

    public static void updateInputApplySetDelFlagYes(int id) throws SQLException {
         sqlMapper.update("updateInputApplyDelFlagYesByinApId", new Integer(id));
    }

    public static void updateInputApplySetDelFlagNo(int id) throws SQLException {
         sqlMapper.update("updateInputApplyDelFlagNoByinApId", new Integer(id));
    }

   public int selectCount(Page page) throws SQLException{
       if(!toActive){
           return ((Integer)sqlMapper.queryForObject("selectInputApplyForeignkeyViewCount",page)).intValue();
       }else return ((Integer)sqlMapper.queryForObject("selectInputApplyForeignkeyViewCountWOne",page)).intValue();
    }

   public int selectCount() throws SQLException{
       if(!toActive){
           return ((Integer)sqlMapper.queryForObject("selectInputApplyForeignkeyViewCountNotP")).intValue();
       }else return ((Integer)sqlMapper.queryForObject("selectInputApplyForeignkeyViewCountNotPWOne")).intValue();
    }

   public List selectForPage(Page page) throws SQLException{
       List pageList=null;
       if(!toActive){
           pageList = sqlMapper.queryForList("selectInputApplyForeignkeyViewForPage",page);
       }else pageList = sqlMapper.queryForList("selectInputApplyForeignkeyViewForPageWOne",page);
        return pageList;
    }

   public static void startTransation()throws SQLException{
        sqlMapper.startTransaction();
    }

     public static void startTransation(int i)throws SQLException{
        sqlMapper.startTransaction(i);
     }

   public static void rollback() throws SQLException{
        sqlMapper.endTransaction();
     }

   public static void commit()throws SQLException{
        sqlMapper.commitTransaction();
    }

  public static int getLastId() throws SQLException{
       Object obj = sqlMapper.queryForObject("selectInputApplyForeignkeyViewLastId");
       if(obj==null) return 0;
       else
       return ((Integer)obj).intValue();
    }

}

⌨️ 快捷键说明

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