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