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