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