|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shale.usecases.model.minimal.MinimalUsersDAO
public class MinimalUsersDAO
Minimal implementation of UsersDAO that provides no persistence
at all. A single user (username="user", password="pass") is created at
initialization time.
| Constructor Summary | |
|---|---|
MinimalUsersDAO()
Construct an instance with a single valid user. |
|
| Method Summary | |
|---|---|
User |
createUser()
Create and return a User object that may be populated
and then passed to insertUser() for persistence. |
User |
findUser(int id)
Return the User for the corresponding user id, if any. |
User |
findUser(String username)
Return the User for the corresponding username, if any. |
void |
insertUser(User user)
Insert a newly created User into persistent storage. |
void |
updateUser(User user)
Update an existing User into persistent storage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MinimalUsersDAO()
Construct an instance with a single valid user.
| Method Detail |
|---|
public User createUser()
UsersDAOCreate and return a User object that may be populated
and then passed to insertUser() for persistence.
createUser in interface UsersDAOpublic User findUser(int id)
UsersDAOReturn the User for the corresponding user id, if any.
Otherwise, return null.
findUser in interface UsersDAOid - User id to look uppublic User findUser(String username)
UsersDAOReturn the User for the corresponding username, if any.
Otherwise, return null.
findUser in interface UsersDAOusername - Username to look uppublic void insertUser(User user)
UsersDAOInsert a newly created User into persistent storage.
insertUser in interface UsersDAOuser - Created User to be persistedpublic void updateUser(User user)
UsersDAOUpdate an existing User into persistent storage.
updateUser in interface UsersDAOuser - Updated User to be persisted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||