BaseServiceImpl类
import java.io.Serializable; import java.util.List;import org.hibernate.criterion.DetachedCriteria; /** * Service实现类 - Service实现类基类 * ============================================================================ * * ---------------------------------------------------------------------------- * * ---------------------------------------------------------------------------- * * ---------------------------------------------------------------------------- * * ============================================================================ */public class BaseServiceImpl implements BaseService { private BaseDao baseDao; public BaseDao getBaseDao() { return baseDao; } public void setBaseDao(BaseDao baseDao) { this.baseDao = baseDao; } public T get(PK id) { return baseDao.get(id); } public T load(PK id) { return baseDao.load(id); } public List get(PK[] ids) { return baseDao.get(ids); } public T get(String propertyName, Object value) { return baseDao.get(propertyName, value); } public List getList(String propertyName, Object value) { return baseDao.getList(propertyName, value); } public List getAll() { return baseDao.getAll(); } public Long getTotalCount() { return baseDao.getTotalCount(); } public boolean isUnique(String propertyName, Object oldValue, Object newValue) { return baseDao.isUnique(propertyName, oldValue, newValue); } public boolean isExist(String propertyName, Object value) { return baseDao.isExist(propertyName, value); } public PK save(T entity) { return baseDao.save(entity); } public void update(T entity) { baseDao.update(entity); } public void delete(T entity) { baseDao.delete(entity); } public void delete(PK id) { baseDao.delete(id); } public void delete(PK[] ids) { baseDao.delete(ids); } public void flush() { baseDao.flush(); } public void clear() { baseDao.clear(); } public void evict(Object object) { baseDao.evict(object); } public Pager findByPager(Pager pager) { return baseDao.findByPager(pager); } public Pager findByPager(Pager pager, DetachedCriteria detachedCriteria) { return baseDao.findByPager(pager, detachedCriteria); }}
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
暂时没有评论,来抢沙发吧~