Agentflow
V3.1

pe.pase
Class Department

java.lang.Object
  extended by pe.pase.Department
All Implemented Interfaces:
com.flowring.entity.Entity, java.io.Serializable
Direct Known Subclasses:
AFDepartment

public class Department
extends java.lang.Object
implements java.io.Serializable, com.flowring.entity.Entity

A data object to represent the concept of department in a enterprise.

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:

Relationship of Company in Enterprise Tree Structure
Relation\Class Company Department Role MemberRecord
Parent v v v  
Sibling   v v  
Child   v v  

Since:
version 1.0.0
Version:
1.1.5,
Author:
yschen
See Also:
Compnay, Role, MemberRecord, Serialized Form

Constructor Summary
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.
 
Method Summary
 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
 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
 java.lang.String toString()
          Get a string representation of the department.
 void update(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Department

public Department()

Department

public Department(java.lang.String id)
Constructor. Construct a instance of Department with the specified department id and initial the other variables.

Parameters:
id - the given department id
Since:
version 1.0.0

Department

public Department(java.lang.String id,
                  java.lang.String name,
                  java.lang.String parent,
                  java.lang.String manager)
Constructor. Construct a instance of Department with the specified parameters and initial other variables.

Parameters:
id - the given department id
name - the given department name
parent - the given id of parent node (company id, department id, or role id)
manager - the given department manager id
Since:
version 1.0.0
Method Detail

addRoleID

public void addRoleID(java.lang.String id)
Add a role into the department

Parameters:
id - the given role id
Since:
version 1.0.0

addSubDepartmentID

public void addSubDepartmentID(java.lang.String id)
Add a department as the sub-department

Parameters:
id - the given department id
Since:
version 1.0.0

getHashKey

public java.lang.Object getHashKey()
Specified by:
getHashKey in interface com.flowring.entity.Entity

getID

public java.lang.String getID()
Get the department id

Returns:
the department id
Since:
version 1.0.0

getManagerID

public java.lang.String getManagerID()
Get the department manager id

Returns:
the department manager id
Since:
version 1.0.0

getMyID

public java.lang.String getMyID()
Get the department user-defined id

Returns:
the user-defined id
Since:
version 1.0.0

getName

public java.lang.String getName()
Get the department name

Returns:
the department name
Since:
version 1.0.0

getParentID

public java.lang.String getParentID()
Get the id of the parent node

Returns:
the id (company id, department id, or role id)
Since:
version 1.0.0

getResopnsibility

public java.lang.String getResopnsibility()
Get the department resopnsibility

Returns:
the department resopnsibility
Since:
version 1.2

getRoleList

public java.util.Vector getRoleList()
Get all roles of the department

Returns:
all roles (each element in Vector is role id)
Since:
version 1.0.0

getSiblingOrder

public int getSiblingOrder()

getSubDepartmentList

public java.util.Vector getSubDepartmentList()
Get all sub-department of the department

Returns:
all departments (each element in Vector is department id)
Since:
version 1.0.0

getSynopsis

public java.lang.String getSynopsis()
Get the department synopsis

Returns:
the department synopsis
Since:
version 1.0.0

getUnitID

public java.lang.String getUnitID()
Get the department unit type id

Returns:
unit type id
Since:
version 2.2.5

removeRoleID

public boolean removeRoleID(java.lang.String id)
Remove a role from the department

Parameters:
id - the given role id
Returns:
true if the removal is successful; false otherwise
Since:
version 1.0.0

removeSubDepartmentID

public boolean removeSubDepartmentID(java.lang.String id)
Remove a sub-department from the department

Parameters:
id - the given department id
Returns:
true if the removal is successful; false otherwise
Since:
version 1.0.0

setID

public void setID(java.lang.String id)
Set the department id

Parameters:
id - the given department id
Since:
version 1.0.0

setManagerID

public void setManagerID(java.lang.String manager)
Set the department manager id

Parameters:
manager - the given department manager id
Since:
version 1.0.0

setMyID

public void setMyID(java.lang.String id)
Set the department user-defined id

Parameters:
id - the given user-defined id
Since:
version 1.0.0

setName

public void setName(java.lang.String name)
Set the department name

Parameters:
name - the given department name
Since:
version 1.0.0

setParentID

public void setParentID(java.lang.String parent)
Set the id of the parent node

Parameters:
manager - the given id (company id, department id, or role id)
Since:
version 1.0.0

setResopnsibility

public void setResopnsibility(java.lang.String value)
Set the department resopnsibility

Since:
version 1.2

setRoleList

public void setRoleList(java.util.Vector v)
Add more than one roles into the department

Parameters:
the - given sets of roles (each element in Vector is role id)
Since:
version 1.0.0

setSiblingOrder

public void setSiblingOrder(int order)

setSubDepartmentList

public void setSubDepartmentList(java.util.Vector v)
Add more than one sub-departments in the department

Parameters:
the - given sets of departments (each element in Vector is department id)
Since:
version 1.0.0

setSynopsis

public void setSynopsis(java.lang.String synopsis)
Set the department synopsis

Parameters:
synopsis - the given department synopsis
Since:
version 1.0.0

setUnitID

public void setUnitID(java.lang.String value)
Set the department unit type id

Parameters:
value - the given unit type id
Since:
version 2.2.5

toString

public java.lang.String toString()
Get a string representation of the department.

Overrides:
toString in class java.lang.Object
Returns:
the department name
Since:
version 1.0.0

update

public void update(java.lang.Object obj)
Specified by:
update in interface com.flowring.entity.Entity

Agentflow
V3.1

Submit a bug or feature
Copyright 1999-2010 Flowring , Inc. 12F., No.120, Sec2, Gongdao 5th Rd.,
Hsinchu City 300, Taiwan (R.O.C.) All Rights Reserved.