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