|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.pow2.dao.AbstractDAO
com.pow2.user.dao.DBUserDAO
User Data access object.
Encapsulates data access methods for the User entity.
Extends AbstractDAO, and use the singleton
design pattern to provide an unique object instance
per vm.
| Field Summary |
| Fields inherited from class com.pow2.dao.AbstractDAO |
cat |
| Constructor Summary | |
protected |
DBUserDAO()
Default private constructor. |
| Method Summary | |
void |
deleteUser(String id)
Delete the User having the input id from the database. |
String |
getProviderType()
Get the data provider type |
User |
getUser(String login,
String passwd)
Update the input User object with the user informations retrieved from the data provider. |
void |
getUser(User user)
Update the input User object with the user informations retrieved from the data provider. |
protected static DBUserDAO |
instance()
Get the unique instance of UserDAO class. |
boolean |
loginExists(String login)
Test if the input login property
already exists into the application database. |
boolean |
loginExists(User user)
Test if the input user login property
already exists into the application database. |
void |
setUser(User user)
Persist the user informations into the database. |
| Methods inherited from class com.pow2.dao.AbstractDAO |
assertion, closeResources, closeResources, closeResources, count, count, delete, delete, encode, getConnection, getConnection, getNewKey, isDebugEnabled, populate, setLike, setLike |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected DBUserDAO()
| Method Detail |
protected static DBUserDAO instance()
public String getProviderType()
getProviderType in interface UserDAO
public User getUser(String login,
String passwd)
throws Exception
login
and passwd properties to execute the login procedure.
getUser in interface UserDAOlogin - the user loginpasswd - the user password
Exception - if any error occurs
public void getUser(User user)
throws Exception
login
and passwd properties to execute the login procedure.
getUser in interface UserDAOuser - the user object with the login
and passwd properties properly set.
Exception - if any error occurs
public void setUser(User user)
throws Exception
setUser in interface UserDAOuser - the user object to persist into the database
Exception - if any error occurs
public void deleteUser(String id)
throws Exception
deleteUser in interface UserDAOid - the identifier of the user to remove from the database
Exception - if any error occurs
public boolean loginExists(User user)
throws Exception
login property
already exists into the application database.
loginExists in interface UserDAOuser - the user object
Exception - if any error occurs
public boolean loginExists(String login)
throws Exception
login property
already exists into the application database.
loginExists in interface UserDAOlogin - the login string
Exception - if any error occurs
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||