KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

31 public interface IForumDAO extends DAOConstants {
32
33     /**
34      * @param id
35      * @return forum
36      */

37     public Forum load(Long JavaDoc id);
38
39     /**
40      * @param forum
41      * @param forumTo
42      * @throws Exception
43      */

44     public void transferForum(Forum forum, int forumTo) throws Exception JavaDoc;
45
46     /**
47      * @param forum
48      * @throws Exception
49      */

50     public void deleteForum(Forum forum) throws Exception JavaDoc;
51
52     /**
53      * Refresh the information of Forum
54      * @param forumId
55      */

56     public void refreshForum(Long JavaDoc forumId);
57
58     /**
59      * Refresh the information of Topic count at forum
60      * @param topicId
61      */

62     public void refreshTopic(Long JavaDoc topicId);
63
64     /**
65      * Refresh the information of Post count at forum
66      * @param postId
67      */

68     public void refreshPost(Long JavaDoc postId);
69
70     /**
71      * @return forum list
72      */

73     public List JavaDoc findAll();
74     
75     public List JavaDoc findByCategoryOrderAsc(Long JavaDoc id);
76
77     /**
78      * @param id
79      * @return forum list
80      */

81     public List JavaDoc findByCategory(Long JavaDoc id);
82
83     /**
84      * @param forum
85      */

86     public void update(Forum forum);
87
88     /**
89      * @return forum count
90      */

91     public int countAllForums();
92
93     /**
94      * Insert a forum
95      * @param forum
96      * @return
97      */

98     public Forum insertForum(Forum forum);
99     
100     /**
101      * Get all id foruns with unread topics
102      * @param readTopics - Topics reads
103      * @param lastUserVisit - Last user visit of user
104      * @param userId - id of user
105      */

106     public List JavaDoc obtainUnreadForuns(Set JavaDoc readTopics, Date JavaDoc lastUserVisit, Long JavaDoc userId) throws Exception JavaDoc;
107
108 }
Popular Tags