1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.ratings.service.base;
24  
25  import com.liferay.counter.service.CounterLocalService;
26  import com.liferay.counter.service.CounterService;
27  
28  import com.liferay.portal.PortalException;
29  import com.liferay.portal.SystemException;
30  import com.liferay.portal.kernel.annotation.BeanReference;
31  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
32  import com.liferay.portal.service.UserLocalService;
33  import com.liferay.portal.service.UserService;
34  import com.liferay.portal.service.persistence.UserFinder;
35  import com.liferay.portal.service.persistence.UserPersistence;
36  
37  import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
38  import com.liferay.portlet.blogs.service.BlogsEntryService;
39  import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
40  import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
41  import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
42  import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
43  import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
44  import com.liferay.portlet.ratings.model.RatingsEntry;
45  import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
46  import com.liferay.portlet.ratings.service.RatingsEntryService;
47  import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
48  import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
49  import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
50  
51  import java.util.List;
52  
53  /**
54   * <a href="RatingsEntryLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
55   *
56   * @author Brian Wing Shun Chan
57   *
58   */
59  public abstract class RatingsEntryLocalServiceBaseImpl
60      implements RatingsEntryLocalService {
61      public RatingsEntry addRatingsEntry(RatingsEntry ratingsEntry)
62          throws SystemException {
63          ratingsEntry.setNew(true);
64  
65          return ratingsEntryPersistence.update(ratingsEntry, false);
66      }
67  
68      public RatingsEntry createRatingsEntry(long entryId) {
69          return ratingsEntryPersistence.create(entryId);
70      }
71  
72      public void deleteRatingsEntry(long entryId)
73          throws PortalException, SystemException {
74          ratingsEntryPersistence.remove(entryId);
75      }
76  
77      public void deleteRatingsEntry(RatingsEntry ratingsEntry)
78          throws SystemException {
79          ratingsEntryPersistence.remove(ratingsEntry);
80      }
81  
82      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
83          throws SystemException {
84          return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery);
85      }
86  
87      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
88          int end) throws SystemException {
89          return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
90              start, end);
91      }
92  
93      public RatingsEntry getRatingsEntry(long entryId)
94          throws PortalException, SystemException {
95          return ratingsEntryPersistence.findByPrimaryKey(entryId);
96      }
97  
98      public List<RatingsEntry> getRatingsEntries(int start, int end)
99          throws SystemException {
100         return ratingsEntryPersistence.findAll(start, end);
101     }
102 
103     public int getRatingsEntriesCount() throws SystemException {
104         return ratingsEntryPersistence.countAll();
105     }
106 
107     public RatingsEntry updateRatingsEntry(RatingsEntry ratingsEntry)
108         throws SystemException {
109         ratingsEntry.setNew(false);
110 
111         return ratingsEntryPersistence.update(ratingsEntry, true);
112     }
113 
114     public RatingsEntryLocalService getRatingsEntryLocalService() {
115         return ratingsEntryLocalService;
116     }
117 
118     public void setRatingsEntryLocalService(
119         RatingsEntryLocalService ratingsEntryLocalService) {
120         this.ratingsEntryLocalService = ratingsEntryLocalService;
121     }
122 
123     public RatingsEntryService getRatingsEntryService() {
124         return ratingsEntryService;
125     }
126 
127     public void setRatingsEntryService(RatingsEntryService ratingsEntryService) {
128         this.ratingsEntryService = ratingsEntryService;
129     }
130 
131     public RatingsEntryPersistence getRatingsEntryPersistence() {
132         return ratingsEntryPersistence;
133     }
134 
135     public void setRatingsEntryPersistence(
136         RatingsEntryPersistence ratingsEntryPersistence) {
137         this.ratingsEntryPersistence = ratingsEntryPersistence;
138     }
139 
140     public RatingsStatsLocalService getRatingsStatsLocalService() {
141         return ratingsStatsLocalService;
142     }
143 
144     public void setRatingsStatsLocalService(
145         RatingsStatsLocalService ratingsStatsLocalService) {
146         this.ratingsStatsLocalService = ratingsStatsLocalService;
147     }
148 
149     public RatingsStatsPersistence getRatingsStatsPersistence() {
150         return ratingsStatsPersistence;
151     }
152 
153     public void setRatingsStatsPersistence(
154         RatingsStatsPersistence ratingsStatsPersistence) {
155         this.ratingsStatsPersistence = ratingsStatsPersistence;
156     }
157 
158     public CounterLocalService getCounterLocalService() {
159         return counterLocalService;
160     }
161 
162     public void setCounterLocalService(CounterLocalService counterLocalService) {
163         this.counterLocalService = counterLocalService;
164     }
165 
166     public CounterService getCounterService() {
167         return counterService;
168     }
169 
170     public void setCounterService(CounterService counterService) {
171         this.counterService = counterService;
172     }
173 
174     public UserLocalService getUserLocalService() {
175         return userLocalService;
176     }
177 
178     public void setUserLocalService(UserLocalService userLocalService) {
179         this.userLocalService = userLocalService;
180     }
181 
182     public UserService getUserService() {
183         return userService;
184     }
185 
186     public void setUserService(UserService userService) {
187         this.userService = userService;
188     }
189 
190     public UserPersistence getUserPersistence() {
191         return userPersistence;
192     }
193 
194     public void setUserPersistence(UserPersistence userPersistence) {
195         this.userPersistence = userPersistence;
196     }
197 
198     public UserFinder getUserFinder() {
199         return userFinder;
200     }
201 
202     public void setUserFinder(UserFinder userFinder) {
203         this.userFinder = userFinder;
204     }
205 
206     public BlogsEntryLocalService getBlogsEntryLocalService() {
207         return blogsEntryLocalService;
208     }
209 
210     public void setBlogsEntryLocalService(
211         BlogsEntryLocalService blogsEntryLocalService) {
212         this.blogsEntryLocalService = blogsEntryLocalService;
213     }
214 
215     public BlogsEntryService getBlogsEntryService() {
216         return blogsEntryService;
217     }
218 
219     public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
220         this.blogsEntryService = blogsEntryService;
221     }
222 
223     public BlogsEntryPersistence getBlogsEntryPersistence() {
224         return blogsEntryPersistence;
225     }
226 
227     public void setBlogsEntryPersistence(
228         BlogsEntryPersistence blogsEntryPersistence) {
229         this.blogsEntryPersistence = blogsEntryPersistence;
230     }
231 
232     public BlogsEntryFinder getBlogsEntryFinder() {
233         return blogsEntryFinder;
234     }
235 
236     public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
237         this.blogsEntryFinder = blogsEntryFinder;
238     }
239 
240     public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
241         return blogsStatsUserLocalService;
242     }
243 
244     public void setBlogsStatsUserLocalService(
245         BlogsStatsUserLocalService blogsStatsUserLocalService) {
246         this.blogsStatsUserLocalService = blogsStatsUserLocalService;
247     }
248 
249     public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
250         return blogsStatsUserPersistence;
251     }
252 
253     public void setBlogsStatsUserPersistence(
254         BlogsStatsUserPersistence blogsStatsUserPersistence) {
255         this.blogsStatsUserPersistence = blogsStatsUserPersistence;
256     }
257 
258     public BlogsStatsUserFinder getBlogsStatsUserFinder() {
259         return blogsStatsUserFinder;
260     }
261 
262     public void setBlogsStatsUserFinder(
263         BlogsStatsUserFinder blogsStatsUserFinder) {
264         this.blogsStatsUserFinder = blogsStatsUserFinder;
265     }
266 
267     @BeanReference(name = "com.liferay.portlet.ratings.service.RatingsEntryLocalService.impl")
268     protected RatingsEntryLocalService ratingsEntryLocalService;
269     @BeanReference(name = "com.liferay.portlet.ratings.service.RatingsEntryService.impl")
270     protected RatingsEntryService ratingsEntryService;
271     @BeanReference(name = "com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence.impl")
272     protected RatingsEntryPersistence ratingsEntryPersistence;
273     @BeanReference(name = "com.liferay.portlet.ratings.service.RatingsStatsLocalService.impl")
274     protected RatingsStatsLocalService ratingsStatsLocalService;
275     @BeanReference(name = "com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence.impl")
276     protected RatingsStatsPersistence ratingsStatsPersistence;
277     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
278     protected CounterLocalService counterLocalService;
279     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
280     protected CounterService counterService;
281     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
282     protected UserLocalService userLocalService;
283     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
284     protected UserService userService;
285     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
286     protected UserPersistence userPersistence;
287     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
288     protected UserFinder userFinder;
289     @BeanReference(name = "com.liferay.portlet.blogs.service.BlogsEntryLocalService.impl")
290     protected BlogsEntryLocalService blogsEntryLocalService;
291     @BeanReference(name = "com.liferay.portlet.blogs.service.BlogsEntryService.impl")
292     protected BlogsEntryService blogsEntryService;
293     @BeanReference(name = "com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence.impl")
294     protected BlogsEntryPersistence blogsEntryPersistence;
295     @BeanReference(name = "com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder.impl")
296     protected BlogsEntryFinder blogsEntryFinder;
297     @BeanReference(name = "com.liferay.portlet.blogs.service.BlogsStatsUserLocalService.impl")
298     protected BlogsStatsUserLocalService blogsStatsUserLocalService;
299     @BeanReference(name = "com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence.impl")
300     protected BlogsStatsUserPersistence blogsStatsUserPersistence;
301     @BeanReference(name = "com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder.impl")
302     protected BlogsStatsUserFinder blogsStatsUserFinder;
303 }