📄 checkdetailservice.java
字号:
package cn.com.sdcncsi.lunch.balance.service;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import cn.com.sdcncsi.lunch.balance.dao.IAccountBookDao;
import cn.com.sdcncsi.lunch.balance.domain.AccountBook;
import cn.com.sdcncsi.lunch.balance.utils.Hibernate2JSON;
public class CheckDetailService{
private static Log logger = LogFactory.getLog(CheckDetailService.class.getName());
//private IAccountDetailDao iAccountDetailDao = null;
private IAccountBookDao iAccountBookDao = null;
private Hibernate2JSON h2JSONBook = null;
public void setAccountBookDao(IAccountBookDao iAccountBookDao){
this.iAccountBookDao = iAccountBookDao;
}
/**
* @param h2json the h2JSONBook to set
*/
public void setH2JSONBook(Hibernate2JSON h2json) {
this.h2JSONBook = h2json;
}
// public Collection getAccountDetailsByAccountId(String accountId){
// AccountBook accountBook = new AccountBook();
// accountBook.setId(new Integer(accountId));
// return iAccountDetailDao.getAccountDetails(accountId);
// }
public AccountBook getAccountBookWithDetails(Integer id){
logger.debug("getAccountBookWithDetails:"+id);
AccountBook accountBook = iAccountBookDao.getAccountBookByPrimary(id);
logger.debug("accountType class:"+accountBook.getAccountType().getClass());
//整理hibernate代理类 转化为实际类
AccountBook accountBookNew;
try {
accountBookNew = (AccountBook)h2JSONBook.convertCglibToBean(accountBook);
return accountBookNew;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// AccountType accountType = new AccountType();
// accountType.setAccountBooks(null);
// accountType.setAccountTypeId(accountBook.getAccountType().getAccountTypeId());
// accountType.setAccountTypeName(accountBook.getAccountType().getAccountTypeName());
// accountBook.setAccountType(accountType);
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -