2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shale.usecases.model;
19
20 /***
21 * <p>Data Access Object (DAO) for accessing model data about registered
22 * users and their profile information.</p>
23 *
24 * $Id: UsersDAO.java 464373 2006-10-16 04:21:54Z rahul $
25 */
26 public interface UsersDAO {
27
28
29 /***
30 * <p>Create and return a {@link User} object that may be populated
31 * and then passed to <code>insertUser()</code> for persistence.</p>
32 */
33 public User createUser();
34
35
36 /***
37 * <p>Return the {@link User} for the corresponding user id, if any.
38 * Otherwise, return <code>null</code>.</p>
39 *
40 * @param id User id to look up
41 */
42 public User findUser(int id);
43
44
45 /***
46 * <p>Return the {@link User} for the corresponding username, if any.
47 * Otherwise, return <code>null</code>.</p>
48 *
49 * @param username Username to look up
50 */
51 public User findUser(String username);
52
53
54 /***
55 * <p>Insert a newly created {@link User} into persistent storage.</p>
56 *
57 * @param user Created {@link User} to be persisted
58 */
59 public void insertUser(User user);
60
61
62 /***
63 * <p>Update an existing {@link User} into persistent storage.</p>
64 *
65 * @param user Updated {@link User} to be persisted
66 */
67 public void updateUser(User user);
68
69
70 }