Agentflow
V3.1

pe.pase
Class Company

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

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

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

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  

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

Field Summary
static java.lang.String CACHE_HASHKEY
           
 
Constructor Summary
Company()
           
Company(java.lang.String id)
           
Company(java.lang.String id, java.lang.String name)
          Constructor.
 
Method Summary
 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
 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 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)
          Set the company parent 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 update(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_HASHKEY

public static final java.lang.String CACHE_HASHKEY
See Also:
Constant Field Values
Constructor Detail

Company

public Company()

Company

public Company(java.lang.String id)

Company

public Company(java.lang.String id,
               java.lang.String name)
Constructor. Constructs a instance of Company with the specified id and name.

Parameters:
id - the given company id
id - the given company name
Since:
version 1.0.0
Method Detail

addCompanyID

public void addCompanyID(java.lang.String id)
Add a sub-company into the company

Parameters:
id - the given company id
Since:
V3.1

addDepartmentID

public void addDepartmentID(java.lang.String id)
Add a department into the company

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

addRoleID

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

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

getCompanyList

public java.util.Vector getCompanyList()
Get all sub companies ID in the company

Returns:
all companies (each element in Vector is company id)
Since:
V3.1

getDepartmentList

public java.util.Vector getDepartmentList()
Get all departments in the company

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

getHashKey

public java.lang.Object getHashKey()
Get the hash key of this company, this function is used internally.

Specified by:
getHashKey in interface com.flowring.entity.Entity
Returns:
the hash key of this object

getID

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

Returns:
the company id
Since:
version 1.0.0

getManagerID

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

Returns:
the company manager id, a role id
Since:
V3.1

getMyID

public java.lang.String getMyID()
Get the company MyID

Returns:
the company MyID
Since:
version 1.0.0

getName

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

Returns:
the company name
Since:
version 1.0.0

getParentID

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

Returns:
the company parent id
Since:
V3.1

getRoleList

public java.util.Vector getRoleList()
Get all roles in the company

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

getSiblingOrder

public int getSiblingOrder()

getSynopsis

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

Returns:
the company synopsis
Since:
V3.1

getUnitID

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

Returns:
the company unit id
Since:
V3.1

removeCompanyID

public boolean removeCompanyID(java.lang.String id)
Remove a sub-company from the company

Parameters:
id - the given company id
Returns:
true the removal is successful; false otherwise
Since:
V3.1

removeDepartmentID

public boolean removeDepartmentID(java.lang.String id)
Remove a department from the company

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

removeRoleID

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

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

setDepartmentList

public void setDepartmentList(java.util.Vector v)
Add more than one departments in the company

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

setID

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

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

setManagerID

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

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

setMyID

public void setMyID(java.lang.String id)
Set the company MyID

Parameters:
id - the given company MyID
Since:
version 1.0.0

setName

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

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

setParent

public void setParent(java.lang.String id)
Set the company parent id

Parameters:
id - the given company parent id
Since:
version 1.0.0

setRoleList

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

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

setSiblingOrder

public void setSiblingOrder(int order)

setSynopsis

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

Parameters:
id - the given company synopsis
Since:
V3.1

setUnitID

public void setUnitID(java.lang.String id)
Set the company unit id

Parameters:
id - the given company unit id
Since:
V3.1

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.