it.eng.spagobi.commons.dao
Class RoleDAOHibImpl

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.commons.dao.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(it.eng.spagobi.commons.bo.Role aRole)
          Erase role.
 void insertRole(it.eng.spagobi.commons.bo.Role aRole)
          Insert role.
 java.lang.Integer insertRoleComplete(it.eng.spagobi.commons.bo.Role role)
          Implements the query to insert a role.
 java.util.List loadAllFreeRolesForDetail(java.lang.Integer parUseID)
          Load all free roles for detail.
 java.util.List loadAllFreeRolesForInsert(java.lang.Integer parameterID)
          Load all free roles for insert.
 java.util.List loadAllRoles()
          Load all roles.
 it.eng.spagobi.commons.bo.Role loadByID(java.lang.Integer roleID)
          Load by id.
 it.eng.spagobi.commons.bo.Role loadByName(java.lang.String roleName)
          Load by name.
 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(it.eng.spagobi.commons.bo.Role aRole)
          Modify role.
 it.eng.spagobi.commons.bo.Role toRole(SbiExtRoles hibRole)
          From the hibernate Role at input, gives the corrispondent Role object.
 
Methods inherited from class it.eng.spagobi.commons.dao.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 it.eng.spagobi.commons.bo.Role loadByID(java.lang.Integer roleID)
                                        throws it.eng.spago.error.EMFUserError
Load by id.

Specified by:
loadByID in interface IRoleDAO
Parameters:
roleID - the role id
Returns:
the role
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IRoleDAO.loadByID(java.lang.Integer)

loadByName

public it.eng.spagobi.commons.bo.Role loadByName(java.lang.String roleName)
                                          throws it.eng.spago.error.EMFUserError
Load by name.

Specified by:
loadByName in interface IRoleDAO
Parameters:
roleName - the role name
Returns:
the role
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IRoleDAO.loadByName(java.lang.String)

loadAllRoles

public java.util.List loadAllRoles()
                            throws it.eng.spago.error.EMFUserError
Load all roles.

Specified by:
loadAllRoles in interface IRoleDAO
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IRoleDAO.loadAllRoles()

insertRole

public void insertRole(it.eng.spagobi.commons.bo.Role aRole)
                throws it.eng.spago.error.EMFUserError
Insert role.

Specified by:
insertRole in interface IRoleDAO
Parameters:
aRole - the a role
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IRoleDAO.insertRole(it.eng.spagobi.commons.bo.Role)

eraseRole

public void eraseRole(it.eng.spagobi.commons.bo.Role aRole)
               throws it.eng.spago.error.EMFUserError
Erase role.

Specified by:
eraseRole in interface IRoleDAO
Parameters:
aRole - the a role
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IRoleDAO.eraseRole(it.eng.spagobi.commons.bo.Role)

modifyRole

public void modifyRole(it.eng.spagobi.commons.bo.Role aRole)
                throws it.eng.spago.error.EMFUserError
Modify role.

Specified by:
modifyRole in interface IRoleDAO
Parameters:
aRole - the a role
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IRoleDAO.modifyRole(it.eng.spagobi.commons.bo.Role)

loadAllFreeRolesForInsert

public java.util.List loadAllFreeRolesForInsert(java.lang.Integer parameterID)
                                         throws it.eng.spago.error.EMFUserError
Load all free roles for insert.

Specified by:
loadAllFreeRolesForInsert in interface IRoleDAO
Parameters:
parameterID - the parameter id
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IRoleDAO.loadAllFreeRolesForInsert(java.lang.Integer)

loadAllFreeRolesForDetail

public java.util.List loadAllFreeRolesForDetail(java.lang.Integer parUseID)
                                         throws it.eng.spago.error.EMFUserError
Load all free roles for detail.

Specified by:
loadAllFreeRolesForDetail in interface IRoleDAO
Parameters:
parUseID - the par use id
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IRoleDAO.loadAllFreeRolesForDetail(java.lang.Integer)

toRole

public it.eng.spagobi.commons.bo.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 it.eng.spago.error.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:
it.eng.spago.error.EMFUserError - the EMF user error

LoadParUsesAssociated

public java.util.List LoadParUsesAssociated(java.lang.Integer roleID)
                                     throws it.eng.spago.error.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:
it.eng.spago.error.EMFUserError - the EMF user error

insertRoleComplete

public java.lang.Integer insertRoleComplete(it.eng.spagobi.commons.bo.Role role)
                                     throws it.eng.spago.error.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:
insertRoleComplete in interface IRoleDAO
Parameters:
role - The object containing all insert information, includig the role abilitations
Returns:
The role id
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred