FileDocCategorySizeDatePackage
UserDatabase.javaAPI DocExample3209Thu Jul 08 09:28:38 BST 2004org.apache.struts.webapp.example

UserDatabase

public interface UserDatabase

A Data Access Object (DAO) interface describing the available operations for retrieving and storing {@link User}s (and their associated {@link Subscription}s) in some persistence layer whose characteristics are not specified here. One or more implementations will be created to perform the actual I/O that is required.

version
$Revision: 1.6 $ $Date: 2004/03/12 02:43:29 $
since
Struts 1.1

Fields Summary
Constructors Summary
Methods Summary
public voidclose()

Finalize access to the underlying persistence layer.

exception
Exception if a database access error occurs

public UsercreateUser(java.lang.String username)

Create and return a new {@link User} defined in this user database.

param
username Username of the new user
exception
IllegalArgumentException if the specified username is not unique

public UserfindUser(java.lang.String username)

Return the existing {@link User} with the specified username, if any; otherwise return null.

param
username Username of the user to retrieve
throws
ExpiredPasswordException if user password has expired and must be changed

public User[]findUsers()

Return the set of {@link User}s defined in this user database.

public voidopen()

Initiate access to the underlying persistence layer.

exception
Exception if a database access error occurs

public voidremoveUser(User user)
Remove the specified {@link User} from this database.

param
user User to be removed
exception
IllegalArgumentException if the specified user is not associated with this database

public voidsave()

Save any pending changes to the underlying persistence layer.

exception
Exception if a database access error occurs