1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.blogs.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.GroupLocalService;
33  import com.liferay.portal.service.GroupService;
34  import com.liferay.portal.service.ResourceLocalService;
35  import com.liferay.portal.service.ResourceService;
36  import com.liferay.portal.service.UserLocalService;
37  import com.liferay.portal.service.UserService;
38  import com.liferay.portal.service.persistence.GroupFinder;
39  import com.liferay.portal.service.persistence.GroupPersistence;
40  import com.liferay.portal.service.persistence.ResourceFinder;
41  import com.liferay.portal.service.persistence.ResourcePersistence;
42  import com.liferay.portal.service.persistence.UserFinder;
43  import com.liferay.portal.service.persistence.UserPersistence;
44  import com.liferay.portal.util.PortalUtil;
45  
46  import com.liferay.portlet.blogs.model.BlogsStatsUser;
47  import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
48  import com.liferay.portlet.blogs.service.BlogsEntryService;
49  import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
50  import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
51  import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
52  import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
53  import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
54  
55  import java.util.List;
56  
57  /**
58   * <a href="BlogsStatsUserLocalServiceBaseImpl.java.html"><b><i>View Source</i>
59   * </b></a>
60   *
61   * @author Brian Wing Shun Chan
62   */
63  public abstract class BlogsStatsUserLocalServiceBaseImpl
64      implements BlogsStatsUserLocalService {
65      public BlogsStatsUser addBlogsStatsUser(BlogsStatsUser blogsStatsUser)
66          throws SystemException {
67          blogsStatsUser.setNew(true);
68  
69          return blogsStatsUserPersistence.update(blogsStatsUser, false);
70      }
71  
72      public BlogsStatsUser createBlogsStatsUser(long statsUserId) {
73          return blogsStatsUserPersistence.create(statsUserId);
74      }
75  
76      public void deleteBlogsStatsUser(long statsUserId)
77          throws PortalException, SystemException {
78          blogsStatsUserPersistence.remove(statsUserId);
79      }
80  
81      public void deleteBlogsStatsUser(BlogsStatsUser blogsStatsUser)
82          throws SystemException {
83          blogsStatsUserPersistence.remove(blogsStatsUser);
84      }
85  
86      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
87          throws SystemException {
88          return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery);
89      }
90  
91      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
92          int end) throws SystemException {
93          return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery,
94              start, end);
95      }
96  
97      public BlogsStatsUser getBlogsStatsUser(long statsUserId)
98          throws PortalException, SystemException {
99          return blogsStatsUserPersistence.findByPrimaryKey(statsUserId);
100     }
101 
102     public List<BlogsStatsUser> getBlogsStatsUsers(int start, int end)
103         throws SystemException {
104         return blogsStatsUserPersistence.findAll(start, end);
105     }
106 
107     public int getBlogsStatsUsersCount() throws SystemException {
108         return blogsStatsUserPersistence.countAll();
109     }
110 
111     public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser)
112         throws SystemException {
113         blogsStatsUser.setNew(false);
114 
115         return blogsStatsUserPersistence.update(blogsStatsUser, true);
116     }
117 
118     public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser,
119         boolean merge) throws SystemException {
120         blogsStatsUser.setNew(false);
121 
122         return blogsStatsUserPersistence.update(blogsStatsUser, merge);
123     }
124 
125     public BlogsEntryLocalService getBlogsEntryLocalService() {
126         return blogsEntryLocalService;
127     }
128 
129     public void setBlogsEntryLocalService(
130         BlogsEntryLocalService blogsEntryLocalService) {
131         this.blogsEntryLocalService = blogsEntryLocalService;
132     }
133 
134     public BlogsEntryService getBlogsEntryService() {
135         return blogsEntryService;
136     }
137 
138     public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
139         this.blogsEntryService = blogsEntryService;
140     }
141 
142     public BlogsEntryPersistence getBlogsEntryPersistence() {
143         return blogsEntryPersistence;
144     }
145 
146     public void setBlogsEntryPersistence(
147         BlogsEntryPersistence blogsEntryPersistence) {
148         this.blogsEntryPersistence = blogsEntryPersistence;
149     }
150 
151     public BlogsEntryFinder getBlogsEntryFinder() {
152         return blogsEntryFinder;
153     }
154 
155     public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
156         this.blogsEntryFinder = blogsEntryFinder;
157     }
158 
159     public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
160         return blogsStatsUserLocalService;
161     }
162 
163     public void setBlogsStatsUserLocalService(
164         BlogsStatsUserLocalService blogsStatsUserLocalService) {
165         this.blogsStatsUserLocalService = blogsStatsUserLocalService;
166     }
167 
168     public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
169         return blogsStatsUserPersistence;
170     }
171 
172     public void setBlogsStatsUserPersistence(
173         BlogsStatsUserPersistence blogsStatsUserPersistence) {
174         this.blogsStatsUserPersistence = blogsStatsUserPersistence;
175     }
176 
177     public BlogsStatsUserFinder getBlogsStatsUserFinder() {
178         return blogsStatsUserFinder;
179     }
180 
181     public void setBlogsStatsUserFinder(
182         BlogsStatsUserFinder blogsStatsUserFinder) {
183         this.blogsStatsUserFinder = blogsStatsUserFinder;
184     }
185 
186     public CounterLocalService getCounterLocalService() {
187         return counterLocalService;
188     }
189 
190     public void setCounterLocalService(CounterLocalService counterLocalService) {
191         this.counterLocalService = counterLocalService;
192     }
193 
194     public CounterService getCounterService() {
195         return counterService;
196     }
197 
198     public void setCounterService(CounterService counterService) {
199         this.counterService = counterService;
200     }
201 
202     public GroupLocalService getGroupLocalService() {
203         return groupLocalService;
204     }
205 
206     public void setGroupLocalService(GroupLocalService groupLocalService) {
207         this.groupLocalService = groupLocalService;
208     }
209 
210     public GroupService getGroupService() {
211         return groupService;
212     }
213 
214     public void setGroupService(GroupService groupService) {
215         this.groupService = groupService;
216     }
217 
218     public GroupPersistence getGroupPersistence() {
219         return groupPersistence;
220     }
221 
222     public void setGroupPersistence(GroupPersistence groupPersistence) {
223         this.groupPersistence = groupPersistence;
224     }
225 
226     public GroupFinder getGroupFinder() {
227         return groupFinder;
228     }
229 
230     public void setGroupFinder(GroupFinder groupFinder) {
231         this.groupFinder = groupFinder;
232     }
233 
234     public ResourceLocalService getResourceLocalService() {
235         return resourceLocalService;
236     }
237 
238     public void setResourceLocalService(
239         ResourceLocalService resourceLocalService) {
240         this.resourceLocalService = resourceLocalService;
241     }
242 
243     public ResourceService getResourceService() {
244         return resourceService;
245     }
246 
247     public void setResourceService(ResourceService resourceService) {
248         this.resourceService = resourceService;
249     }
250 
251     public ResourcePersistence getResourcePersistence() {
252         return resourcePersistence;
253     }
254 
255     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
256         this.resourcePersistence = resourcePersistence;
257     }
258 
259     public ResourceFinder getResourceFinder() {
260         return resourceFinder;
261     }
262 
263     public void setResourceFinder(ResourceFinder resourceFinder) {
264         this.resourceFinder = resourceFinder;
265     }
266 
267     public UserLocalService getUserLocalService() {
268         return userLocalService;
269     }
270 
271     public void setUserLocalService(UserLocalService userLocalService) {
272         this.userLocalService = userLocalService;
273     }
274 
275     public UserService getUserService() {
276         return userService;
277     }
278 
279     public void setUserService(UserService userService) {
280         this.userService = userService;
281     }
282 
283     public UserPersistence getUserPersistence() {
284         return userPersistence;
285     }
286 
287     public void setUserPersistence(UserPersistence userPersistence) {
288         this.userPersistence = userPersistence;
289     }
290 
291     public UserFinder getUserFinder() {
292         return userFinder;
293     }
294 
295     public void setUserFinder(UserFinder userFinder) {
296         this.userFinder = userFinder;
297     }
298 
299     protected void runSQL(String sql) throws SystemException {
300         try {
301             PortalUtil.runSQL(sql);
302         }
303         catch (Exception e) {
304             throw new SystemException(e);
305         }
306     }
307 
308     @BeanReference(name = "com.liferay.portlet.blogs.service.BlogsEntryLocalService.impl")
309     protected BlogsEntryLocalService blogsEntryLocalService;
310     @BeanReference(name = "com.liferay.portlet.blogs.service.BlogsEntryService.impl")
311     protected BlogsEntryService blogsEntryService;
312     @BeanReference(name = "com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence.impl")
313     protected BlogsEntryPersistence blogsEntryPersistence;
314     @BeanReference(name = "com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder.impl")
315     protected BlogsEntryFinder blogsEntryFinder;
316     @BeanReference(name = "com.liferay.portlet.blogs.service.BlogsStatsUserLocalService.impl")
317     protected BlogsStatsUserLocalService blogsStatsUserLocalService;
318     @BeanReference(name = "com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence.impl")
319     protected BlogsStatsUserPersistence blogsStatsUserPersistence;
320     @BeanReference(name = "com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder.impl")
321     protected BlogsStatsUserFinder blogsStatsUserFinder;
322     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
323     protected CounterLocalService counterLocalService;
324     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
325     protected CounterService counterService;
326     @BeanReference(name = "com.liferay.portal.service.GroupLocalService.impl")
327     protected GroupLocalService groupLocalService;
328     @BeanReference(name = "com.liferay.portal.service.GroupService.impl")
329     protected GroupService groupService;
330     @BeanReference(name = "com.liferay.portal.service.persistence.GroupPersistence.impl")
331     protected GroupPersistence groupPersistence;
332     @BeanReference(name = "com.liferay.portal.service.persistence.GroupFinder.impl")
333     protected GroupFinder groupFinder;
334     @BeanReference(name = "com.liferay.portal.service.ResourceLocalService.impl")
335     protected ResourceLocalService resourceLocalService;
336     @BeanReference(name = "com.liferay.portal.service.ResourceService.impl")
337     protected ResourceService resourceService;
338     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
339     protected ResourcePersistence resourcePersistence;
340     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceFinder.impl")
341     protected ResourceFinder resourceFinder;
342     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
343     protected UserLocalService userLocalService;
344     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
345     protected UserService userService;
346     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
347     protected UserPersistence userPersistence;
348     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
349     protected UserFinder userFinder;
350 }