it.eng.spagobi.wapp.dao
Interface IMenuDAO

All Superinterfaces:
ISpagoBIDao
All Known Implementing Classes:
MenuDAOImpl

public interface IMenuDAO
extends ISpagoBIDao

Author:
Antonella Giachino (antonella.giachino@eng.it)

Method Summary
 void createMasterMenu(java.lang.Integer menuID)
          Substitution between the current node and his father
 void eraseMenu(Menu aMenu)
          Implements the query to erase a menu.
 java.util.List getChildrenMenu(java.lang.Integer menuId, java.lang.Integer roleID)
          Tells if a menu has children element.
 boolean hasRolesAssociated(java.lang.Integer menuId)
          Tells if a menu is associated to any roles.
 void insertMenu(Menu aMenu)
          Implements the query to insert a menu.
 java.util.List loadAllMenues()
          Loads all detail information for all menus.
 Menu loadMenuByID(java.lang.Integer menuID)
          Loads all detail information for a menu identified by its menuID.
 Menu loadMenuByID(java.lang.Integer menuID, java.lang.Integer roleID)
          Loads all detail information for a menu identified by its menuID.
 Menu loadMenuByName(java.lang.String name)
          Loads all detail information for a menu whose name is equal to name.
 void modifyMenu(Menu aMenu)
          Implements the query to modify a menu.
 void moveDownMenu(java.lang.Integer menuID)
          Move down the current node
 void moveUpMenu(java.lang.Integer menuID)
          Move up the current node
 
Methods inherited from interface it.eng.spagobi.commons.dao.ISpagoBIDao
getUserProfile, setUserID, setUserProfile
 

Method Detail

loadMenuByID

Menu loadMenuByID(java.lang.Integer menuID)
                  throws it.eng.spago.error.EMFUserError
Loads all detail information for a menu identified by its menuID. All these information, archived by a query to the DB, are stored into an menu object, which is returned.

Parameters:
menuID - The id for the menu to load
Returns:
An menu object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadMenuByID

Menu loadMenuByID(java.lang.Integer menuID,
                  java.lang.Integer roleID)
                  throws it.eng.spago.error.EMFUserError
Loads all detail information for a menu identified by its menuID. All these information, archived by a query to the DB, are stored into an menu object, which is returned.

Parameters:
menuID - The id for the menu to load
Returns:
An menu object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadMenuByName

Menu loadMenuByName(java.lang.String name)
                    throws it.eng.spago.error.EMFUserError
Loads all detail information for a menu whose name is equal to name.

Parameters:
name - The name for the menu to load
Returns:
An menu object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadAllMenues

java.util.List loadAllMenues()
                             throws it.eng.spago.error.EMFUserError
Loads all detail information for all menus. For each of them, detail information is stored into an menu object. After that, all menus are stored into a List, which is returned.

Returns:
A list containing all menu objects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

modifyMenu

void modifyMenu(Menu aMenu)
                throws it.eng.spago.error.EMFUserError
Implements the query to modify a menu. All information needed is stored into the input menu object.

Parameters:
aMenu - The object containing all modify information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

insertMenu

void insertMenu(Menu aMenu)
                throws it.eng.spago.error.EMFUserError
Implements the query to insert a menu. All information needed is stored into the input menu object.

Parameters:
aMenu - The object containing all insert information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

eraseMenu

void eraseMenu(Menu aMenu)
               throws it.eng.spago.error.EMFUserError
Implements the query to erase a menu. All information needed is stored into the input menu object.

Parameters:
aMenu - The object containing all delete information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

hasRolesAssociated

boolean hasRolesAssociated(java.lang.Integer menuId)
                           throws it.eng.spago.error.EMFUserError
Tells if a menu is associated to any roles. It is useful because a menu cannot be deleted if it is used by one or more BI Roles.

Parameters:
menuId - The menu identifier
Returns:
True if the menu is used by one or more objects, else false
Throws:
it.eng.spago.error.EMFUserError - If any exception occurred

getChildrenMenu

java.util.List getChildrenMenu(java.lang.Integer menuId,
                               java.lang.Integer roleID)
                               throws it.eng.spago.error.EMFUserError
Tells if a menu has children element. It is useful for define the type of menu

Parameters:
menuId - The menu identifier
Returns:
True if the menu is used by one or more objects, else false
Throws:
it.eng.spago.error.EMFUserError - If any exception occurred

createMasterMenu

void createMasterMenu(java.lang.Integer menuID)
                      throws it.eng.spago.error.EMFUserError
Substitution between the current node and his father

Parameters:
menuID -
Throws:
it.eng.spago.error.EMFUserError

moveUpMenu

void moveUpMenu(java.lang.Integer menuID)
                throws it.eng.spago.error.EMFUserError
Move up the current node

Parameters:
menuID -
Throws:
it.eng.spago.error.EMFUserError

moveDownMenu

void moveDownMenu(java.lang.Integer menuID)
                  throws it.eng.spago.error.EMFUserError
Move down the current node

Parameters:
menuID -
Throws:
it.eng.spago.error.EMFUserError