|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 UserDAO
login
- the user loginpasswd
- the user password
Exception
- if any error occurspublic void getUser(User user) throws Exception
login
and passwd
properties to execute the login procedure.
getUser
in interface UserDAO
user
- the user object with the login
and passwd
properties properly set.
Exception
- if any error occurspublic void setUser(User user) throws Exception
setUser
in interface UserDAO
user
- the user object to persist into the database
Exception
- if any error occurspublic void deleteUser(String id) throws Exception
deleteUser
in interface UserDAO
id
- the identifier of the user to remove from the database
Exception
- if any error occurspublic boolean loginExists(User user) throws Exception
login
property
already exists into the application database.
loginExists
in interface UserDAO
user
- the user object
Exception
- if any error occurspublic boolean loginExists(String login) throws Exception
login
property
already exists into the application database.
loginExists
in interface UserDAO
login
- the login string
Exception
- if any error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |