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