public class Company
extends java.lang.Object
implements java.io.Serializable
The CompanyID, CompanyName, and
CompanyManagerID are information encapsulated in
Company
to represent the identification, company name, and the
leader of the company. The CompanyID is unique for identifying each company.
It is reserved for the future extension of the feature about multi-company.
The CompanyManagerID shows the role of leader, such as CEO, by indicating its
RoleID.
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 Company
in the tree structure is listed below:
Relationship of Company in Enterprise ;Tree Structure
Relation\Class | Company |
Department |
Role |
MemberRecord |
Parent | ||||
Sibling | ||||
Child | v | v |
Department
,
Role
,
MemberRecord
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
CACHE_HASHKEY |
Constructor and Description |
---|
Company() |
Company(java.lang.String id) |
Company(java.lang.String id,
java.lang.String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCompanyID(java.lang.String id)
Add a sub-company into the company
|
void |
addDepartmentID(java.lang.String id)
Add a department into the company
|
void |
addRoleID(java.lang.String id)
Add a role into the company
|
java.util.Vector |
getCompanyList()
Get all sub companies ID in the company
|
java.util.Vector |
getDepartmentList()
Get all departments in the company
|
java.lang.Object |
getHashKey()
Get the hash key of this company, this function is used internally.
|
java.lang.String |
getID()
Get the company id
|
java.lang.String |
getManagerID()
Get the company manager id
|
java.lang.String |
getMyID()
Get the company MyID
|
java.lang.String |
getName()
Get the company name
|
java.lang.String |
getParentID()
Get the company parent id
|
java.util.Vector |
getRoleList()
Get all roles in the company
|
int |
getSiblingOrder() |
java.lang.String |
getSynopsis()
Get the company synopsis
|
java.lang.String |
getUnitID()
Get the company unit id
|
java.lang.String |
getWechatOrgID() |
boolean |
removeCompanyID(java.lang.String id)
Remove a sub-company from the company
|
boolean |
removeDepartmentID(java.lang.String id)
Remove a department from the company
|
boolean |
removeRoleID(java.lang.String id)
Remove a role from the company
|
void |
setCompanyList(java.util.Vector companyList)
set all sub companies ID in the company
|
void |
setDepartmentList(java.util.Vector v)
Add more than one departments in the company
|
void |
setID(java.lang.String id)
Set the company id
|
void |
setManagerID(java.lang.String id)
Set the company manager id
|
void |
setMyID(java.lang.String id)
Set the company MyID
|
void |
setName(java.lang.String name)
Set the company name
|
void |
setParent(java.lang.String id)
Deprecated.
|
void |
setParentID(java.lang.String id) |
void |
setRoleList(java.util.Vector v)
Add more than one roles in the company
|
void |
setSiblingOrder(int order) |
void |
setSynopsis(java.lang.String synopsis)
Set the company synopsis
|
void |
setUnitID(java.lang.String id)
Set the company unit id
|
void |
setWechatOrgID(java.lang.String wechatOrgID) |
java.lang.String |
toString()
Deprecated.
|
void |
update(java.lang.Object obj) |
public Company()
public Company(java.lang.String id)
public Company(java.lang.String id, java.lang.String name)
Company
with the
specified id and name.id
- the given company idid
- the given company namepublic java.lang.String getID()
public void setID(java.lang.String id)
id
- the given company idpublic java.lang.String getMyID()
public void setMyID(java.lang.String id)
id
- the given company MyIDpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the given company namepublic java.lang.String getParentID()
@Deprecated public void setParent(java.lang.String id)
id
- the given company parent idpublic void setParentID(java.lang.String id)
public java.lang.String getUnitID()
public void setUnitID(java.lang.String id)
id
- the given company unit idpublic java.lang.String getManagerID()
public void setManagerID(java.lang.String id)
id
- the given company manager idpublic java.lang.String getSynopsis()
public void setSynopsis(java.lang.String synopsis)
id
- the given company synopsispublic void addCompanyID(java.lang.String id)
id
- the given company idpublic boolean removeCompanyID(java.lang.String id)
id
- the given company idpublic void setCompanyList(java.util.Vector companyList)
public java.util.Vector getCompanyList()
Vector
is
company id)public void addDepartmentID(java.lang.String id)
id
- the given department idpublic boolean removeDepartmentID(java.lang.String id)
id
- the given department idpublic java.util.Vector getDepartmentList()
Vector
is
department id)public void setDepartmentList(java.util.Vector v)
the
- given sets of departments (each element in Vector
is department 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 int getSiblingOrder()
public void setSiblingOrder(int order)
public java.lang.String toString()
toString
in class java.lang.Object
public void update(java.lang.Object obj)
public java.lang.Object getHashKey()
public java.lang.String getWechatOrgID()
public void setWechatOrgID(java.lang.String wechatOrgID)
Copyright ? 2022. All Rights Reserved.