KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > jforum > dao > generic > GenericDataAccessDriver


1 /*
2  * Copyright (c) Rafael Steil
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms,
6  * with or without modification, are permitted provided
7  * that the following conditions are met:
8  *
9  * 1) Redistributions of source code must retain the above
10  * copyright notice, this list of conditions and the
11  * following disclaimer.
12  * 2) Redistributions in binary form must reproduce the
13  * above copyright notice, this list of conditions and
14  * the following disclaimer in the documentation and/or
15  * other materials provided with the distribution.
16  * 3) Neither the name of "Rafael Steil" nor
17  * the names of its contributors may be used to endorse
18  * or promote products derived from this software without
19  * specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
22  * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
23  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
24  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
27  * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
32  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
34  * IN CONTRACT, STRICT LIABILITY, OR TORT
35  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
36  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
37  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
38  *
39  * This file creation date: Mar 3, 2003 / 2:19:47 PM
40  * The JForum Project
41  * http://www.jforum.net
42  */

43 package net.jforum.dao.generic;
44
45 import net.jforum.dao.AttachmentDAO;
46 import net.jforum.dao.BannerDAO;
47 import net.jforum.dao.BookmarkDAO;
48 import net.jforum.dao.CategoryDAO;
49 import net.jforum.dao.ConfigDAO;
50 import net.jforum.dao.ForumDAO;
51 import net.jforum.dao.GroupDAO;
52 import net.jforum.dao.KarmaDAO;
53 import net.jforum.dao.ModerationDAO;
54 import net.jforum.dao.PollDAO;
55 import net.jforum.dao.PostDAO;
56 import net.jforum.dao.PrivateMessageDAO;
57 import net.jforum.dao.RankingDAO;
58 import net.jforum.dao.ScheduledSearchIndexerDAO;
59 import net.jforum.dao.SearchDAO;
60 import net.jforum.dao.SmilieDAO;
61 import net.jforum.dao.SummaryDAO;
62 import net.jforum.dao.TopicDAO;
63 import net.jforum.dao.TreeGroupDAO;
64 import net.jforum.dao.UserDAO;
65 import net.jforum.dao.UserSessionDAO;
66 import net.jforum.dao.generic.security.GenericGroupSecurityDAO;
67 import net.jforum.dao.security.GroupSecurityDAO;
68
69 /**
70  * @author Rafael Steil
71  * @version $Id: GenericDataAccessDriver.java,v 1.3 2005/11/10 18:30:03 almilli Exp $
72  */

73 public class GenericDataAccessDriver extends net.jforum.dao.DataAccessDriver
74 {
75     private static GroupDAO groupDao = new GenericGroupDAO();
76     private static PostDAO postDao = new GenericPostDAO();
77     private static PollDAO pollDao = new GenericPollDAO();
78     private static RankingDAO rankingDao = new GenericRankingDAO();
79     private static TopicDAO topicDao = new GenericTopicDAO();
80     private static UserDAO userDao = new GenericUserDAO();
81     private static TreeGroupDAO treeGroupDao = new GenericTreeGroupDAO();
82     private static SmilieDAO smilieDao = new GenericSmilieDAO();
83     private static SearchDAO searchDao = new GenericSearchDAO();
84     private static GroupSecurityDAO groupSecurityDao = new GenericGroupSecurityDAO();
85     private static PrivateMessageDAO privateMessageDao = new GenericPrivateMessageDAO();
86     private static UserSessionDAO userSessionDao = new GenericUserSessionDAO();
87     private static KarmaDAO karmaDao = new GenericKarmaDAO();
88     private static BookmarkDAO bookmarkDao = new GenericBookmarkDAO();
89     private static AttachmentDAO attachmentDao = new GenericAttachmentDAO();
90     private static ModerationDAO moderationDao = new GenericModerationDAO();
91     private static ForumDAO forumDao = new GenericForumDAO();
92     private static CategoryDAO categoryDao = new GenericCategoryDAO();
93     private static ConfigDAO configDao = new GenericConfigDAO();
94     private static ScheduledSearchIndexerDAO ssiDao = new GenericScheduledSearchIndexerDAO();
95     private static BannerDAO bannerDao = new GenericBannerDAO();
96     private static SummaryDAO summaryDao = new GenericSummaryDAO();
97
98     /**
99      * @see net.jforum.dao.DataAccessDriver#getForumModel()
100      */

101     public net.jforum.dao.ForumDAO newForumDAO()
102     {
103         return forumDao;
104     }
105
106     /**
107      * @see net.jforum.dao.DataAccessDriver#getGroupModel()
108      */

109     public net.jforum.dao.GroupDAO newGroupDAO()
110     {
111         return groupDao;
112     }
113
114     /**
115      * @see net.jforum.dao.DataAccessDriver#getPostModel()
116      */

117     public net.jforum.dao.PostDAO newPostDAO()
118     {
119         return postDao;
120     }
121
122     /**
123      * @see net.jforum.dao.DataAccessDriver#getPollModel()
124      */

125     public net.jforum.dao.PollDAO newPollDAO()
126     {
127         return pollDao;
128     }
129
130     /**
131      * @see net.jforum.dao.DataAccessDriver#getRankingModel()
132      */

133     public net.jforum.dao.RankingDAO newRankingDAO()
134     {
135         return rankingDao;
136     }
137
138     /**
139      * @see net.jforum.dao.DataAccessDriver#getTopicModel()
140      */

141     public net.jforum.dao.TopicDAO newTopicDAO()
142     {
143         return topicDao;
144     }
145
146     /**
147      * @see net.jforum.dao.DataAccessDriver#getUserModel()
148      */

149     public net.jforum.dao.UserDAO newUserDAO()
150     {
151         return userDao;
152     }
153
154     /**
155      * @see net.jforum.dao.DataAccessDriver#newCategoryDAO()
156      */

157     public net.jforum.dao.CategoryDAO newCategoryDAO()
158     {
159         return categoryDao;
160     }
161
162     /**
163      * @see net.jforum.dao.DataAccessDriver#newTreeGroupDAO()
164      */

165     public net.jforum.dao.TreeGroupDAO newTreeGroupDAO()
166     {
167         return treeGroupDao;
168     }
169     
170     /**
171      * @see net.jforum.dao.DataAccessDriver#newSmilieDAO()
172      */

173     public net.jforum.dao.SmilieDAO newSmilieDAO()
174     {
175         return smilieDao;
176     }
177     
178     /**
179      * @see net.jforum.dao.DataAccessDriver#newSearchDAO()
180      */

181     public net.jforum.dao.SearchDAO newSearchDAO()
182     {
183         return searchDao;
184     }
185     
186     /**
187      * @see net.jforum.dao.DataAccessDriver#newSearchIndexerDAO()
188      */

189     public net.jforum.dao.SearchIndexerDAO newSearchIndexerDAO()
190     {
191         return new GenericSearchIndexerDAO();
192     }
193     
194     /**
195      * @see net.jforum.dao.DataAccessDriver#newGroupSecurityDAO()
196      */

197     public net.jforum.dao.security.GroupSecurityDAO newGroupSecurityDAO()
198     {
199         return groupSecurityDao;
200     }
201
202     /**
203      * @see net.jforum.dao.DataAccessDriver#newPrivateMessageDAO()
204      */

205     public net.jforum.dao.PrivateMessageDAO newPrivateMessageDAO()
206     {
207         return privateMessageDao;
208     }
209     
210     /**
211      * @see net.jforum.dao.DataAccessDriver#newUserSessionDAO()
212      */

213     public net.jforum.dao.UserSessionDAO newUserSessionDAO()
214     {
215         return userSessionDao;
216     }
217     
218     /**
219      * @see net.jforum.dao.DataAccessDriver#newConfigDAO()
220      */

221     public net.jforum.dao.ConfigDAO newConfigDAO()
222     {
223         return configDao;
224     }
225     
226     /**
227      * @see net.jforum.dao.DataAccessDriver#newKarmaDAO()
228      */

229     public net.jforum.dao.KarmaDAO newKarmaDAO()
230     {
231         return karmaDao;
232     }
233     
234     /**
235      * @see net.jforum.dao.DataAccessDriver#newBookmarkDAO()
236      */

237     public net.jforum.dao.BookmarkDAO newBookmarkDAO()
238     {
239         return bookmarkDao;
240     }
241     
242     /**
243      * @see net.jforum.dao.DataAccessDriver#newAttachmentDAO()
244      */

245     public net.jforum.dao.AttachmentDAO newAttachmentDAO()
246     {
247         return attachmentDao;
248     }
249     
250     /**
251      * @see net.jforum.dao.DataAccessDriver#newModerationDAO()
252      */

253     public net.jforum.dao.ModerationDAO newModerationDAO()
254     {
255         return moderationDao;
256     }
257     
258     /**
259      * @see net.jforum.dao.DataAccessDriver#newScheduledSearchIndexerDAO()
260      */

261     public net.jforum.dao.ScheduledSearchIndexerDAO newScheduledSearchIndexerDAO()
262     {
263         return ssiDao;
264     }
265
266     /**
267      * @see net.jforum.dao.DataAccessDriver#newBannerDAO()
268      */

269     public net.jforum.dao.BannerDAO newBannerDAO()
270     {
271         return bannerDao;
272     }
273     
274     /**
275      * @see net.jforum.dao.DataAccessDriver#newSummaryDAO()
276      */

277     public SummaryDAO newSummaryDAO()
278     {
279         return summaryDao;
280     }
281 }
282
Popular Tags