com.pow2.user.dao
Interface UserDAO

All Known Implementing Classes:
DBUserDAO, LDAPUserDAO

public interface UserDAO

Abstract class for User Data Access objects

Author:
Luca Fossato

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)
          Get the registered User identified by the input login and passwd properties.
 void getUser(User user)
          Update the input User object with the user informations retrieved from the database.
 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.
 

Method Detail

getProviderType

public String getProviderType()
Get the data provider type

Returns:
the data provider type

getUser

public User getUser(String login,
                    String passwd)
             throws Exception
Get the registered User identified by the input login and passwd properties.

Parameters:
login - Description of the Parameter
passwd - Description of the Parameter
Returns:
the registered User object if the login procedure is successful; null otherwise
Throws:
Exception - Description of the Exception

getUser

public void getUser(User user)
             throws Exception
Update the input User object with the user informations retrieved from the database.
This method uses the User login and passwd properties to execute the login procedure.

Parameters:
user - the user object with the login and passwd properties properly set.
Throws:
Exception - Description of the Exception

setUser

public void setUser(User user)
             throws Exception
Persist the user informations into the database.
This method updates or insert a new User entry into the database depending on the user id value.

Parameters:
user - the user object to persist into the database
Throws:
Exception - if any error occurs

deleteUser

public void deleteUser(String id)
                throws Exception
Delete the User having the input id from the database.

Parameters:
id - the identifier of the user to remove from the database
Throws:
Exception - if any error occurs

loginExists

public boolean loginExists(User user)
                    throws Exception
Test if the input user login property already exists into the application database.

Parameters:
user - the user object
Returns:
true if the input user login already exists into the application database; false otherwise.
Throws:
Exception - if any error occurs

loginExists

public boolean loginExists(String login)
                    throws Exception
Test if the input login property already exists into the application database.

Parameters:
login - the login string
Returns:
true if the input login already exists into the application database; false otherwise
Throws:
Exception - if any error occurs


Copyright © 2002-2004 Power Of Two S.R.L. All Rights Reserved.