425da84a71c0c71007b15e396427f482456b29d6.svn-base 4.7 KB
package com.espeed.dao.impl;

import java.util.List;
import com.espeed.dao.YxySendFilterAddressDao;
import com.espeed.pojo.YxySendFilterAddress;
import com.espeed.vo.PageBean;

/**
 * 程序名称:    	EspeedMail_时速邮箱
 * 程序版本:    	V1.0
 * 作    者:    	深圳市科飞时速网络技术有限公司(0755-88843776)
 * 版权所有:    	深圳市科飞时速网络技术有限公司
 * 技术支持:    	Tech@21gmail.com
 * 单元名称:     发送过滤分组地址DAO实现类
 * 开始时间:    	2013.12.09
 * 程 序 员:    	谢勇
 * 最后修改:    
 * 备    注:		如需修改请通知程序员    
 */
public class YxySendFilterAddressImpl extends HibernateBaseDAOImpl<YxySendFilterAddress, Long> implements YxySendFilterAddressDao{

	/**实体插入*/
	public int addPojo(YxySendFilterAddress o)throws Exception{
		return super.add(o);
	}
	/**实体批量插入*/
	public void addPojoPi(List<YxySendFilterAddress> o) throws Exception {
		super.addPi(o);
	}
	/**实体编辑*/
	public void updatePojo(YxySendFilterAddress o)throws Exception{
		super.update(o);
	}
	/**HQL查询*/
	public List<YxySendFilterAddress> findByHql(String hql)throws Exception{
		return super.getAll(hql);
	}
	/**HQL查询分页*/
	public List<YxySendFilterAddress> findByHqlPage(String hql,String hqlcount,PageBean pb)throws Exception{
		return super.findByPage(hql, hqlcount, pb);
	}
	/**SQL查询*/
	public List<Object> findBySqlQuery(String sql)throws Exception{
		return super.findBySql(sql);
	}
	/**HQL更新*/
	public void updateByHql(String hql)throws Exception{
		super.updateorDelByHql(hql);
	}
	
	
//	/**根据分类查询分组地址分页*/
//	public List<YxySendFilterAddress> findFilterAddressAll(int filterID,
//			String loginid, String domain,int isready,PageBean pageBean) throws Exception {
//		String hql="";
//		String hqlCount="";
//		if(isready==0){
//			hql="from YxySendFilterAddress where filteraddrloginid='"+loginid+"' and filteraddrdomain='"+domain+"'";
//			hqlCount="select count(*) from YxySendFilterAddress where filteraddrloginid='"+loginid+"' and filteraddrdomain='"+domain+"'";
//		}else{
//			hql="from YxySendFilterAddress where filterid="+filterID+" and filteraddrloginid='"+loginid+"' and filteraddrdomain='"+domain+"'";
//			hqlCount="select count(*) from YxySendFilterAddress where filterid="+filterID+" and filteraddrloginid='"+loginid+"' and filteraddrdomain='"+domain+"'";
//		}	
//		return super.findByPage(hql, hqlCount, pageBean);
//	}
//
//	/**批量添加分组地址*/
//	public void addFilterAddress(List<YxySendFilterAddress> o) throws Exception {
//		super.addPi(o);	
//	}
//
//	/**查询所有地址*/
//	public List<YxySendFilterAddress> findFilterAddress(String loginid,
//			String domain) throws Exception {
//		String hql="from YxySendFilterAddress where filteraddrloginid='"+loginid+"' and filteraddrdomain='"+domain+"'";
//		return super.getAll(hql);
//	}
//	/**模糊查询地址*/
//	public List<YxySendFilterAddress> findFilterAddressLike(String loginid,
//			String domain, String value) throws Exception {
//		String hql="from YxySendFilterAddress where filteraddrloginid='"+loginid+"' and filteraddrdomain='"+domain+"' and filteraddress like '%"+value+"%'";
//		return super.getAll(hql);
//	}
//	/**多ID删除地址*/
//	public void delFilterAddressID(String loginid, String domain, String id)
//			throws Exception {
//		String sql="delete YxySendFilterAddress where filteraddrloginid='"+loginid+"' and filteraddrdomain='"+domain+"' and filteraddrid in("+id+")";
//		super.updateorDelBySql(sql);
//	}
//
//	/**根据地址查询*/
//	public List<YxySendFilterAddress> findFilterAddressByAddr(String loginid,
//			String domain, String address) throws Exception {
//		String hql="from YxySendFilterAddress where filteraddrloginid='"+loginid+"' and filteraddrdomain='"+domain+"' and filteraddress='"+address+"'";
//		return super.getAll(hql);
//	}
//	
//	/**更新地址*/
//	public void updateFilterAddress(YxySendFilterAddress o) throws Exception {
//		super.update(o);
//		
//	}
//
//	/**查询所有分类下的地址*/
//	public List<YxySendFilterAddress> findFilterByFilterID(String loginid,
//			String domain, String filterID) throws Exception {
//		String hql="from YxySendFilterAddress where filterid="+filterID+" and filteraddrloginid='"+loginid+"' and filteraddrdomain='"+domain+"'";
//		return super.getAll(hql);
//	}
//
//	/**HQL更新与删除*/
//	public void delOrUpdateByHQL(String hql) throws Exception {
//		super.updateorDelBySql(hql);	
//	}
//	
//	/**根据id查询过滤地址*/
//	public List<YxySendFilterAddress> findAddressById(String loginid,String domain,String addrssID) throws Exception
//	{
//		String hql = "from YxySendFilterAddress where filteraddrid in ("+addrssID+")";
//		
//		return super.getAll(hql);
//	}
}