|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserManager
Manages the creation, retrieval, removal, and updating of users
| Method Summary | |
|---|---|
java.util.Collection |
getAllUsers()
Returns a collection of all users |
java.util.Collection |
getFavoritePlaces(int userId)
Gets a collection of places that a user has marked as some of his favorites. |
java.util.Collection |
getFavoritePlaces(int userId,
int offset,
int maxReturned)
Returns a range of the favorite places |
java.util.Collection |
getPopularPlaces(int count)
Returns the top "X" places |
User |
getUser(int userId)
Retrieves a user from the storage medium based on their unique id number. |
User |
getUser(java.lang.String username)
This doesn't relate to a user, a slightly hacky way to avoid a new manager interface for favorites. |
int |
getUserCount()
Returns the number of users that exist in the database |
java.util.Collection |
getUsers(int offset,
int maxReturned)
Returns a range of the users |
int |
insertUser(java.lang.String username,
java.lang.String password,
java.lang.String name,
java.lang.String interests,
java.util.Date dateOfBirth)
Inserts a new user into the storage medium |
boolean |
removeUser(int userId)
Removes a user from the storage medium |
boolean |
updateUser(int id,
java.lang.String username,
java.lang.String password,
java.lang.String name,
java.lang.String interests,
java.util.Date dateOfBirth)
Updates a user in the storage medium |
| Method Detail |
|---|
User getUser(int userId)
userId - The id of the user to be retrieved
User getUser(java.lang.String username)
username - The username of this user
boolean removeUser(int userId)
userId - The unique id for the user to remove
int insertUser(java.lang.String username,
java.lang.String password,
java.lang.String name,
java.lang.String interests,
java.util.Date dateOfBirth)
username - The login name for the new userpassword - The password for the new username - The real name of the new user (optional)interests - A list of the interests of the new user (optional)dateOfBirth - the date that the new user was born
boolean updateUser(int id,
java.lang.String username,
java.lang.String password,
java.lang.String name,
java.lang.String interests,
java.util.Date dateOfBirth)
id - The id of the user to be updatedusername - The new login name for the userpassword - The new password for the username - The new real name of the user (optional)interests - A new list of the interests of the user (optional)dateOfBirth - The new date that the user was born
java.util.Collection getFavoritePlaces(int userId)
userId - The id of the user whose favorites should be retrieved
java.util.Collection getFavoritePlaces(int userId,
int offset,
int maxReturned)
userId - the user to return favorites foroffset - The number of favorites to skip before returning favoritesmaxReturned - The maximum number of favorites to return from this query
java.util.Collection getPopularPlaces(int count)
count - The number of results to be returned in the collection
java.util.Collection getAllUsers()
java.util.Collection getUsers(int offset,
int maxReturned)
offset - The number of users to skip before returning usersmaxReturned - The maximum number of users to return from this query
int getUserCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||