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