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