|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserDatabase
A Data Access Object (DAO) interface describing
the available operations for retrieving and storing Users
(and their associated Subscriptions) 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.
| Method Summary | |
|---|---|
void |
close()
Finalize access to the underlying persistence layer. |
User |
createUser(java.lang.String username)
Create and return a new User defined in this user database. |
User |
findUser(java.lang.String username)
Return the existing User with the specified username,
if any; otherwise return null. |
User[] |
findUsers()
Return the set of Users defined in this user database. |
boolean |
isOpen()
Return true if open() has been called. |
void |
open()
Initiate access to the underlying persistence layer. |
void |
removeUser(User user)
Remove the specified User from this database. |
void |
save()
Save any pending changes to the underlying persistence layer. |
| Method Detail |
|---|
User createUser(java.lang.String username)
Create and return a new User defined in this user database.
username - Username of the new user
java.lang.IllegalArgumentException - if the specified username
is not unique
void close()
throws java.lang.Exception
Finalize access to the underlying persistence layer.
java.lang.Exception - if a database access error occurs
User findUser(java.lang.String username)
throws ExpiredPasswordException
Return the existing User with the specified username,
if any; otherwise return null.
username - Username of the user to retrieve
ExpiredPasswordException - if user password has expired
and must be changedUser[] findUsers()
Return the set of Users defined in this user database.
boolean isOpen()
Return true if open() has been called.
java.lang.Exception - if a database access error occurs
void open()
throws java.lang.Exception
Initiate access to the underlying persistence layer.
java.lang.Exception - if a database access error occursvoid removeUser(User user)
User from this database.
user - User to be removed
java.lang.IllegalArgumentException - if the specified user is not
associated with this database
void save()
throws java.lang.Exception
Save any pending changes to the underlying persistence layer.
java.lang.Exception - if a database access error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||