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