public class MemoryDepartmentExecutor extends java.lang.Object implements DepartmentExecutor
构造器和说明 |
---|
MemoryDepartmentExecutor() |
限定符和类型 | 方法和说明 |
---|---|
void |
buildCache()
初始化部门结构树缓存
|
void |
cache(Department ment)
添加部门
|
void |
cacheNewName(long did,
java.lang.String newName)
更新部门名称
|
void |
clearCache()
清理所有的缓存信息
|
Department |
findDepartmentByNameAndParentName(java.lang.String deparmentName,
java.lang.String parentDepartmentName) |
Department |
findDepartmentByNameAndPID(java.lang.String departmentNamePID)
根据部门名称和pid查找部门
|
java.lang.Class |
getClassKey()
缓存器的class标识
|
Department |
getDepartment(long id) |
Department |
getDepartmentByNameAndPid(java.lang.String dpname,
long pid) |
java.lang.Long[] |
getDepartmentPath(long id) |
java.lang.Long[] |
getDpidsByPid(long pid) |
static DepartmentExecutor |
getInstance() |
DepartmentTreeNode |
getRootNode() |
java.lang.String |
getShowDepartmentName(long id,
java.lang.String prefix) |
void |
rebuildCache()
重新初始化
|
boolean |
removeCache(long id)
删除部门
|
public static DepartmentExecutor getInstance()
public void buildCache()
buildCache
在接口中 CacheExecutor
java.lang.Exception
public void rebuildCache()
rebuildCache
在接口中 CacheExecutor
java.lang.Exception
public void cache(Department ment)
cache
在接口中 DepartmentExecutor
ment
- 部门对象public void cacheNewName(long did, java.lang.String newName)
cacheNewName
在接口中 DepartmentExecutor
did
- 部门idnewName
- 新名称public DepartmentTreeNode getRootNode()
getRootNode
在接口中 DepartmentExecutor
public Department getDepartment(long id)
getDepartment
在接口中 DepartmentExecutor
public java.lang.Long[] getDpidsByPid(long pid)
getDpidsByPid
在接口中 DepartmentExecutor
public Department getDepartmentByNameAndPid(java.lang.String dpname, long pid)
getDepartmentByNameAndPid
在接口中 DepartmentExecutor
public java.lang.String getShowDepartmentName(long id, java.lang.String prefix)
getShowDepartmentName
在接口中 DepartmentExecutor
public java.lang.Long[] getDepartmentPath(long id)
getDepartmentPath
在接口中 DepartmentExecutor
public boolean removeCache(long id) throws java.lang.Exception
removeCache
在接口中 DepartmentExecutor
id
- 部门idjava.lang.Exception
public Department findDepartmentByNameAndParentName(java.lang.String deparmentName, java.lang.String parentDepartmentName) throws java.lang.Exception
findDepartmentByNameAndParentName
在接口中 DepartmentExecutor
java.lang.Exception
public Department findDepartmentByNameAndPID(java.lang.String departmentNamePID) throws java.lang.Exception
DepartmentExecutor
findDepartmentByNameAndPID
在接口中 DepartmentExecutor
java.lang.Exception
public void clearCache() throws java.lang.Exception
CacheExecutor
clearCache
在接口中 CacheExecutor
java.lang.Exception
public java.lang.Class getClassKey()
CacheExecutor
getClassKey
在接口中 CacheExecutor