public class TableDataDepartmentDAO extends java.lang.Object implements DepartmentDAO
构造器和说明 |
---|
TableDataDepartmentDAO() |
限定符和类型 | 方法和说明 |
---|---|
boolean |
delete(Department ment)
删除部门
|
boolean |
deleteByID(long id)
根据id删除某个部门
|
java.util.List |
findAll()
返回所有的部门
|
Department |
findByID(long id)
根据id返回某个部门
|
Department |
findByNameAndPid(java.lang.String name,
long pid)
根据部门名称和部门名查找部门
|
Department |
findDepartmentByName(java.lang.String departmentName)
根据部门名获取部门
|
Department |
findDepartmentByNameAndParentName(java.lang.String deparmentName,
java.lang.String parentDepartmentName) |
static TableDataDepartmentDAO |
getInstance() |
java.util.Iterator |
getUserAndPostIterator(long id,
boolean toObj)
返回该部门下所有用户与职位的信息
|
void |
save(Department ment)
保存部门
|
void |
transfer(Department ment)
转移部门
|
boolean |
updateDepartment(Department department)
更新部门
|
boolean |
updateDepartmentName(long id,
java.lang.String newName)
更新部门设置
|
public static TableDataDepartmentDAO getInstance()
public void save(Department ment) throws java.lang.Exception
save
在接口中 DepartmentDAO
ment
- 部门对象java.lang.Exception
public void transfer(Department ment) throws java.lang.Exception
DepartmentDAO
transfer
在接口中 DepartmentDAO
ment
- 部门对象java.lang.Exception
public boolean delete(Department ment) throws java.lang.Exception
delete
在接口中 DepartmentDAO
ment
- 部门对象java.lang.Exception
public boolean deleteByID(long id) throws java.lang.Exception
deleteByID
在接口中 DepartmentDAO
id
- 部门idjava.lang.Exception
public Department findByID(long id) throws java.lang.Exception
findByID
在接口中 DepartmentDAO
id
- 部门idjava.lang.Exception
public boolean updateDepartmentName(long id, java.lang.String newName) throws java.lang.Exception
updateDepartmentName
在接口中 DepartmentDAO
id
- 部门idnewName
- 新部门名称java.lang.Exception
public boolean updateDepartment(Department department) throws java.lang.Exception
updateDepartment
在接口中 DepartmentDAO
department
- 新部门java.lang.Exception
public Department findByNameAndPid(java.lang.String name, long pid) throws java.lang.Exception
findByNameAndPid
在接口中 DepartmentDAO
name
- 部门名称pid
- 父idjava.lang.Exception
public java.util.Iterator getUserAndPostIterator(long id, boolean toObj) throws java.lang.Exception
getUserAndPostIterator
在接口中 DepartmentDAO
id
- 部门idtoObj
- 是否转化为对象java.lang.Exception
public Department findDepartmentByName(java.lang.String departmentName)
DepartmentDAO
findDepartmentByName
在接口中 DepartmentDAO
public java.util.List findAll() throws java.lang.Exception
findAll
在接口中 DepartmentDAO
java.lang.Exception
public Department findDepartmentByNameAndParentName(java.lang.String deparmentName, java.lang.String parentDepartmentName) throws java.lang.Exception
findDepartmentByNameAndParentName
在接口中 DepartmentDAO
java.lang.Exception