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