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