1   /**
2    * Copyright (c) 2000-2008 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.dao.orm.DynamicQuery;
31  import com.liferay.portal.service.UserLocalService;
32  import com.liferay.portal.service.UserService;
33  import com.liferay.portal.service.persistence.UserFinder;
34  import com.liferay.portal.service.persistence.UserPersistence;
35  
36  import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
37  import com.liferay.portlet.blogs.service.BlogsEntryService;
38  import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
39  import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
40  import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
41  import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
42  import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
43  import com.liferay.portlet.ratings.model.RatingsEntry;
44  import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
45  import com.liferay.portlet.ratings.service.RatingsEntryService;
46  import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
47  import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
48  import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
49  
50  import java.util.List;
51  
52  /**
53   * <a href="RatingsEntryLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
54   *
55   * @author Brian Wing Shun Chan
56   *
57   */
58  public abstract class RatingsEntryLocalServiceBaseImpl
59      implements RatingsEntryLocalService {
60      public RatingsEntry addRatingsEntry(RatingsEntry ratingsEntry)
61          throws SystemException {
62          ratingsEntry.setNew(true);
63  
64          return ratingsEntryPersistence.update(ratingsEntry, false);
65      }
66  
67      public RatingsEntry createRatingsEntry(long entryId) {
68          return ratingsEntryPersistence.create(entryId);
69      }
70  
71      public void deleteRatingsEntry(long entryId)
72          throws PortalException, SystemException {
73          ratingsEntryPersistence.remove(entryId);
74      }
75  
76      public void deleteRatingsEntry(RatingsEntry ratingsEntry)
77          throws SystemException {
78          ratingsEntryPersistence.remove(ratingsEntry);
79      }
80  
81      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
82          throws SystemException {
83          return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery);
84      }
85  
86      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
87          int end) throws SystemException {
88          return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
89              start, end);
90      }
91  
92      public RatingsEntry getRatingsEntry(long entryId)
93          throws PortalException, SystemException {
94          return ratingsEntryPersistence.findByPrimaryKey(entryId);
95      }
96  
97      public List<RatingsEntry> getRatingsEntries(int start, int end)
98          throws SystemException {
99          return ratingsEntryPersistence.findAll(start, end);
100     }
101 
102     public int getRatingsEntriesCount() throws SystemException {
103         return ratingsEntryPersistence.countAll();
104     }
105 
106     public RatingsEntry updateRatingsEntry(RatingsEntry ratingsEntry)
107         throws SystemException {
108         ratingsEntry.setNew(false);
109 
110         return ratingsEntryPersistence.update(ratingsEntry, true);
111     }
112 
113     public RatingsEntryLocalService getRatingsEntryLocalService() {
114         return ratingsEntryLocalService;
115     }
116 
117     public void setRatingsEntryLocalService(
118         RatingsEntryLocalService ratingsEntryLocalService) {
119         this.ratingsEntryLocalService = ratingsEntryLocalService;
120     }
121 
122     public RatingsEntryService getRatingsEntryService() {
123         return ratingsEntryService;
124     }
125 
126     public void setRatingsEntryService(RatingsEntryService ratingsEntryService) {
127         this.ratingsEntryService = ratingsEntryService;
128     }
129 
130     public RatingsEntryPersistence getRatingsEntryPersistence() {
131         return ratingsEntryPersistence;
132     }
133 
134     public void setRatingsEntryPersistence(
135         RatingsEntryPersistence ratingsEntryPersistence) {
136         this.ratingsEntryPersistence = ratingsEntryPersistence;
137     }
138 
139     public RatingsStatsLocalService getRatingsStatsLocalService() {
140         return ratingsStatsLocalService;
141     }
142 
143     public void setRatingsStatsLocalService(
144         RatingsStatsLocalService ratingsStatsLocalService) {
145         this.ratingsStatsLocalService = ratingsStatsLocalService;
146     }
147 
148     public RatingsStatsPersistence getRatingsStatsPersistence() {
149         return ratingsStatsPersistence;
150     }
151 
152     public void setRatingsStatsPersistence(
153         RatingsStatsPersistence ratingsStatsPersistence) {
154         this.ratingsStatsPersistence = ratingsStatsPersistence;
155     }
156 
157     public CounterLocalService getCounterLocalService() {
158         return counterLocalService;
159     }
160 
161     public void setCounterLocalService(CounterLocalService counterLocalService) {
162         this.counterLocalService = counterLocalService;
163     }
164 
165     public CounterService getCounterService() {
166         return counterService;
167     }
168 
169     public void setCounterService(CounterService counterService) {
170         this.counterService = counterService;
171     }
172 
173     public UserLocalService getUserLocalService() {
174         return userLocalService;
175     }
176 
177     public void setUserLocalService(UserLocalService userLocalService) {
178         this.userLocalService = userLocalService;
179     }
180 
181     public UserService getUserService() {
182         return userService;
183     }
184 
185     public void setUserService(UserService userService) {
186         this.userService = userService;
187     }
188 
189     public UserPersistence getUserPersistence() {
190         return userPersistence;
191     }
192 
193     public void setUserPersistence(UserPersistence userPersistence) {
194         this.userPersistence = userPersistence;
195     }
196 
197     public UserFinder getUserFinder() {
198         return userFinder;
199     }
200 
201     public void setUserFinder(UserFinder userFinder) {
202         this.userFinder = userFinder;
203     }
204 
205     public BlogsEntryLocalService getBlogsEntryLocalService() {
206         return blogsEntryLocalService;
207     }
208 
209     public void setBlogsEntryLocalService(
210         BlogsEntryLocalService blogsEntryLocalService) {
211         this.blogsEntryLocalService = blogsEntryLocalService;
212     }
213 
214     public BlogsEntryService getBlogsEntryService() {
215         return blogsEntryService;
216     }
217 
218     public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
219         this.blogsEntryService = blogsEntryService;
220     }
221 
222     public BlogsEntryPersistence getBlogsEntryPersistence() {
223         return blogsEntryPersistence;
224     }
225 
226     public void setBlogsEntryPersistence(
227         BlogsEntryPersistence blogsEntryPersistence) {
228         this.blogsEntryPersistence = blogsEntryPersistence;
229     }
230 
231     public BlogsEntryFinder getBlogsEntryFinder() {
232         return blogsEntryFinder;
233     }
234 
235     public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
236         this.blogsEntryFinder = blogsEntryFinder;
237     }
238 
239     public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
240         return blogsStatsUserLocalService;
241     }
242 
243     public void setBlogsStatsUserLocalService(
244         BlogsStatsUserLocalService blogsStatsUserLocalService) {
245         this.blogsStatsUserLocalService = blogsStatsUserLocalService;
246     }
247 
248     public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
249         return blogsStatsUserPersistence;
250     }
251 
252     public void setBlogsStatsUserPersistence(
253         BlogsStatsUserPersistence blogsStatsUserPersistence) {
254         this.blogsStatsUserPersistence = blogsStatsUserPersistence;
255     }
256 
257     public BlogsStatsUserFinder getBlogsStatsUserFinder() {
258         return blogsStatsUserFinder;
259     }
260 
261     public void setBlogsStatsUserFinder(
262         BlogsStatsUserFinder blogsStatsUserFinder) {
263         this.blogsStatsUserFinder = blogsStatsUserFinder;
264     }
265 
266     @javax.annotation.Resource(name = "com.liferay.portlet.ratings.service.RatingsEntryLocalService.impl")
267     protected RatingsEntryLocalService ratingsEntryLocalService;
268     @javax.annotation.Resource(name = "com.liferay.portlet.ratings.service.RatingsEntryService.impl")
269     protected RatingsEntryService ratingsEntryService;
270     @javax.annotation.Resource(name = "com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence.impl")
271     protected RatingsEntryPersistence ratingsEntryPersistence;
272     @javax.annotation.Resource(name = "com.liferay.portlet.ratings.service.RatingsStatsLocalService.impl")
273     protected RatingsStatsLocalService ratingsStatsLocalService;
274     @javax.annotation.Resource(name = "com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence.impl")
275     protected RatingsStatsPersistence ratingsStatsPersistence;
276     @javax.annotation.Resource(name = "com.liferay.counter.service.CounterLocalService.impl")
277     protected CounterLocalService counterLocalService;
278     @javax.annotation.Resource(name = "com.liferay.counter.service.CounterService.impl")
279     protected CounterService counterService;
280     @javax.annotation.Resource(name = "com.liferay.portal.service.UserLocalService.impl")
281     protected UserLocalService userLocalService;
282     @javax.annotation.Resource(name = "com.liferay.portal.service.UserService.impl")
283     protected UserService userService;
284     @javax.annotation.Resource(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
285     protected UserPersistence userPersistence;
286     @javax.annotation.Resource(name = "com.liferay.portal.service.persistence.UserFinder.impl")
287     protected UserFinder userFinder;
288     @javax.annotation.Resource(name = "com.liferay.portlet.blogs.service.BlogsEntryLocalService.impl")
289     protected BlogsEntryLocalService blogsEntryLocalService;
290     @javax.annotation.Resource(name = "com.liferay.portlet.blogs.service.BlogsEntryService.impl")
291     protected BlogsEntryService blogsEntryService;
292     @javax.annotation.Resource(name = "com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence.impl")
293     protected BlogsEntryPersistence blogsEntryPersistence;
294     @javax.annotation.Resource(name = "com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder.impl")
295     protected BlogsEntryFinder blogsEntryFinder;
296     @javax.annotation.Resource(name = "com.liferay.portlet.blogs.service.BlogsStatsUserLocalService.impl")
297     protected BlogsStatsUserLocalService blogsStatsUserLocalService;
298     @javax.annotation.Resource(name = "com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence.impl")
299     protected BlogsStatsUserPersistence blogsStatsUserPersistence;
300     @javax.annotation.Resource(name = "com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder.impl")
301     protected BlogsStatsUserFinder blogsStatsUserFinder;
302 }