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

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

public class RoleDAOHibImpl
extends AbstractHibernateDAO
implements IRoleDAO

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

Author:
zoppello

Constructor Summary
RoleDAOHibImpl()
           
 
Method Summary
 void eraseRole(Role aRole)
          Implements the query to erase a role.
 void insertRole(Role aRole)
          Implements the query to insert a role.
 java.util.List loadAllFreeRolesForDetail(java.lang.Integer parUseID)
          Gets all free roles for detail.
 java.util.List loadAllFreeRolesForInsert(java.lang.Integer parameterID)
          Gets all free roles for Insert.
 java.util.List loadAllRoles()
          Loads all detail information for all roles.
 Role loadByID(java.lang.Integer roleID)
          Loads a role identified by its roleID.
 Role loadByName(java.lang.String roleName)
          Loads a role identified by its roleName.
 java.util.List LoadFunctionalitiesAssociated(java.lang.Integer roleID)
          Gets all the functionalities associated to the role.
 java.util.List LoadParUsesAssociated(java.lang.Integer roleID)
          Gets all the parameter uses associated to the role.
 void modifyRole(Role aRole)
          Implements the query to modify a role.
 Role toRole(SbiExtRoles hibRole)
          From the hibernate Role at input, gives the corrispondent Role object.
 
Methods inherited from class it.eng.spagobi.bo.dao.hibernate.AbstractHibernateDAO
getSession, logException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleDAOHibImpl

public RoleDAOHibImpl()
Method Detail

loadByID

public Role loadByID(java.lang.Integer roleID)
              throws EMFUserError
Description copied from interface: IRoleDAO
Loads a role identified by its roleID. All these information, are stored into a Role object, which is returned.

Specified by:
loadByID in interface IRoleDAO
Parameters:
roleID - The id for the role to load
Returns:
A Role object containing all loaded information
Throws:
EMFUserError - If an Exception occurred
See Also:
IRoleDAO.loadByID(java.lang.Integer)

loadByName

public Role loadByName(java.lang.String roleName)
                throws EMFUserError
Description copied from interface: IRoleDAO
Loads a role identified by its roleName. All these information, are stored into a Role object, which is returned.

Specified by:
loadByName in interface IRoleDAO
Parameters:
roleName - The name for the role to load
Returns:
A Role object containing all loaded information
Throws:
EMFUserError - If an Exception occurred
See Also:
IRoleDAO.loadByName(java.lang.String)

loadAllRoles

public java.util.List loadAllRoles()
                            throws EMFUserError
Description copied from interface: IRoleDAO
Loads all detail information for all roles. For each of them, detail information is stored into a Role object. After that, all roles are stored into a List, which is returned.

Specified by:
loadAllRoles in interface IRoleDAO
Returns:
A list containing all role objects
Throws:
EMFUserError - If an Exception occurred
See Also:
IRoleDAO.loadAllRoles()

insertRole

public void insertRole(Role aRole)
                throws EMFUserError
Description copied from interface: IRoleDAO
Implements the query to insert a role. All information needed is stored into the input Role object.

Specified by:
insertRole in interface IRoleDAO
Parameters:
aRole - The object containing all insert information
Throws:
EMFUserError - If an Exception occurred
See Also:
IRoleDAO.insertRole(it.eng.spagobi.bo.Role)

eraseRole

public void eraseRole(Role aRole)
               throws EMFUserError
Description copied from interface: IRoleDAO
Implements the query to erase a role. All information needed is stored into the input Role object.

Specified by:
eraseRole in interface IRoleDAO
Parameters:
aRole - The object containing all delete information
Throws:
EMFUserError - If an Exception occurred
See Also:
IRoleDAO.eraseRole(it.eng.spagobi.bo.Role)

modifyRole

public void modifyRole(Role aRole)
                throws EMFUserError
Description copied from interface: IRoleDAO
Implements the query to modify a role. All information needed is stored into the input Role object.

Specified by:
modifyRole in interface IRoleDAO
Parameters:
aRole - The object containing all modify information
Throws:
EMFUserError - If an Exception occurred
See Also:
IRoleDAO.modifyRole(it.eng.spagobi.bo.Role)

loadAllFreeRolesForInsert

public java.util.List loadAllFreeRolesForInsert(java.lang.Integer parameterID)
                                         throws EMFUserError
Description copied from interface: IRoleDAO
Gets all free roles for Insert. When a parameter has some parameter use modes associated, this association happens with one or more roles. For the same parameter, roles belonging to a parameter use mode cannot be assigned to others. So, when a new parameter use mode has to be inserted/modifies, this methods gives the roles that are still free.

Specified by:
loadAllFreeRolesForInsert in interface IRoleDAO
Parameters:
parameterID - The parameter id
Returns:
The free roles list
Throws:
EMFUserError
See Also:
IRoleDAO.loadAllFreeRolesForInsert(java.lang.Integer)

loadAllFreeRolesForDetail

public java.util.List loadAllFreeRolesForDetail(java.lang.Integer parUseID)
                                         throws EMFUserError
Description copied from interface: IRoleDAO
Gets all free roles for detail. When a parameter has some parameter use modes associated, this association happens with one or more roles. For the same parameter, roles belonging to a parameter use mode cannot be assigned to others. So, when a parameter use mode detail is required, this methods gives the roles that are still free.

Specified by:
loadAllFreeRolesForDetail in interface IRoleDAO
Parameters:
parUseID - The parameter use mode id
Returns:
The free roles list
Throws:
EMFUserError
See Also:
IRoleDAO.loadAllFreeRolesForDetail(java.lang.Integer)

toRole

public Role toRole(SbiExtRoles hibRole)
From the hibernate Role at input, gives the corrispondent Role object.

Parameters:
hibRole - The hybernate role
Returns:
The corrispondent Role object

LoadFunctionalitiesAssociated

public java.util.List LoadFunctionalitiesAssociated(java.lang.Integer roleID)
                                             throws EMFUserError
Gets all the functionalities associated to the role.

Specified by:
LoadFunctionalitiesAssociated in interface IRoleDAO
Parameters:
roleID - The role id
Returns:
The functionalities associated to the role
Throws:
EMFUserError

LoadParUsesAssociated

public java.util.List LoadParUsesAssociated(java.lang.Integer roleID)
                                     throws EMFUserError
Gets all the parameter uses associated to the role.

Specified by:
LoadParUsesAssociated in interface IRoleDAO
Parameters:
roleID - The role id
Returns:
The parameter uses associated to the role
Throws:
EMFUserError