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