package org.guangsoft.dao;
import java.util.List;
import java.util.Set;
/**
* 公共DAO功能
* @param <K>要操作的主键类型,由子接口实现
* @param <V> 要操作的POJO类型,由子接口实现
* @author guanghe
*/
public interface CommDao<K,V>
{
//增加数据
public Boolean doCreate(V pojo) throws Exception;
//删除数据
public Boolean doDelete(V pojo) throws Exception;
//修改数据
public Boolean doUpdate(V pojo) throws Exception;
//查询所有数据
public List<V> findAll() throws Exception;
//根据id获取数据
public V findById(K id) throws Exception;
//根据name获取数据
public V findByName(String name) throws Exception;
//根据id批量删除数据
public Boolean doRemoveBatch(Set<K> ids) throws Exception;
//
public Integer getAllCount(String column,String keyWord) throws Exception;
//分页查询数据
public List<V> findAllSplit(Integer currentPage,Integer lineSize,String column,String keyWord) throws Exception;
}