package cn.yw.alarmtaskmanage.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;
import com.ibatis.sqlmap.client.SqlMapClient;

import cn.base.dao.BaseSqlMapDAO;

@Repository("ywalarmruleinfoDao")
public class YwalarmruleinfoDao  extends BaseSqlMapDAO{
	
	
	/**
	 * 增加记录
	 */
	
	public void insert_Ywalarmruleinfo(Map map) throws SQLException{
		this.insert("insert_Ywalarmruleinfo",map);
	}
	
	
	/**
	 * 批处理增加记录
	 */
	/*
	public void batch_insert_Ywalarmruleinfo(List batch) throws SQLException{
		this.getSqlMapClientTemplate().insert("batch_insert_Ywalarmruleinfo",batch);
	}
	*/
	 
	/**
	 * 修改记录
	 */
	
	public Integer update_Ywalarmruleinfo(Map map) throws SQLException{
		return this.update("update_Ywalarmruleinfo",map);
	}
	
	
	/**
	 * 删除记录
	 */
	
	public Integer delete_Ywalarmruleinfo(Map map) throws SQLException{
		return this.delete("delete_Ywalarmruleinfo",map);
	}
	
	
	/**
	 * 批处理删除记录
	 */
	
	
	public Integer batch_delete_Ywalarmruleinfo(Map map) throws SQLException{
		return this.delete("batch_delete_Ywalarmruleinfo",map);
	}
	
	
	/**
	 * 查询总数
	 */
	
	public Integer count_Ywalarmruleinfo(Map map) throws SQLException{
		return (Integer)this.queryForObject("count_Ywalarmruleinfo",map);
	}
	
	
	/**
	 * 查询列表记录
	 */
	
	
	public List<Map> query_Ywalarmruleinfo(Map map) throws SQLException{
		return this.queryForPage("query_Ywalarmruleinfo",map);
	}
	
	
	/**
	 * 查询列表记录
	 */
	
	public Map get_Ywalarmruleinfo(Map map) throws SQLException{
		return (Map) this.queryForObject("query_Ywalarmruleinfo",map);
	}
	
	// 查询 告警类型 名称常量
	public List<Map> getAlarmTypeMc(Map map) throws SQLException{
		return this.queryForList("getAlarmTypeMc",map);
	}
	
	// 更新
	public Integer edit_Ywalarmruleinfo(Map map) throws SQLException{
		return this.update("edit_Ywalarmruleinfo",map);
	}
}
