package eu.smartlm.abs.portal.security.login.dao; import java.util.List; import eu.smartlm.abs.portal.security.login.model.User; /** * Interface that abstract the User database implementation from the rest of the project * @author David García Pérez - CESGA **/ public interface UserDao { public static int USER_ADDED = 100; public static int ALREADY_USED_USERNAME = 200; /** * Gives back a list with all the users stored in teh database * @return a list of all users */ public List getUsers(); /** * Adds an user to the database * @param user to be added */ public int addUser(User user); /** * Removes an specific user from the database * @param username of the user to be removed */ public void removeUser(String username); /** * Edits the information of an user stored in the database * @param user with the same id but with the updated information */ public void editUser(User user); /** * Retrieves an user form the database by username field * @param username of the user to be retrieved * @return the User or null if the users does not exists in the database */ public User getUser(String username); }