📄 hibernatedao.java
字号:
package com.util;
import java.io.Serializable;
import java.util.List;
import org.hibernate.Session;
public interface HibernateDao {
public void save(Object po) throws Exception ;
public List query(String hql)throws Exception ;
public Object get(Class clas ,Serializable id)throws Exception;
public void update(Object po) throws Exception ;
public void delete(Object po) throws Exception ;
public void executeSql(String sql)throws Exception ;
/**
* 直接执行一个统计的Sql,返回统计数量(第一个字段)
* @param sql
* @return
* @throws Exception
*/
public int getCountByExecuteSql(String sql)throws Exception ;
public List getTopN(String hql,int n)throws Exception ;
public List getListByExecuteSql(String sq,String columnNamel)throws Exception;
public List getListByExecuteSql(String sq, int fetchNubmer)throws Exception;
public Session openSession()throws Exception;
public void closeSession()throws Exception;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -