PageRenderTime 526ms CodeModel.GetById 212ms app.highlight 7ms RepoModel.GetById 185ms app.codeStats 1ms

/src/main/java/com/google/ie/business/dao/UserDao.java

http://thoughtsite.googlecode.com/
Java | 57 lines | 9 code | 7 blank | 41 comment | 0 complexity | 65018f0fec469a0223074ce98e5d1075 MD5 | raw file
 1/* Copyright 2010 Google Inc.
 2 * 
 3 * Licensed under the Apache License, Version 2.0 (the "License");
 4 * you may not use this file except in compliance with the License.
 5 * You may obtain a copy of the License at
 6 * 
 7 *      http://www.apache.org/licenses/LICENSE-2.0
 8 * 
 9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS.
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License
14 */
15
16package com.google.ie.business.dao;
17
18import com.google.ie.business.domain.User;
19import com.google.ie.dto.RetrievalInfo;
20
21import java.util.List;
22
23/**
24 * A service specification for the User entity
25 * 
26 * @author Charanjeet singh
27 * 
28 */
29public interface UserDao extends BaseDao {
30    /**
31     * Saves a user in to data store.
32     * 
33     * @param user User object.
34     * 
35     * @return Returns the saved user.
36     */
37    User saveUser(User user);
38
39    /**
40     * Retrieves the user corresponding to the id.
41     * 
42     * @param id String object representing the user's id
43     * @return Returns the user object or null;
44     */
45    User getUserById(String id);
46
47    /**
48     * Get list of registered users with the given role and status.
49     * 
50     * @param retrievalInfo information for accessing users.
51     * @param role role of user
52     * @param status status of user
53     * @return list of users
54     */
55    List<User> getUsers(RetrievalInfo retrievalInfo, String role, String status);
56}
57