Kawai Wiki

Rev

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

Rev Author Line No. Line
8 soliveira 1
package org.kawai.dao;
6 soliveira 2
 
8 soliveira 3
import org.kawai.model.User;
6 soliveira 4
 
195 helio.frota 5
/**
6
 * Interace DAO UserDAO.
7
 *
8
 * @author Sergio Oliveira
9
 *
10
 */
6 soliveira 11
public interface UserDAO {
195 helio.frota 12
 
13
    /**
14
     * Find the user by name.
15
     * @param username String
16
     * @return User
17
     */
18
    public User findByUsername(String username);
19
 
20
    /**
21
     * Insert the user.
22
     * @param u User
23
     */
24
    public void insert(User u);
25
 
26
    /**
27
     * Updates the user.
28
     * @param u User
29
     */
30
    public void update(User u);
31
 
32
    /**
33
     * Insert or update the user.
34
     * @param u User
35
     * @return boolean
36
     */
37
    public boolean insertOrUpdate(User u);
38
 
39
    /**
40
     * Loads the user by id.
41
     * @param id int
42
     * @return User
43
     */
44
    public User load(int id);
45
}