org.apache.shale.usecases.model.minimal
Class MinimalUsersDAO

java.lang.Object
  extended by org.apache.shale.usecases.model.minimal.MinimalUsersDAO
All Implemented Interfaces:
UsersDAO

public class MinimalUsersDAO
extends Object
implements UsersDAO

Minimal implementation of UsersDAO that provides no persistence at all. A single user (username="user", password="pass") is created at initialization time.

$Id: MinimalUsersDAO.java 464373 2006-10-16 04:21:54Z rahul $


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

MinimalUsersDAO

public MinimalUsersDAO()

Construct an instance with a single valid user.

Method Detail

createUser

public User createUser()
Description copied from interface: UsersDAO

Create and return a User object that may be populated and then passed to insertUser() for persistence.

Specified by:
createUser in interface UsersDAO

findUser

public User findUser(int id)
Description copied from interface: UsersDAO

Return the User for the corresponding user id, if any. Otherwise, return null.

Specified by:
findUser in interface UsersDAO
Parameters:
id - User id to look up

findUser

public User findUser(String username)
Description copied from interface: UsersDAO

Return the User for the corresponding username, if any. Otherwise, return null.

Specified by:
findUser in interface UsersDAO
Parameters:
username - Username to look up

insertUser

public void insertUser(User user)
Description copied from interface: UsersDAO

Insert a newly created User into persistent storage.

Specified by:
insertUser in interface UsersDAO
Parameters:
user - Created User to be persisted

updateUser

public void updateUser(User user)
Description copied from interface: UsersDAO

Update an existing User into persistent storage.

Specified by:
updateUser in interface UsersDAO
Parameters:
user - Updated User to be persisted


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.