001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.journal.service.base;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025    import com.liferay.portal.kernel.exception.PortalException;
026    import com.liferay.portal.kernel.exception.SystemException;
027    import com.liferay.portal.kernel.search.Indexable;
028    import com.liferay.portal.kernel.search.IndexableType;
029    import com.liferay.portal.kernel.util.OrderByComparator;
030    import com.liferay.portal.model.PersistedModel;
031    import com.liferay.portal.service.BaseLocalServiceImpl;
032    import com.liferay.portal.service.GroupLocalService;
033    import com.liferay.portal.service.GroupService;
034    import com.liferay.portal.service.ImageLocalService;
035    import com.liferay.portal.service.ImageService;
036    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
037    import com.liferay.portal.service.ResourceLocalService;
038    import com.liferay.portal.service.ResourceService;
039    import com.liferay.portal.service.UserLocalService;
040    import com.liferay.portal.service.UserService;
041    import com.liferay.portal.service.WebDAVPropsLocalService;
042    import com.liferay.portal.service.persistence.GroupFinder;
043    import com.liferay.portal.service.persistence.GroupPersistence;
044    import com.liferay.portal.service.persistence.ImagePersistence;
045    import com.liferay.portal.service.persistence.ResourceFinder;
046    import com.liferay.portal.service.persistence.ResourcePersistence;
047    import com.liferay.portal.service.persistence.UserFinder;
048    import com.liferay.portal.service.persistence.UserPersistence;
049    import com.liferay.portal.service.persistence.WebDAVPropsPersistence;
050    
051    import com.liferay.portlet.expando.service.ExpandoValueLocalService;
052    import com.liferay.portlet.expando.service.ExpandoValueService;
053    import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
054    import com.liferay.portlet.journal.model.JournalTemplate;
055    import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
056    import com.liferay.portlet.journal.service.JournalArticleLocalService;
057    import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
058    import com.liferay.portlet.journal.service.JournalArticleService;
059    import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
060    import com.liferay.portlet.journal.service.JournalFeedLocalService;
061    import com.liferay.portlet.journal.service.JournalFeedService;
062    import com.liferay.portlet.journal.service.JournalStructureLocalService;
063    import com.liferay.portlet.journal.service.JournalStructureService;
064    import com.liferay.portlet.journal.service.JournalTemplateLocalService;
065    import com.liferay.portlet.journal.service.JournalTemplateService;
066    import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
067    import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
068    import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
069    import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
070    import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
071    import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
072    import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
073    import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
074    import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
075    import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
076    import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
077    
078    import java.io.Serializable;
079    
080    import java.util.List;
081    
082    import javax.sql.DataSource;
083    
084    /**
085     * The base implementation of the journal template local service.
086     *
087     * <p>
088     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portlet.journal.service.impl.JournalTemplateLocalServiceImpl}.
089     * </p>
090     *
091     * @author Brian Wing Shun Chan
092     * @see com.liferay.portlet.journal.service.impl.JournalTemplateLocalServiceImpl
093     * @see com.liferay.portlet.journal.service.JournalTemplateLocalServiceUtil
094     * @generated
095     */
096    public abstract class JournalTemplateLocalServiceBaseImpl
097            extends BaseLocalServiceImpl implements JournalTemplateLocalService,
098                    IdentifiableBean {
099            /*
100             * NOTE FOR DEVELOPERS:
101             *
102             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.journal.service.JournalTemplateLocalServiceUtil} to access the journal template local service.
103             */
104    
105            /**
106             * Adds the journal template to the database. Also notifies the appropriate model listeners.
107             *
108             * @param journalTemplate the journal template
109             * @return the journal template that was added
110             * @throws SystemException if a system exception occurred
111             */
112            @Indexable(type = IndexableType.REINDEX)
113            public JournalTemplate addJournalTemplate(JournalTemplate journalTemplate)
114                    throws SystemException {
115                    journalTemplate.setNew(true);
116    
117                    return journalTemplatePersistence.update(journalTemplate, false);
118            }
119    
120            /**
121             * Creates a new journal template with the primary key. Does not add the journal template to the database.
122             *
123             * @param id the primary key for the new journal template
124             * @return the new journal template
125             */
126            public JournalTemplate createJournalTemplate(long id) {
127                    return journalTemplatePersistence.create(id);
128            }
129    
130            /**
131             * Deletes the journal template with the primary key from the database. Also notifies the appropriate model listeners.
132             *
133             * @param id the primary key of the journal template
134             * @return the journal template that was removed
135             * @throws PortalException if a journal template with the primary key could not be found
136             * @throws SystemException if a system exception occurred
137             */
138            @Indexable(type = IndexableType.DELETE)
139            public JournalTemplate deleteJournalTemplate(long id)
140                    throws PortalException, SystemException {
141                    return journalTemplatePersistence.remove(id);
142            }
143    
144            /**
145             * Deletes the journal template from the database. Also notifies the appropriate model listeners.
146             *
147             * @param journalTemplate the journal template
148             * @return the journal template that was removed
149             * @throws SystemException if a system exception occurred
150             */
151            @Indexable(type = IndexableType.DELETE)
152            public JournalTemplate deleteJournalTemplate(
153                    JournalTemplate journalTemplate) throws SystemException {
154                    return journalTemplatePersistence.remove(journalTemplate);
155            }
156    
157            public DynamicQuery dynamicQuery() {
158                    Class<?> clazz = getClass();
159    
160                    return DynamicQueryFactoryUtil.forClass(JournalTemplate.class,
161                            clazz.getClassLoader());
162            }
163    
164            /**
165             * Performs a dynamic query on the database and returns the matching rows.
166             *
167             * @param dynamicQuery the dynamic query
168             * @return the matching rows
169             * @throws SystemException if a system exception occurred
170             */
171            @SuppressWarnings("rawtypes")
172            public List dynamicQuery(DynamicQuery dynamicQuery)
173                    throws SystemException {
174                    return journalTemplatePersistence.findWithDynamicQuery(dynamicQuery);
175            }
176    
177            /**
178             * Performs a dynamic query on the database and returns a range of the matching rows.
179             *
180             * <p>
181             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
182             * </p>
183             *
184             * @param dynamicQuery the dynamic query
185             * @param start the lower bound of the range of model instances
186             * @param end the upper bound of the range of model instances (not inclusive)
187             * @return the range of matching rows
188             * @throws SystemException if a system exception occurred
189             */
190            @SuppressWarnings("rawtypes")
191            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
192                    throws SystemException {
193                    return journalTemplatePersistence.findWithDynamicQuery(dynamicQuery,
194                            start, end);
195            }
196    
197            /**
198             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
199             *
200             * <p>
201             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
202             * </p>
203             *
204             * @param dynamicQuery the dynamic query
205             * @param start the lower bound of the range of model instances
206             * @param end the upper bound of the range of model instances (not inclusive)
207             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
208             * @return the ordered range of matching rows
209             * @throws SystemException if a system exception occurred
210             */
211            @SuppressWarnings("rawtypes")
212            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
213                    OrderByComparator orderByComparator) throws SystemException {
214                    return journalTemplatePersistence.findWithDynamicQuery(dynamicQuery,
215                            start, end, orderByComparator);
216            }
217    
218            /**
219             * Returns the number of rows that match the dynamic query.
220             *
221             * @param dynamicQuery the dynamic query
222             * @return the number of rows that match the dynamic query
223             * @throws SystemException if a system exception occurred
224             */
225            public long dynamicQueryCount(DynamicQuery dynamicQuery)
226                    throws SystemException {
227                    return journalTemplatePersistence.countWithDynamicQuery(dynamicQuery);
228            }
229    
230            public JournalTemplate fetchJournalTemplate(long id)
231                    throws SystemException {
232                    return journalTemplatePersistence.fetchByPrimaryKey(id);
233            }
234    
235            /**
236             * Returns the journal template with the primary key.
237             *
238             * @param id the primary key of the journal template
239             * @return the journal template
240             * @throws PortalException if a journal template with the primary key could not be found
241             * @throws SystemException if a system exception occurred
242             */
243            public JournalTemplate getJournalTemplate(long id)
244                    throws PortalException, SystemException {
245                    return journalTemplatePersistence.findByPrimaryKey(id);
246            }
247    
248            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
249                    throws PortalException, SystemException {
250                    return journalTemplatePersistence.findByPrimaryKey(primaryKeyObj);
251            }
252    
253            /**
254             * Returns the journal template with the UUID in the group.
255             *
256             * @param uuid the UUID of journal template
257             * @param groupId the group id of the journal template
258             * @return the journal template
259             * @throws PortalException if a journal template with the UUID in the group could not be found
260             * @throws SystemException if a system exception occurred
261             */
262            public JournalTemplate getJournalTemplateByUuidAndGroupId(String uuid,
263                    long groupId) throws PortalException, SystemException {
264                    return journalTemplatePersistence.findByUUID_G(uuid, groupId);
265            }
266    
267            /**
268             * Returns a range of all the journal templates.
269             *
270             * <p>
271             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
272             * </p>
273             *
274             * @param start the lower bound of the range of journal templates
275             * @param end the upper bound of the range of journal templates (not inclusive)
276             * @return the range of journal templates
277             * @throws SystemException if a system exception occurred
278             */
279            public List<JournalTemplate> getJournalTemplates(int start, int end)
280                    throws SystemException {
281                    return journalTemplatePersistence.findAll(start, end);
282            }
283    
284            /**
285             * Returns the number of journal templates.
286             *
287             * @return the number of journal templates
288             * @throws SystemException if a system exception occurred
289             */
290            public int getJournalTemplatesCount() throws SystemException {
291                    return journalTemplatePersistence.countAll();
292            }
293    
294            /**
295             * Updates the journal template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
296             *
297             * @param journalTemplate the journal template
298             * @return the journal template that was updated
299             * @throws SystemException if a system exception occurred
300             */
301            @Indexable(type = IndexableType.REINDEX)
302            public JournalTemplate updateJournalTemplate(
303                    JournalTemplate journalTemplate) throws SystemException {
304                    return updateJournalTemplate(journalTemplate, true);
305            }
306    
307            /**
308             * Updates the journal template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
309             *
310             * @param journalTemplate the journal template
311             * @param merge whether to merge the journal template with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
312             * @return the journal template that was updated
313             * @throws SystemException if a system exception occurred
314             */
315            @Indexable(type = IndexableType.REINDEX)
316            public JournalTemplate updateJournalTemplate(
317                    JournalTemplate journalTemplate, boolean merge)
318                    throws SystemException {
319                    journalTemplate.setNew(false);
320    
321                    return journalTemplatePersistence.update(journalTemplate, merge);
322            }
323    
324            /**
325             * Returns the journal article local service.
326             *
327             * @return the journal article local service
328             */
329            public JournalArticleLocalService getJournalArticleLocalService() {
330                    return journalArticleLocalService;
331            }
332    
333            /**
334             * Sets the journal article local service.
335             *
336             * @param journalArticleLocalService the journal article local service
337             */
338            public void setJournalArticleLocalService(
339                    JournalArticleLocalService journalArticleLocalService) {
340                    this.journalArticleLocalService = journalArticleLocalService;
341            }
342    
343            /**
344             * Returns the journal article remote service.
345             *
346             * @return the journal article remote service
347             */
348            public JournalArticleService getJournalArticleService() {
349                    return journalArticleService;
350            }
351    
352            /**
353             * Sets the journal article remote service.
354             *
355             * @param journalArticleService the journal article remote service
356             */
357            public void setJournalArticleService(
358                    JournalArticleService journalArticleService) {
359                    this.journalArticleService = journalArticleService;
360            }
361    
362            /**
363             * Returns the journal article persistence.
364             *
365             * @return the journal article persistence
366             */
367            public JournalArticlePersistence getJournalArticlePersistence() {
368                    return journalArticlePersistence;
369            }
370    
371            /**
372             * Sets the journal article persistence.
373             *
374             * @param journalArticlePersistence the journal article persistence
375             */
376            public void setJournalArticlePersistence(
377                    JournalArticlePersistence journalArticlePersistence) {
378                    this.journalArticlePersistence = journalArticlePersistence;
379            }
380    
381            /**
382             * Returns the journal article finder.
383             *
384             * @return the journal article finder
385             */
386            public JournalArticleFinder getJournalArticleFinder() {
387                    return journalArticleFinder;
388            }
389    
390            /**
391             * Sets the journal article finder.
392             *
393             * @param journalArticleFinder the journal article finder
394             */
395            public void setJournalArticleFinder(
396                    JournalArticleFinder journalArticleFinder) {
397                    this.journalArticleFinder = journalArticleFinder;
398            }
399    
400            /**
401             * Returns the journal article image local service.
402             *
403             * @return the journal article image local service
404             */
405            public JournalArticleImageLocalService getJournalArticleImageLocalService() {
406                    return journalArticleImageLocalService;
407            }
408    
409            /**
410             * Sets the journal article image local service.
411             *
412             * @param journalArticleImageLocalService the journal article image local service
413             */
414            public void setJournalArticleImageLocalService(
415                    JournalArticleImageLocalService journalArticleImageLocalService) {
416                    this.journalArticleImageLocalService = journalArticleImageLocalService;
417            }
418    
419            /**
420             * Returns the journal article image persistence.
421             *
422             * @return the journal article image persistence
423             */
424            public JournalArticleImagePersistence getJournalArticleImagePersistence() {
425                    return journalArticleImagePersistence;
426            }
427    
428            /**
429             * Sets the journal article image persistence.
430             *
431             * @param journalArticleImagePersistence the journal article image persistence
432             */
433            public void setJournalArticleImagePersistence(
434                    JournalArticleImagePersistence journalArticleImagePersistence) {
435                    this.journalArticleImagePersistence = journalArticleImagePersistence;
436            }
437    
438            /**
439             * Returns the journal article resource local service.
440             *
441             * @return the journal article resource local service
442             */
443            public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
444                    return journalArticleResourceLocalService;
445            }
446    
447            /**
448             * Sets the journal article resource local service.
449             *
450             * @param journalArticleResourceLocalService the journal article resource local service
451             */
452            public void setJournalArticleResourceLocalService(
453                    JournalArticleResourceLocalService journalArticleResourceLocalService) {
454                    this.journalArticleResourceLocalService = journalArticleResourceLocalService;
455            }
456    
457            /**
458             * Returns the journal article resource persistence.
459             *
460             * @return the journal article resource persistence
461             */
462            public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
463                    return journalArticleResourcePersistence;
464            }
465    
466            /**
467             * Sets the journal article resource persistence.
468             *
469             * @param journalArticleResourcePersistence the journal article resource persistence
470             */
471            public void setJournalArticleResourcePersistence(
472                    JournalArticleResourcePersistence journalArticleResourcePersistence) {
473                    this.journalArticleResourcePersistence = journalArticleResourcePersistence;
474            }
475    
476            /**
477             * Returns the journal content search local service.
478             *
479             * @return the journal content search local service
480             */
481            public JournalContentSearchLocalService getJournalContentSearchLocalService() {
482                    return journalContentSearchLocalService;
483            }
484    
485            /**
486             * Sets the journal content search local service.
487             *
488             * @param journalContentSearchLocalService the journal content search local service
489             */
490            public void setJournalContentSearchLocalService(
491                    JournalContentSearchLocalService journalContentSearchLocalService) {
492                    this.journalContentSearchLocalService = journalContentSearchLocalService;
493            }
494    
495            /**
496             * Returns the journal content search persistence.
497             *
498             * @return the journal content search persistence
499             */
500            public JournalContentSearchPersistence getJournalContentSearchPersistence() {
501                    return journalContentSearchPersistence;
502            }
503    
504            /**
505             * Sets the journal content search persistence.
506             *
507             * @param journalContentSearchPersistence the journal content search persistence
508             */
509            public void setJournalContentSearchPersistence(
510                    JournalContentSearchPersistence journalContentSearchPersistence) {
511                    this.journalContentSearchPersistence = journalContentSearchPersistence;
512            }
513    
514            /**
515             * Returns the journal feed local service.
516             *
517             * @return the journal feed local service
518             */
519            public JournalFeedLocalService getJournalFeedLocalService() {
520                    return journalFeedLocalService;
521            }
522    
523            /**
524             * Sets the journal feed local service.
525             *
526             * @param journalFeedLocalService the journal feed local service
527             */
528            public void setJournalFeedLocalService(
529                    JournalFeedLocalService journalFeedLocalService) {
530                    this.journalFeedLocalService = journalFeedLocalService;
531            }
532    
533            /**
534             * Returns the journal feed remote service.
535             *
536             * @return the journal feed remote service
537             */
538            public JournalFeedService getJournalFeedService() {
539                    return journalFeedService;
540            }
541    
542            /**
543             * Sets the journal feed remote service.
544             *
545             * @param journalFeedService the journal feed remote service
546             */
547            public void setJournalFeedService(JournalFeedService journalFeedService) {
548                    this.journalFeedService = journalFeedService;
549            }
550    
551            /**
552             * Returns the journal feed persistence.
553             *
554             * @return the journal feed persistence
555             */
556            public JournalFeedPersistence getJournalFeedPersistence() {
557                    return journalFeedPersistence;
558            }
559    
560            /**
561             * Sets the journal feed persistence.
562             *
563             * @param journalFeedPersistence the journal feed persistence
564             */
565            public void setJournalFeedPersistence(
566                    JournalFeedPersistence journalFeedPersistence) {
567                    this.journalFeedPersistence = journalFeedPersistence;
568            }
569    
570            /**
571             * Returns the journal feed finder.
572             *
573             * @return the journal feed finder
574             */
575            public JournalFeedFinder getJournalFeedFinder() {
576                    return journalFeedFinder;
577            }
578    
579            /**
580             * Sets the journal feed finder.
581             *
582             * @param journalFeedFinder the journal feed finder
583             */
584            public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
585                    this.journalFeedFinder = journalFeedFinder;
586            }
587    
588            /**
589             * Returns the journal structure local service.
590             *
591             * @return the journal structure local service
592             */
593            public JournalStructureLocalService getJournalStructureLocalService() {
594                    return journalStructureLocalService;
595            }
596    
597            /**
598             * Sets the journal structure local service.
599             *
600             * @param journalStructureLocalService the journal structure local service
601             */
602            public void setJournalStructureLocalService(
603                    JournalStructureLocalService journalStructureLocalService) {
604                    this.journalStructureLocalService = journalStructureLocalService;
605            }
606    
607            /**
608             * Returns the journal structure remote service.
609             *
610             * @return the journal structure remote service
611             */
612            public JournalStructureService getJournalStructureService() {
613                    return journalStructureService;
614            }
615    
616            /**
617             * Sets the journal structure remote service.
618             *
619             * @param journalStructureService the journal structure remote service
620             */
621            public void setJournalStructureService(
622                    JournalStructureService journalStructureService) {
623                    this.journalStructureService = journalStructureService;
624            }
625    
626            /**
627             * Returns the journal structure persistence.
628             *
629             * @return the journal structure persistence
630             */
631            public JournalStructurePersistence getJournalStructurePersistence() {
632                    return journalStructurePersistence;
633            }
634    
635            /**
636             * Sets the journal structure persistence.
637             *
638             * @param journalStructurePersistence the journal structure persistence
639             */
640            public void setJournalStructurePersistence(
641                    JournalStructurePersistence journalStructurePersistence) {
642                    this.journalStructurePersistence = journalStructurePersistence;
643            }
644    
645            /**
646             * Returns the journal structure finder.
647             *
648             * @return the journal structure finder
649             */
650            public JournalStructureFinder getJournalStructureFinder() {
651                    return journalStructureFinder;
652            }
653    
654            /**
655             * Sets the journal structure finder.
656             *
657             * @param journalStructureFinder the journal structure finder
658             */
659            public void setJournalStructureFinder(
660                    JournalStructureFinder journalStructureFinder) {
661                    this.journalStructureFinder = journalStructureFinder;
662            }
663    
664            /**
665             * Returns the journal template local service.
666             *
667             * @return the journal template local service
668             */
669            public JournalTemplateLocalService getJournalTemplateLocalService() {
670                    return journalTemplateLocalService;
671            }
672    
673            /**
674             * Sets the journal template local service.
675             *
676             * @param journalTemplateLocalService the journal template local service
677             */
678            public void setJournalTemplateLocalService(
679                    JournalTemplateLocalService journalTemplateLocalService) {
680                    this.journalTemplateLocalService = journalTemplateLocalService;
681            }
682    
683            /**
684             * Returns the journal template remote service.
685             *
686             * @return the journal template remote service
687             */
688            public JournalTemplateService getJournalTemplateService() {
689                    return journalTemplateService;
690            }
691    
692            /**
693             * Sets the journal template remote service.
694             *
695             * @param journalTemplateService the journal template remote service
696             */
697            public void setJournalTemplateService(
698                    JournalTemplateService journalTemplateService) {
699                    this.journalTemplateService = journalTemplateService;
700            }
701    
702            /**
703             * Returns the journal template persistence.
704             *
705             * @return the journal template persistence
706             */
707            public JournalTemplatePersistence getJournalTemplatePersistence() {
708                    return journalTemplatePersistence;
709            }
710    
711            /**
712             * Sets the journal template persistence.
713             *
714             * @param journalTemplatePersistence the journal template persistence
715             */
716            public void setJournalTemplatePersistence(
717                    JournalTemplatePersistence journalTemplatePersistence) {
718                    this.journalTemplatePersistence = journalTemplatePersistence;
719            }
720    
721            /**
722             * Returns the journal template finder.
723             *
724             * @return the journal template finder
725             */
726            public JournalTemplateFinder getJournalTemplateFinder() {
727                    return journalTemplateFinder;
728            }
729    
730            /**
731             * Sets the journal template finder.
732             *
733             * @param journalTemplateFinder the journal template finder
734             */
735            public void setJournalTemplateFinder(
736                    JournalTemplateFinder journalTemplateFinder) {
737                    this.journalTemplateFinder = journalTemplateFinder;
738            }
739    
740            /**
741             * Returns the counter local service.
742             *
743             * @return the counter local service
744             */
745            public CounterLocalService getCounterLocalService() {
746                    return counterLocalService;
747            }
748    
749            /**
750             * Sets the counter local service.
751             *
752             * @param counterLocalService the counter local service
753             */
754            public void setCounterLocalService(CounterLocalService counterLocalService) {
755                    this.counterLocalService = counterLocalService;
756            }
757    
758            /**
759             * Returns the group local service.
760             *
761             * @return the group local service
762             */
763            public GroupLocalService getGroupLocalService() {
764                    return groupLocalService;
765            }
766    
767            /**
768             * Sets the group local service.
769             *
770             * @param groupLocalService the group local service
771             */
772            public void setGroupLocalService(GroupLocalService groupLocalService) {
773                    this.groupLocalService = groupLocalService;
774            }
775    
776            /**
777             * Returns the group remote service.
778             *
779             * @return the group remote service
780             */
781            public GroupService getGroupService() {
782                    return groupService;
783            }
784    
785            /**
786             * Sets the group remote service.
787             *
788             * @param groupService the group remote service
789             */
790            public void setGroupService(GroupService groupService) {
791                    this.groupService = groupService;
792            }
793    
794            /**
795             * Returns the group persistence.
796             *
797             * @return the group persistence
798             */
799            public GroupPersistence getGroupPersistence() {
800                    return groupPersistence;
801            }
802    
803            /**
804             * Sets the group persistence.
805             *
806             * @param groupPersistence the group persistence
807             */
808            public void setGroupPersistence(GroupPersistence groupPersistence) {
809                    this.groupPersistence = groupPersistence;
810            }
811    
812            /**
813             * Returns the group finder.
814             *
815             * @return the group finder
816             */
817            public GroupFinder getGroupFinder() {
818                    return groupFinder;
819            }
820    
821            /**
822             * Sets the group finder.
823             *
824             * @param groupFinder the group finder
825             */
826            public void setGroupFinder(GroupFinder groupFinder) {
827                    this.groupFinder = groupFinder;
828            }
829    
830            /**
831             * Returns the image local service.
832             *
833             * @return the image local service
834             */
835            public ImageLocalService getImageLocalService() {
836                    return imageLocalService;
837            }
838    
839            /**
840             * Sets the image local service.
841             *
842             * @param imageLocalService the image local service
843             */
844            public void setImageLocalService(ImageLocalService imageLocalService) {
845                    this.imageLocalService = imageLocalService;
846            }
847    
848            /**
849             * Returns the image remote service.
850             *
851             * @return the image remote service
852             */
853            public ImageService getImageService() {
854                    return imageService;
855            }
856    
857            /**
858             * Sets the image remote service.
859             *
860             * @param imageService the image remote service
861             */
862            public void setImageService(ImageService imageService) {
863                    this.imageService = imageService;
864            }
865    
866            /**
867             * Returns the image persistence.
868             *
869             * @return the image persistence
870             */
871            public ImagePersistence getImagePersistence() {
872                    return imagePersistence;
873            }
874    
875            /**
876             * Sets the image persistence.
877             *
878             * @param imagePersistence the image persistence
879             */
880            public void setImagePersistence(ImagePersistence imagePersistence) {
881                    this.imagePersistence = imagePersistence;
882            }
883    
884            /**
885             * Returns the resource local service.
886             *
887             * @return the resource local service
888             */
889            public ResourceLocalService getResourceLocalService() {
890                    return resourceLocalService;
891            }
892    
893            /**
894             * Sets the resource local service.
895             *
896             * @param resourceLocalService the resource local service
897             */
898            public void setResourceLocalService(
899                    ResourceLocalService resourceLocalService) {
900                    this.resourceLocalService = resourceLocalService;
901            }
902    
903            /**
904             * Returns the resource remote service.
905             *
906             * @return the resource remote service
907             */
908            public ResourceService getResourceService() {
909                    return resourceService;
910            }
911    
912            /**
913             * Sets the resource remote service.
914             *
915             * @param resourceService the resource remote service
916             */
917            public void setResourceService(ResourceService resourceService) {
918                    this.resourceService = resourceService;
919            }
920    
921            /**
922             * Returns the resource persistence.
923             *
924             * @return the resource persistence
925             */
926            public ResourcePersistence getResourcePersistence() {
927                    return resourcePersistence;
928            }
929    
930            /**
931             * Sets the resource persistence.
932             *
933             * @param resourcePersistence the resource persistence
934             */
935            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
936                    this.resourcePersistence = resourcePersistence;
937            }
938    
939            /**
940             * Returns the resource finder.
941             *
942             * @return the resource finder
943             */
944            public ResourceFinder getResourceFinder() {
945                    return resourceFinder;
946            }
947    
948            /**
949             * Sets the resource finder.
950             *
951             * @param resourceFinder the resource finder
952             */
953            public void setResourceFinder(ResourceFinder resourceFinder) {
954                    this.resourceFinder = resourceFinder;
955            }
956    
957            /**
958             * Returns the user local service.
959             *
960             * @return the user local service
961             */
962            public UserLocalService getUserLocalService() {
963                    return userLocalService;
964            }
965    
966            /**
967             * Sets the user local service.
968             *
969             * @param userLocalService the user local service
970             */
971            public void setUserLocalService(UserLocalService userLocalService) {
972                    this.userLocalService = userLocalService;
973            }
974    
975            /**
976             * Returns the user remote service.
977             *
978             * @return the user remote service
979             */
980            public UserService getUserService() {
981                    return userService;
982            }
983    
984            /**
985             * Sets the user remote service.
986             *
987             * @param userService the user remote service
988             */
989            public void setUserService(UserService userService) {
990                    this.userService = userService;
991            }
992    
993            /**
994             * Returns the user persistence.
995             *
996             * @return the user persistence
997             */
998            public UserPersistence getUserPersistence() {
999                    return userPersistence;
1000            }
1001    
1002            /**
1003             * Sets the user persistence.
1004             *
1005             * @param userPersistence the user persistence
1006             */
1007            public void setUserPersistence(UserPersistence userPersistence) {
1008                    this.userPersistence = userPersistence;
1009            }
1010    
1011            /**
1012             * Returns the user finder.
1013             *
1014             * @return the user finder
1015             */
1016            public UserFinder getUserFinder() {
1017                    return userFinder;
1018            }
1019    
1020            /**
1021             * Sets the user finder.
1022             *
1023             * @param userFinder the user finder
1024             */
1025            public void setUserFinder(UserFinder userFinder) {
1026                    this.userFinder = userFinder;
1027            }
1028    
1029            /**
1030             * Returns the web d a v props local service.
1031             *
1032             * @return the web d a v props local service
1033             */
1034            public WebDAVPropsLocalService getWebDAVPropsLocalService() {
1035                    return webDAVPropsLocalService;
1036            }
1037    
1038            /**
1039             * Sets the web d a v props local service.
1040             *
1041             * @param webDAVPropsLocalService the web d a v props local service
1042             */
1043            public void setWebDAVPropsLocalService(
1044                    WebDAVPropsLocalService webDAVPropsLocalService) {
1045                    this.webDAVPropsLocalService = webDAVPropsLocalService;
1046            }
1047    
1048            /**
1049             * Returns the web d a v props persistence.
1050             *
1051             * @return the web d a v props persistence
1052             */
1053            public WebDAVPropsPersistence getWebDAVPropsPersistence() {
1054                    return webDAVPropsPersistence;
1055            }
1056    
1057            /**
1058             * Sets the web d a v props persistence.
1059             *
1060             * @param webDAVPropsPersistence the web d a v props persistence
1061             */
1062            public void setWebDAVPropsPersistence(
1063                    WebDAVPropsPersistence webDAVPropsPersistence) {
1064                    this.webDAVPropsPersistence = webDAVPropsPersistence;
1065            }
1066    
1067            /**
1068             * Returns the expando value local service.
1069             *
1070             * @return the expando value local service
1071             */
1072            public ExpandoValueLocalService getExpandoValueLocalService() {
1073                    return expandoValueLocalService;
1074            }
1075    
1076            /**
1077             * Sets the expando value local service.
1078             *
1079             * @param expandoValueLocalService the expando value local service
1080             */
1081            public void setExpandoValueLocalService(
1082                    ExpandoValueLocalService expandoValueLocalService) {
1083                    this.expandoValueLocalService = expandoValueLocalService;
1084            }
1085    
1086            /**
1087             * Returns the expando value remote service.
1088             *
1089             * @return the expando value remote service
1090             */
1091            public ExpandoValueService getExpandoValueService() {
1092                    return expandoValueService;
1093            }
1094    
1095            /**
1096             * Sets the expando value remote service.
1097             *
1098             * @param expandoValueService the expando value remote service
1099             */
1100            public void setExpandoValueService(ExpandoValueService expandoValueService) {
1101                    this.expandoValueService = expandoValueService;
1102            }
1103    
1104            /**
1105             * Returns the expando value persistence.
1106             *
1107             * @return the expando value persistence
1108             */
1109            public ExpandoValuePersistence getExpandoValuePersistence() {
1110                    return expandoValuePersistence;
1111            }
1112    
1113            /**
1114             * Sets the expando value persistence.
1115             *
1116             * @param expandoValuePersistence the expando value persistence
1117             */
1118            public void setExpandoValuePersistence(
1119                    ExpandoValuePersistence expandoValuePersistence) {
1120                    this.expandoValuePersistence = expandoValuePersistence;
1121            }
1122    
1123            public void afterPropertiesSet() {
1124                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.journal.model.JournalTemplate",
1125                            journalTemplateLocalService);
1126            }
1127    
1128            public void destroy() {
1129                    persistedModelLocalServiceRegistry.unregister(
1130                            "com.liferay.portlet.journal.model.JournalTemplate");
1131            }
1132    
1133            /**
1134             * Returns the Spring bean ID for this bean.
1135             *
1136             * @return the Spring bean ID for this bean
1137             */
1138            public String getBeanIdentifier() {
1139                    return _beanIdentifier;
1140            }
1141    
1142            /**
1143             * Sets the Spring bean ID for this bean.
1144             *
1145             * @param beanIdentifier the Spring bean ID for this bean
1146             */
1147            public void setBeanIdentifier(String beanIdentifier) {
1148                    _beanIdentifier = beanIdentifier;
1149            }
1150    
1151            protected Class<?> getModelClass() {
1152                    return JournalTemplate.class;
1153            }
1154    
1155            protected String getModelClassName() {
1156                    return JournalTemplate.class.getName();
1157            }
1158    
1159            /**
1160             * Performs an SQL query.
1161             *
1162             * @param sql the sql query
1163             */
1164            protected void runSQL(String sql) throws SystemException {
1165                    try {
1166                            DataSource dataSource = journalTemplatePersistence.getDataSource();
1167    
1168                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1169                                            sql, new int[0]);
1170    
1171                            sqlUpdate.update();
1172                    }
1173                    catch (Exception e) {
1174                            throw new SystemException(e);
1175                    }
1176            }
1177    
1178            @BeanReference(type = JournalArticleLocalService.class)
1179            protected JournalArticleLocalService journalArticleLocalService;
1180            @BeanReference(type = JournalArticleService.class)
1181            protected JournalArticleService journalArticleService;
1182            @BeanReference(type = JournalArticlePersistence.class)
1183            protected JournalArticlePersistence journalArticlePersistence;
1184            @BeanReference(type = JournalArticleFinder.class)
1185            protected JournalArticleFinder journalArticleFinder;
1186            @BeanReference(type = JournalArticleImageLocalService.class)
1187            protected JournalArticleImageLocalService journalArticleImageLocalService;
1188            @BeanReference(type = JournalArticleImagePersistence.class)
1189            protected JournalArticleImagePersistence journalArticleImagePersistence;
1190            @BeanReference(type = JournalArticleResourceLocalService.class)
1191            protected JournalArticleResourceLocalService journalArticleResourceLocalService;
1192            @BeanReference(type = JournalArticleResourcePersistence.class)
1193            protected JournalArticleResourcePersistence journalArticleResourcePersistence;
1194            @BeanReference(type = JournalContentSearchLocalService.class)
1195            protected JournalContentSearchLocalService journalContentSearchLocalService;
1196            @BeanReference(type = JournalContentSearchPersistence.class)
1197            protected JournalContentSearchPersistence journalContentSearchPersistence;
1198            @BeanReference(type = JournalFeedLocalService.class)
1199            protected JournalFeedLocalService journalFeedLocalService;
1200            @BeanReference(type = JournalFeedService.class)
1201            protected JournalFeedService journalFeedService;
1202            @BeanReference(type = JournalFeedPersistence.class)
1203            protected JournalFeedPersistence journalFeedPersistence;
1204            @BeanReference(type = JournalFeedFinder.class)
1205            protected JournalFeedFinder journalFeedFinder;
1206            @BeanReference(type = JournalStructureLocalService.class)
1207            protected JournalStructureLocalService journalStructureLocalService;
1208            @BeanReference(type = JournalStructureService.class)
1209            protected JournalStructureService journalStructureService;
1210            @BeanReference(type = JournalStructurePersistence.class)
1211            protected JournalStructurePersistence journalStructurePersistence;
1212            @BeanReference(type = JournalStructureFinder.class)
1213            protected JournalStructureFinder journalStructureFinder;
1214            @BeanReference(type = JournalTemplateLocalService.class)
1215            protected JournalTemplateLocalService journalTemplateLocalService;
1216            @BeanReference(type = JournalTemplateService.class)
1217            protected JournalTemplateService journalTemplateService;
1218            @BeanReference(type = JournalTemplatePersistence.class)
1219            protected JournalTemplatePersistence journalTemplatePersistence;
1220            @BeanReference(type = JournalTemplateFinder.class)
1221            protected JournalTemplateFinder journalTemplateFinder;
1222            @BeanReference(type = CounterLocalService.class)
1223            protected CounterLocalService counterLocalService;
1224            @BeanReference(type = GroupLocalService.class)
1225            protected GroupLocalService groupLocalService;
1226            @BeanReference(type = GroupService.class)
1227            protected GroupService groupService;
1228            @BeanReference(type = GroupPersistence.class)
1229            protected GroupPersistence groupPersistence;
1230            @BeanReference(type = GroupFinder.class)
1231            protected GroupFinder groupFinder;
1232            @BeanReference(type = ImageLocalService.class)
1233            protected ImageLocalService imageLocalService;
1234            @BeanReference(type = ImageService.class)
1235            protected ImageService imageService;
1236            @BeanReference(type = ImagePersistence.class)
1237            protected ImagePersistence imagePersistence;
1238            @BeanReference(type = ResourceLocalService.class)
1239            protected ResourceLocalService resourceLocalService;
1240            @BeanReference(type = ResourceService.class)
1241            protected ResourceService resourceService;
1242            @BeanReference(type = ResourcePersistence.class)
1243            protected ResourcePersistence resourcePersistence;
1244            @BeanReference(type = ResourceFinder.class)
1245            protected ResourceFinder resourceFinder;
1246            @BeanReference(type = UserLocalService.class)
1247            protected UserLocalService userLocalService;
1248            @BeanReference(type = UserService.class)
1249            protected UserService userService;
1250            @BeanReference(type = UserPersistence.class)
1251            protected UserPersistence userPersistence;
1252            @BeanReference(type = UserFinder.class)
1253            protected UserFinder userFinder;
1254            @BeanReference(type = WebDAVPropsLocalService.class)
1255            protected WebDAVPropsLocalService webDAVPropsLocalService;
1256            @BeanReference(type = WebDAVPropsPersistence.class)
1257            protected WebDAVPropsPersistence webDAVPropsPersistence;
1258            @BeanReference(type = ExpandoValueLocalService.class)
1259            protected ExpandoValueLocalService expandoValueLocalService;
1260            @BeanReference(type = ExpandoValueService.class)
1261            protected ExpandoValueService expandoValueService;
1262            @BeanReference(type = ExpandoValuePersistence.class)
1263            protected ExpandoValuePersistence expandoValuePersistence;
1264            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1265            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1266            private String _beanIdentifier;
1267    }