org.itracker.persistence.dao
Interface UserDAO

All Superinterfaces:
BaseDAO<User>
All Known Implementing Classes:
UserDAOImpl

public interface UserDAO
extends BaseDAO<User>

User Data Access Object interface.

Author:
?, Johnny Macchione

Method Summary
 List<User> findActive()
          Finds all active users.
 List<User> findAll()
          Finds all users.
 User findByLogin(String login)
          Finds a user by login.
 User findByPrimaryKey(Integer userId)
          Finds the users with the given primary key.
 List<User> findByRegistrationType(int registrationType)
          Finds users with the given registration type.
 List<User> findByStatus(int status)
          Finds users with the given status.
 List<User> findSuperUsers()
          Finds all super users.
 List<User> findUsersForProjectByAllPermissionTypeList(Integer projectID, Integer[] permissionTypes)
           
 Map<Integer,Set<PermissionType>> getUsersMapOfProjectsAndPermissionTypes(User user)
          Finds of the given user the set of permission types for all projects on which the user has permissions.
 
Methods inherited from interface org.itracker.persistence.dao.BaseDAO
delete, detach, merge, refresh, save, saveOrUpdate
 

Method Detail

findByPrimaryKey

User findByPrimaryKey(Integer userId)
Finds the users with the given primary key. PENDING: should this method throw a NoSuchEntityException instead of returning null if the userId doesn't exist ?

Parameters:
userId - ID of the user to retrieve
Returns:
user with the given ID or null if none exits

findByLogin

User findByLogin(String login)
Finds a user by login.

Parameters:
login - login name of the user to find
Returns:
user with the given login or null if login is unknown

findAll

List<User> findAll()
Finds all users.

Returns:
list of all users, in unspecified order

findActive

List<User> findActive()
Finds all active users.

Returns:
list of users with a status > 0, in unspecified order

findByStatus

List<User> findByStatus(int status)
Finds users with the given status.

Parameters:
status - status code
Returns:
list of users with the given status, in unspecified order

findSuperUsers

List<User> findSuperUsers()
Finds all super users.

Returns:
list of super users, in unspecified order

findByRegistrationType

List<User> findByRegistrationType(int registrationType)
Finds users with the given registration type.

Parameters:
registrationType -
Returns:
list of users with the given registration type, in unspecified order

getUsersMapOfProjectsAndPermissionTypes

Map<Integer,Set<PermissionType>> getUsersMapOfProjectsAndPermissionTypes(User user)
Finds of the given user the set of permission types for all projects on which the user has permissions.

Parameters:
user -
sourceRequest -
Returns:
set of permission types mapped by project id

findUsersForProjectByAllPermissionTypeList

List<User> findUsersForProjectByAllPermissionTypeList(Integer projectID,
                                                      Integer[] permissionTypes)


Copyright © 2002-2012 itracker. All Rights Reserved.