inputshformdao.java

来自「hibernate应用测试,初学hibernate 的会员可以看看.」· Java 代码 · 共 85 行

JAVA
85
字号
package com.dao;

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

import com.tool.pagetool.*;
import com.bean.*;
public class InputShFormDAO extends PageDAO{
    public static List selectAllInputShForm() throws SQLException {
        return sqlMapper.queryForList("selectAllInputShForm");
   }

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

   public static void insertInputShForm(InputShForm inputshform) throws SQLException {
      sqlMapper.insert("insertInputShForm", inputshform);
   }

   public static void updateInputShForm(InputShForm inputshform) throws SQLException {
       sqlMapper.update("updateInputShForm", inputshform);
   }

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

   public int selectCount(Page page) throws SQLException{
        return ((Integer)sqlMapper.queryForObject("selectInputShFormCount",page)).intValue();
    }

   public int selectCount() throws SQLException{
        return ((Integer)sqlMapper.queryForObject("selectInputShFormCountNotP")).intValue();
    }

   public List selectForPage(Page page) throws SQLException{
        List pageList = sqlMapper.queryForList("selectInputShFormForPage",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("selectInputShFormLastId");
       if(obj==null) return 0;
       else
       return ((Integer)obj).intValue();
    }

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

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

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

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

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

⌨️ 快捷键说明

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