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