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.dao.db.DB;
021    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
028    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
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.module.framework.service.IdentifiableOSGiService;
033    import com.liferay.portal.kernel.search.Indexable;
034    import com.liferay.portal.kernel.search.IndexableType;
035    import com.liferay.portal.kernel.util.OrderByComparator;
036    import com.liferay.portal.model.LayoutSetBranch;
037    import com.liferay.portal.model.PersistedModel;
038    import com.liferay.portal.service.BaseLocalServiceImpl;
039    import com.liferay.portal.service.LayoutSetBranchLocalService;
040    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
041    import com.liferay.portal.service.persistence.ImagePersistence;
042    import com.liferay.portal.service.persistence.LayoutBranchPersistence;
043    import com.liferay.portal.service.persistence.LayoutFinder;
044    import com.liferay.portal.service.persistence.LayoutPersistence;
045    import com.liferay.portal.service.persistence.LayoutRevisionPersistence;
046    import com.liferay.portal.service.persistence.LayoutSetBranchPersistence;
047    import com.liferay.portal.service.persistence.LayoutSetPersistence;
048    import com.liferay.portal.service.persistence.RecentLayoutSetBranchPersistence;
049    import com.liferay.portal.service.persistence.UserFinder;
050    import com.liferay.portal.service.persistence.UserPersistence;
051    import com.liferay.portal.util.PortalUtil;
052    
053    import java.io.Serializable;
054    
055    import java.util.List;
056    
057    import javax.sql.DataSource;
058    
059    /**
060     * Provides the base implementation for the layout set branch local service.
061     *
062     * <p>
063     * 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.LayoutSetBranchLocalServiceImpl}.
064     * </p>
065     *
066     * @author Brian Wing Shun Chan
067     * @see com.liferay.portal.service.impl.LayoutSetBranchLocalServiceImpl
068     * @see com.liferay.portal.service.LayoutSetBranchLocalServiceUtil
069     * @generated
070     */
071    @ProviderType
072    public abstract class LayoutSetBranchLocalServiceBaseImpl
073            extends BaseLocalServiceImpl implements LayoutSetBranchLocalService,
074                    IdentifiableOSGiService {
075            /*
076             * NOTE FOR DEVELOPERS:
077             *
078             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.LayoutSetBranchLocalServiceUtil} to access the layout set branch local service.
079             */
080    
081            /**
082             * Adds the layout set branch to the database. Also notifies the appropriate model listeners.
083             *
084             * @param layoutSetBranch the layout set branch
085             * @return the layout set branch that was added
086             */
087            @Indexable(type = IndexableType.REINDEX)
088            @Override
089            public LayoutSetBranch addLayoutSetBranch(LayoutSetBranch layoutSetBranch) {
090                    layoutSetBranch.setNew(true);
091    
092                    return layoutSetBranchPersistence.update(layoutSetBranch);
093            }
094    
095            /**
096             * Creates a new layout set branch with the primary key. Does not add the layout set branch to the database.
097             *
098             * @param layoutSetBranchId the primary key for the new layout set branch
099             * @return the new layout set branch
100             */
101            @Override
102            public LayoutSetBranch createLayoutSetBranch(long layoutSetBranchId) {
103                    return layoutSetBranchPersistence.create(layoutSetBranchId);
104            }
105    
106            /**
107             * Deletes the layout set branch with the primary key from the database. Also notifies the appropriate model listeners.
108             *
109             * @param layoutSetBranchId the primary key of the layout set branch
110             * @return the layout set branch that was removed
111             * @throws PortalException if a layout set branch with the primary key could not be found
112             */
113            @Indexable(type = IndexableType.DELETE)
114            @Override
115            public LayoutSetBranch deleteLayoutSetBranch(long layoutSetBranchId)
116                    throws PortalException {
117                    return layoutSetBranchPersistence.remove(layoutSetBranchId);
118            }
119    
120            /**
121             * Deletes the layout set branch from the database. Also notifies the appropriate model listeners.
122             *
123             * @param layoutSetBranch the layout set branch
124             * @return the layout set branch that was removed
125             * @throws PortalException
126             */
127            @Indexable(type = IndexableType.DELETE)
128            @Override
129            public LayoutSetBranch deleteLayoutSetBranch(
130                    LayoutSetBranch layoutSetBranch) throws PortalException {
131                    return layoutSetBranchPersistence.remove(layoutSetBranch);
132            }
133    
134            @Override
135            public DynamicQuery dynamicQuery() {
136                    Class<?> clazz = getClass();
137    
138                    return DynamicQueryFactoryUtil.forClass(LayoutSetBranch.class,
139                            clazz.getClassLoader());
140            }
141    
142            /**
143             * Performs a dynamic query on the database and returns the matching rows.
144             *
145             * @param dynamicQuery the dynamic query
146             * @return the matching rows
147             */
148            @Override
149            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
150                    return layoutSetBranchPersistence.findWithDynamicQuery(dynamicQuery);
151            }
152    
153            /**
154             * Performs a dynamic query on the database and returns a range of the matching rows.
155             *
156             * <p>
157             * 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.LayoutSetBranchModelImpl}. 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.
158             * </p>
159             *
160             * @param dynamicQuery the dynamic query
161             * @param start the lower bound of the range of model instances
162             * @param end the upper bound of the range of model instances (not inclusive)
163             * @return the range of matching rows
164             */
165            @Override
166            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
167                    int end) {
168                    return layoutSetBranchPersistence.findWithDynamicQuery(dynamicQuery,
169                            start, end);
170            }
171    
172            /**
173             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
174             *
175             * <p>
176             * 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.LayoutSetBranchModelImpl}. 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.
177             * </p>
178             *
179             * @param dynamicQuery the dynamic query
180             * @param start the lower bound of the range of model instances
181             * @param end the upper bound of the range of model instances (not inclusive)
182             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
183             * @return the ordered range of matching rows
184             */
185            @Override
186            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
187                    int end, OrderByComparator<T> orderByComparator) {
188                    return layoutSetBranchPersistence.findWithDynamicQuery(dynamicQuery,
189                            start, end, orderByComparator);
190            }
191    
192            /**
193             * Returns the number of rows matching the dynamic query.
194             *
195             * @param dynamicQuery the dynamic query
196             * @return the number of rows matching the dynamic query
197             */
198            @Override
199            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
200                    return layoutSetBranchPersistence.countWithDynamicQuery(dynamicQuery);
201            }
202    
203            /**
204             * Returns the number of rows matching the dynamic query.
205             *
206             * @param dynamicQuery the dynamic query
207             * @param projection the projection to apply to the query
208             * @return the number of rows matching the dynamic query
209             */
210            @Override
211            public long dynamicQueryCount(DynamicQuery dynamicQuery,
212                    Projection projection) {
213                    return layoutSetBranchPersistence.countWithDynamicQuery(dynamicQuery,
214                            projection);
215            }
216    
217            @Override
218            public LayoutSetBranch fetchLayoutSetBranch(long layoutSetBranchId) {
219                    return layoutSetBranchPersistence.fetchByPrimaryKey(layoutSetBranchId);
220            }
221    
222            /**
223             * Returns the layout set branch with the primary key.
224             *
225             * @param layoutSetBranchId the primary key of the layout set branch
226             * @return the layout set branch
227             * @throws PortalException if a layout set branch with the primary key could not be found
228             */
229            @Override
230            public LayoutSetBranch getLayoutSetBranch(long layoutSetBranchId)
231                    throws PortalException {
232                    return layoutSetBranchPersistence.findByPrimaryKey(layoutSetBranchId);
233            }
234    
235            @Override
236            public ActionableDynamicQuery getActionableDynamicQuery() {
237                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
238    
239                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutSetBranchLocalServiceUtil.getService());
240                    actionableDynamicQuery.setClassLoader(getClassLoader());
241                    actionableDynamicQuery.setModelClass(LayoutSetBranch.class);
242    
243                    actionableDynamicQuery.setPrimaryKeyPropertyName("layoutSetBranchId");
244    
245                    return actionableDynamicQuery;
246            }
247    
248            @Override
249            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
250                    IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
251    
252                    indexableActionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutSetBranchLocalServiceUtil.getService());
253                    indexableActionableDynamicQuery.setClassLoader(getClassLoader());
254                    indexableActionableDynamicQuery.setModelClass(LayoutSetBranch.class);
255    
256                    indexableActionableDynamicQuery.setPrimaryKeyPropertyName(
257                            "layoutSetBranchId");
258    
259                    return indexableActionableDynamicQuery;
260            }
261    
262            protected void initActionableDynamicQuery(
263                    ActionableDynamicQuery actionableDynamicQuery) {
264                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutSetBranchLocalServiceUtil.getService());
265                    actionableDynamicQuery.setClassLoader(getClassLoader());
266                    actionableDynamicQuery.setModelClass(LayoutSetBranch.class);
267    
268                    actionableDynamicQuery.setPrimaryKeyPropertyName("layoutSetBranchId");
269            }
270    
271            /**
272             * @throws PortalException
273             */
274            @Override
275            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
276                    throws PortalException {
277                    return layoutSetBranchLocalService.deleteLayoutSetBranch((LayoutSetBranch)persistedModel);
278            }
279    
280            @Override
281            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
282                    throws PortalException {
283                    return layoutSetBranchPersistence.findByPrimaryKey(primaryKeyObj);
284            }
285    
286            /**
287             * Returns a range of all the layout set branchs.
288             *
289             * <p>
290             * 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.LayoutSetBranchModelImpl}. 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.
291             * </p>
292             *
293             * @param start the lower bound of the range of layout set branchs
294             * @param end the upper bound of the range of layout set branchs (not inclusive)
295             * @return the range of layout set branchs
296             */
297            @Override
298            public List<LayoutSetBranch> getLayoutSetBranchs(int start, int end) {
299                    return layoutSetBranchPersistence.findAll(start, end);
300            }
301    
302            /**
303             * Returns the number of layout set branchs.
304             *
305             * @return the number of layout set branchs
306             */
307            @Override
308            public int getLayoutSetBranchsCount() {
309                    return layoutSetBranchPersistence.countAll();
310            }
311    
312            /**
313             * Updates the layout set branch in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
314             *
315             * @param layoutSetBranch the layout set branch
316             * @return the layout set branch that was updated
317             */
318            @Indexable(type = IndexableType.REINDEX)
319            @Override
320            public LayoutSetBranch updateLayoutSetBranch(
321                    LayoutSetBranch layoutSetBranch) {
322                    return layoutSetBranchPersistence.update(layoutSetBranch);
323            }
324    
325            /**
326             * Returns the layout set branch local service.
327             *
328             * @return the layout set branch local service
329             */
330            public LayoutSetBranchLocalService getLayoutSetBranchLocalService() {
331                    return layoutSetBranchLocalService;
332            }
333    
334            /**
335             * Sets the layout set branch local service.
336             *
337             * @param layoutSetBranchLocalService the layout set branch local service
338             */
339            public void setLayoutSetBranchLocalService(
340                    LayoutSetBranchLocalService layoutSetBranchLocalService) {
341                    this.layoutSetBranchLocalService = layoutSetBranchLocalService;
342            }
343    
344            /**
345             * Returns the layout set branch persistence.
346             *
347             * @return the layout set branch persistence
348             */
349            public LayoutSetBranchPersistence getLayoutSetBranchPersistence() {
350                    return layoutSetBranchPersistence;
351            }
352    
353            /**
354             * Sets the layout set branch persistence.
355             *
356             * @param layoutSetBranchPersistence the layout set branch persistence
357             */
358            public void setLayoutSetBranchPersistence(
359                    LayoutSetBranchPersistence layoutSetBranchPersistence) {
360                    this.layoutSetBranchPersistence = layoutSetBranchPersistence;
361            }
362    
363            /**
364             * Returns the counter local service.
365             *
366             * @return the counter local service
367             */
368            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
369                    return counterLocalService;
370            }
371    
372            /**
373             * Sets the counter local service.
374             *
375             * @param counterLocalService the counter local service
376             */
377            public void setCounterLocalService(
378                    com.liferay.counter.service.CounterLocalService counterLocalService) {
379                    this.counterLocalService = counterLocalService;
380            }
381    
382            /**
383             * Returns the image local service.
384             *
385             * @return the image local service
386             */
387            public com.liferay.portal.service.ImageLocalService getImageLocalService() {
388                    return imageLocalService;
389            }
390    
391            /**
392             * Sets the image local service.
393             *
394             * @param imageLocalService the image local service
395             */
396            public void setImageLocalService(
397                    com.liferay.portal.service.ImageLocalService imageLocalService) {
398                    this.imageLocalService = imageLocalService;
399            }
400    
401            /**
402             * Returns the image persistence.
403             *
404             * @return the image persistence
405             */
406            public ImagePersistence getImagePersistence() {
407                    return imagePersistence;
408            }
409    
410            /**
411             * Sets the image persistence.
412             *
413             * @param imagePersistence the image persistence
414             */
415            public void setImagePersistence(ImagePersistence imagePersistence) {
416                    this.imagePersistence = imagePersistence;
417            }
418    
419            /**
420             * Returns the layout local service.
421             *
422             * @return the layout local service
423             */
424            public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() {
425                    return layoutLocalService;
426            }
427    
428            /**
429             * Sets the layout local service.
430             *
431             * @param layoutLocalService the layout local service
432             */
433            public void setLayoutLocalService(
434                    com.liferay.portal.service.LayoutLocalService layoutLocalService) {
435                    this.layoutLocalService = layoutLocalService;
436            }
437    
438            /**
439             * Returns the layout persistence.
440             *
441             * @return the layout persistence
442             */
443            public LayoutPersistence getLayoutPersistence() {
444                    return layoutPersistence;
445            }
446    
447            /**
448             * Sets the layout persistence.
449             *
450             * @param layoutPersistence the layout persistence
451             */
452            public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
453                    this.layoutPersistence = layoutPersistence;
454            }
455    
456            /**
457             * Returns the layout finder.
458             *
459             * @return the layout finder
460             */
461            public LayoutFinder getLayoutFinder() {
462                    return layoutFinder;
463            }
464    
465            /**
466             * Sets the layout finder.
467             *
468             * @param layoutFinder the layout finder
469             */
470            public void setLayoutFinder(LayoutFinder layoutFinder) {
471                    this.layoutFinder = layoutFinder;
472            }
473    
474            /**
475             * Returns the layout branch local service.
476             *
477             * @return the layout branch local service
478             */
479            public com.liferay.portal.service.LayoutBranchLocalService getLayoutBranchLocalService() {
480                    return layoutBranchLocalService;
481            }
482    
483            /**
484             * Sets the layout branch local service.
485             *
486             * @param layoutBranchLocalService the layout branch local service
487             */
488            public void setLayoutBranchLocalService(
489                    com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService) {
490                    this.layoutBranchLocalService = layoutBranchLocalService;
491            }
492    
493            /**
494             * Returns the layout branch persistence.
495             *
496             * @return the layout branch persistence
497             */
498            public LayoutBranchPersistence getLayoutBranchPersistence() {
499                    return layoutBranchPersistence;
500            }
501    
502            /**
503             * Sets the layout branch persistence.
504             *
505             * @param layoutBranchPersistence the layout branch persistence
506             */
507            public void setLayoutBranchPersistence(
508                    LayoutBranchPersistence layoutBranchPersistence) {
509                    this.layoutBranchPersistence = layoutBranchPersistence;
510            }
511    
512            /**
513             * Returns the layout revision local service.
514             *
515             * @return the layout revision local service
516             */
517            public com.liferay.portal.service.LayoutRevisionLocalService getLayoutRevisionLocalService() {
518                    return layoutRevisionLocalService;
519            }
520    
521            /**
522             * Sets the layout revision local service.
523             *
524             * @param layoutRevisionLocalService the layout revision local service
525             */
526            public void setLayoutRevisionLocalService(
527                    com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService) {
528                    this.layoutRevisionLocalService = layoutRevisionLocalService;
529            }
530    
531            /**
532             * Returns the layout revision persistence.
533             *
534             * @return the layout revision persistence
535             */
536            public LayoutRevisionPersistence getLayoutRevisionPersistence() {
537                    return layoutRevisionPersistence;
538            }
539    
540            /**
541             * Sets the layout revision persistence.
542             *
543             * @param layoutRevisionPersistence the layout revision persistence
544             */
545            public void setLayoutRevisionPersistence(
546                    LayoutRevisionPersistence layoutRevisionPersistence) {
547                    this.layoutRevisionPersistence = layoutRevisionPersistence;
548            }
549    
550            /**
551             * Returns the layout set local service.
552             *
553             * @return the layout set local service
554             */
555            public com.liferay.portal.service.LayoutSetLocalService getLayoutSetLocalService() {
556                    return layoutSetLocalService;
557            }
558    
559            /**
560             * Sets the layout set local service.
561             *
562             * @param layoutSetLocalService the layout set local service
563             */
564            public void setLayoutSetLocalService(
565                    com.liferay.portal.service.LayoutSetLocalService layoutSetLocalService) {
566                    this.layoutSetLocalService = layoutSetLocalService;
567            }
568    
569            /**
570             * Returns the layout set persistence.
571             *
572             * @return the layout set persistence
573             */
574            public LayoutSetPersistence getLayoutSetPersistence() {
575                    return layoutSetPersistence;
576            }
577    
578            /**
579             * Sets the layout set persistence.
580             *
581             * @param layoutSetPersistence the layout set persistence
582             */
583            public void setLayoutSetPersistence(
584                    LayoutSetPersistence layoutSetPersistence) {
585                    this.layoutSetPersistence = layoutSetPersistence;
586            }
587    
588            /**
589             * Returns the recent layout set branch local service.
590             *
591             * @return the recent layout set branch local service
592             */
593            public com.liferay.portal.service.RecentLayoutSetBranchLocalService getRecentLayoutSetBranchLocalService() {
594                    return recentLayoutSetBranchLocalService;
595            }
596    
597            /**
598             * Sets the recent layout set branch local service.
599             *
600             * @param recentLayoutSetBranchLocalService the recent layout set branch local service
601             */
602            public void setRecentLayoutSetBranchLocalService(
603                    com.liferay.portal.service.RecentLayoutSetBranchLocalService recentLayoutSetBranchLocalService) {
604                    this.recentLayoutSetBranchLocalService = recentLayoutSetBranchLocalService;
605            }
606    
607            /**
608             * Returns the recent layout set branch persistence.
609             *
610             * @return the recent layout set branch persistence
611             */
612            public RecentLayoutSetBranchPersistence getRecentLayoutSetBranchPersistence() {
613                    return recentLayoutSetBranchPersistence;
614            }
615    
616            /**
617             * Sets the recent layout set branch persistence.
618             *
619             * @param recentLayoutSetBranchPersistence the recent layout set branch persistence
620             */
621            public void setRecentLayoutSetBranchPersistence(
622                    RecentLayoutSetBranchPersistence recentLayoutSetBranchPersistence) {
623                    this.recentLayoutSetBranchPersistence = recentLayoutSetBranchPersistence;
624            }
625    
626            /**
627             * Returns the resource local service.
628             *
629             * @return the resource local service
630             */
631            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
632                    return resourceLocalService;
633            }
634    
635            /**
636             * Sets the resource local service.
637             *
638             * @param resourceLocalService the resource local service
639             */
640            public void setResourceLocalService(
641                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
642                    this.resourceLocalService = resourceLocalService;
643            }
644    
645            /**
646             * Returns the user local service.
647             *
648             * @return the user local service
649             */
650            public com.liferay.portal.service.UserLocalService getUserLocalService() {
651                    return userLocalService;
652            }
653    
654            /**
655             * Sets the user local service.
656             *
657             * @param userLocalService the user local service
658             */
659            public void setUserLocalService(
660                    com.liferay.portal.service.UserLocalService userLocalService) {
661                    this.userLocalService = userLocalService;
662            }
663    
664            /**
665             * Returns the user persistence.
666             *
667             * @return the user persistence
668             */
669            public UserPersistence getUserPersistence() {
670                    return userPersistence;
671            }
672    
673            /**
674             * Sets the user persistence.
675             *
676             * @param userPersistence the user persistence
677             */
678            public void setUserPersistence(UserPersistence userPersistence) {
679                    this.userPersistence = userPersistence;
680            }
681    
682            /**
683             * Returns the user finder.
684             *
685             * @return the user finder
686             */
687            public UserFinder getUserFinder() {
688                    return userFinder;
689            }
690    
691            /**
692             * Sets the user finder.
693             *
694             * @param userFinder the user finder
695             */
696            public void setUserFinder(UserFinder userFinder) {
697                    this.userFinder = userFinder;
698            }
699    
700            public void afterPropertiesSet() {
701                    persistedModelLocalServiceRegistry.register("com.liferay.portal.model.LayoutSetBranch",
702                            layoutSetBranchLocalService);
703            }
704    
705            public void destroy() {
706                    persistedModelLocalServiceRegistry.unregister(
707                            "com.liferay.portal.model.LayoutSetBranch");
708            }
709    
710            /**
711             * Returns the OSGi service identifier.
712             *
713             * @return the OSGi service identifier
714             */
715            @Override
716            public String getOSGiServiceIdentifier() {
717                    return LayoutSetBranchLocalService.class.getName();
718            }
719    
720            protected Class<?> getModelClass() {
721                    return LayoutSetBranch.class;
722            }
723    
724            protected String getModelClassName() {
725                    return LayoutSetBranch.class.getName();
726            }
727    
728            /**
729             * Performs a SQL query.
730             *
731             * @param sql the sql query
732             */
733            protected void runSQL(String sql) {
734                    try {
735                            DataSource dataSource = layoutSetBranchPersistence.getDataSource();
736    
737                            DB db = DBManagerUtil.getDB();
738    
739                            sql = db.buildSQL(sql);
740                            sql = PortalUtil.transformSQL(sql);
741    
742                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
743                                            sql, new int[0]);
744    
745                            sqlUpdate.update();
746                    }
747                    catch (Exception e) {
748                            throw new SystemException(e);
749                    }
750            }
751    
752            @BeanReference(type = com.liferay.portal.service.LayoutSetBranchLocalService.class)
753            protected LayoutSetBranchLocalService layoutSetBranchLocalService;
754            @BeanReference(type = LayoutSetBranchPersistence.class)
755            protected LayoutSetBranchPersistence layoutSetBranchPersistence;
756            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
757            protected com.liferay.counter.service.CounterLocalService counterLocalService;
758            @BeanReference(type = com.liferay.portal.service.ImageLocalService.class)
759            protected com.liferay.portal.service.ImageLocalService imageLocalService;
760            @BeanReference(type = ImagePersistence.class)
761            protected ImagePersistence imagePersistence;
762            @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class)
763            protected com.liferay.portal.service.LayoutLocalService layoutLocalService;
764            @BeanReference(type = LayoutPersistence.class)
765            protected LayoutPersistence layoutPersistence;
766            @BeanReference(type = LayoutFinder.class)
767            protected LayoutFinder layoutFinder;
768            @BeanReference(type = com.liferay.portal.service.LayoutBranchLocalService.class)
769            protected com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService;
770            @BeanReference(type = LayoutBranchPersistence.class)
771            protected LayoutBranchPersistence layoutBranchPersistence;
772            @BeanReference(type = com.liferay.portal.service.LayoutRevisionLocalService.class)
773            protected com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService;
774            @BeanReference(type = LayoutRevisionPersistence.class)
775            protected LayoutRevisionPersistence layoutRevisionPersistence;
776            @BeanReference(type = com.liferay.portal.service.LayoutSetLocalService.class)
777            protected com.liferay.portal.service.LayoutSetLocalService layoutSetLocalService;
778            @BeanReference(type = LayoutSetPersistence.class)
779            protected LayoutSetPersistence layoutSetPersistence;
780            @BeanReference(type = com.liferay.portal.service.RecentLayoutSetBranchLocalService.class)
781            protected com.liferay.portal.service.RecentLayoutSetBranchLocalService recentLayoutSetBranchLocalService;
782            @BeanReference(type = RecentLayoutSetBranchPersistence.class)
783            protected RecentLayoutSetBranchPersistence recentLayoutSetBranchPersistence;
784            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
785            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
786            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
787            protected com.liferay.portal.service.UserLocalService userLocalService;
788            @BeanReference(type = UserPersistence.class)
789            protected UserPersistence userPersistence;
790            @BeanReference(type = UserFinder.class)
791            protected UserFinder userFinder;
792            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
793            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
794    }