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