001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.dao.db.DB;
021    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
028    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
029    import com.liferay.portal.kernel.dao.orm.Projection;
030    import com.liferay.portal.kernel.exception.PortalException;
031    import com.liferay.portal.kernel.exception.SystemException;
032    import com.liferay.portal.kernel.model.LayoutSet;
033    import com.liferay.portal.kernel.model.PersistedModel;
034    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
035    import com.liferay.portal.kernel.search.Indexable;
036    import com.liferay.portal.kernel.search.IndexableType;
037    import com.liferay.portal.kernel.service.BaseLocalServiceImpl;
038    import com.liferay.portal.kernel.service.LayoutSetLocalService;
039    import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry;
040    import com.liferay.portal.kernel.service.persistence.GroupFinder;
041    import com.liferay.portal.kernel.service.persistence.GroupPersistence;
042    import com.liferay.portal.kernel.service.persistence.ImagePersistence;
043    import com.liferay.portal.kernel.service.persistence.LayoutFinder;
044    import com.liferay.portal.kernel.service.persistence.LayoutPersistence;
045    import com.liferay.portal.kernel.service.persistence.LayoutSetBranchPersistence;
046    import com.liferay.portal.kernel.service.persistence.LayoutSetPersistence;
047    import com.liferay.portal.kernel.service.persistence.PluginSettingPersistence;
048    import com.liferay.portal.kernel.service.persistence.VirtualHostPersistence;
049    import com.liferay.portal.kernel.util.OrderByComparator;
050    import com.liferay.portal.kernel.util.PortalUtil;
051    
052    import java.io.Serializable;
053    
054    import java.util.List;
055    
056    import javax.sql.DataSource;
057    
058    /**
059     * Provides the base implementation for the layout set local service.
060     *
061     * <p>
062     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portal.service.impl.LayoutSetLocalServiceImpl}.
063     * </p>
064     *
065     * @author Brian Wing Shun Chan
066     * @see com.liferay.portal.service.impl.LayoutSetLocalServiceImpl
067     * @see com.liferay.portal.kernel.service.LayoutSetLocalServiceUtil
068     * @generated
069     */
070    @ProviderType
071    public abstract class LayoutSetLocalServiceBaseImpl extends BaseLocalServiceImpl
072            implements LayoutSetLocalService, IdentifiableOSGiService {
073            /*
074             * NOTE FOR DEVELOPERS:
075             *
076             * Never modify or reference this class directly. Always use {@link com.liferay.portal.kernel.service.LayoutSetLocalServiceUtil} to access the layout set local service.
077             */
078    
079            /**
080             * Adds the layout set to the database. Also notifies the appropriate model listeners.
081             *
082             * @param layoutSet the layout set
083             * @return the layout set that was added
084             */
085            @Indexable(type = IndexableType.REINDEX)
086            @Override
087            public LayoutSet addLayoutSet(LayoutSet layoutSet) {
088                    layoutSet.setNew(true);
089    
090                    return layoutSetPersistence.update(layoutSet);
091            }
092    
093            /**
094             * Creates a new layout set with the primary key. Does not add the layout set to the database.
095             *
096             * @param layoutSetId the primary key for the new layout set
097             * @return the new layout set
098             */
099            @Override
100            public LayoutSet createLayoutSet(long layoutSetId) {
101                    return layoutSetPersistence.create(layoutSetId);
102            }
103    
104            /**
105             * Deletes the layout set with the primary key from the database. Also notifies the appropriate model listeners.
106             *
107             * @param layoutSetId the primary key of the layout set
108             * @return the layout set that was removed
109             * @throws PortalException if a layout set with the primary key could not be found
110             */
111            @Indexable(type = IndexableType.DELETE)
112            @Override
113            public LayoutSet deleteLayoutSet(long layoutSetId)
114                    throws PortalException {
115                    return layoutSetPersistence.remove(layoutSetId);
116            }
117    
118            /**
119             * Deletes the layout set from the database. Also notifies the appropriate model listeners.
120             *
121             * @param layoutSet the layout set
122             * @return the layout set that was removed
123             */
124            @Indexable(type = IndexableType.DELETE)
125            @Override
126            public LayoutSet deleteLayoutSet(LayoutSet layoutSet) {
127                    return layoutSetPersistence.remove(layoutSet);
128            }
129    
130            @Override
131            public DynamicQuery dynamicQuery() {
132                    Class<?> clazz = getClass();
133    
134                    return DynamicQueryFactoryUtil.forClass(LayoutSet.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 layoutSetPersistence.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.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.
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 layoutSetPersistence.findWithDynamicQuery(dynamicQuery, start,
165                            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.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.
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 layoutSetPersistence.findWithDynamicQuery(dynamicQuery, start,
185                            end, orderByComparator);
186            }
187    
188            /**
189             * Returns the number of rows matching the dynamic query.
190             *
191             * @param dynamicQuery the dynamic query
192             * @return the number of rows matching the dynamic query
193             */
194            @Override
195            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
196                    return layoutSetPersistence.countWithDynamicQuery(dynamicQuery);
197            }
198    
199            /**
200             * Returns the number of rows matching 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 matching the dynamic query
205             */
206            @Override
207            public long dynamicQueryCount(DynamicQuery dynamicQuery,
208                    Projection projection) {
209                    return layoutSetPersistence.countWithDynamicQuery(dynamicQuery,
210                            projection);
211            }
212    
213            @Override
214            public LayoutSet fetchLayoutSet(long layoutSetId) {
215                    return layoutSetPersistence.fetchByPrimaryKey(layoutSetId);
216            }
217    
218            /**
219             * Returns the layout set with the primary key.
220             *
221             * @param layoutSetId the primary key of the layout set
222             * @return the layout set
223             * @throws PortalException if a layout set with the primary key could not be found
224             */
225            @Override
226            public LayoutSet getLayoutSet(long layoutSetId) throws PortalException {
227                    return layoutSetPersistence.findByPrimaryKey(layoutSetId);
228            }
229    
230            @Override
231            public ActionableDynamicQuery getActionableDynamicQuery() {
232                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
233    
234                    actionableDynamicQuery.setBaseLocalService(layoutSetLocalService);
235                    actionableDynamicQuery.setClassLoader(getClassLoader());
236                    actionableDynamicQuery.setModelClass(LayoutSet.class);
237    
238                    actionableDynamicQuery.setPrimaryKeyPropertyName("layoutSetId");
239    
240                    return actionableDynamicQuery;
241            }
242    
243            @Override
244            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
245                    IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
246    
247                    indexableActionableDynamicQuery.setBaseLocalService(layoutSetLocalService);
248                    indexableActionableDynamicQuery.setClassLoader(getClassLoader());
249                    indexableActionableDynamicQuery.setModelClass(LayoutSet.class);
250    
251                    indexableActionableDynamicQuery.setPrimaryKeyPropertyName("layoutSetId");
252    
253                    return indexableActionableDynamicQuery;
254            }
255    
256            protected void initActionableDynamicQuery(
257                    ActionableDynamicQuery actionableDynamicQuery) {
258                    actionableDynamicQuery.setBaseLocalService(layoutSetLocalService);
259                    actionableDynamicQuery.setClassLoader(getClassLoader());
260                    actionableDynamicQuery.setModelClass(LayoutSet.class);
261    
262                    actionableDynamicQuery.setPrimaryKeyPropertyName("layoutSetId");
263            }
264    
265            /**
266             * @throws PortalException
267             */
268            @Override
269            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
270                    throws PortalException {
271                    return layoutSetLocalService.deleteLayoutSet((LayoutSet)persistedModel);
272            }
273    
274            @Override
275            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
276                    throws PortalException {
277                    return layoutSetPersistence.findByPrimaryKey(primaryKeyObj);
278            }
279    
280            /**
281             * Returns a range of all the layout sets.
282             *
283             * <p>
284             * 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.
285             * </p>
286             *
287             * @param start the lower bound of the range of layout sets
288             * @param end the upper bound of the range of layout sets (not inclusive)
289             * @return the range of layout sets
290             */
291            @Override
292            public List<LayoutSet> getLayoutSets(int start, int end) {
293                    return layoutSetPersistence.findAll(start, end);
294            }
295    
296            /**
297             * Returns the number of layout sets.
298             *
299             * @return the number of layout sets
300             */
301            @Override
302            public int getLayoutSetsCount() {
303                    return layoutSetPersistence.countAll();
304            }
305    
306            /**
307             * Updates the layout set in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
308             *
309             * @param layoutSet the layout set
310             * @return the layout set that was updated
311             */
312            @Indexable(type = IndexableType.REINDEX)
313            @Override
314            public LayoutSet updateLayoutSet(LayoutSet layoutSet) {
315                    return layoutSetPersistence.update(layoutSet);
316            }
317    
318            /**
319             * Returns the layout set local service.
320             *
321             * @return the layout set local service
322             */
323            public LayoutSetLocalService getLayoutSetLocalService() {
324                    return layoutSetLocalService;
325            }
326    
327            /**
328             * Sets the layout set local service.
329             *
330             * @param layoutSetLocalService the layout set local service
331             */
332            public void setLayoutSetLocalService(
333                    LayoutSetLocalService layoutSetLocalService) {
334                    this.layoutSetLocalService = layoutSetLocalService;
335            }
336    
337            /**
338             * Returns the layout set persistence.
339             *
340             * @return the layout set persistence
341             */
342            public LayoutSetPersistence getLayoutSetPersistence() {
343                    return layoutSetPersistence;
344            }
345    
346            /**
347             * Sets the layout set persistence.
348             *
349             * @param layoutSetPersistence the layout set persistence
350             */
351            public void setLayoutSetPersistence(
352                    LayoutSetPersistence layoutSetPersistence) {
353                    this.layoutSetPersistence = layoutSetPersistence;
354            }
355    
356            /**
357             * Returns the counter local service.
358             *
359             * @return the counter local service
360             */
361            public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() {
362                    return counterLocalService;
363            }
364    
365            /**
366             * Sets the counter local service.
367             *
368             * @param counterLocalService the counter local service
369             */
370            public void setCounterLocalService(
371                    com.liferay.counter.kernel.service.CounterLocalService counterLocalService) {
372                    this.counterLocalService = counterLocalService;
373            }
374    
375            /**
376             * Returns the group local service.
377             *
378             * @return the group local service
379             */
380            public com.liferay.portal.kernel.service.GroupLocalService getGroupLocalService() {
381                    return groupLocalService;
382            }
383    
384            /**
385             * Sets the group local service.
386             *
387             * @param groupLocalService the group local service
388             */
389            public void setGroupLocalService(
390                    com.liferay.portal.kernel.service.GroupLocalService groupLocalService) {
391                    this.groupLocalService = groupLocalService;
392            }
393    
394            /**
395             * Returns the group persistence.
396             *
397             * @return the group persistence
398             */
399            public GroupPersistence getGroupPersistence() {
400                    return groupPersistence;
401            }
402    
403            /**
404             * Sets the group persistence.
405             *
406             * @param groupPersistence the group persistence
407             */
408            public void setGroupPersistence(GroupPersistence groupPersistence) {
409                    this.groupPersistence = groupPersistence;
410            }
411    
412            /**
413             * Returns the group finder.
414             *
415             * @return the group finder
416             */
417            public GroupFinder getGroupFinder() {
418                    return groupFinder;
419            }
420    
421            /**
422             * Sets the group finder.
423             *
424             * @param groupFinder the group finder
425             */
426            public void setGroupFinder(GroupFinder groupFinder) {
427                    this.groupFinder = groupFinder;
428            }
429    
430            /**
431             * Returns the image local service.
432             *
433             * @return the image local service
434             */
435            public com.liferay.portal.kernel.service.ImageLocalService getImageLocalService() {
436                    return imageLocalService;
437            }
438    
439            /**
440             * Sets the image local service.
441             *
442             * @param imageLocalService the image local service
443             */
444            public void setImageLocalService(
445                    com.liferay.portal.kernel.service.ImageLocalService imageLocalService) {
446                    this.imageLocalService = imageLocalService;
447            }
448    
449            /**
450             * Returns the image persistence.
451             *
452             * @return the image persistence
453             */
454            public ImagePersistence getImagePersistence() {
455                    return imagePersistence;
456            }
457    
458            /**
459             * Sets the image persistence.
460             *
461             * @param imagePersistence the image persistence
462             */
463            public void setImagePersistence(ImagePersistence imagePersistence) {
464                    this.imagePersistence = imagePersistence;
465            }
466    
467            /**
468             * Returns the layout local service.
469             *
470             * @return the layout local service
471             */
472            public com.liferay.portal.kernel.service.LayoutLocalService getLayoutLocalService() {
473                    return layoutLocalService;
474            }
475    
476            /**
477             * Sets the layout local service.
478             *
479             * @param layoutLocalService the layout local service
480             */
481            public void setLayoutLocalService(
482                    com.liferay.portal.kernel.service.LayoutLocalService layoutLocalService) {
483                    this.layoutLocalService = layoutLocalService;
484            }
485    
486            /**
487             * Returns the layout persistence.
488             *
489             * @return the layout persistence
490             */
491            public LayoutPersistence getLayoutPersistence() {
492                    return layoutPersistence;
493            }
494    
495            /**
496             * Sets the layout persistence.
497             *
498             * @param layoutPersistence the layout persistence
499             */
500            public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
501                    this.layoutPersistence = layoutPersistence;
502            }
503    
504            /**
505             * Returns the layout finder.
506             *
507             * @return the layout finder
508             */
509            public LayoutFinder getLayoutFinder() {
510                    return layoutFinder;
511            }
512    
513            /**
514             * Sets the layout finder.
515             *
516             * @param layoutFinder the layout finder
517             */
518            public void setLayoutFinder(LayoutFinder layoutFinder) {
519                    this.layoutFinder = layoutFinder;
520            }
521    
522            /**
523             * Returns the layout set branch local service.
524             *
525             * @return the layout set branch local service
526             */
527            public com.liferay.portal.kernel.service.LayoutSetBranchLocalService getLayoutSetBranchLocalService() {
528                    return layoutSetBranchLocalService;
529            }
530    
531            /**
532             * Sets the layout set branch local service.
533             *
534             * @param layoutSetBranchLocalService the layout set branch local service
535             */
536            public void setLayoutSetBranchLocalService(
537                    com.liferay.portal.kernel.service.LayoutSetBranchLocalService layoutSetBranchLocalService) {
538                    this.layoutSetBranchLocalService = layoutSetBranchLocalService;
539            }
540    
541            /**
542             * Returns the layout set branch persistence.
543             *
544             * @return the layout set branch persistence
545             */
546            public LayoutSetBranchPersistence getLayoutSetBranchPersistence() {
547                    return layoutSetBranchPersistence;
548            }
549    
550            /**
551             * Sets the layout set branch persistence.
552             *
553             * @param layoutSetBranchPersistence the layout set branch persistence
554             */
555            public void setLayoutSetBranchPersistence(
556                    LayoutSetBranchPersistence layoutSetBranchPersistence) {
557                    this.layoutSetBranchPersistence = layoutSetBranchPersistence;
558            }
559    
560            /**
561             * Returns the plugin setting local service.
562             *
563             * @return the plugin setting local service
564             */
565            public com.liferay.portal.kernel.service.PluginSettingLocalService getPluginSettingLocalService() {
566                    return pluginSettingLocalService;
567            }
568    
569            /**
570             * Sets the plugin setting local service.
571             *
572             * @param pluginSettingLocalService the plugin setting local service
573             */
574            public void setPluginSettingLocalService(
575                    com.liferay.portal.kernel.service.PluginSettingLocalService pluginSettingLocalService) {
576                    this.pluginSettingLocalService = pluginSettingLocalService;
577            }
578    
579            /**
580             * Returns the plugin setting persistence.
581             *
582             * @return the plugin setting persistence
583             */
584            public PluginSettingPersistence getPluginSettingPersistence() {
585                    return pluginSettingPersistence;
586            }
587    
588            /**
589             * Sets the plugin setting persistence.
590             *
591             * @param pluginSettingPersistence the plugin setting persistence
592             */
593            public void setPluginSettingPersistence(
594                    PluginSettingPersistence pluginSettingPersistence) {
595                    this.pluginSettingPersistence = pluginSettingPersistence;
596            }
597    
598            /**
599             * Returns the virtual host local service.
600             *
601             * @return the virtual host local service
602             */
603            public com.liferay.portal.kernel.service.VirtualHostLocalService getVirtualHostLocalService() {
604                    return virtualHostLocalService;
605            }
606    
607            /**
608             * Sets the virtual host local service.
609             *
610             * @param virtualHostLocalService the virtual host local service
611             */
612            public void setVirtualHostLocalService(
613                    com.liferay.portal.kernel.service.VirtualHostLocalService virtualHostLocalService) {
614                    this.virtualHostLocalService = virtualHostLocalService;
615            }
616    
617            /**
618             * Returns the virtual host persistence.
619             *
620             * @return the virtual host persistence
621             */
622            public VirtualHostPersistence getVirtualHostPersistence() {
623                    return virtualHostPersistence;
624            }
625    
626            /**
627             * Sets the virtual host persistence.
628             *
629             * @param virtualHostPersistence the virtual host persistence
630             */
631            public void setVirtualHostPersistence(
632                    VirtualHostPersistence virtualHostPersistence) {
633                    this.virtualHostPersistence = virtualHostPersistence;
634            }
635    
636            public void afterPropertiesSet() {
637                    persistedModelLocalServiceRegistry.register("com.liferay.portal.kernel.model.LayoutSet",
638                            layoutSetLocalService);
639            }
640    
641            public void destroy() {
642                    persistedModelLocalServiceRegistry.unregister(
643                            "com.liferay.portal.kernel.model.LayoutSet");
644            }
645    
646            /**
647             * Returns the OSGi service identifier.
648             *
649             * @return the OSGi service identifier
650             */
651            @Override
652            public String getOSGiServiceIdentifier() {
653                    return LayoutSetLocalService.class.getName();
654            }
655    
656            protected Class<?> getModelClass() {
657                    return LayoutSet.class;
658            }
659    
660            protected String getModelClassName() {
661                    return LayoutSet.class.getName();
662            }
663    
664            /**
665             * Performs a SQL query.
666             *
667             * @param sql the sql query
668             */
669            protected void runSQL(String sql) {
670                    try {
671                            DataSource dataSource = layoutSetPersistence.getDataSource();
672    
673                            DB db = DBManagerUtil.getDB();
674    
675                            sql = db.buildSQL(sql);
676                            sql = PortalUtil.transformSQL(sql);
677    
678                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
679                                            sql);
680    
681                            sqlUpdate.update();
682                    }
683                    catch (Exception e) {
684                            throw new SystemException(e);
685                    }
686            }
687    
688            @BeanReference(type = LayoutSetLocalService.class)
689            protected LayoutSetLocalService layoutSetLocalService;
690            @BeanReference(type = LayoutSetPersistence.class)
691            protected LayoutSetPersistence layoutSetPersistence;
692            @BeanReference(type = com.liferay.counter.kernel.service.CounterLocalService.class)
693            protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService;
694            @BeanReference(type = com.liferay.portal.kernel.service.GroupLocalService.class)
695            protected com.liferay.portal.kernel.service.GroupLocalService groupLocalService;
696            @BeanReference(type = GroupPersistence.class)
697            protected GroupPersistence groupPersistence;
698            @BeanReference(type = GroupFinder.class)
699            protected GroupFinder groupFinder;
700            @BeanReference(type = com.liferay.portal.kernel.service.ImageLocalService.class)
701            protected com.liferay.portal.kernel.service.ImageLocalService imageLocalService;
702            @BeanReference(type = ImagePersistence.class)
703            protected ImagePersistence imagePersistence;
704            @BeanReference(type = com.liferay.portal.kernel.service.LayoutLocalService.class)
705            protected com.liferay.portal.kernel.service.LayoutLocalService layoutLocalService;
706            @BeanReference(type = LayoutPersistence.class)
707            protected LayoutPersistence layoutPersistence;
708            @BeanReference(type = LayoutFinder.class)
709            protected LayoutFinder layoutFinder;
710            @BeanReference(type = com.liferay.portal.kernel.service.LayoutSetBranchLocalService.class)
711            protected com.liferay.portal.kernel.service.LayoutSetBranchLocalService layoutSetBranchLocalService;
712            @BeanReference(type = LayoutSetBranchPersistence.class)
713            protected LayoutSetBranchPersistence layoutSetBranchPersistence;
714            @BeanReference(type = com.liferay.portal.kernel.service.PluginSettingLocalService.class)
715            protected com.liferay.portal.kernel.service.PluginSettingLocalService pluginSettingLocalService;
716            @BeanReference(type = PluginSettingPersistence.class)
717            protected PluginSettingPersistence pluginSettingPersistence;
718            @BeanReference(type = com.liferay.portal.kernel.service.VirtualHostLocalService.class)
719            protected com.liferay.portal.kernel.service.VirtualHostLocalService virtualHostLocalService;
720            @BeanReference(type = VirtualHostPersistence.class)
721            protected VirtualHostPersistence virtualHostPersistence;
722            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
723            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
724    }