org.dartra.framework.dao
Interface UserDAO

All Superinterfaces:
DataAccessObject

public interface UserDAO
extends DataAccessObject

Data access object for users.

Author:
Erwin Vervaet

Method Summary
 void addUser(User user)
          Add given user to the persistent store.
 User getUser(java.lang.String userId)
          Load the user with specified user id.
 java.util.Vector getUsers()
          Load all user objects available in the persistent store.
 User getUserWithId(java.lang.Object id)
          Load the user with specified persistent store id.
 void updateUser(User user)
          Update the information of given user in the persistent store.
 
Methods inherited from interface org.dartra.framework.dao.DataAccessObject
close, getConnection, getDAOFactory, init
 

Method Detail

addUser

public void addUser(User user)
             throws DataAccessException

Add given user to the persistent store.

Throws:
DataAccessException - When there is a problem accessing the persistent store, for instance when the given user is already present.

updateUser

public void updateUser(User user)
                throws DataAccessException

Update the information of given user in the persistent store. The specified user should already be present in the persistent store before calling this method.

Throws:
DataAccessException - When there is a problem accessing the persistent store.

getUserWithId

public User getUserWithId(java.lang.Object id)
                   throws DataAccessException

Load the user with specified persistent store id.

Throws:
DataAccessException - When there is a problem accessing the persistent store.

getUser

public User getUser(java.lang.String userId)
             throws DataAccessException

Load the user with specified user id.

Throws:
DataAccessException - When there is a problem accessing the persistent store.

getUsers

public java.util.Vector getUsers()
                          throws DataAccessException

Load all user objects available in the persistent store.

Throws:
DataAccessException - When there is a problem accessing the persistent store.