it.eng.spagobi.kpi.ou.dao
Interface IOrganizationalUnitDAO

All Known Implementing Classes:
OrganizationalUnitDAOImpl

public interface IOrganizationalUnitDAO


Method Summary
 void eraseGrant(java.lang.Integer grantId)
          Removes a grant
 void eraseHierarchy(java.lang.Integer hierarchyId)
          Removes the hierarchy
 void eraseNodeGrant(OrganizationalUnitGrantNode grantNode)
          Remove the grant nodes of a grant
 void eraseNodeGrants(java.lang.Integer grantId)
          Remove all the grant nodes of a grant(a grant node is an association between a hierarchy node and a KPI model instance node in the context of a grant)
 void eraseOrganizationalUnit(java.lang.Integer ouId)
          Removes the organizational unit
 void eraseOrganizationalUnitNode(OrganizationalUnitNode node)
          Removes a node from the structure with its descendants
 boolean existsNodeInHierarchy(java.lang.String path, java.lang.Integer hierarchyId)
          Checks if the input path exists in the given hierarchy
 java.util.List<OrganizationalUnitNode> getChildrenNodes(java.lang.Integer nodeId)
           
 java.util.List<OrganizationalUnitNodeWithGrant> getChildrenNodesWithGrants(java.lang.Integer nodeId, java.lang.Integer grantId)
           
 java.util.List<OrganizationalUnitGrantNode> getGrants(java.lang.Integer kpiModelInstanceId)
          Retrieves the grants associated the KPI model instance node identified by the input integer
 java.util.List<OrganizationalUnitGrant> getGrantsList()
           
 java.util.List<OrganizationalUnitGrantNode> getGrantsValidByDate(java.lang.Integer kpiModelInstanceId, java.util.Date now)
          Retrieves the grants associated the KPI model instance node identified by the input integer, valid in the real time
 java.util.List<OrganizationalUnitHierarchy> getHierarchiesList()
           
 OrganizationalUnitHierarchy getHierarchy(java.lang.Integer id)
           
 java.util.List<OrganizationalUnitGrantNode> getNodeGrants(java.lang.Integer nodeId, java.lang.Integer grantId)
           
 java.util.List<OrganizationalUnitNode> getNodes()
          Retrieves all ou nodes
 OrganizationalUnit getOrganizationalUnit(java.lang.Integer id)
           
 OrganizationalUnit getOrganizationalUnitByLabelAndName(java.lang.String label, java.lang.String name)
           
 java.util.List<OrganizationalUnit> getOrganizationalUnitList()
           
 OrganizationalUnitNode getOrganizationalUnitNode(java.lang.String path, java.lang.Integer hierarchyId)
          Retrieve the node with the input path in the given hierarchy
 OrganizationalUnitNode getRootNode(java.lang.Integer hierarchyId)
           
 OrganizationalUnitNodeWithGrant getRootNodeWithGrants(java.lang.Integer hierarchyId, java.lang.Integer grantId)
           
 void insertGrant(OrganizationalUnitGrant grant)
          Inserts a new grant
 void insertHierarchy(OrganizationalUnitHierarchy h)
          Inserts the hierarchy
 void insertNodeGrants(java.util.List<OrganizationalUnitGrantNode> grantNodes)
          Inserts a list of grant nodes (a grant node is an association between a hierarchy node and a KPI model instance node in the context of a grant)
 void insertOrganizationalUnit(OrganizationalUnit ou)
          Inserts the organizational unit
 void insertOrganizationalUnitNode(OrganizationalUnitNode aNode)
          Inserts the input node in the hierarchy
 void modifyGrant(OrganizationalUnitGrant grant)
          Modify a grant
 void modifyHierarchy(OrganizationalUnitHierarchy h)
          Modifies the hierarchy
 void modifyOrganizationalUnit(OrganizationalUnit ou)
          Modifies the organizational unit
 

Method Detail

getOrganizationalUnitList

java.util.List<OrganizationalUnit> getOrganizationalUnitList()
Returns:
the list of OU

getOrganizationalUnit

OrganizationalUnit getOrganizationalUnit(java.lang.Integer id)
Returns:
the OU with the given identifier

getOrganizationalUnitByLabelAndName

OrganizationalUnit getOrganizationalUnitByLabelAndName(java.lang.String label,
                                                       java.lang.String name)
Returns:
the OU with the given label and name (unique key)

eraseOrganizationalUnit

void eraseOrganizationalUnit(java.lang.Integer ouId)
Removes the organizational unit


insertOrganizationalUnit

void insertOrganizationalUnit(OrganizationalUnit ou)
Inserts the organizational unit


modifyOrganizationalUnit

void modifyOrganizationalUnit(OrganizationalUnit ou)
Modifies the organizational unit


getHierarchiesList

