1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.tasks.service.base;
16  
17  import com.liferay.counter.service.CounterLocalService;
18  import com.liferay.counter.service.CounterService;
19  
20  import com.liferay.portal.PortalException;
21  import com.liferay.portal.SystemException;
22  import com.liferay.portal.kernel.annotation.BeanReference;
23  import com.liferay.portal.kernel.dao.db.DB;
24  import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
25  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
26  import com.liferay.portal.kernel.util.OrderByComparator;
27  import com.liferay.portal.service.ResourceLocalService;
28  import com.liferay.portal.service.ResourceService;
29  import com.liferay.portal.service.UserLocalService;
30  import com.liferay.portal.service.UserService;
31  import com.liferay.portal.service.persistence.ResourceFinder;
32  import com.liferay.portal.service.persistence.ResourcePersistence;
33  import com.liferay.portal.service.persistence.UserFinder;
34  import com.liferay.portal.service.persistence.UserPersistence;
35  
36  import com.liferay.portlet.messageboards.service.MBMessageLocalService;
37  import com.liferay.portlet.messageboards.service.MBMessageService;
38  import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
39  import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
40  import com.liferay.portlet.social.service.SocialActivityLocalService;
41  import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
42  import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
43  import com.liferay.portlet.tasks.model.TasksProposal;
44  import com.liferay.portlet.tasks.service.TasksProposalLocalService;
45  import com.liferay.portlet.tasks.service.TasksProposalService;
46  import com.liferay.portlet.tasks.service.TasksReviewLocalService;
47  import com.liferay.portlet.tasks.service.TasksReviewService;
48  import com.liferay.portlet.tasks.service.persistence.TasksProposalFinder;
49  import com.liferay.portlet.tasks.service.persistence.TasksProposalPersistence;
50  import com.liferay.portlet.tasks.service.persistence.TasksReviewPersistence;
51  
52  import java.util.List;
53  
54  /**
55   * <a href="TasksProposalLocalServiceBaseImpl.java.html"><b><i>View Source</i>
56   * </b></a>
57   *
58   * @author Brian Wing Shun Chan
59   */
60  public abstract class TasksProposalLocalServiceBaseImpl
61      implements TasksProposalLocalService {
62      public TasksProposal addTasksProposal(TasksProposal tasksProposal)
63          throws SystemException {
64          tasksProposal.setNew(true);
65  
66          return tasksProposalPersistence.update(tasksProposal, false);
67      }
68  
69      public TasksProposal createTasksProposal(long proposalId) {
70          return tasksProposalPersistence.create(proposalId);
71      }
72  
73      public void deleteTasksProposal(long proposalId)
74          throws PortalException, SystemException {
75          tasksProposalPersistence.remove(proposalId);
76      }
77  
78      public void deleteTasksProposal(TasksProposal tasksProposal)
79          throws SystemException {
80          tasksProposalPersistence.remove(tasksProposal);
81      }
82  
83      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
84          throws SystemException {
85          return tasksProposalPersistence.findWithDynamicQuery(dynamicQuery);
86      }
87  
88      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
89          int end) throws SystemException {
90          return tasksProposalPersistence.findWithDynamicQuery(dynamicQuery,
91              start, end);
92      }
93  
94      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
95          int end, OrderByComparator orderByComparator) throws SystemException {
96          return tasksProposalPersistence.findWithDynamicQuery(dynamicQuery,
97              start, end, orderByComparator);
98      }
99  
100     public int dynamicQueryCount(DynamicQuery dynamicQuery)
101         throws SystemException {
102         return tasksProposalPersistence.countWithDynamicQuery(dynamicQuery);
103     }
104 
105     public TasksProposal getTasksProposal(long proposalId)
106         throws PortalException, SystemException {
107         return tasksProposalPersistence.findByPrimaryKey(proposalId);
108     }
109 
110     public List<TasksProposal> getTasksProposals(int start, int end)
111         throws SystemException {
112         return tasksProposalPersistence.findAll(start, end);
113     }
114 
115     public int getTasksProposalsCount() throws SystemException {
116         return tasksProposalPersistence.countAll();
117     }
118 
119     public TasksProposal updateTasksProposal(TasksProposal tasksProposal)
120         throws SystemException {
121         tasksProposal.setNew(false);
122 
123         return tasksProposalPersistence.update(tasksProposal, true);
124     }
125 
126     public TasksProposal updateTasksProposal(TasksProposal tasksProposal,
127         boolean merge) throws SystemException {
128         tasksProposal.setNew(false);
129 
130         return tasksProposalPersistence.update(tasksProposal, merge);
131     }
132 
133     public TasksProposalLocalService getTasksProposalLocalService() {
134         return tasksProposalLocalService;
135     }
136 
137     public void setTasksProposalLocalService(
138         TasksProposalLocalService tasksProposalLocalService) {
139         this.tasksProposalLocalService = tasksProposalLocalService;
140     }
141 
142     public TasksProposalService getTasksProposalService() {
143         return tasksProposalService;
144     }
145 
146     public void setTasksProposalService(
147         TasksProposalService tasksProposalService) {
148         this.tasksProposalService = tasksProposalService;
149     }
150 
151     public TasksProposalPersistence getTasksProposalPersistence() {
152         return tasksProposalPersistence;
153     }
154 
155     public void setTasksProposalPersistence(
156         TasksProposalPersistence tasksProposalPersistence) {
157         this.tasksProposalPersistence = tasksProposalPersistence;
158     }
159 
160     public TasksProposalFinder getTasksProposalFinder() {
161         return tasksProposalFinder;
162     }
163 
164     public void setTasksProposalFinder(TasksProposalFinder tasksProposalFinder) {
165         this.tasksProposalFinder = tasksProposalFinder;
166     }
167 
168     public TasksReviewLocalService getTasksReviewLocalService() {
169         return tasksReviewLocalService;
170     }
171 
172     public void setTasksReviewLocalService(
173         TasksReviewLocalService tasksReviewLocalService) {
174         this.tasksReviewLocalService = tasksReviewLocalService;
175     }
176 
177     public TasksReviewService getTasksReviewService() {
178         return tasksReviewService;
179     }
180 
181     public void setTasksReviewService(TasksReviewService tasksReviewService) {
182         this.tasksReviewService = tasksReviewService;
183     }
184 
185     public TasksReviewPersistence getTasksReviewPersistence() {
186         return tasksReviewPersistence;
187     }
188 
189     public void setTasksReviewPersistence(
190         TasksReviewPersistence tasksReviewPersistence) {
191         this.tasksReviewPersistence = tasksReviewPersistence;
192     }
193 
194     public CounterLocalService getCounterLocalService() {
195         return counterLocalService;
196     }
197 
198     public void setCounterLocalService(CounterLocalService counterLocalService) {
199         this.counterLocalService = counterLocalService;
200     }
201 
202     public CounterService getCounterService() {
203         return counterService;
204     }
205 
206     public void setCounterService(CounterService counterService) {
207         this.counterService = counterService;
208     }
209 
210     public ResourceLocalService getResourceLocalService() {
211         return resourceLocalService;
212     }
213 
214     public void setResourceLocalService(
215         ResourceLocalService resourceLocalService) {
216         this.resourceLocalService = resourceLocalService;
217     }
218 
219     public ResourceService getResourceService() {
220         return resourceService;
221     }
222 
223     public void setResourceService(ResourceService resourceService) {
224         this.resourceService = resourceService;
225     }
226 
227     public ResourcePersistence getResourcePersistence() {
228         return resourcePersistence;
229     }
230 
231     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
232         this.resourcePersistence = resourcePersistence;
233     }
234 
235     public ResourceFinder getResourceFinder() {
236         return resourceFinder;
237     }
238 
239     public void setResourceFinder(ResourceFinder resourceFinder) {
240         this.resourceFinder = resourceFinder;
241     }
242 
243     public UserLocalService getUserLocalService() {
244         return userLocalService;
245     }
246 
247     public void setUserLocalService(UserLocalService userLocalService) {
248         this.userLocalService = userLocalService;
249     }
250 
251     public UserService getUserService() {
252         return userService;
253     }
254 
255     public void setUserService(UserService userService) {
256         this.userService = userService;
257     }
258 
259     public UserPersistence getUserPersistence() {
260         return userPersistence;
261     }
262 
263     public void setUserPersistence(UserPersistence userPersistence) {
264         this.userPersistence = userPersistence;
265     }
266 
267     public UserFinder getUserFinder() {
268         return userFinder;
269     }
270 
271     public void setUserFinder(UserFinder userFinder) {
272         this.userFinder = userFinder;
273     }
274 
275     public MBMessageLocalService getMBMessageLocalService() {
276         return mbMessageLocalService;
277     }
278 
279     public void setMBMessageLocalService(
280         MBMessageLocalService mbMessageLocalService) {
281         this.mbMessageLocalService = mbMessageLocalService;
282     }
283 
284     public MBMessageService getMBMessageService() {
285         return mbMessageService;
286     }
287 
288     public void setMBMessageService(MBMessageService mbMessageService) {
289         this.mbMessageService = mbMessageService;
290     }
291 
292     public MBMessagePersistence getMBMessagePersistence() {
293         return mbMessagePersistence;
294     }
295 
296     public void setMBMessagePersistence(
297         MBMessagePersistence mbMessagePersistence) {
298         this.mbMessagePersistence = mbMessagePersistence;
299     }
300 
301     public MBMessageFinder getMBMessageFinder() {
302         return mbMessageFinder;
303     }
304 
305     public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
306         this.mbMessageFinder = mbMessageFinder;
307     }
308 
309     public SocialActivityLocalService getSocialActivityLocalService() {
310         return socialActivityLocalService;
311     }
312 
313     public void setSocialActivityLocalService(
314         SocialActivityLocalService socialActivityLocalService) {
315         this.socialActivityLocalService = socialActivityLocalService;
316     }
317 
318     public SocialActivityPersistence getSocialActivityPersistence() {
319         return socialActivityPersistence;
320     }
321 
322     public void setSocialActivityPersistence(
323         SocialActivityPersistence socialActivityPersistence) {
324         this.socialActivityPersistence = socialActivityPersistence;
325     }
326 
327     public SocialActivityFinder getSocialActivityFinder() {
328         return socialActivityFinder;
329     }
330 
331     public void setSocialActivityFinder(
332         SocialActivityFinder socialActivityFinder) {
333         this.socialActivityFinder = socialActivityFinder;
334     }
335 
336     protected void runSQL(String sql) throws SystemException {
337         try {
338             DB db = DBFactoryUtil.getDB();
339 
340             db.runSQL(sql);
341         }
342         catch (Exception e) {
343             throw new SystemException(e);
344         }
345     }
346 
347     @BeanReference(type = TasksProposalLocalService.class)
348     protected TasksProposalLocalService tasksProposalLocalService;
349     @BeanReference(type = TasksProposalService.class)
350     protected TasksProposalService tasksProposalService;
351     @BeanReference(type = TasksProposalPersistence.class)
352     protected TasksProposalPersistence tasksProposalPersistence;
353     @BeanReference(type = TasksProposalFinder.class)
354     protected TasksProposalFinder tasksProposalFinder;
355     @BeanReference(type = TasksReviewLocalService.class)
356     protected TasksReviewLocalService tasksReviewLocalService;
357     @BeanReference(type = TasksReviewService.class)
358     protected TasksReviewService tasksReviewService;
359     @BeanReference(type = TasksReviewPersistence.class)
360     protected TasksReviewPersistence tasksReviewPersistence;
361     @BeanReference(type = CounterLocalService.class)
362     protected CounterLocalService counterLocalService;
363     @BeanReference(type = CounterService.class)
364     protected CounterService counterService;
365     @BeanReference(type = ResourceLocalService.class)
366     protected ResourceLocalService resourceLocalService;
367     @BeanReference(type = ResourceService.class)
368     protected ResourceService resourceService;
369     @BeanReference(type = ResourcePersistence.class)
370     protected ResourcePersistence resourcePersistence;
371     @BeanReference(type = ResourceFinder.class)
372     protected ResourceFinder resourceFinder;
373     @BeanReference(type = UserLocalService.class)
374     protected UserLocalService userLocalService;
375     @BeanReference(type = UserService.class)
376     protected UserService userService;
377     @BeanReference(type = UserPersistence.class)
378     protected UserPersistence userPersistence;
379     @BeanReference(type = UserFinder.class)
380     protected UserFinder userFinder;
381     @BeanReference(type = MBMessageLocalService.class)
382     protected MBMessageLocalService mbMessageLocalService;
383     @BeanReference(type = MBMessageService.class)
384     protected MBMessageService mbMessageService;
385     @BeanReference(type = MBMessagePersistence.class)
386     protected MBMessagePersistence mbMessagePersistence;
387     @BeanReference(type = MBMessageFinder.class)
388     protected MBMessageFinder mbMessageFinder;
389     @BeanReference(type = SocialActivityLocalService.class)
390     protected SocialActivityLocalService socialActivityLocalService;
391     @BeanReference(type = SocialActivityPersistence.class)
392     protected SocialActivityPersistence socialActivityPersistence;
393     @BeanReference(type = SocialActivityFinder.class)
394     protected SocialActivityFinder socialActivityFinder;
395 }