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