it.eng.spagobi.bo.dao.hibernate
Class LowFunctionalityDAOHibImpl

java.lang.Object
  extended by it.eng.spagobi.bo.dao.hibernate.AbstractHibernateDAO
      extended by it.eng.spagobi.bo.dao.hibernate.LowFunctionalityDAOHibImpl
All Implemented Interfaces:
ILowFunctionalityDAO

public class LowFunctionalityDAOHibImpl
extends AbstractHibernateDAO
implements ILowFunctionalityDAO

Defines the Hibernate implementations for all DAO methods, for a functionality.

Author:
sulis

Constructor Summary
LowFunctionalityDAOHibImpl()
           
 
Method Summary
 void deleteInconsistentRoles(java.util.Set rolesSet)
          Deletes a set of inconsistent roles reference from the database, in order to keep functionalities tree permissions consistence.
 void eraseLowFunctionality(LowFunctionality aLowFunctionality, it.eng.spago.security.IEngUserProfile profile)
          Implements the query to erase a low functionality.
 java.lang.Integer existByCode(java.lang.String code)
          Control if exist a functionality with the given code
 boolean hasChild(java.lang.Integer id)
          Control if the functionality with the given id has childs
 void insertLowFunctionality(LowFunctionality aLowFunctionality, it.eng.spago.security.IEngUserProfile profile)
          Implements the query to insert a low functionality.
 java.util.List loadAllLowFunctionalities(boolean recoverBIObjects)
          Loads all the functionalities
 java.util.List loadChildFunctionalities(java.lang.Integer parentId, boolean recoverBIObjects)
          Loads all the child functionalities of the given parent functionality
 LowFunctionality loadLowFunctionalityByID(java.lang.Integer functionalityID, boolean recoverBIObjects)
          Loads all information for a low functionality identified by its functionalityID.
 LowFunctionality loadLowFunctionalityByPath(java.lang.String functionalityPath, boolean recoverBIObjects)
          Loads all information for a low functionality identified by its functionalityPath.
 LowFunctionality loadRootLowFunctionality(boolean recoverBIObjects)
          Loads the root functionality
 java.util.List loadSubLowFunctionalities(java.lang.String initialPath, boolean recoverBIObjects)
          Loads all the sub functionalities of the given initial path
 void modifyLowFunctionality(LowFunctionality aLowFunctionality)
          Implements the query to modify a low functionality.
 void moveDownLowFunctionality(java.lang.Integer functionalityID)
          Moves down the functionality specified by the id at input in the functionalities tree
 void moveUpLowFunctionality(java.lang.Integer functionalityID)
          Moves up the functionality specified by the id at input in the functionalities tree
 LowFunctionality toLowFunctionality(SbiFunctions hibFunct, boolean recoverBIObjects)
          From the Hibernate Low Functionality object at input, gives the corrispondent LowFunctionality object.
 
Methods inherited from class it.eng.spagobi.bo.dao.hibernate.AbstractHibernateDAO
getSession, logException
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LowFunctionalityDAOHibImpl

public LowFunctionalityDAOHibImpl()
Method Detail

loadLowFunctionalityByID

public LowFunctionality loadLowFunctionalityByID(java.lang.Integer functionalityID,
                                                 boolean recoverBIObjects)
                                          throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Loads all information for a low functionality identified by its functionalityID. All these information, are stored into a LowFunctionality object, which is returned.

Specified by:
loadLowFunctionalityByID in interface ILowFunctionalityDAO
Parameters:
functionalityID - The id for the low functionality to load
recoverBIObjects - If true the LowFunctionality at output will have the list of contained BIObject objects
Returns:
A LowFunctionality object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
it.eng.spagobi.bo.dao.ILowFunctionalityDAO#loadLowFunctionalityByID(java.lang.Integer)

loadRootLowFunctionality

public LowFunctionality loadRootLowFunctionality(boolean recoverBIObjects)
                                          throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Loads the root functionality

Specified by:
loadRootLowFunctionality in interface ILowFunctionalityDAO
Parameters:
recoverBIObjects - If true each LowFunctionality at output will have the list of contained BIObject objects
Returns:
the root functionality
Throws:
it.eng.spago.error.EMFUserError
See Also:
ILowFunctionalityDAO.loadRootLowFunctionality(boolean)

loadLowFunctionalityByPath

public LowFunctionality loadLowFunctionalityByPath(java.lang.String functionalityPath,
                                                   boolean recoverBIObjects)
                                            throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Loads all information for a low functionality identified by its functionalityPath. All these information, are stored into a LowFunctionality object, which is returned.

Specified by:
loadLowFunctionalityByPath in interface ILowFunctionalityDAO
Parameters:
functionalityPath - The path for the low functionality to load
recoverBIObjects - If true the LowFunctionality at output will have the list of contained BIObject objects
Returns:
A LowFunctionality object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
it.eng.spagobi.bo.dao.ILowFunctionalityDAO#loadLowFunctionalityByPath(java.lang.String)

modifyLowFunctionality

public void modifyLowFunctionality(LowFunctionality aLowFunctionality)
                            throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Implements the query to modify a low functionality. All information needed is stored into the input LowFunctionality object.

