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