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