public class Department
extends java.lang.Object
implements java.io.Serializable
DepartmentID,DepartmentUDID, DepartmentName,
DepartmentManagerID, and DepartmentSynopsis are the
information encapsulated in Company
. The last three field
shows the department name, the manager of the department, and the comment for
the department.
The DepartmentID is unique and used to identify the specific department in the Agentflow System. However, in the real world, some enterprise has its own way to identify the departments. Therefore, the DepartmentUDID (User-Defined-ID) is used to meet the requirement by filling the corresponding self-defined department ID.
The tree structure is used to denote the enterprise. The class Company
,
Department
, Role
, and MemberRecord
are the tree nodes. The ancestor-descendant relationship of Department
in the tree structure is listed below:
Relation\Class | Company |
Department |
Role |
MemberRecord |
Parent | v | v | v | |
Sibling | v | v | ||
Child | v | v |
Compnay
,
Role
,
MemberRecord
,
Serialized FormConstructor and Description |
---|
Department() |
Department(java.lang.String id)
Constructor.
|
Department(java.lang.String id,
java.lang.String name,
java.lang.String parent,
java.lang.String manager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addRoleID(java.lang.String id)
Add a role into the department
|
void |
addSubDepartmentID(java.lang.String id)
Add a department as the sub-department
|
java.lang.Object |
getHashKey() |
java.lang.String |
getID()
Get the department id
|
java.lang.String |
getManagerID()
Get the department manager id
|
java.lang.String |
getMyID()
Get the department user-defined id
|
java.lang.String |
getName()
Get the department name
|
java.lang.String |
getParentID()
Get the id of the parent node
|
java.lang.String |
getResopnsibility()
Get the department resopnsibility
|
java.util.Vector |
getRoleList()
Get all roles of the department
|
int |
getSiblingOrder() |
java.util.Vector |
getSubDepartmentList()
Get all sub-department of the department
|
java.lang.String |
getSynopsis()
Get the department synopsis
|
java.lang.String |
getUnitID()
Get the department unit type id
|
java.lang.String |
getWechatOrgID() |
boolean |
removeRoleID(java.lang.String id)
Remove a role from the department
|
boolean |
removeSubDepartmentID(java.lang.String id)
Remove a sub-department from the department
|
void |
setID(java.lang.String id)
Set the department id
|
void |
setManagerID(java.lang.String manager)
Set the department manager id
|
void |
setMyID(java.lang.String id)
Set the department user-defined id
|
void |
setName(java.lang.String name)
Set the department name
|
void |
setParentID(java.lang.String parent)
Set the id of the parent node
|
void |
setResopnsibility(java.lang.String value)
Set the department resopnsibility
|
void |
setRoleList(java.util.Vector v)
Add more than one roles into the department
|
void |
setSiblingOrder(int order) |
void |
setSubDepartmentList(java.util.Vector v)
Add more than one sub-departments in the department
|
void |
setSynopsis(java.lang.String synopsis)
Set the department synopsis
|
void |
setUnitID(java.lang.String value)
Set the department unit type id
|
void |
setWechatOrgID(java.lang.String wechatOrgID) |
java.lang.String |
toString()
Get a string representation of the department.
|
void |
update(java.lang.Object obj) |
public Department()
public Department(java.lang.String id)
Department
with the
specified department id and initial the other variables.id
- the given department idpublic Department(java.lang.String id, java.lang.String name, java.lang.String parent, java.lang.String manager)
Department
with the
specified parameters and initial other variables.id
- the given department idname
- the given department nameparent
- the given id of parent node (company id, department id, or
role id)manager
- the given department manager idpublic java.lang.String getID()
public void setID(java.lang.String id)
id
- the given department idpublic java.lang.String getMyID()
public void setMyID(java.lang.String id)
id
- the given user-defined idpublic java.lang.String getUnitID()
public void setUnitID(java.lang.String value)
value
- the given unit type idpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the given department namepublic java.lang.String getResopnsibility()
public void setResopnsibility(java.lang.String value)
public java.lang.String getSynopsis()
public void setSynopsis(java.lang.String synopsis)
synopsis
- the given department synopsispublic java.lang.String getManagerID()
public void setManagerID(java.lang.String manager)
manager
- the given department manager idpublic java.lang.String getParentID()
public void setParentID(java.lang.String parent)
manager
- the given id (company id, department id, or role id)public void addRoleID(java.lang.String id)
id
- the given role idpublic boolean removeRoleID(java.lang.String id)
id
- the given role idpublic java.util.Vector getRoleList()
Vector
is role id)public void setRoleList(java.util.Vector v)
the
- given sets of roles (each element in Vector
is
role id)public void addSubDepartmentID(java.lang.String id)
id
- the given department idpublic boolean removeSubDepartmentID(java.lang.String id)
id
- the given department idpublic java.util.Vector getSubDepartmentList()
Vector
is
department id)public void setSubDepartmentList(java.util.Vector v)
the
- given sets of departments (each element in Vector
is department id)public int getSiblingOrder()
public void setSiblingOrder(int order)
public java.lang.String getWechatOrgID()
public void setWechatOrgID(java.lang.String wechatOrgID)
public java.lang.String toString()
toString
in class java.lang.Object
public void update(java.lang.Object obj)
public java.lang.Object getHashKey()
Copyright ? 2022. All Rights Reserved.