Specified by:
modifyLowFunctionality in interface ILowFunctionalityDAO
Parameters:
aLowFunctionality - The object containing all modify information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
ILowFunctionalityDAO.modifyLowFunctionality(it.eng.spagobi.bo.LowFunctionality)

insertLowFunctionality

public void insertLowFunctionality(LowFunctionality aLowFunctionality,
                                   it.eng.spago.security.IEngUserProfile profile)
                            throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Implements the query to insert a low functionality. All information needed is stored into the input LowFunctionality object.

Specified by:
insertLowFunctionality in interface ILowFunctionalityDAO
Parameters:
aLowFunctionality - The object containing all insert information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
ILowFunctionalityDAO.insertLowFunctionality(it.eng.spagobi.bo.LowFunctionality, it.eng.spago.security.IEngUserProfile)

eraseLowFunctionality

public void eraseLowFunctionality(LowFunctionality aLowFunctionality,
                                  it.eng.spago.security.IEngUserProfile profile)
                           throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Implements the query to erase a low functionality. All information needed is stored into the input LowFunctionality object.

Specified by:
eraseLowFunctionality in interface ILowFunctionalityDAO
Parameters:
aLowFunctionality - The object containing all erase information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
ILowFunctionalityDAO.eraseLowFunctionality(it.eng.spagobi.bo.LowFunctionality, it.eng.spago.security.IEngUserProfile)

toLowFunctionality

public LowFunctionality toLowFunctionality(SbiFunctions hibFunct,
                                           boolean recoverBIObjects)
From the Hibernate Low Functionality object at input, gives the corrispondent LowFunctionality object.

Parameters:
hibFunct - The Hibernate Low Functionality object
recoverBIObjects - If true the LowFunctionality at output will have the list of contained BIObject objects
Returns:
the corrispondent output LowFunctionality

existByCode

public java.lang.Integer existByCode(java.lang.String code)
                              throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Control if exist a functionality with the given code

Specified by:
existByCode in interface ILowFunctionalityDAO
Parameters:
code - The code of the functionality
Returns:
The functionality ID
Throws:
it.eng.spago.error.EMFUserError
See Also:
ILowFunctionalityDAO.existByCode(java.lang.String)

loadAllLowFunctionalities

public java.util.List loadAllLowFunctionalities(boolean recoverBIObjects)
                                         throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Loads all the functionalities

Specified by:
loadAllLowFunctionalities in interface ILowFunctionalityDAO
Parameters:
recoverBIObjects - If true each LowFunctionality at output will have the list of contained BIObject objects
Returns:
the list of functionalities
Throws:
it.eng.spago.error.EMFUserError
See Also:
ILowFunctionalityDAO.loadAllLowFunctionalities(boolean)

loadSubLowFunctionalities

public java.util.List loadSubLowFunctionalities(java.lang.String initialPath,
                                                boolean recoverBIObjects)
                                         throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Loads all the sub functionalities of the given initial path

Specified by:
loadSubLowFunctionalities in interface ILowFunctionalityDAO
Parameters:
initialPath - The String representing the initial path
recoverBIObjects - If true each LowFunctionality at output will have the list of contained BIObject objects
Returns:
the list of functionalities
Throws:
it.eng.spago.error.EMFUserError
See Also:
ILowFunctionalityDAO.loadSubLowFunctionalities(java.lang.String, boolean)

hasChild

public boolean hasChild(java.lang.Integer id)
                 throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Control if the functionality with the given id has childs

Specified by:
hasChild in interface ILowFunctionalityDAO
Parameters:
id - Integer id of the functionality
Throws:
it.eng.spago.error.EMFUserError
See Also:
it.eng.spagobi.bo.dao.ILowFunctionalityDAO#hasChild(java.lang.String)

deleteInconsistentRoles

public void deleteInconsistentRoles(java.util.Set rolesSet)
                             throws it.eng.spago.error.EMFUserError
Deletes a set of inconsistent roles reference from the database, in order to keep functionalities tree permissions consistence.

Specified by:
deleteInconsistentRoles in interface ILowFunctionalityDAO
Parameters:
rolesSet - the set containing the roles to erase
Throws:
it.eng.spago.error.EMFUserError

loadChildFunctionalities

public java.util.List loadChildFunctionalities(java.lang.Integer parentId,
                                               boolean recoverBIObjects)
                                        throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Loads all the child functionalities of the given parent functionality

Specified by:
loadChildFunctionalities in interface ILowFunctionalityDAO
Parameters:
parentId - The Integer representing the parent id
recoverBIObjects - If true each LowFunctionality at output will have the list of contained BIObject objects
Returns:
the list of functionalities
Throws:
it.eng.spago.error.EMFUserError

moveDownLowFunctionality

public void moveDownLowFunctionality(java.lang.Integer functionalityID)
                              throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Moves down the functionality specified by the id at input in the functionalities tree

Specified by:
moveDownLowFunctionality in interface ILowFunctionalityDAO
Throws:
it.eng.spago.error.EMFUserError

moveUpLowFunctionality

public void moveUpLowFunctionality(java.lang.Integer functionalityID)
                            throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Moves up the functionality specified by the id at input in the functionalities tree

Specified by:
moveUpLowFunctionality in interface ILowFunctionalityDAO
Throws:
it.eng.spago.error.EMFUserError