java.util.List<OrganizationalUnitHierarchy> getHierarchiesList()
Returns:
the list of hierarchies

getHierarchy

OrganizationalUnitHierarchy getHierarchy(java.lang.Integer id)
Returns:
the Hierarchy with the given identifier

eraseHierarchy

void eraseHierarchy(java.lang.Integer hierarchyId)
Removes the hierarchy


insertHierarchy

void insertHierarchy(OrganizationalUnitHierarchy h)
Inserts the hierarchy


modifyHierarchy

void modifyHierarchy(OrganizationalUnitHierarchy h)
Modifies the hierarchy


getRootNode

OrganizationalUnitNode getRootNode(java.lang.Integer hierarchyId)
Returns:
the root node for a single hierarchy

getRootNodeWithGrants

OrganizationalUnitNodeWithGrant getRootNodeWithGrants(java.lang.Integer hierarchyId,
                                                      java.lang.Integer grantId)
Returns:
the root node (with grants) for a single hierarchy

getChildrenNodes

java.util.List<OrganizationalUnitNode> getChildrenNodes(java.lang.Integer nodeId)
Returns:
the list of children nodes for a single node of a hierarchy

getChildrenNodesWithGrants

java.util.List<OrganizationalUnitNodeWithGrant> getChildrenNodesWithGrants(java.lang.Integer nodeId,
                                                                           java.lang.Integer grantId)
Returns:
the list of children nodes for a single node of a hierarchy

getGrantsList

java.util.List<OrganizationalUnitGrant> getGrantsList()
Returns:
the list of grants (i.e. association between a KPI model instance and a OU hierarchy)

insertGrant

void insertGrant(OrganizationalUnitGrant grant)
Inserts a new grant

Parameters:
grant -

modifyGrant

void modifyGrant(OrganizationalUnitGrant grant)
Modify a grant

Parameters:
grant -

eraseGrant

void eraseGrant(java.lang.Integer grantId)
Removes a grant

Parameters:
grantId - The grant identifier

getNodeGrants

java.util.List<OrganizationalUnitGrantNode> getNodeGrants(java.lang.Integer nodeId,
                                                          java.lang.Integer grantId)
Returns:
the list of grants for a single node of a hierarchy (i.e. association between a KPI model instance node and a OU hierarchy node)

insertNodeGrants

void insertNodeGrants(java.util.List<OrganizationalUnitGrantNode> grantNodes)
Inserts a list of grant nodes (a grant node is an association between a hierarchy node and a KPI model instance node in the context of a grant)

Parameters:
grantNodes -

eraseNodeGrants

void eraseNodeGrants(java.lang.Integer grantId)
Remove all the grant nodes of a grant(a grant node is an association between a hierarchy node and a KPI model instance node in the context of a grant)

Parameters:
grantNodes -

eraseOrganizationalUnitNode

void eraseOrganizationalUnitNode(OrganizationalUnitNode node)
Removes a node from the structure with its descendants

Parameters:
node - The node to be removed

existsNodeInHierarchy

boolean existsNodeInHierarchy(java.lang.String path,
                              java.lang.Integer hierarchyId)
Checks if the input path exists in the given hierarchy

Parameters:
path -
hierarchyId - The hierarchy identifier
Returns:
true if the path exists in the given hierarchy, false otherwise

getOrganizationalUnitNode

OrganizationalUnitNode getOrganizationalUnitNode(java.lang.String path,
                                                 java.lang.Integer hierarchyId)
Retrieve the node with the input path in the given hierarchy

Parameters:
path -
hierarchyId - The hierarchy identifier
Returns:
the node with the input path in the given hierarchy

insertOrganizationalUnitNode

void insertOrganizationalUnitNode(OrganizationalUnitNode aNode)
Inserts the input node in the hierarchy

Parameters:
aNode -

getGrants

java.util.List<OrganizationalUnitGrantNode> getGrants(java.lang.Integer kpiModelInstanceId)
Retrieves the grants associated the KPI model instance node identified by the input integer

Parameters:
kpiModelInstanceId -
Returns:
the grants associated the KPI model instance node identified by the input integer

getGrantsValidByDate

java.util.List<OrganizationalUnitGrantNode> getGrantsValidByDate(java.lang.Integer kpiModelInstanceId,
                                                                 java.util.Date now)
Retrieves the grants associated the KPI model instance node identified by the input integer, valid in the real time

Parameters:
kpiModelInstanceId -
now -
Returns:
the grants associated the KPI model instance node identified by the input integer

getNodes

java.util.List<OrganizationalUnitNode> getNodes()
Retrieves all ou nodes

Returns:
all the ou nodes

eraseNodeGrant

void eraseNodeGrant(OrganizationalUnitGrantNode grantNode)
Remove the grant nodes of a grant

Parameters:
grantNode - to erase