it.eng.spagobi.profiling.dao
Class SbiUserDAOHibImpl

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.profiling.dao.SbiUserDAOHibImpl
All Implemented Interfaces:
ISpagoBIDao, ISbiUserDAO

public class SbiUserDAOHibImpl
extends AbstractHibernateDAO
implements ISbiUserDAO


Constructor Summary
SbiUserDAOHibImpl()
           
 
Method Summary
 java.lang.Integer countUsers()
           
 void deleteSbiUserById(java.lang.Integer id)
           
 java.lang.Integer fullSaveOrUpdateSbiUser(SbiUser user, java.util.List roles, java.util.HashMap<java.lang.Integer,java.lang.String> attributes)
           
 java.lang.Integer loadByUserId(java.lang.String userId)
          Load SbiUser by userId.
 java.util.List<UserBO> loadPagedUsersList(java.lang.Integer offset, java.lang.Integer fetchSize)
           
 java.util.ArrayList<SbiUserAttributes> loadSbiUserAttributesById(java.lang.Integer id)
           
 SbiUser loadSbiUserById(java.lang.Integer id)
          Load SbiUser by id.
 SbiUser loadSbiUserByUserId(java.lang.String userId)
           
 java.util.ArrayList<SbiExtRoles> loadSbiUserRolesById(java.lang.Integer id)
           
 java.util.ArrayList<SbiUser> loadSbiUsers()
           
 UserBO loadUserById(java.lang.Integer id)
           
 java.util.ArrayList<UserBO> loadUsers()
           
 java.lang.Integer saveSbiUser(SbiUser user)
          Insert SbiUser
 UserBO toUserBO(SbiUser sbiUser)
          From the Hibernate SbiUser at input, gives the corrispondent BI object (UserBO).
 void updateSbiUser(SbiUser user, java.lang.Integer userID)
          Update SbiUser
 void updateSbiUserAttributes(SbiUserAttributes attribute)
           
 void updateSbiUserRoles(SbiExtUserRoles role)
           
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
getSession, getUserProfile, logException, rollbackIfActiveAndClose, setUserID, setUserProfile, updateSbiCommonInfo4Insert, updateSbiCommonInfo4Update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.eng.spagobi.commons.dao.ISpagoBIDao
getUserProfile, setUserID, setUserProfile
 

Constructor Detail

SbiUserDAOHibImpl

public SbiUserDAOHibImpl()
Method Detail

loadByUserId

public java.lang.Integer loadByUserId(java.lang.String userId)
                               throws it.eng.spago.error.EMFUserError
Load SbiUser by userId.

Specified by:
loadByUserId in interface ISbiUserDAO
Parameters:
userId - the user id /** Load SbiUser by id.
id - the bi object id
Returns:
the BI object
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

loadSbiUserById

public SbiUser loadSbiUserById(java.lang.Integer id)
                        throws it.eng.spago.error.EMFUserError
Load SbiUser by id.

Specified by:
loadSbiUserById in interface ISbiUserDAO
Parameters:
id - the identifier /** Load SbiUser by id.
id - the bi object id
Returns:
the BI object
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

saveSbiUser

public java.lang.Integer saveSbiUser(SbiUser user)
                              throws it.eng.spago.error.EMFUserError
Insert SbiUser

Specified by:
saveSbiUser in interface ISbiUserDAO
Parameters:
user -
Throws:
it.eng.spago.error.EMFUserError

updateSbiUser

public void updateSbiUser(SbiUser user,
                          java.lang.Integer userID)
                   throws it.eng.spago.error.EMFUserError
Update SbiUser

Specified by:
updateSbiUser in interface ISbiUserDAO
Parameters:
user -
Throws:
it.eng.spago.error.EMFUserError

updateSbiUserAttributes

public void updateSbiUserAttributes(SbiUserAttributes attribute)
                             throws it.eng.spago.error.EMFUserError
Specified by:
updateSbiUserAttributes in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

updateSbiUserRoles

public void updateSbiUserRoles(SbiExtUserRoles role)
                        throws it.eng.spago.error.EMFUserError
Specified by:
updateSbiUserRoles in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

loadSbiUserByUserId

public SbiUser loadSbiUserByUserId(java.lang.String userId)
                            throws it.eng.spago.error.EMFUserError
Specified by:
loadSbiUserByUserId in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

loadSbiUserAttributesById

public java.util.ArrayList<SbiUserAttributes> loadSbiUserAttributesById(java.lang.Integer id)
                                                                 throws it.eng.spago.error.EMFUserError
Specified by:
loadSbiUserAttributesById in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

loadSbiUserRolesById

public java.util.ArrayList<SbiExtRoles> loadSbiUserRolesById(java.lang.Integer id)
                                                      throws it.eng.spago.error.EMFUserError
Specified by:
loadSbiUserRolesById in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

loadSbiUsers

public java.util.ArrayList<SbiUser> loadSbiUsers()
                                          throws it.eng.spago.error.EMFUserError
Specified by:
loadSbiUsers in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

deleteSbiUserById

public void deleteSbiUserById(java.lang.Integer id)
                       throws it.eng.spago.error.EMFUserError
Specified by:
deleteSbiUserById in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

fullSaveOrUpdateSbiUser

public java.lang.Integer fullSaveOrUpdateSbiUser(SbiUser user,
                                                 java.util.List roles,
                                                 java.util.HashMap<java.lang.Integer,java.lang.String> attributes)
                                          throws it.eng.spago.error.EMFUserError
Specified by:
fullSaveOrUpdateSbiUser in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

loadUserById

public UserBO loadUserById(java.lang.Integer id)
                    throws it.eng.spago.error.EMFUserError
Specified by:
loadUserById in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

loadUsers

public java.util.ArrayList<UserBO> loadUsers()
                                      throws it.eng.spago.error.EMFUserError
Specified by:
loadUsers in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

toUserBO

public UserBO toUserBO(SbiUser sbiUser)
                throws it.eng.spago.error.EMFUserError
From the Hibernate SbiUser at input, gives the corrispondent BI object (UserBO).

Parameters:
sbiUser - The Hibernate SbiUser
Returns:
the corrispondent output UserBO
Throws:
it.eng.spago.error.EMFUserError

countUsers

public java.lang.Integer countUsers()
                             throws it.eng.spago.error.EMFUserError
Specified by:
countUsers in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError

loadPagedUsersList

public java.util.List<UserBO> loadPagedUsersList(java.lang.Integer offset,
                                                 java.lang.Integer fetchSize)
                                          throws it.eng.spago.error.EMFUserError
Specified by:
loadPagedUsersList in interface ISbiUserDAO
Throws:
it.eng.spago.error.EMFUserError