Kawai Wiki

Rev

Rev 8 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.kawai.dao;

import org.kawai.model.User;

/**
 * Interace DAO UserDAO.
 *
 * @author Sergio Oliveira
 *
 */

public interface UserDAO {

    /**
     * Find the user by name.
     * @param username String
     * @return User
     */

    public User findByUsername(String username);

    /**
     * Insert the user.
     * @param u User
     */

    public void insert(User u);

    /**
     * Updates the user.
     * @param u User
     */

    public void update(User u);

    /**
     * Insert or update the user.
     * @param u User
     * @return boolean
     */

    public boolean insertOrUpdate(User u);

    /**
     * Loads the user by id.
     * @param id int
     * @return User
     */

    public User load(int id);
}