| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectHibernateDaoSupport
org.pentaho.platform.engine.security.userroledao.hibernate.HibernateUserRoleDao
public class HibernateUserRoleDao
An IUserRoleDao that uses Hibernate. Furthermore, it uses Spring's HibernateDaoSupport. This 
 allows instances to be dependency injected. At a minimum, instances require a Hibernate SessionFactory.
 
 
The init method must be called after all properties have been set and before calling any of the CRUD 
 methods. Can be called automatically if using Spring via the init-method attribute. Otherwise, call it 
 manually after setting all properties.
| Nested Class Summary | |
|---|---|
static interface | 
HibernateUserRoleDao.InitHandler
Generic interface to allow extensibility without tight coupling.  | 
| Field Summary | |
|---|---|
static String | 
DEFAULT_ALL_ROLES_QUERY
 | 
static String | 
DEFAULT_ALL_USERS_QUERY
 | 
| Constructor Summary | |
|---|---|
HibernateUserRoleDao()
 | 
|
| Method Summary | |
|---|---|
 void | 
createRole(IPentahoRole roleToCreate)
This method is more complex because this is the inverse end of a bidirectional many-to-many relationship.  | 
 void | 
createUser(IPentahoUser userToCreate)
 | 
 void | 
deleteRole(IPentahoRole roleToDelete)
This method is more complex because this is the inverse end of a bidirectional many-to-many relationship.  | 
 void | 
deleteUser(IPentahoUser userToDelete)
 | 
 String | 
getAllRolesQuery()
 | 
 String | 
getAllUsersQuery()
 | 
 IPentahoRole | 
getRole(String name)
 | 
 List<IPentahoRole> | 
getRoles()
 | 
 IPentahoUser | 
getUser(String username)
 | 
 List<IPentahoUser> | 
getUsers()
 | 
 void | 
init()
A generic initialization method.  | 
 void | 
setAllRolesQuery(String allRolesQuery)
 | 
 void | 
setAllUsersQuery(String allUsersQuery)
 | 
 void | 
setInitHandler(HibernateUserRoleDao.InitHandler initHandler)
 | 
 void | 
updateRole(IPentahoRole roleToUpdate)
This method is more complex because this is the inverse end of a bidirectional many-to-many relationship.  | 
 void | 
updateUser(IPentahoUser userToUpdate)
 | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String DEFAULT_ALL_USERS_QUERY
public static final String DEFAULT_ALL_ROLES_QUERY
| Constructor Detail | 
|---|
public HibernateUserRoleDao()
| Method Detail | 
|---|
public void init()
public void createUser(IPentahoUser userToCreate)
                throws AlreadyExistsException,
                       UncategorizedUserRoleDaoException
createUser in interface IUserRoleDaoAlreadyExistsException
UncategorizedUserRoleDaoException
public void deleteUser(IPentahoUser userToDelete)
                throws NotFoundException,
                       UncategorizedUserRoleDaoException
deleteUser in interface IUserRoleDaoNotFoundException
UncategorizedUserRoleDaoException
public IPentahoUser getUser(String username)
                     throws UncategorizedUserRoleDaoException
getUser in interface IUserRoleDaoUncategorizedUserRoleDaoException
public List<IPentahoUser> getUsers()
                            throws UncategorizedUserRoleDaoException
getUsers in interface IUserRoleDaoUncategorizedUserRoleDaoException
public void updateUser(IPentahoUser userToUpdate)
                throws NotFoundException,
                       UncategorizedUserRoleDaoException
updateUser in interface IUserRoleDaoNotFoundException
UncategorizedUserRoleDaoException
public void createRole(IPentahoRole roleToCreate)
                throws AlreadyExistsException,
                       UncategorizedUserRoleDaoException
createRole in interface IUserRoleDaoAlreadyExistsException
UncategorizedUserRoleDaoException
public void deleteRole(IPentahoRole roleToDelete)
                throws NotFoundException,
                       UncategorizedUserRoleDaoException
deleteRole in interface IUserRoleDaoNotFoundException
UncategorizedUserRoleDaoException
public IPentahoRole getRole(String name)
                     throws UncategorizedUserRoleDaoException
getRole in interface IUserRoleDaoUncategorizedUserRoleDaoException
public List<IPentahoRole> getRoles()
                            throws UncategorizedUserRoleDaoException
getRoles in interface IUserRoleDaoUncategorizedUserRoleDaoException
public void updateRole(IPentahoRole roleToUpdate)
                throws NotFoundException,
                       UncategorizedUserRoleDaoException
updateRole in interface IUserRoleDaoNotFoundException
UncategorizedUserRoleDaoExceptionpublic void setAllUsersQuery(String allUsersQuery)
public String getAllUsersQuery()
public void setAllRolesQuery(String allRolesQuery)
public String getAllRolesQuery()
public void setInitHandler(HibernateUserRoleDao.InitHandler initHandler)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||