br.com.arsmachina.authentication.controller
Interface UserController

All Superinterfaces:
br.com.arsmachina.controller.Controller<User,Integer>, br.com.arsmachina.controller.ReadableController<User,Integer>, br.com.arsmachina.controller.WriteableController<User,Integer>
All Known Implementing Classes:
UserControllerImpl

public interface UserController
extends br.com.arsmachina.controller.Controller<User,Integer>

Controller definition for User.

Author:
Thiago H. de Paula Figueiredo

Method Summary
 User findByLogin(String login)
          Returns the user with a given login or null if no such user exists.
 User findByLoginAndPassword(String login, String password)
          Returns the user with a given login and password or null if no such user exists.
<T extends Role>
List<User>
findByRole(Class<T> roleClass)
          Returns all users with a given Role subclass.
 boolean hasUserWithLogin(String login)
          Tells if some user with a given login exists.
 
Methods inherited from interface br.com.arsmachina.controller.ReadableController
countAll, findAll, findAll, findByExample, findById, findByIds, reattach
 
Methods inherited from interface br.com.arsmachina.controller.WriteableController
delete, delete, evict, isPersistent, save, saveOrUpdate, update
 

Method Detail

findByLoginAndPassword

User findByLoginAndPassword(String login,
                            String password)
Returns the user with a given login and password or null if no such user exists.

Parameters:
login - a String.
Returns:

findByLogin

User findByLogin(String login)
Returns the user with a given login or null if no such user exists.

Parameters:
login - a String.
Returns:
an User.

findByRole

<T extends Role> List<User> findByRole(Class<T> roleClass)
Returns all users with a given Role subclass.

Parameters:
role - a Class. It must be a Role subclass and cannot be null.
Returns:
a List of Users.

hasUserWithLogin

boolean hasUserWithLogin(String login)
Tells if some user with a given login exists.

Parameters:
login - a String. It cannot be null.
Returns:
a boolean.


Copyright © 2008-2009 Thiago H. de Paula Figueiredo. All Rights Reserved.