|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
magoffin.matt.dao.hbm.GenericHibernateDao<User,java.lang.Long>
magoffin.matt.ma2.dao.hbm.HibernateUserDao
public class HibernateUserDao
Hibernate implementation of UserDao.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class magoffin.matt.dao.hbm.GenericHibernateDao |
|---|
magoffin.matt.dao.hbm.GenericHibernateDao.UpdateMode |
| 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 |
QUERY_USER_BY_EMAIL
Find a user by its email. |
static java.lang.String |
QUERY_USER_BY_KEY
Find a user by its key. |
static java.lang.String |
QUERY_USER_BY_LOGIN
Find a user by its username. |
static java.lang.String |
QUERY_USERS_BY_ACCESS_LEVEL
Find users by access level. |
static java.lang.String |
QUERY_USERS_UNCONFIRMED_FOR_LONG_TIME
Find users not confirmed in a long time. |
| Fields inherited from class magoffin.matt.dao.hbm.GenericHibernateDao |
|---|
DEFAULT_BATCH_FLUSH_COUNT, log |
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Fields inherited from interface magoffin.matt.ma2.dao.UserDao |
|---|
BATCH_NAME_INDEX |
| Constructor Summary | |
|---|---|
HibernateUserDao()
Default constructor. |
|
| Method Summary | |
|---|---|
magoffin.matt.dao.BatchableDao.BatchResult |
batchProcess(magoffin.matt.dao.BatchableDao.BatchCallback<User> callback,
magoffin.matt.dao.BatchableDao.BatchOptions options)
|
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. |
protected java.lang.Long |
getPrimaryKey(User domainObject)
|
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 class magoffin.matt.dao.hbm.GenericHibernateDao |
|---|
delete, executeLiveCriteriaBatchCallback, executeNamedQueryBatchCallback, executeStatelessCriteriaBatchCallback, findByNamedQuery, findByNamedQuery, findByNamedQuery, findByNamedQuery, findByNamedQuery, get, getBatchFlushCount, getType, getUpdateMode, save, setBatchFlushCount, setUpdateMode, store, update |
| Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
|---|
checkDaoConfig, closeSessionIfNecessary, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet, initDao |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface magoffin.matt.dao.GenericDao |
|---|
delete, get, store |
| Field Detail |
|---|
public static final java.lang.String QUERY_USER_BY_LOGIN
public static final java.lang.String QUERY_USER_BY_EMAIL
public static final java.lang.String QUERY_USER_BY_KEY
public static final java.lang.String QUERY_USERS_BY_ACCESS_LEVEL
public static final java.lang.String QUERY_USERS_UNCONFIRMED_FOR_LONG_TIME
| Constructor Detail |
|---|
public HibernateUserDao()
| Method Detail |
|---|
protected java.lang.Long getPrimaryKey(User domainObject)
getPrimaryKey in class magoffin.matt.dao.hbm.GenericHibernateDao<User,java.lang.Long>public java.util.List<User> findUsersForAccess(java.lang.Integer accessLevel)
UserDao
findUsersForAccess in interface UserDaoaccessLevel - the access level
public User getUserByEmail(java.lang.String email)
UserDao
getUserByEmail in interface UserDaoemail - the email
public User getUserByLogin(java.lang.String login)
UserDao
getUserByLogin in interface UserDaologin - the login name
public magoffin.matt.dao.BatchableDao.BatchResult batchProcess(magoffin.matt.dao.BatchableDao.BatchCallback<User> callback,
magoffin.matt.dao.BatchableDao.BatchOptions options)
batchProcess in interface magoffin.matt.dao.BatchableDao<User>public User getUserByKey(java.lang.String key)
UserDao
getUserByKey in interface UserDaokey - the user key
public java.util.List<User> deleteUnconfirmedRegistrations(int minDaysOld)
UserDao
deleteUnconfirmedRegistrations in interface UserDaominDaysOld - the minimum number of days old from the current time
the registration must be in order to delete
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||