📄 payplanservice.java
字号:
/* * Created on 2008-09-22 17:31:32 * * By Yehailong * Copyright juneng.com.cn, 2005-2006, All rights reserved. */package cn.com.juneng.payplan.service;import java.util.List;import java.io.Serializable;import cn.com.juneng.system.common.COMMON;import cn.com.juneng.payplan.vo.PayplanVOImpl;import cn.com.juneng.payplan.dao.PayplanDAO;/** * service类,由Spring容器注入DAO实现,并管理事务性 * @author xiean */public class PayplanService { private PayplanDAO payplanDAO; /** * spring注入dao实现 * @param payplanDAO */ public void setPayplanDAO(PayplanDAO payplanDAO) { this.payplanDAO = payplanDAO; } public PayplanDAO getPayplanDAO() { return this.payplanDAO; } public void remove(Serializable[] key)throws Exception{ if(key!=null){ for (int i=0;i<key.length ;i++ ){ payplanDAO.remove(key[i]); } } } public PayplanVOImpl findByPrimaryKey(String key)throws Exception{ return payplanDAO.findByPrimaryKey(key); } public void create(Object obj)throws Exception{ payplanDAO.create(obj); } public void update(Object obj)throws Exception{ payplanDAO.update(obj); } public List getList(String queryHql,String orderHql,int start, int maxResults) throws Exception { String hql = "from PayplanVOImpl "; if(!COMMON.isEmpty(queryHql)){ hql += "where "+queryHql; } if(COMMON.isEmpty(orderHql)){ orderHql = " order by rid desc"; } hql += " "+orderHql; return payplanDAO.find(hql,start,maxResults); } public int getRowCount(String queryHql){ String hql = "from PayplanVOImpl "; if(!COMMON.isEmpty(queryHql)){ hql += "where "+queryHql; } return payplanDAO.getRowCount(hql,null); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -