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