📄 topsf01clientdao.java
字号:
package com.tops.crm.model;
import java.util.*;
import com.tops.j2eebase.model.*;
import org.hibernate.*;
import com.tops.j2eebase.exception.DBOperaterException;
import com.tops.j2eebase.exception.BugReportBaseException;
public final class TopsF01ClientDAO extends PagedHibernateDAO{
private TopsF01ClientDAO() {}
public static TopsF01ClientDAO getNewInstance() {
return new TopsF01ClientDAO();
}
public ActfrmTopsF01Client findByPrimaryKey(java.io.Serializable key,Session outSession) throws BugReportBaseException{
Session session=outSession;
try{
if(session==null) session= ConnectionFactory.getInstance().getSession();
ActfrmTopsF01Client result=(ActfrmTopsF01Client)findByPrimaryKey(ActfrmTopsF01Client.class,key, session);
//处理延迟读取的集合属性或从表内容 if(result!=null){
//Hibernate.initialize(result.get***s());
}
return result;
}
catch(HibernateException ex){
throw new DBOperaterException("提取F01客户信息失败 ,可能对象已经被删除 ",ex,
"findByPrimaryKey失败 ,表名 : TOPS_F01_CLIENT, 主码 :"+key,
DBOperaterException.operType_load_by_hql);
}
finally {
if (session != null && outSession == null) {
try {
session.close();
}
catch (HibernateException e) {
new DBOperaterException("", e, "关闭session时发生错误",DBOperaterException.operType_close_session).saveToBugManager("底层错误 ");
}
}
}
}
public ActfrmTopsF01Client findByPrimaryKey(java.io.Serializable key) throws BugReportBaseException{
return (ActfrmTopsF01Client)findByPrimaryKey(key,null);
}
public List findAll(Session outSession) throws BugReportBaseException{
return findAll(ActfrmTopsF01Client.class,outSession);
}
public List findAll() throws BugReportBaseException{
return findAll(ActfrmTopsF01Client.class);
}
public DataPage findAll(String pageurl,int ipage,int pagesize,Session outSession) throws BugReportBaseException{
return this.findAll(ActfrmTopsF01Client.class,pageurl,ipage,outSession);
}
public DataPage findAll(String pageurl,int ipage,int pagesize) throws BugReportBaseException{
return this.findAll(ActfrmTopsF01Client.class,pageurl,ipage,pagesize,null);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -