it.eng.spagobi.analiticalmodel.functionalitytree.dao
Class LowFunctionalityDAOHibImpl

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.analiticalmodel.functionalitytree.dao.LowFunctionalityDAOHibImpl
All Implemented Interfaces:
ILowFunctionalityDAO

public class LowFunctionalityDAOHibImpl
extends AbstractHibernateDAO
implements ILowFunctionalityDAO

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


Constructor Summary
LowFunctionalityDAOHibImpl()
           
 
Method Summary
 boolean checkUserRootExists(java.lang.String username)
          Check user root exists.
 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)
          Erase low functionality.
 java.lang.Integer existByCode(java.lang.String code)
          Exist by code.
 boolean hasChild(java.lang.Integer id)
          Checks for child.
 void insertLowFunctionality(LowFunctionality aLowFunctionality, it.eng.spago.security.IEngUserProfile profile)
          Insert low functionality.
 void insertUserFunctionality(UserFunctionality userfunct)
          Insert user functionality.
 java.util.List loadAllLowFunctionalities(boolean recoverBIObjects)
          Load all low functionalities.
 java.util.List loadChildFunctionalities(java.lang.Integer parentId, boolean recoverBIObjects)
          Loads all the child functionalities of the given parent functionality.
 LowFunctionality loadLowFunctionalityByCode(java.lang.String code, boolean recoverBIObjects)
          Load low functionality by code.
 LowFunctionality loadLowFunctionalityByID(java.lang.Integer functionalityID, boolean recoverBIObjects)
          Load low functionality by id.
 LowFunctionality loadLowFunctionalityByPath(java.lang.String functionalityPath, boolean recoverBIObjects)
          Load low functionality by path.
 java.util.List loadLowFunctionalityList(java.util.List functionalityIDs)
          Load low functionality list by id List
 java.util.List loadParentFunctionalities(java.lang.Integer functId, java.lang.Integer rootFolderID)
          Load all fathers functionalities.
 LowFunctionality loadRootLowFunctionality(boolean recoverBIObjects)
          Load root low functionality.
 java.util.List loadSubLowFunctionalities(java.lang.String initialPath, boolean recoverBIObjects)
          Load sub low functionalities.
 java.util.List loadUserFunctionalities(java.lang.Integer parentId, boolean recoverBIObjects, it.eng.spago.security.IEngUserProfile profile)
          Load all functionalities associated the user roles.
 void modifyLowFunctionality(LowFunctionality aLowFunctionality)
          Modify 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.commons.dao.AbstractHibernateDAO
getSession, logException, rollbackIfActiveAndClose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LowFunctionalityDAOHibImpl

public LowFunctionalityDAOHibImpl()
Method Detail

checkUserRootExists

public boolean checkUserRootExists(java.lang.String username)
                            throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Check user root exists.

Specified by:
checkUserRootExists in interface ILowFunctionalityDAO
Parameters:
username - the username
Returns:
true, if successful
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertUserFunctionality

public void insertUserFunctionality(UserFunctionality userfunct)
                             throws it.eng.spago.error.EMFUserError
Description copied from interface: ILowFunctionalityDAO
Insert user functionality.

Specified by:
insertUserFunctionality in interface ILowFunctionalityDAO
Parameters:
userfunct - the userfunct
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

loadLowFunctionalityByID

public LowFunctionality loadLowFunctionalityByID(java.lang.Integer functionalityID,
                                                 boolean recoverBIObjects)
                                          throws it.eng.spago.error.EMFUserError
Load low functionality by id.

Specified by:
loadLowFunctionalityByID in interface ILowFunctionalityDAO
Parameters:
functionalityID - the functionality id
recoverBIObjects - the recover bi objects
Returns:
the low functionality
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.analiticalmodel.functionalitytree.dao.ILowFunctionalityDAO#loadLowFunctionalityByID(java.lang.Integer)

loadLowFunctionalityByCode

public LowFunctionality loadLowFunctionalityByCode(java.lang.String code,
                                                   boolean recoverBIObjects)
                                            throws it.eng.spago.error.EMFUserError
Load low functionality by code.

Specified by:
loadLowFunctionalityByCode in interface ILowFunctionalityDAO
Parameters:
label - the functionality code
recoverBIObjects - the recover bi objects
Returns:
the low functionality
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.analiticalmodel.functionalitytree.dao.ILowFunctionalityDAO#loadLowFunctionalityByLabel(java.lang.String)

loadLowFunctionalityList

public java.util.List loadLowFunctionalityList(java.util.List functionalityIDs)
                                        throws it.eng.spago.error.EMFUserError
Load low functionality list by id List

Specified by:
loadLowFunctionalityList in interface ILowFunctionalityDAO
Parameters:
functionalityIDs - the functionality id List
Returns:
the low functionalities List
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.analiticalmodel.functionalitytree.dao.ILowFunctionalityDAO#loadLowFunctionalityByID(java.lang.Integer)

loadRootLowFunctionality

public LowFunctionality loadRootLowFunctionality(boolean recoverBIObjects)
                                          throws it.eng.spago.error.EMFUserError
Load root low functionality.

Specified by:
loadRootLowFunctionality in interface ILowFunctionalityDAO
Parameters:
recoverBIObjects - the recover bi objects
Returns:
the low functionality
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
ILowFunctionalityDAO.loadRootLowFunctionality(boolean)

loadLowFunctionalityByPath

public LowFunctionality loadLowFunctionalityByPath(java.lang.String functionalityPath,
                                                   boolean recoverBIObjects)
                                            throws it.eng.spago.error.EMFUserError
Load low functionality by path.

Specified by:
loadLowFunctionalityByPath in interface ILowFunctionalityDAO
Parameters:
functionalityPath - the functionality path
recoverBIObjects - the recover bi objects
Returns:
the low functionality
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.analiticalmodel.functionalitytree.dao.ILowFunctionalityDAO#loadLowFunctionalityByPath(java.lang.String)

modifyLowFunctionality

public void modifyLowFunctionality(LowFunctionality aLowFunctionality)
                            throws it.eng.spago.error.EMFUserError
Modify low functionality.

Specified by:
modifyLowFunctionality in interface ILowFunctionalityDAO
Parameters:
aLowFunctionality - the a low functionality
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
ILowFunctionalityDAO.modifyLowFunctionality(it.eng.spagobi.analiticalmodel.functionalitytree.bo.LowFunctionality)

insertLowFunctionality

public void insertLowFunctionality(LowFunctionality aLowFunctionality,
                                   it.eng.spago.security.IEngUserProfile profile)
                            throws it.eng.spago.error.EMFUserError
Insert low functionality.

Specified by:
insertLowFunctionality in interface ILowFunctionalityDAO
Parameters:
aLowFunctionality - the a low functionality
profile - the profile
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
ILowFunctionalityDAO.insertLowFunctionality(it.eng.spagobi.analiticalmodel.functionalitytree.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
Erase low functionality.

Specified by:
eraseLowFunctionality in interface ILowFunctionalityDAO
Parameters:
aLowFunctionality - the a low functionality
profile - the profile
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
ILowFunctionalityDAO.eraseLowFunctionality(it.eng.spagobi.analiticalmodel.functionalitytree.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
Exist by code.

Specified by:
existByCode in interface ILowFunctionalityDAO
Parameters:
code - the code
Returns:
the integer
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
ILowFunctionalityDAO.existByCode(java.lang.String)

loadAllLowFunctionalities

public java.util.List loadAllLowFunctionalities(boolean recoverBIObjects)
                                         throws it.eng.spago.error.EMFUserError
Load all low functionalities.

Specified by:
loadAllLowFunctionalities in interface ILowFunctionalityDAO
Parameters:
recoverBIObjects - the recover bi objects
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
ILowFunctionalityDAO.loadAllLowFunctionalities(boolean)

loadSubLowFunctionalities

public java.util.List loadSubLowFunctionalities(java.lang.String initialPath,
                                                boolean recoverBIObjects)
                                         throws it.eng.spago.error.EMFUserError
Load sub low functionalities.

Specified by:
loadSubLowFunctionalities in interface ILowFunctionalityDAO
Parameters:
initialPath - the initial path
recoverBIObjects - the recover bi objects
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
ILowFunctionalityDAO.loadSubLowFunctionalities(java.lang.String, boolean)

hasChild

public boolean hasChild(java.lang.Integer id)
                 throws it.eng.spago.error.EMFUserError
Checks for child.

Specified by:
hasChild in interface ILowFunctionalityDAO
Parameters:
id - the id
Returns:
true, if checks for child
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.analiticalmodel.functionalitytree.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 - the EMF user error

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 - the EMF user error

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
Parameters:
functionalityID - the functionality id
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

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
Parameters:
functionalityID - the functionality id
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

loadUserFunctionalities

public java.util.List loadUserFunctionalities(java.lang.Integer parentId,
                                              boolean recoverBIObjects,
                                              it.eng.spago.security.IEngUserProfile profile)
                                       throws it.eng.spago.error.EMFUserError
Load all functionalities associated the user roles.

Specified by:
loadUserFunctionalities in interface ILowFunctionalityDAO
Parameters:
onlyFirstLevel - limits functionalities to first level
recoverBIObjects - the recover bi objects
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
ILowFunctionalityDAO.loadAllLowFunctionalities(boolean)

loadParentFunctionalities

public java.util.List loadParentFunctionalities(java.lang.Integer functId,
                                                java.lang.Integer rootFolderID)
                                         throws it.eng.spago.error.EMFUserError
Load all fathers functionalities.

Specified by:
loadParentFunctionalities in interface ILowFunctionalityDAO
Parameters:
functId - the identifier of functionality child
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.analiticalmodel.functionalitytree.dao.ILowFunctionalityDAO#loadAllLowFunctionalities(Integer)