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