📄 deptservice.java
字号:
package com.baidu.service;
import java.io.Serializable;
import java.util.List;
import com.baidu.base.*;
import com.baidu.dao.IDeptDAO;
import com.baidu.hibernate.pojo.Zhangshan;
public class DeptService implements IDeptService {
private IDeptDAO deptDao;
public List getResultsByPage(int startIndex, int maxResults) {
return this.deptDao.getRecordLimited(startIndex, maxResults);
}
public int getTotalPage(int size) {
return this.deptDao.getTotalPage(size);
}
public void setDeptDao(IDeptDAO deptDao){
this.deptDao = deptDao;
}
public IDeptDAO getDeptDao(){
return this.deptDao;
}
public void deleteDept(Serializable id) {
this.deptDao.delete(this.deptDao.find(Zhangshan.class, id));
}
public List findAll() {
return this.deptDao.findAll(Zhangshan.class);
}
public Zhangshan findById(Serializable id) {
return (Zhangshan)this.deptDao.find(Zhangshan.class, id);
}
public Serializable saveDept(Zhangshan zs) {
return this.deptDao.save(zs);
}
public Serializable updateDept(Zhangshan zs) {
this.deptDao.update(zs);
return zs.getFldDeptId();
}
public int getTotalRecords(){
return this.deptDao.getTotalResults();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -