public class DepartmentCache
extends java.lang.Object
构造器和说明 |
---|
DepartmentCache() |
限定符和类型 | 方法和说明 |
---|---|
static void |
cache(Department ment)
添加部门
|
static void |
cacheNewName(long did,
java.lang.String newName)
更新部门名称
|
static void |
clearCache()
清空缓存
|
static Department |
findDepartmentByNameAndParentName(java.lang.String deparmentName,
java.lang.String parentDepartmentName)
根据父子部门名来查找部门
|
static Department |
getDepartment(long id) |
static Department |
getDepartmentByNameAndPid(java.lang.String departmentNamePID) |
static Department |
getDepartmentByNameAndPid(java.lang.String dpname,
long pid) |
static java.lang.Long[] |
getDepartmentPath(long id) |
static java.lang.Long[] |
getDpidsByPid(long pid) |
static DepartmentTreeNode |
getRootNode() |
static java.lang.String |
getShowDepartmentName(long id,
java.lang.String prefix) |
static void |
initCacheTree()
初始化部门结构树缓存
|
static void |
reInit()
重新初始化
|
static boolean |
removeCache(long id)
删除部门
|
public static void initCacheTree()
java.lang.Exception
public static void reInit()
java.lang.Exception
public static void clearCache() throws java.lang.Exception
java.lang.Exception
public static void cache(Department ment)
ment
- 部门对象public static void cacheNewName(long did, java.lang.String newName)
did
- 部门idnewName
- 新名称public static DepartmentTreeNode getRootNode()
public static Department getDepartment(long id)
public static java.lang.Long[] getDpidsByPid(long pid)
public static Department getDepartmentByNameAndPid(java.lang.String dpname, long pid)
public static java.lang.String getShowDepartmentName(long id, java.lang.String prefix)
public static java.lang.Long[] getDepartmentPath(long id)
public static boolean removeCache(long id) throws java.lang.Exception
id
- 部门idjava.lang.Exception
public static Department findDepartmentByNameAndParentName(java.lang.String deparmentName, java.lang.String parentDepartmentName) throws java.lang.Exception
deparmentName
- 当前部门名称parentDepartmentName
- 父部门路径java.lang.Exception
public static Department getDepartmentByNameAndPid(java.lang.String departmentNamePID) throws java.lang.Exception
java.lang.Exception