KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > javabb > dao > entity > IUserDAO


1 package org.javabb.dao.entity;
2
3 import java.util.List JavaDoc;
4
5 import org.javabb.dao.DAOConstants;
6 import org.javabb.vo.User;
7 import org.javabb.vo.UserRank;
8
9 /*
10  * Copyright 2004 JavaFree.org
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  */

24
25 /**
26  * $Id: IUserDAO.java,v 1.6.2.1.4.1.2.2 2006/04/17 17:47:26 daltoncamargo Exp $
27  * @author Dalton Camargo - <a HREF="mailto:dalton@javabb.org">dalton@javabb.org </a> <br>
28  * @author Ronald Tetsuo Miura
29  */

30 public interface IUserDAO extends DAOConstants {
31
32     /**
33      * @param userId
34      * @return user
35      */

36     public User loadUser(Long JavaDoc userId);
37
38     /**
39      * @param email
40      * @return list of users
41      */

42     public List JavaDoc findByEmail(final String JavaDoc email);
43     
44     /**
45      * @param email
46      * @return list of users
47      */

48     public List JavaDoc findByEmail(final String JavaDoc email, final Long JavaDoc userId);
49
50     /**
51      * @param name
52      * @return user
53      */

54     public User loadByUsername(String JavaDoc name);
55
56     /**
57      * @return user
58      */

59     public User lastUserRegistered();
60
61     /**
62      * @param name
63      * @param passwd
64      * @return user
65      */

66     public User verificaLogin(String JavaDoc name, String JavaDoc passwd);
67
68     /**
69      * Delete an user and move your messages to user Guest - ID=0
70      * @param user
71      */

72     public void deleteUser(User user);
73
74     /**
75      * @param usercode
76      * @return user
77      */

78     public User loadByUsercode(String JavaDoc usercode);
79
80     /**
81      * @return user count
82      */

83     public int countAllUsers();
84
85     /**
86      * @param userName
87      * @param page
88      * @param itemsPerPage
89      * @return user list
90      */

91     public List JavaDoc findAllUsernameLike(String JavaDoc userName, int page, int itemsPerPage);
92
93     /**
94      * @param pageNumber
95      * @param itemsPerPage
96      * @return
97      */

98     public List JavaDoc findAllUserAdmin(int pageNumber, int itemsPerPage);
99     
100     /**
101      * @param pageNumber
102      * @param itemsPerPage
103      * @param orderBy
104      * @param ascDesc
105      * @return user list
106      */

107     public List JavaDoc findAllSortedBy(int pageNumber, int itemsPerPage, String JavaDoc orderBy, String JavaDoc ascDesc);
108
109     /**
110      * @param user
111      */

112     public void update(User user);
113
114     /**
115      * @param pageNumber
116      * @param itemsPerPage
117      * @return user list
118      */

119     public List JavaDoc findAll(int pageNumber, int itemsPerPage);
120
121     /**
122      * @param user
123      */

124     public void create(User user) throws Exception JavaDoc;
125
126     /**
127      * @param username
128      * @return
129      */

130     public List JavaDoc loadListByUsername(String JavaDoc username);
131     
132     /**
133      * Load a list of userRanks
134      * @return
135      */

136     public List JavaDoc loadUserRanks();
137     
138     /**
139      * Get UserRank VO using the postCount specified
140      * @param postCount
141      * @return
142      */

143     public UserRank getUserRank(Long JavaDoc postCount);
144 }
145
Popular Tags