net.sf.mud4j.dao.hibernate
Class AccountDaoHibernate
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
net.sf.mud4j.dao.hibernate.AccountDaoHibernate
- All Implemented Interfaces:
- AccountDao, org.springframework.beans.factory.InitializingBean
public class AccountDaoHibernate
- extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
- implements AccountDao
Account dao implementation for hibernate.
- Author:
- Matthew Purland
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
Method Summary |
java.util.List |
getAccounts()
Get list of accounts. |
Account |
loadAccount(java.lang.String username)
Load an account from the username. |
Account |
loadAccount(java.lang.String username,
java.lang.String password)
Load an account from the username accessed by a password. |
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
checkDaoConfig, 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 |
AccountDaoHibernate
public AccountDaoHibernate()
getAccounts
public java.util.List getAccounts()
throws org.springframework.dao.DataAccessException
- Get list of accounts.
- Specified by:
getAccounts
in interface AccountDao
- Returns:
- Returns a list of accounts.
- Throws:
org.springframework.dao.DataAccessException
- in case of data access I/O problems
loadAccount
public Account loadAccount(java.lang.String username)
throws org.springframework.dao.DataAccessException
- Load an account from the username.
- Specified by:
loadAccount
in interface AccountDao
- Parameters:
username
- Username of the account to load.
- Returns:
- Returns an account from the username.
- Throws:
org.springframework.dao.DataAccessException
- in case of data access I/O problems
loadAccount
public Account loadAccount(java.lang.String username,
java.lang.String password)
throws org.springframework.dao.DataAccessException,
org.springframework.dao.PermissionDeniedDataAccessException
- Load an account from the username accessed by a password.
- Specified by:
loadAccount
in interface AccountDao
- Parameters:
username
- Username of the account.password
- Password of the account to verify.
- Returns:
- Returns an account if verified.
- Throws:
org.springframework.dao.DataAccessException
- in case of data access I/O
org.springframework.dao.PermissionDeniedDataAccessException
- if password is incorrect
Copyright © 2006-2007 mud4j. All Rights Reserved.