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.journal.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.expando.service.ExpandoValueLocalService;
43  import com.liferay.portlet.expando.service.ExpandoValueService;
44  import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
45  import com.liferay.portlet.journal.model.JournalFeed;
46  import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
47  import com.liferay.portlet.journal.service.JournalArticleLocalService;
48  import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
49  import com.liferay.portlet.journal.service.JournalArticleService;
50  import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
51  import com.liferay.portlet.journal.service.JournalFeedLocalService;
52  import com.liferay.portlet.journal.service.JournalFeedService;
53  import com.liferay.portlet.journal.service.JournalStructureLocalService;
54  import com.liferay.portlet.journal.service.JournalStructureService;
55  import com.liferay.portlet.journal.service.JournalTemplateLocalService;
56  import com.liferay.portlet.journal.service.JournalTemplateService;
57  import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
58  import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
59  import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
60  import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
61  import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
62  import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
63  import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
64  import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
65  import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
66  import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
67  import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
68  
69  import java.util.List;
70  
71  /**
72   * <a href="JournalFeedLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
73   *
74   * @author Brian Wing Shun Chan
75   *
76   */
77  public abstract class JournalFeedLocalServiceBaseImpl
78      implements JournalFeedLocalService {
79      public JournalFeed addJournalFeed(JournalFeed journalFeed)
80          throws SystemException {
81          journalFeed.setNew(true);
82  
83          return journalFeedPersistence.update(journalFeed, false);
84      }
85  
86      public JournalFeed createJournalFeed(long id) {
87          return journalFeedPersistence.create(id);
88      }
89  
90      public void deleteJournalFeed(long id)
91          throws PortalException, SystemException {
92          journalFeedPersistence.remove(id);
93      }
94  
95      public void deleteJournalFeed(JournalFeed journalFeed)
96          throws SystemException {
97          journalFeedPersistence.remove(journalFeed);
98      }
99  
100     public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
101         throws SystemException {
102         return journalFeedPersistence.findWithDynamicQuery(dynamicQuery);
103     }
104 
105     public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
106         int end) throws SystemException {
107         return journalFeedPersistence.findWithDynamicQuery(dynamicQuery, start,
108             end);
109     }
110 
111     public JournalFeed getJournalFeed(long id)
112         throws PortalException, SystemException {
113         return journalFeedPersistence.findByPrimaryKey(id);
114     }
115 
116     public List<JournalFeed> getJournalFeeds(int start, int end)
117         throws SystemException {
118         return journalFeedPersistence.findAll(start, end);
119     }
120 
121     public int getJournalFeedsCount() throws SystemException {
122         return journalFeedPersistence.countAll();
123     }
124 
125     public JournalFeed updateJournalFeed(JournalFeed journalFeed)
126         throws SystemException {
127         journalFeed.setNew(false);
128 
129         return journalFeedPersistence.update(journalFeed, true);
130     }
131 
132     public JournalFeed updateJournalFeed(JournalFeed journalFeed, boolean merge)
133         throws SystemException {
134         journalFeed.setNew(false);
135 
136         return journalFeedPersistence.update(journalFeed, merge);
137     }
138 
139     public JournalArticleLocalService getJournalArticleLocalService() {
140         return journalArticleLocalService;
141     }
142 
143     public void setJournalArticleLocalService(
144         JournalArticleLocalService journalArticleLocalService) {
145         this.journalArticleLocalService = journalArticleLocalService;
146     }
147 
148     public JournalArticleService getJournalArticleService() {
149         return journalArticleService;
150     }
151 
152     public void setJournalArticleService(
153         JournalArticleService journalArticleService) {
154         this.journalArticleService = journalArticleService;
155     }
156 
157     public JournalArticlePersistence getJournalArticlePersistence() {
158         return journalArticlePersistence;
159     }
160 
161     public void setJournalArticlePersistence(
162         JournalArticlePersistence journalArticlePersistence) {
163         this.journalArticlePersistence = journalArticlePersistence;
164     }
165 
166     public JournalArticleFinder getJournalArticleFinder() {
167         return journalArticleFinder;
168     }
169 
170     public void setJournalArticleFinder(
171         JournalArticleFinder journalArticleFinder) {
172         this.journalArticleFinder = journalArticleFinder;
173     }
174 
175     public JournalArticleImageLocalService getJournalArticleImageLocalService() {
176         return journalArticleImageLocalService;
177     }
178 
179     public void setJournalArticleImageLocalService(
180         JournalArticleImageLocalService journalArticleImageLocalService) {
181         this.journalArticleImageLocalService = journalArticleImageLocalService;
182     }
183 
184     public JournalArticleImagePersistence getJournalArticleImagePersistence() {
185         return journalArticleImagePersistence;
186     }
187 
188     public void setJournalArticleImagePersistence(
189         JournalArticleImagePersistence journalArticleImagePersistence) {
190         this.journalArticleImagePersistence = journalArticleImagePersistence;
191     }
192 
193     public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
194         return journalArticleResourceLocalService;
195     }
196 
197     public void setJournalArticleResourceLocalService(
198         JournalArticleResourceLocalService journalArticleResourceLocalService) {
199         this.journalArticleResourceLocalService = journalArticleResourceLocalService;
200     }
201 
202     public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
203         return journalArticleResourcePersistence;
204     }
205 
206     public void setJournalArticleResourcePersistence(
207         JournalArticleResourcePersistence journalArticleResourcePersistence) {
208         this.journalArticleResourcePersistence = journalArticleResourcePersistence;
209     }
210 
211     public JournalContentSearchLocalService getJournalContentSearchLocalService() {
212         return journalContentSearchLocalService;
213     }
214 
215     public void setJournalContentSearchLocalService(
216         JournalContentSearchLocalService journalContentSearchLocalService) {
217         this.journalContentSearchLocalService = journalContentSearchLocalService;
218     }
219 
220     public JournalContentSearchPersistence getJournalContentSearchPersistence() {
221         return journalContentSearchPersistence;
222     }
223 
224     public void setJournalContentSearchPersistence(
225         JournalContentSearchPersistence journalContentSearchPersistence) {
226         this.journalContentSearchPersistence = journalContentSearchPersistence;
227     }
228 
229     public JournalFeedLocalService getJournalFeedLocalService() {
230         return journalFeedLocalService;
231     }
232 
233     public void setJournalFeedLocalService(
234         JournalFeedLocalService journalFeedLocalService) {
235         this.journalFeedLocalService = journalFeedLocalService;
236     }
237 
238     public JournalFeedService getJournalFeedService() {
239         return journalFeedService;
240     }
241 
242     public void setJournalFeedService(JournalFeedService journalFeedService) {
243         this.journalFeedService = journalFeedService;
244     }
245 
246     public JournalFeedPersistence getJournalFeedPersistence() {
247         return journalFeedPersistence;
248     }
249 
250     public void setJournalFeedPersistence(
251         JournalFeedPersistence journalFeedPersistence) {
252         this.journalFeedPersistence = journalFeedPersistence;
253     }
254 
255     public JournalFeedFinder getJournalFeedFinder() {
256         return journalFeedFinder;
257     }
258 
259     public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
260         this.journalFeedFinder = journalFeedFinder;
261     }
262 
263     public JournalStructureLocalService getJournalStructureLocalService() {
264         return journalStructureLocalService;
265     }
266 
267     public void setJournalStructureLocalService(
268         JournalStructureLocalService journalStructureLocalService) {
269         this.journalStructureLocalService = journalStructureLocalService;
270     }
271 
272     public JournalStructureService getJournalStructureService() {
273         return journalStructureService;
274     }
275 
276     public void setJournalStructureService(
277         JournalStructureService journalStructureService) {
278         this.journalStructureService = journalStructureService;
279     }
280 
281     public JournalStructurePersistence getJournalStructurePersistence() {
282         return journalStructurePersistence;
283     }
284 
285     public void setJournalStructurePersistence(
286         JournalStructurePersistence journalStructurePersistence) {
287         this.journalStructurePersistence = journalStructurePersistence;
288     }
289 
290     public JournalStructureFinder getJournalStructureFinder() {
291         return journalStructureFinder;
292     }
293 
294     public void setJournalStructureFinder(
295         JournalStructureFinder journalStructureFinder) {
296         this.journalStructureFinder = journalStructureFinder;
297     }
298 
299     public JournalTemplateLocalService getJournalTemplateLocalService() {
300         return journalTemplateLocalService;
301     }
302 
303     public void setJournalTemplateLocalService(
304         JournalTemplateLocalService journalTemplateLocalService) {
305         this.journalTemplateLocalService = journalTemplateLocalService;
306     }
307 
308     public JournalTemplateService getJournalTemplateService() {
309         return journalTemplateService;
310     }
311 
312     public void setJournalTemplateService(
313         JournalTemplateService journalTemplateService) {
314         this.journalTemplateService = journalTemplateService;
315     }
316 
317     public JournalTemplatePersistence getJournalTemplatePersistence() {
318         return journalTemplatePersistence;
319     }
320 
321     public void setJournalTemplatePersistence(
322         JournalTemplatePersistence journalTemplatePersistence) {
323         this.journalTemplatePersistence = journalTemplatePersistence;
324     }
325 
326     public JournalTemplateFinder getJournalTemplateFinder() {
327         return journalTemplateFinder;
328     }
329 
330     public void setJournalTemplateFinder(
331         JournalTemplateFinder journalTemplateFinder) {
332         this.journalTemplateFinder = journalTemplateFinder;
333     }
334 
335     public CounterLocalService getCounterLocalService() {
336         return counterLocalService;
337     }
338 
339     public void setCounterLocalService(CounterLocalService counterLocalService) {
340         this.counterLocalService = counterLocalService;
341     }
342 
343     public CounterService getCounterService() {
344         return counterService;
345     }
346 
347     public void setCounterService(CounterService counterService) {
348         this.counterService = counterService;
349     }
350 
351     public ResourceLocalService getResourceLocalService() {
352         return resourceLocalService;
353     }
354 
355     public void setResourceLocalService(
356         ResourceLocalService resourceLocalService) {
357         this.resourceLocalService = resourceLocalService;
358     }
359 
360     public ResourceService getResourceService() {
361         return resourceService;
362     }
363 
364     public void setResourceService(ResourceService resourceService) {
365         this.resourceService = resourceService;
366     }
367 
368     public ResourcePersistence getResourcePersistence() {
369         return resourcePersistence;
370     }
371 
372     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
373         this.resourcePersistence = resourcePersistence;
374     }
375 
376     public ResourceFinder getResourceFinder() {
377         return resourceFinder;
378     }
379 
380     public void setResourceFinder(ResourceFinder resourceFinder) {
381         this.resourceFinder = resourceFinder;
382     }
383 
384     public UserLocalService getUserLocalService() {
385         return userLocalService;
386     }
387 
388     public void setUserLocalService(UserLocalService userLocalService) {
389         this.userLocalService = userLocalService;
390     }
391 
392     public UserService getUserService() {
393         return userService;
394     }
395 
396     public void setUserService(UserService userService) {
397         this.userService = userService;
398     }
399 
400     public UserPersistence getUserPersistence() {
401         return userPersistence;
402     }
403 
404     public void setUserPersistence(UserPersistence userPersistence) {
405         this.userPersistence = userPersistence;
406     }
407 
408     public UserFinder getUserFinder() {
409         return userFinder;
410     }
411 
412     public void setUserFinder(UserFinder userFinder) {
413         this.userFinder = userFinder;
414     }
415 
416     public ExpandoValueLocalService getExpandoValueLocalService() {
417         return expandoValueLocalService;
418     }
419 
420     public void setExpandoValueLocalService(
421         ExpandoValueLocalService expandoValueLocalService) {
422         this.expandoValueLocalService = expandoValueLocalService;
423     }
424 
425     public ExpandoValueService getExpandoValueService() {
426         return expandoValueService;
427     }
428 
429     public void setExpandoValueService(ExpandoValueService expandoValueService) {
430         this.expandoValueService = expandoValueService;
431     }
432 
433     public ExpandoValuePersistence getExpandoValuePersistence() {
434         return expandoValuePersistence;
435     }
436 
437     public void setExpandoValuePersistence(
438         ExpandoValuePersistence expandoValuePersistence) {
439         this.expandoValuePersistence = expandoValuePersistence;
440     }
441 
442     protected void runSQL(String sql) throws SystemException {
443         try {
444             PortalUtil.runSQL(sql);
445         }
446         catch (Exception e) {
447             throw new SystemException(e);
448         }
449     }
450 
451     @BeanReference(name = "com.liferay.portlet.journal.service.JournalArticleLocalService.impl")
452     protected JournalArticleLocalService journalArticleLocalService;
453     @BeanReference(name = "com.liferay.portlet.journal.service.JournalArticleService.impl")
454     protected JournalArticleService journalArticleService;
455     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalArticlePersistence.impl")
456     protected JournalArticlePersistence journalArticlePersistence;
457     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalArticleFinder.impl")
458     protected JournalArticleFinder journalArticleFinder;
459     @BeanReference(name = "com.liferay.portlet.journal.service.JournalArticleImageLocalService.impl")
460     protected JournalArticleImageLocalService journalArticleImageLocalService;
461     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence.impl")
462     protected JournalArticleImagePersistence journalArticleImagePersistence;
463     @BeanReference(name = "com.liferay.portlet.journal.service.JournalArticleResourceLocalService.impl")
464     protected JournalArticleResourceLocalService journalArticleResourceLocalService;
465     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence.impl")
466     protected JournalArticleResourcePersistence journalArticleResourcePersistence;
467     @BeanReference(name = "com.liferay.portlet.journal.service.JournalContentSearchLocalService.impl")
468     protected JournalContentSearchLocalService journalContentSearchLocalService;
469     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence.impl")
470     protected JournalContentSearchPersistence journalContentSearchPersistence;
471     @BeanReference(name = "com.liferay.portlet.journal.service.JournalFeedLocalService.impl")
472     protected JournalFeedLocalService journalFeedLocalService;
473     @BeanReference(name = "com.liferay.portlet.journal.service.JournalFeedService.impl")
474     protected JournalFeedService journalFeedService;
475     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalFeedPersistence.impl")
476     protected JournalFeedPersistence journalFeedPersistence;
477     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalFeedFinder.impl")
478     protected JournalFeedFinder journalFeedFinder;
479     @BeanReference(name = "com.liferay.portlet.journal.service.JournalStructureLocalService.impl")
480     protected JournalStructureLocalService journalStructureLocalService;
481     @BeanReference(name = "com.liferay.portlet.journal.service.JournalStructureService.impl")
482     protected JournalStructureService journalStructureService;
483     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalStructurePersistence.impl")
484     protected JournalStructurePersistence journalStructurePersistence;
485     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalStructureFinder.impl")
486     protected JournalStructureFinder journalStructureFinder;
487     @BeanReference(name = "com.liferay.portlet.journal.service.JournalTemplateLocalService.impl")
488     protected JournalTemplateLocalService journalTemplateLocalService;
489     @BeanReference(name = "com.liferay.portlet.journal.service.JournalTemplateService.impl")
490     protected JournalTemplateService journalTemplateService;
491     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence.impl")
492     protected JournalTemplatePersistence journalTemplatePersistence;
493     @BeanReference(name = "com.liferay.portlet.journal.service.persistence.JournalTemplateFinder.impl")
494     protected JournalTemplateFinder journalTemplateFinder;
495     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
496     protected CounterLocalService counterLocalService;
497     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
498     protected CounterService counterService;
499     @BeanReference(name = "com.liferay.portal.service.ResourceLocalService.impl")
500     protected ResourceLocalService resourceLocalService;
501     @BeanReference(name = "com.liferay.portal.service.ResourceService.impl")
502     protected ResourceService resourceService;
503     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
504     protected ResourcePersistence resourcePersistence;
505     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceFinder.impl")
506     protected ResourceFinder resourceFinder;
507     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
508     protected UserLocalService userLocalService;
509     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
510     protected UserService userService;
511     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
512     protected UserPersistence userPersistence;
513     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
514     protected UserFinder userFinder;
515     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoValueLocalService.impl")
516     protected ExpandoValueLocalService expandoValueLocalService;
517     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoValueService.impl")
518     protected ExpandoValueService expandoValueService;
519     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence.impl")
520     protected ExpandoValuePersistence expandoValuePersistence;
521 }