it.eng.spagobi.bo.dao.jdbc
Class RoleDAOImpl

java.lang.Object
  extended byit.eng.spagobi.bo.dao.jdbc.AbstractJdbcDAO
      extended byit.eng.spagobi.bo.dao.jdbc.RoleDAOImpl
All Implemented Interfaces:
IRoleDAO

public class RoleDAOImpl
extends AbstractJdbcDAO
implements IRoleDAO

Defines the JDBC implementations for all DAO methods, for a role.

Author:
zoppello

Constructor Summary
RoleDAOImpl()
           
 
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.
 void modifyRole(Role aRole)
          Implements the query to modify a role.
 
Methods inherited from class it.eng.spagobi.bo.dao.jdbc.AbstractJdbcDAO
getConnection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleDAOImpl

public RoleDAOImpl()
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)

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)

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)