001    /**
002     * Copyright (c) 2000-present 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.portal.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
029    import com.liferay.portal.kernel.dao.orm.Projection;
030    import com.liferay.portal.kernel.exception.PortalException;
031    import com.liferay.portal.kernel.exception.SystemException;
032    import com.liferay.portal.kernel.search.Indexable;
033    import com.liferay.portal.kernel.search.IndexableType;
034    import com.liferay.portal.kernel.util.OrderByComparator;
035    import com.liferay.portal.model.LayoutRevision;
036    import com.liferay.portal.model.PersistedModel;
037    import com.liferay.portal.service.BaseLocalServiceImpl;
038    import com.liferay.portal.service.LayoutRevisionLocalService;
039    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
040    import com.liferay.portal.service.persistence.ImagePersistence;
041    import com.liferay.portal.service.persistence.LayoutBranchPersistence;
042    import com.liferay.portal.service.persistence.LayoutFinder;
043    import com.liferay.portal.service.persistence.LayoutPersistence;
044    import com.liferay.portal.service.persistence.LayoutRevisionPersistence;
045    import com.liferay.portal.service.persistence.LayoutSetBranchPersistence;
046    import com.liferay.portal.service.persistence.LayoutSetPersistence;
047    import com.liferay.portal.service.persistence.PortletPreferencesFinder;
048    import com.liferay.portal.service.persistence.PortletPreferencesPersistence;
049    import com.liferay.portal.service.persistence.UserFinder;
050    import com.liferay.portal.service.persistence.UserPersistence;
051    import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence;
052    import com.liferay.portal.util.PortalUtil;
053    
054    import java.io.Serializable;
055    
056    import java.util.List;
057    
058    import javax.sql.DataSource;
059    
060    /**
061     * Provides the base implementation for the layout revision local service.
062     *
063     * <p>
064     * 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.portal.service.impl.LayoutRevisionLocalServiceImpl}.
065     * </p>
066     *
067     * @author Brian Wing Shun Chan
068     * @see com.liferay.portal.service.impl.LayoutRevisionLocalServiceImpl
069     * @see com.liferay.portal.service.LayoutRevisionLocalServiceUtil
070     * @generated
071     */
072    @ProviderType
073    public abstract class LayoutRevisionLocalServiceBaseImpl
074            extends BaseLocalServiceImpl implements LayoutRevisionLocalService,
075                    IdentifiableBean {
076            /*
077             * NOTE FOR DEVELOPERS:
078             *
079             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.LayoutRevisionLocalServiceUtil} to access the layout revision local service.
080             */
081    
082            /**
083             * Adds the layout revision to the database. Also notifies the appropriate model listeners.
084             *
085             * @param layoutRevision the layout revision
086             * @return the layout revision that was added
087             */
088            @Indexable(type = IndexableType.REINDEX)
089            @Override
090            public LayoutRevision addLayoutRevision(LayoutRevision layoutRevision) {
091                    layoutRevision.setNew(true);
092    
093                    return layoutRevisionPersistence.update(layoutRevision);
094            }
095    
096            /**
097             * Creates a new layout revision with the primary key. Does not add the layout revision to the database.
098             *
099             * @param layoutRevisionId the primary key for the new layout revision
100             * @return the new layout revision
101             */
102            @Override
103            public LayoutRevision createLayoutRevision(long layoutRevisionId) {
104                    return layoutRevisionPersistence.create(layoutRevisionId);
105            }
106    
107            /**
108             * Deletes the layout revision with the primary key from the database. Also notifies the appropriate model listeners.
109             *
110             * @param layoutRevisionId the primary key of the layout revision
111             * @return the layout revision that was removed
112             * @throws PortalException if a layout revision with the primary key could not be found
113             */
114            @Indexable(type = IndexableType.DELETE)
115            @Override
116            public LayoutRevision deleteLayoutRevision(long layoutRevisionId)
117                    throws PortalException {
118                    return layoutRevisionPersistence.remove(layoutRevisionId);
119            }
120    
121            /**
122             * Deletes the layout revision from the database. Also notifies the appropriate model listeners.
123             *
124             * @param layoutRevision the layout revision
125             * @return the layout revision that was removed
126             * @throws PortalException
127             */
128            @Indexable(type = IndexableType.DELETE)
129            @Override
130            public LayoutRevision deleteLayoutRevision(LayoutRevision layoutRevision)
131                    throws PortalException {
132                    return layoutRevisionPersistence.remove(layoutRevision);
133            }
134    
135            @Override
136            public DynamicQuery dynamicQuery() {
137                    Class<?> clazz = getClass();
138    
139                    return DynamicQueryFactoryUtil.forClass(LayoutRevision.class,
140                            clazz.getClassLoader());
141            }
142    
143            /**
144             * Performs a dynamic query on the database and returns the matching rows.
145             *
146             * @param dynamicQuery the dynamic query
147             * @return the matching rows
148             */
149            @Override
150            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
151                    return layoutRevisionPersistence.findWithDynamicQuery(dynamicQuery);
152            }
153    
154            /**
155             * Performs a dynamic query on the database and returns a range of the matching rows.
156             *
157             * <p>
158             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutRevisionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
159             * </p>
160             *
161             * @param dynamicQuery the dynamic query
162             * @param start the lower bound of the range of model instances
163             * @param end the upper bound of the range of model instances (not inclusive)
164             * @return the range of matching rows
165             */
166            @Override
167            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
168                    int end) {
169                    return layoutRevisionPersistence.findWithDynamicQuery(dynamicQuery,
170                            start, end);
171            }
172    
173            /**
174             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
175             *
176             * <p>
177             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutRevisionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
178             * </p>
179             *
180             * @param dynamicQuery the dynamic query
181             * @param start the lower bound of the range of model instances
182             * @param end the upper bound of the range of model instances (not inclusive)
183             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
184             * @return the ordered range of matching rows
185             */
186            @Override
187            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
188                    int end, OrderByComparator<T> orderByComparator) {
189                    return layoutRevisionPersistence.findWithDynamicQuery(dynamicQuery,
190                            start, end, orderByComparator);
191            }
192    
193            /**
194             * Returns the number of rows matching the dynamic query.
195             *
196             * @param dynamicQuery the dynamic query
197             * @return the number of rows matching the dynamic query
198             */
199            @Override
200            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
201                    return layoutRevisionPersistence.countWithDynamicQuery(dynamicQuery);
202            }
203    
204            /**
205             * Returns the number of rows matching the dynamic query.
206             *
207             * @param dynamicQuery the dynamic query
208             * @param projection the projection to apply to the query
209             * @return the number of rows matching the dynamic query
210             */
211            @Override
212            public long dynamicQueryCount(DynamicQuery dynamicQuery,
213                    Projection projection) {
214                    return layoutRevisionPersistence.countWithDynamicQuery(dynamicQuery,
215                            projection);
216            }
217    
218            @Override
219            public LayoutRevision fetchLayoutRevision(long layoutRevisionId) {
220                    return layoutRevisionPersistence.fetchByPrimaryKey(layoutRevisionId);
221            }
222    
223            /**
224             * Returns the layout revision with the primary key.
225             *
226             * @param layoutRevisionId the primary key of the layout revision
227             * @return the layout revision
228             * @throws PortalException if a layout revision with the primary key could not be found
229             */
230            @Override
231            public LayoutRevision getLayoutRevision(long layoutRevisionId)
232                    throws PortalException {
233                    return layoutRevisionPersistence.findByPrimaryKey(layoutRevisionId);
234            }
235    
236            @Override
237            public ActionableDynamicQuery getActionableDynamicQuery() {
238                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
239    
240                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutRevisionLocalServiceUtil.getService());
241                    actionableDynamicQuery.setClass(LayoutRevision.class);
242                    actionableDynamicQuery.setClassLoader(getClassLoader());
243    
244                    actionableDynamicQuery.setPrimaryKeyPropertyName("layoutRevisionId");
245    
246                    return actionableDynamicQuery;
247            }
248    
249            protected void initActionableDynamicQuery(
250                    ActionableDynamicQuery actionableDynamicQuery) {
251                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutRevisionLocalServiceUtil.getService());
252                    actionableDynamicQuery.setClass(LayoutRevision.class);
253                    actionableDynamicQuery.setClassLoader(getClassLoader());
254    
255                    actionableDynamicQuery.setPrimaryKeyPropertyName("layoutRevisionId");
256            }
257    
258            /**
259             * @throws PortalException
260             */
261            @Override
262            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
263                    throws PortalException {
264                    return layoutRevisionLocalService.deleteLayoutRevision((LayoutRevision)persistedModel);
265            }
266    
267            @Override
268            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
269                    throws PortalException {
270                    return layoutRevisionPersistence.findByPrimaryKey(primaryKeyObj);
271            }
272    
273            /**
274             * Returns a range of all the layout revisions.
275             *
276             * <p>
277             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutRevisionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
278             * </p>
279             *
280             * @param start the lower bound of the range of layout revisions
281             * @param end the upper bound of the range of layout revisions (not inclusive)
282             * @return the range of layout revisions
283             */
284            @Override
285            public List<LayoutRevision> getLayoutRevisions(int start, int end) {
286                    return layoutRevisionPersistence.findAll(start, end);
287            }
288    
289            /**
290             * Returns the number of layout revisions.
291             *
292             * @return the number of layout revisions
293             */
294            @Override
295            public int getLayoutRevisionsCount() {
296                    return layoutRevisionPersistence.countAll();
297            }
298    
299            /**
300             * Updates the layout revision in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
301             *
302             * @param layoutRevision the layout revision
303             * @return the layout revision that was updated
304             */
305            @Indexable(type = IndexableType.REINDEX)
306            @Override
307            public LayoutRevision updateLayoutRevision(LayoutRevision layoutRevision) {
308                    return layoutRevisionPersistence.update(layoutRevision);
309            }
310    
311            /**
312             * Returns the layout revision local service.
313             *
314             * @return the layout revision local service
315             */
316            public LayoutRevisionLocalService getLayoutRevisionLocalService() {
317                    return layoutRevisionLocalService;
318            }
319    
320            /**
321             * Sets the layout revision local service.
322             *
323             * @param layoutRevisionLocalService the layout revision local service
324             */
325            public void setLayoutRevisionLocalService(
326                    LayoutRevisionLocalService layoutRevisionLocalService) {
327                    this.layoutRevisionLocalService = layoutRevisionLocalService;
328            }
329    
330            /**
331             * Returns the layout revision remote service.
332             *
333             * @return the layout revision remote service
334             */
335            public com.liferay.portal.service.LayoutRevisionService getLayoutRevisionService() {
336                    return layoutRevisionService;
337            }
338    
339            /**
340             * Sets the layout revision remote service.
341             *
342             * @param layoutRevisionService the layout revision remote service
343             */
344            public void setLayoutRevisionService(
345                    com.liferay.portal.service.LayoutRevisionService layoutRevisionService) {
346                    this.layoutRevisionService = layoutRevisionService;
347            }
348    
349            /**
350             * Returns the layout revision persistence.
351             *
352             * @return the layout revision persistence
353             */
354            public LayoutRevisionPersistence getLayoutRevisionPersistence() {
355                    return layoutRevisionPersistence;
356            }
357    
358            /**
359             * Sets the layout revision persistence.
360             *
361             * @param layoutRevisionPersistence the layout revision persistence
362             */
363            public void setLayoutRevisionPersistence(
364                    LayoutRevisionPersistence layoutRevisionPersistence) {
365                    this.layoutRevisionPersistence = layoutRevisionPersistence;
366            }
367    
368            /**
369             * Returns the counter local service.
370             *
371             * @return the counter local service
372             */
373            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
374                    return counterLocalService;
375            }
376    
377            /**
378             * Sets the counter local service.
379             *
380             * @param counterLocalService the counter local service
381             */
382            public void setCounterLocalService(
383                    com.liferay.counter.service.CounterLocalService counterLocalService) {
384                    this.counterLocalService = counterLocalService;
385            }
386    
387            /**
388             * Returns the image local service.
389             *
390             * @return the image local service
391             */
392            public com.liferay.portal.service.ImageLocalService getImageLocalService() {
393                    return imageLocalService;
394            }
395    
396            /**
397             * Sets the image local service.
398             *
399             * @param imageLocalService the image local service
400             */
401            public void setImageLocalService(
402                    com.liferay.portal.service.ImageLocalService imageLocalService) {
403                    this.imageLocalService = imageLocalService;
404            }
405    
406            /**
407             * Returns the image remote service.
408             *
409             * @return the image remote service
410             */
411            public com.liferay.portal.service.ImageService getImageService() {
412                    return imageService;
413            }
414    
415            /**
416             * Sets the image remote service.
417             *
418             * @param imageService the image remote service
419             */
420            public void setImageService(
421                    com.liferay.portal.service.ImageService imageService) {
422                    this.imageService = imageService;
423            }
424    
425            /**
426             * Returns the image persistence.
427             *
428             * @return the image persistence
429             */
430            public ImagePersistence getImagePersistence() {
431                    return imagePersistence;
432            }
433    
434            /**
435             * Sets the image persistence.
436             *
437             * @param imagePersistence the image persistence
438             */
439            public void setImagePersistence(ImagePersistence imagePersistence) {
440                    this.imagePersistence = imagePersistence;
441            }
442    
443            /**
444             * Returns the layout local service.
445             *
446             * @return the layout local service
447             */
448            public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() {
449                    return layoutLocalService;
450            }
451    
452            /**
453             * Sets the layout local service.
454             *
455             * @param layoutLocalService the layout local service
456             */
457            public void setLayoutLocalService(
458                    com.liferay.portal.service.LayoutLocalService layoutLocalService) {
459                    this.layoutLocalService = layoutLocalService;
460            }
461    
462            /**
463             * Returns the layout remote service.
464             *
465             * @return the layout remote service
466             */
467            public com.liferay.portal.service.LayoutService getLayoutService() {
468                    return layoutService;
469            }
470    
471            /**
472             * Sets the layout remote service.
473             *
474             * @param layoutService the layout remote service
475             */
476            public void setLayoutService(
477                    com.liferay.portal.service.LayoutService layoutService) {
478                    this.layoutService = layoutService;
479            }
480    
481            /**
482             * Returns the layout persistence.
483             *
484             * @return the layout persistence
485             */
486            public LayoutPersistence getLayoutPersistence() {
487                    return layoutPersistence;
488            }
489    
490            /**
491             * Sets the layout persistence.
492             *
493             * @param layoutPersistence the layout persistence
494             */
495            public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
496                    this.layoutPersistence = layoutPersistence;
497            }
498    
499            /**
500             * Returns the layout finder.
501             *
502             * @return the layout finder
503             */
504            public LayoutFinder getLayoutFinder() {
505                    return layoutFinder;
506            }
507    
508            /**
509             * Sets the layout finder.
510             *
511             * @param layoutFinder the layout finder
512             */
513            public void setLayoutFinder(LayoutFinder layoutFinder) {
514                    this.layoutFinder = layoutFinder;
515            }
516    
517            /**
518             * Returns the layout branch local service.
519             *
520             * @return the layout branch local service
521             */
522            public com.liferay.portal.service.LayoutBranchLocalService getLayoutBranchLocalService() {
523                    return layoutBranchLocalService;
524            }
525    
526            /**
527             * Sets the layout branch local service.
528             *
529             * @param layoutBranchLocalService the layout branch local service
530             */
531            public void setLayoutBranchLocalService(
532                    com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService) {
533                    this.layoutBranchLocalService = layoutBranchLocalService;
534            }
535    
536            /**
537             * Returns the layout branch remote service.
538             *
539             * @return the layout branch remote service
540             */
541            public com.liferay.portal.service.LayoutBranchService getLayoutBranchService() {
542                    return layoutBranchService;
543            }
544    
545            /**
546             * Sets the layout branch remote service.
547             *
548             * @param layoutBranchService the layout branch remote service
549             */
550            public void setLayoutBranchService(
551                    com.liferay.portal.service.LayoutBranchService layoutBranchService) {
552                    this.layoutBranchService = layoutBranchService;
553            }
554    
555            /**
556             * Returns the layout branch persistence.
557             *
558             * @return the layout branch persistence
559             */
560            public LayoutBranchPersistence getLayoutBranchPersistence() {
561                    return layoutBranchPersistence;
562            }
563    
564            /**
565             * Sets the layout branch persistence.
566             *
567             * @param layoutBranchPersistence the layout branch persistence
568             */
569            public void setLayoutBranchPersistence(
570                    LayoutBranchPersistence layoutBranchPersistence) {
571                    this.layoutBranchPersistence = layoutBranchPersistence;
572            }
573    
574            /**
575             * Returns the layout set local service.
576             *
577             * @return the layout set local service
578             */
579            public com.liferay.portal.service.LayoutSetLocalService getLayoutSetLocalService() {
580                    return layoutSetLocalService;
581            }
582    
583            /**
584             * Sets the layout set local service.
585             *
586             * @param layoutSetLocalService the layout set local service
587             */
588            public void setLayoutSetLocalService(
589                    com.liferay.portal.service.LayoutSetLocalService layoutSetLocalService) {
590                    this.layoutSetLocalService = layoutSetLocalService;
591            }
592    
593            /**
594             * Returns the layout set remote service.
595             *
596             * @return the layout set remote service
597             */
598            public com.liferay.portal.service.LayoutSetService getLayoutSetService() {
599                    return layoutSetService;
600            }
601    
602            /**
603             * Sets the layout set remote service.
604             *
605             * @param layoutSetService the layout set remote service
606             */
607            public void setLayoutSetService(
608                    com.liferay.portal.service.LayoutSetService layoutSetService) {
609                    this.layoutSetService = layoutSetService;
610            }
611    
612            /**
613             * Returns the layout set persistence.
614             *
615             * @return the layout set persistence
616             */
617            public LayoutSetPersistence getLayoutSetPersistence() {
618                    return layoutSetPersistence;
619            }
620    
621            /**
622             * Sets the layout set persistence.
623             *
624             * @param layoutSetPersistence the layout set persistence
625             */
626            public void setLayoutSetPersistence(
627                    LayoutSetPersistence layoutSetPersistence) {
628                    this.layoutSetPersistence = layoutSetPersistence;
629            }
630    
631            /**
632             * Returns the layout set branch local service.
633             *
634             * @return the layout set branch local service
635             */
636            public com.liferay.portal.service.LayoutSetBranchLocalService getLayoutSetBranchLocalService() {
637                    return layoutSetBranchLocalService;
638            }
639    
640            /**
641             * Sets the layout set branch local service.
642             *
643             * @param layoutSetBranchLocalService the layout set branch local service
644             */
645            public void setLayoutSetBranchLocalService(
646                    com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService) {
647                    this.layoutSetBranchLocalService = layoutSetBranchLocalService;
648            }
649    
650            /**
651             * Returns the layout set branch remote service.
652             *
653             * @return the layout set branch remote service
654             */
655            public com.liferay.portal.service.LayoutSetBranchService getLayoutSetBranchService() {
656                    return layoutSetBranchService;
657            }
658    
659            /**
660             * Sets the layout set branch remote service.
661             *
662             * @param layoutSetBranchService the layout set branch remote service
663             */
664            public void setLayoutSetBranchService(
665                    com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService) {
666                    this.layoutSetBranchService = layoutSetBranchService;
667            }
668    
669            /**
670             * Returns the layout set branch persistence.
671             *
672             * @return the layout set branch persistence
673             */
674            public LayoutSetBranchPersistence getLayoutSetBranchPersistence() {
675                    return layoutSetBranchPersistence;
676            }
677    
678            /**
679             * Sets the layout set branch persistence.
680             *
681             * @param layoutSetBranchPersistence the layout set branch persistence
682             */
683            public void setLayoutSetBranchPersistence(
684                    LayoutSetBranchPersistence layoutSetBranchPersistence) {
685                    this.layoutSetBranchPersistence = layoutSetBranchPersistence;
686            }
687    
688            /**
689             * Returns the portlet preferences local service.
690             *
691             * @return the portlet preferences local service
692             */
693            public com.liferay.portal.service.PortletPreferencesLocalService getPortletPreferencesLocalService() {
694                    return portletPreferencesLocalService;
695            }
696    
697            /**
698             * Sets the portlet preferences local service.
699             *
700             * @param portletPreferencesLocalService the portlet preferences local service
701             */
702            public void setPortletPreferencesLocalService(
703                    com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService) {
704                    this.portletPreferencesLocalService = portletPreferencesLocalService;
705            }
706    
707            /**
708             * Returns the portlet preferences remote service.
709             *
710             * @return the portlet preferences remote service
711             */
712            public com.liferay.portal.service.PortletPreferencesService getPortletPreferencesService() {
713                    return portletPreferencesService;
714            }
715    
716            /**
717             * Sets the portlet preferences remote service.
718             *
719             * @param portletPreferencesService the portlet preferences remote service
720             */
721            public void setPortletPreferencesService(
722                    com.liferay.portal.service.PortletPreferencesService portletPreferencesService) {
723                    this.portletPreferencesService = portletPreferencesService;
724            }
725    
726            /**
727             * Returns the portlet preferences persistence.
728             *
729             * @return the portlet preferences persistence
730             */
731            public PortletPreferencesPersistence getPortletPreferencesPersistence() {
732                    return portletPreferencesPersistence;
733            }
734    
735            /**
736             * Sets the portlet preferences persistence.
737             *
738             * @param portletPreferencesPersistence the portlet preferences persistence
739             */
740            public void setPortletPreferencesPersistence(
741                    PortletPreferencesPersistence portletPreferencesPersistence) {
742                    this.portletPreferencesPersistence = portletPreferencesPersistence;
743            }
744    
745            /**
746             * Returns the portlet preferences finder.
747             *
748             * @return the portlet preferences finder
749             */
750            public PortletPreferencesFinder getPortletPreferencesFinder() {
751                    return portletPreferencesFinder;
752            }
753    
754            /**
755             * Sets the portlet preferences finder.
756             *
757             * @param portletPreferencesFinder the portlet preferences finder
758             */
759            public void setPortletPreferencesFinder(
760                    PortletPreferencesFinder portletPreferencesFinder) {
761                    this.portletPreferencesFinder = portletPreferencesFinder;
762            }
763    
764            /**
765             * Returns the resource local service.
766             *
767             * @return the resource local service
768             */
769            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
770                    return resourceLocalService;
771            }
772    
773            /**
774             * Sets the resource local service.
775             *
776             * @param resourceLocalService the resource local service
777             */
778            public void setResourceLocalService(
779                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
780                    this.resourceLocalService = resourceLocalService;
781            }
782    
783            /**
784             * Returns the user local service.
785             *
786             * @return the user local service
787             */
788            public com.liferay.portal.service.UserLocalService getUserLocalService() {
789                    return userLocalService;
790            }
791    
792            /**
793             * Sets the user local service.
794             *
795             * @param userLocalService the user local service
796             */
797            public void setUserLocalService(
798                    com.liferay.portal.service.UserLocalService userLocalService) {
799                    this.userLocalService = userLocalService;
800            }
801    
802            /**
803             * Returns the user remote service.
804             *
805             * @return the user remote service
806             */
807            public com.liferay.portal.service.UserService getUserService() {
808                    return userService;
809            }
810    
811            /**
812             * Sets the user remote service.
813             *
814             * @param userService the user remote service
815             */
816            public void setUserService(
817                    com.liferay.portal.service.UserService userService) {
818                    this.userService = userService;
819            }
820    
821            /**
822             * Returns the user persistence.
823             *
824             * @return the user persistence
825             */
826            public UserPersistence getUserPersistence() {
827                    return userPersistence;
828            }
829    
830            /**
831             * Sets the user persistence.
832             *
833             * @param userPersistence the user persistence
834             */
835            public void setUserPersistence(UserPersistence userPersistence) {
836                    this.userPersistence = userPersistence;
837            }
838    
839            /**
840             * Returns the user finder.
841             *
842             * @return the user finder
843             */
844            public UserFinder getUserFinder() {
845                    return userFinder;
846            }
847    
848            /**
849             * Sets the user finder.
850             *
851             * @param userFinder the user finder
852             */
853            public void setUserFinder(UserFinder userFinder) {
854                    this.userFinder = userFinder;
855            }
856    
857            /**
858             * Returns the workflow instance link local service.
859             *
860             * @return the workflow instance link local service
861             */
862            public com.liferay.portal.service.WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() {
863                    return workflowInstanceLinkLocalService;
864            }
865    
866            /**
867             * Sets the workflow instance link local service.
868             *
869             * @param workflowInstanceLinkLocalService the workflow instance link local service
870             */
871            public void setWorkflowInstanceLinkLocalService(
872                    com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) {
873                    this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService;
874            }
875    
876            /**
877             * Returns the workflow instance link persistence.
878             *
879             * @return the workflow instance link persistence
880             */
881            public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() {
882                    return workflowInstanceLinkPersistence;
883            }
884    
885            /**
886             * Sets the workflow instance link persistence.
887             *
888             * @param workflowInstanceLinkPersistence the workflow instance link persistence
889             */
890            public void setWorkflowInstanceLinkPersistence(
891                    WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) {
892                    this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence;
893            }
894    
895            public void afterPropertiesSet() {
896                    persistedModelLocalServiceRegistry.register("com.liferay.portal.model.LayoutRevision",
897                            layoutRevisionLocalService);
898            }
899    
900            public void destroy() {
901                    persistedModelLocalServiceRegistry.unregister(
902                            "com.liferay.portal.model.LayoutRevision");
903            }
904    
905            /**
906             * Returns the Spring bean ID for this bean.
907             *
908             * @return the Spring bean ID for this bean
909             */
910            @Override
911            public String getBeanIdentifier() {
912                    return _beanIdentifier;
913            }
914    
915            /**
916             * Sets the Spring bean ID for this bean.
917             *
918             * @param beanIdentifier the Spring bean ID for this bean
919             */
920            @Override
921            public void setBeanIdentifier(String beanIdentifier) {
922                    _beanIdentifier = beanIdentifier;
923            }
924    
925            protected Class<?> getModelClass() {
926                    return LayoutRevision.class;
927            }
928    
929            protected String getModelClassName() {
930                    return LayoutRevision.class.getName();
931            }
932    
933            /**
934             * Performs a SQL query.
935             *
936             * @param sql the sql query
937             */
938            protected void runSQL(String sql) {
939                    try {
940                            DataSource dataSource = layoutRevisionPersistence.getDataSource();
941    
942                            DB db = DBFactoryUtil.getDB();
943    
944                            sql = db.buildSQL(sql);
945                            sql = PortalUtil.transformSQL(sql);
946    
947                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
948                                            sql, new int[0]);
949    
950                            sqlUpdate.update();
951                    }
952                    catch (Exception e) {
953                            throw new SystemException(e);
954                    }
955            }
956    
957            @BeanReference(type = com.liferay.portal.service.LayoutRevisionLocalService.class)
958            protected LayoutRevisionLocalService layoutRevisionLocalService;
959            @BeanReference(type = com.liferay.portal.service.LayoutRevisionService.class)
960            protected com.liferay.portal.service.LayoutRevisionService layoutRevisionService;
961            @BeanReference(type = LayoutRevisionPersistence.class)
962            protected LayoutRevisionPersistence layoutRevisionPersistence;
963            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
964            protected com.liferay.counter.service.CounterLocalService counterLocalService;
965            @BeanReference(type = com.liferay.portal.service.ImageLocalService.class)
966            protected com.liferay.portal.service.ImageLocalService imageLocalService;
967            @BeanReference(type = com.liferay.portal.service.ImageService.class)
968            protected com.liferay.portal.service.ImageService imageService;
969            @BeanReference(type = ImagePersistence.class)
970            protected ImagePersistence imagePersistence;
971            @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class)
972            protected com.liferay.portal.service.LayoutLocalService layoutLocalService;
973            @BeanReference(type = com.liferay.portal.service.LayoutService.class)
974            protected com.liferay.portal.service.LayoutService layoutService;
975            @BeanReference(type = LayoutPersistence.class)
976            protected LayoutPersistence layoutPersistence;
977            @BeanReference(type = LayoutFinder.class)
978            protected LayoutFinder layoutFinder;
979            @BeanReference(type = com.liferay.portal.service.LayoutBranchLocalService.class)
980            protected com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService;
981            @BeanReference(type = com.liferay.portal.service.LayoutBranchService.class)
982            protected com.liferay.portal.service.LayoutBranchService layoutBranchService;
983            @BeanReference(type = LayoutBranchPersistence.class)
984            protected LayoutBranchPersistence layoutBranchPersistence;
985            @BeanReference(type = com.liferay.portal.service.LayoutSetLocalService.class)
986            protected com.liferay.portal.service.LayoutSetLocalService layoutSetLocalService;
987            @BeanReference(type = com.liferay.portal.service.LayoutSetService.class)
988            protected com.liferay.portal.service.LayoutSetService layoutSetService;
989            @BeanReference(type = LayoutSetPersistence.class)
990            protected LayoutSetPersistence layoutSetPersistence;
991            @BeanReference(type = com.liferay.portal.service.LayoutSetBranchLocalService.class)
992            protected com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService;
993            @BeanReference(type = com.liferay.portal.service.LayoutSetBranchService.class)
994            protected com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService;
995            @BeanReference(type = LayoutSetBranchPersistence.class)
996            protected LayoutSetBranchPersistence layoutSetBranchPersistence;
997            @BeanReference(type = com.liferay.portal.service.PortletPreferencesLocalService.class)
998            protected com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService;
999            @BeanReference(type = com.liferay.portal.service.PortletPreferencesService.class)
1000            protected com.liferay.portal.service.PortletPreferencesService portletPreferencesService;
1001            @BeanReference(type = PortletPreferencesPersistence.class)
1002            protected PortletPreferencesPersistence portletPreferencesPersistence;
1003            @BeanReference(type = PortletPreferencesFinder.class)
1004            protected PortletPreferencesFinder portletPreferencesFinder;
1005            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1006            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1007            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1008            protected com.liferay.portal.service.UserLocalService userLocalService;
1009            @BeanReference(type = com.liferay.portal.service.UserService.class)
1010            protected com.liferay.portal.service.UserService userService;
1011            @BeanReference(type = UserPersistence.class)
1012            protected UserPersistence userPersistence;
1013            @BeanReference(type = UserFinder.class)
1014            protected UserFinder userFinder;
1015            @BeanReference(type = com.liferay.portal.service.WorkflowInstanceLinkLocalService.class)
1016            protected com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService;
1017            @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1018            protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1019            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1020            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1021            private String _beanIdentifier;
1022    }