it.eng.spagobi.kpi.goal.dao
Class GoalDAOImpl

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.kpi.goal.dao.GoalDAOImpl
All Implemented Interfaces:
ISpagoBIDao, IGoalDAO

public class GoalDAOImpl
extends AbstractHibernateDAO
implements IGoalDAO


Constructor Summary
GoalDAOImpl()
           
 
Method Summary
 void eraseGoal(java.lang.Integer grantId)
          Remove a goal
 void ereseGoalKpis(java.lang.Integer goalNodeId)
          Remove the list of kpi model instances linked to a goalNode
 void ereseGoalNode(java.lang.Integer goalNodeId)
          Remove a goal node
 java.util.List<GoalNode> getChildrenNodes(java.lang.Integer nodeId)
          Get the children of a goal node
 java.util.List<GoalKpi> getGoalKpi(java.lang.Integer goalNodeId)
          get the list of kpi model instances linked to a goalNode
 java.util.List<Goal> getGoalsList()
          Loading the list of the goals
 GoalNode getRootNode(java.lang.Integer goalId, java.lang.Integer ouId)
          Get the root node of a goal hierarchy linked to an ou and a grant
 void insertGoal(Goal goal)
          Insert a goal
 void insertGoalKpis(java.util.List<GoalKpi> goalKpis, java.lang.Integer goalNodeId)
          Insert a list of goal kpi model instances
 void insertGoalNode(GoalNode goalNode, java.lang.Integer fatherId)
          Insert a goal node
 Goal toGoal(SbiGoal hibernateGoal)
           
 GoalKpi toGoalKpi(SbiGoalKpi hibernateGoalKpi)
           
 GoalNode toGoalNode(SbiGoalHierarchy hibernateGoalNode)
           
 void updateGoalName(java.lang.Integer goalId, java.lang.String newName)
          Update a goal node
 void updateGoalNode(GoalNode goalNode)
          Update a goal node
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
commitIfActiveAndClose, getSession, getUserProfile, logException, rollbackIfActiveAndClose, setUserID, setUserProfile, updateSbiCommonInfo4Insert, updateSbiCommonInfo4Update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.eng.spagobi.commons.dao.ISpagoBIDao
getUserProfile, setUserID, setUserProfile
 

Constructor Detail

GoalDAOImpl

public GoalDAOImpl()
Method Detail

getGoalsList

public java.util.List<Goal> getGoalsList()
Description copied from interface: IGoalDAO
Loading the list of the goals

Specified by:
getGoalsList in interface IGoalDAO
Returns:

insertGoal

public void insertGoal(Goal goal)
Description copied from interface: IGoalDAO
Insert a goal

Specified by:
insertGoal in interface IGoalDAO
Parameters:
goal - the goal to insert

eraseGoal

public void eraseGoal(java.lang.Integer grantId)
Description copied from interface: IGoalDAO
Remove a goal

Specified by:
eraseGoal in interface IGoalDAO
Parameters:
grantId - the id of the goal to remove

getRootNode

public GoalNode getRootNode(java.lang.Integer goalId,
                            java.lang.Integer ouId)
Description copied from interface: IGoalDAO
Get the root node of a goal hierarchy linked to an ou and a grant

Specified by:
getRootNode in interface IGoalDAO
Parameters:
goalId - the goal id
ouId - the id of the ou node
Returns:
the root

getChildrenNodes

public java.util.List<GoalNode> getChildrenNodes(java.lang.Integer nodeId)
Description copied from interface: IGoalDAO
Get the children of a goal node

Specified by:
getChildrenNodes in interface IGoalDAO
Parameters:
nodeId - the id of the node
Returns:

insertGoalNode

public void insertGoalNode(GoalNode goalNode,
                           java.lang.Integer fatherId)
Description copied from interface: IGoalDAO
Insert a goal node

Specified by:
insertGoalNode in interface IGoalDAO
Parameters:
goalNode - the goal node
fatherId - the id of the father node (can be null)

ereseGoalNode

public void ereseGoalNode(java.lang.Integer goalNodeId)
Description copied from interface: IGoalDAO
Remove a goal node

Specified by:
ereseGoalNode in interface IGoalDAO
Parameters:
goalNodeId - the id of the goal node to remove

updateGoalName

public void updateGoalName(java.lang.Integer goalId,
                           java.lang.String newName)
Description copied from interface: IGoalDAO
Update a goal node

Specified by:
updateGoalName in interface IGoalDAO
Parameters:
goalId - the id of the goal
newName - the new name of the goal

updateGoalNode

public void updateGoalNode(GoalNode goalNode)
Description copied from interface: IGoalDAO
Update a goal node

Specified by:
updateGoalNode in interface IGoalDAO
Parameters:
goalNode - the goal node to update

insertGoalKpis

public void insertGoalKpis(java.util.List<GoalKpi> goalKpis,
                           java.lang.Integer goalNodeId)
Description copied from interface: IGoalDAO
Insert a list of goal kpi model instances

Specified by:
insertGoalKpis in interface IGoalDAO
Parameters:
goalKpis - the list to add
goalNodeId - the id of the goal node linked to the kpi model instances

ereseGoalKpis

public void ereseGoalKpis(java.lang.Integer goalNodeId)
Description copied from interface: IGoalDAO
Remove the list of kpi model instances linked to a goalNode

Specified by:
ereseGoalKpis in interface IGoalDAO
Parameters:
goalNodeId - the id of the goal node

getGoalKpi

public java.util.List<GoalKpi> getGoalKpi(java.lang.Integer goalNodeId)
Description copied from interface: IGoalDAO
get the list of kpi model instances linked to a goalNode

Specified by:
getGoalKpi in interface IGoalDAO
Parameters:
goalNodeId - the id of the goal node
Returns:

toGoalKpi

public GoalKpi toGoalKpi(SbiGoalKpi hibernateGoalKpi)

toGoal

public Goal toGoal(SbiGoal hibernateGoal)

toGoalNode

public GoalNode toGoalNode(SbiGoalHierarchy hibernateGoalNode)