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