|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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()
UsersDAO
Create and return a User
object that may be populated
and then passed to insertUser()
for persistence.
createUser
in interface UsersDAO
public User findUser(int id)
UsersDAO
Return the User
for the corresponding user id, if any.
Otherwise, return null
.
findUser
in interface UsersDAO
id
- User id to look uppublic User findUser(String username)
UsersDAO
Return the User
for the corresponding username, if any.
Otherwise, return null
.
findUser
in interface UsersDAO
username
- Username to look uppublic void insertUser(User user)
UsersDAO
Insert a newly created User
into persistent storage.
insertUser
in interface UsersDAO
user
- Created User
to be persistedpublic void updateUser(User user)
UsersDAO
Update an existing User
into persistent storage.
updateUser
in interface UsersDAO
user
- Updated User
to be persisted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |