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