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