magoffin.matt.ma2.dao
Interface UserDao

All Superinterfaces:
magoffin.matt.dao.BatchableDao<User>, magoffin.matt.dao.GenericDao<User,java.lang.Long>
All Known Implementing Classes:
HibernateUserDao

public interface UserDao
extends magoffin.matt.dao.GenericDao<User,java.lang.Long>, magoffin.matt.dao.BatchableDao<User>

DAO for User objects.

Version:
$Revision: 43 $ $Date: 2007-10-21 11:10:01 +1300 (Sun, 21 Oct 2007) $
Author:
Matt Magoffin (spamsqr@msqr.us)

Nested Class Summary
 
Nested classes/interfaces inherited from interface magoffin.matt.dao.BatchableDao
magoffin.matt.dao.BatchableDao.BatchCallback<T>, magoffin.matt.dao.BatchableDao.BatchCallbackResult, magoffin.matt.dao.BatchableDao.BatchMode, magoffin.matt.dao.BatchableDao.BatchOptions, magoffin.matt.dao.BatchableDao.BatchResult
 
Field Summary
static java.lang.String BATCH_NAME_INDEX
          The batch processing name to index MediaItem objects.
 
Method Summary
 java.util.List<User> deleteUnconfirmedRegistrations(int minDaysOld)
          Delete registered users that are unconfirmed and created longer than the specified number of days ago.
 java.util.List<User> findUsersForAccess(java.lang.Integer accessLevel)
          Find all users for a given access level.
 User getUserByEmail(java.lang.String email)
          Get a user by an email.
 User getUserByKey(java.lang.String key)
          Get a user by anonymous key.
 User getUserByLogin(java.lang.String login)
          Get a user by a login name.
 
Methods inherited from interface magoffin.matt.dao.GenericDao
delete, get, store
 
Methods inherited from interface magoffin.matt.dao.BatchableDao
batchProcess
 

Field Detail

BATCH_NAME_INDEX

static final java.lang.String BATCH_NAME_INDEX
The batch processing name to index MediaItem objects.

See Also:
Constant Field Values
Method Detail

getUserByLogin

User getUserByLogin(java.lang.String login)
Get a user by a login name.

Parameters:
login - the login name
Returns:
the user, or null if not found

getUserByEmail

User getUserByEmail(java.lang.String email)
Get a user by an email.

Parameters:
email - the email
Returns:
the user, or null if not found

getUserByKey

User getUserByKey(java.lang.String key)
Get a user by anonymous key.

Parameters:
key - the user key
Returns:
the user, or null if not found

findUsersForAccess

java.util.List<User> findUsersForAccess(java.lang.Integer accessLevel)
Find all users for a given access level.

Parameters:
accessLevel - the access level
Returns:
the access level

deleteUnconfirmedRegistrations

java.util.List<User> deleteUnconfirmedRegistrations(int minDaysOld)
Delete registered users that are unconfirmed and created longer than the specified number of days ago.

Parameters:
minDaysOld - the minimum number of days old from the current time the registration must be in order to delete
Returns:
the users that were deleted