
br.com.jhonsapp.finaluser.persistence.UserDAO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of final-user Show documentation
Show all versions of final-user Show documentation
A bunch of classes that help developers building login and authentication.
The newest version!
package br.com.jhonsapp.finaluser.persistence;
import java.util.List;
import javax.ejb.Local;
import br.com.jhonsapp.bootstrap.object.persistence.generic.GenericDAO;
import br.com.jhonsapp.finaluser.domain.User;
/**
* EJB service that defines the User data access object. This service was
* designed to be used in login implementations.
*
* @see User
* @see GenericDAO
*
* @author Jhonathan Camacho
*/
@Local
public interface UserDAO extends GenericDAO {
/**
* Find all persisted user.
*
* @return a list with all user persisted in the database.
*/
public List findAll();
/**
* Find all persisted users based on a id range.
*
* @param first
* the initial user id of the query range.
* @param last
* the last user id of the query range.
* @return a list with the users that satisfy the range or a empty list
* otherwise.
*/
public List findAllInARange(int first, int last);
/**
* Search the total amount of users.
*
* @return the total amount of users.
*/
public Long usersSize();
/**
* Find a persisted user by his restToken.
*
* @param accessToken
* the user's accessToken
* @return the User that have the accessToken passed by parameter or null
* otherwise.
*/
public T findByAccessToken(String accessToken);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy