📄 incomedaoimpl.java
字号:
package org.yeeku.dao.impl;
import java.io.*;
import org.yeeku.model.*;
import org.hibernate.*;
import org.hibernate.cfg.*;
import org.yeeku.dao.*;
import java.util.*;
/**
* @author yeeku.H.lee kongyeeku@163.com
* @version 1.0
* <br>Copyright (C), 2005-2008, yeeku.H.Lee
* <br>This program is protected by copyright laws.
* <br>Program Name:
* <br>Date:
*/
public class IncomeDaoImpl implements IncomeDao
{
public void save(Session sess , Income income)
{
sess.save(income);
}
public void delete(Session sess , Income income)
{
sess.delete(income);
}
public void delete(Session sess , int id)
{
sess.delete(sess.get(Income.class ,new Integer(id)));
}
public void update(Session sess , Income income)
{
sess.update(income);
}
public List findByName(Session sess , String deptName)
{
List l = sess.createQuery("from Dept as d where deptName = :name")
.setString("name" , deptName)
.list();
return l ;
}
public List findByShowIncome(Session sess , int beginPage , int listPage)
{
List l = sess.createQuery("from Income")
.setFirstResult(beginPage)
.setMaxResults(listPage)
.list();
return l ;
}
public Income get(Session sess , Integer incomeId)
{
return (Income)sess.load(Income.class , incomeId);
}
public List findByShowIncome(Session sess)
{
List l = sess.createQuery("from Income")
.list();
return l;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -