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 com.liferay.portal.kernel.bean.BeanReference;
018    import com.liferay.portal.kernel.bean.IdentifiableBean;
019    import com.liferay.portal.kernel.dao.db.DB;
020    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.model.LayoutSet;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.LayoutSetService;
027    import com.liferay.portal.service.persistence.GroupFinder;
028    import com.liferay.portal.service.persistence.GroupPersistence;
029    import com.liferay.portal.service.persistence.ImagePersistence;
030    import com.liferay.portal.service.persistence.LayoutFinder;
031    import com.liferay.portal.service.persistence.LayoutPersistence;
032    import com.liferay.portal.service.persistence.LayoutSetBranchPersistence;
033    import com.liferay.portal.service.persistence.LayoutSetPersistence;
034    import com.liferay.portal.service.persistence.PluginSettingPersistence;
035    import com.liferay.portal.service.persistence.VirtualHostPersistence;
036    import com.liferay.portal.util.PortalUtil;
037    
038    import javax.sql.DataSource;
039    
040    /**
041     * Provides the base implementation for the layout set remote service.
042     *
043     * <p>
044     * 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.LayoutSetServiceImpl}.
045     * </p>
046     *
047     * @author Brian Wing Shun Chan
048     * @see com.liferay.portal.service.impl.LayoutSetServiceImpl
049     * @see com.liferay.portal.service.LayoutSetServiceUtil
050     * @generated
051     */
052    public abstract class LayoutSetServiceBaseImpl extends BaseServiceImpl
053            implements LayoutSetService, IdentifiableBean {
054            /*
055             * NOTE FOR DEVELOPERS:
056             *
057             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.LayoutSetServiceUtil} to access the layout set remote service.
058             */
059    
060            /**
061             * Returns the layout set local service.
062             *
063             * @return the layout set local service
064             */
065            public com.liferay.portal.service.LayoutSetLocalService getLayoutSetLocalService() {
066                    return layoutSetLocalService;
067            }
068    
069            /**
070             * Sets the layout set local service.
071             *
072             * @param layoutSetLocalService the layout set local service
073             */
074            public void setLayoutSetLocalService(
075                    com.liferay.portal.service.LayoutSetLocalService layoutSetLocalService) {
076                    this.layoutSetLocalService = layoutSetLocalService;
077            }
078    
079            /**
080             * Returns the layout set remote service.
081             *
082             * @return the layout set remote service
083             */
084            public com.liferay.portal.service.LayoutSetService getLayoutSetService() {
085                    return layoutSetService;
086            }
087    
088            /**
089             * Sets the layout set remote service.
090             *
091             * @param layoutSetService the layout set remote service
092             */
093            public void setLayoutSetService(
094                    com.liferay.portal.service.LayoutSetService layoutSetService) {
095                    this.layoutSetService = layoutSetService;
096            }
097    
098            /**
099             * Returns the layout set persistence.
100             *
101             * @return the layout set persistence
102             */
103            public LayoutSetPersistence getLayoutSetPersistence() {
104                    return layoutSetPersistence;
105            }
106    
107            /**
108             * Sets the layout set persistence.
109             *
110             * @param layoutSetPersistence the layout set persistence
111             */
112            public void setLayoutSetPersistence(
113                    LayoutSetPersistence layoutSetPersistence) {
114                    this.layoutSetPersistence = layoutSetPersistence;
115            }
116    
117            /**
118             * Returns the counter local service.
119             *
120             * @return the counter local service
121             */
122            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
123                    return counterLocalService;
124            }
125    
126            /**
127             * Sets the counter local service.
128             *
129             * @param counterLocalService the counter local service
130             */
131            public void setCounterLocalService(
132                    com.liferay.counter.service.CounterLocalService counterLocalService) {
133                    this.counterLocalService = counterLocalService;
134            }
135    
136            /**
137             * Returns the group local service.
138             *
139             * @return the group local service
140             */
141            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
142                    return groupLocalService;
143            }
144    
145            /**
146             * Sets the group local service.
147             *
148             * @param groupLocalService the group local service
149             */
150            public void setGroupLocalService(
151                    com.liferay.portal.service.GroupLocalService groupLocalService) {
152                    this.groupLocalService = groupLocalService;
153            }
154    
155            /**
156             * Returns the group remote service.
157             *
158             * @return the group remote service
159             */
160            public com.liferay.portal.service.GroupService getGroupService() {
161                    return groupService;
162            }
163    
164            /**
165             * Sets the group remote service.
166             *
167             * @param groupService the group remote service
168             */
169            public void setGroupService(
170                    com.liferay.portal.service.GroupService groupService) {
171                    this.groupService = groupService;
172            }
173    
174            /**
175             * Returns the group persistence.
176             *
177             * @return the group persistence
178             */
179            public GroupPersistence getGroupPersistence() {
180                    return groupPersistence;
181            }
182    
183            /**
184             * Sets the group persistence.
185             *
186             * @param groupPersistence the group persistence
187             */
188            public void setGroupPersistence(GroupPersistence groupPersistence) {
189                    this.groupPersistence = groupPersistence;
190            }
191    
192            /**
193             * Returns the group finder.
194             *
195             * @return the group finder
196             */
197            public GroupFinder getGroupFinder() {
198                    return groupFinder;
199            }
200    
201            /**
202             * Sets the group finder.
203             *
204             * @param groupFinder the group finder
205             */
206            public void setGroupFinder(GroupFinder groupFinder) {
207                    this.groupFinder = groupFinder;
208            }
209    
210            /**
211             * Returns the image local service.
212             *
213             * @return the image local service
214             */
215            public com.liferay.portal.service.ImageLocalService getImageLocalService() {
216                    return imageLocalService;
217            }
218    
219            /**
220             * Sets the image local service.
221             *
222             * @param imageLocalService the image local service
223             */
224            public void setImageLocalService(
225                    com.liferay.portal.service.ImageLocalService imageLocalService) {
226                    this.imageLocalService = imageLocalService;
227            }
228    
229            /**
230             * Returns the image remote service.
231             *
232             * @return the image remote service
233             */
234            public com.liferay.portal.service.ImageService getImageService() {
235                    return imageService;
236            }
237    
238            /**
239             * Sets the image remote service.
240             *
241             * @param imageService the image remote service
242             */
243            public void setImageService(
244                    com.liferay.portal.service.ImageService imageService) {
245                    this.imageService = imageService;
246            }
247    
248            /**
249             * Returns the image persistence.
250             *
251             * @return the image persistence
252             */
253            public ImagePersistence getImagePersistence() {
254                    return imagePersistence;
255            }
256    
257            /**
258             * Sets the image persistence.
259             *
260             * @param imagePersistence the image persistence
261             */
262            public void setImagePersistence(ImagePersistence imagePersistence) {
263                    this.imagePersistence = imagePersistence;
264            }
265    
266            /**
267             * Returns the layout local service.
268             *
269             * @return the layout local service
270             */
271            public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() {
272                    return layoutLocalService;
273            }
274    
275            /**
276             * Sets the layout local service.
277             *
278             * @param layoutLocalService the layout local service
279             */
280            public void setLayoutLocalService(
281                    com.liferay.portal.service.LayoutLocalService layoutLocalService) {
282                    this.layoutLocalService = layoutLocalService;
283            }
284    
285            /**
286             * Returns the layout remote service.
287             *
288             * @return the layout remote service
289             */
290            public com.liferay.portal.service.LayoutService getLayoutService() {
291                    return layoutService;
292            }
293    
294            /**
295             * Sets the layout remote service.
296             *
297             * @param layoutService the layout remote service
298             */
299            public void setLayoutService(
300                    com.liferay.portal.service.LayoutService layoutService) {
301                    this.layoutService = layoutService;
302            }
303    
304            /**
305             * Returns the layout persistence.
306             *
307             * @return the layout persistence
308             */
309            public LayoutPersistence getLayoutPersistence() {
310                    return layoutPersistence;
311            }
312    
313            /**
314             * Sets the layout persistence.
315             *
316             * @param layoutPersistence the layout persistence
317             */
318            public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
319                    this.layoutPersistence = layoutPersistence;
320            }
321    
322            /**
323             * Returns the layout finder.
324             *
325             * @return the layout finder
326             */
327            public LayoutFinder getLayoutFinder() {
328                    return layoutFinder;
329            }
330    
331            /**
332             * Sets the layout finder.
333             *
334             * @param layoutFinder the layout finder
335             */
336            public void setLayoutFinder(LayoutFinder layoutFinder) {
337                    this.layoutFinder = layoutFinder;
338            }
339    
340            /**
341             * Returns the layout set branch local service.
342             *
343             * @return the layout set branch local service
344             */
345            public com.liferay.portal.service.LayoutSetBranchLocalService getLayoutSetBranchLocalService() {
346                    return layoutSetBranchLocalService;
347            }
348    
349            /**
350             * Sets the layout set branch local service.
351             *
352             * @param layoutSetBranchLocalService the layout set branch local service
353             */
354            public void setLayoutSetBranchLocalService(
355                    com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService) {
356                    this.layoutSetBranchLocalService = layoutSetBranchLocalService;
357            }
358    
359            /**
360             * Returns the layout set branch remote service.
361             *
362             * @return the layout set branch remote service
363             */
364            public com.liferay.portal.service.LayoutSetBranchService getLayoutSetBranchService() {
365                    return layoutSetBranchService;
366            }
367    
368            /**
369             * Sets the layout set branch remote service.
370             *
371             * @param layoutSetBranchService the layout set branch remote service
372             */
373            public void setLayoutSetBranchService(
374                    com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService) {
375                    this.layoutSetBranchService = layoutSetBranchService;
376            }
377    
378            /**
379             * Returns the layout set branch persistence.
380             *
381             * @return the layout set branch persistence
382             */
383            public LayoutSetBranchPersistence getLayoutSetBranchPersistence() {
384                    return layoutSetBranchPersistence;
385            }
386    
387            /**
388             * Sets the layout set branch persistence.
389             *
390             * @param layoutSetBranchPersistence the layout set branch persistence
391             */
392            public void setLayoutSetBranchPersistence(
393                    LayoutSetBranchPersistence layoutSetBranchPersistence) {
394                    this.layoutSetBranchPersistence = layoutSetBranchPersistence;
395            }
396    
397            /**
398             * Returns the plugin setting local service.
399             *
400             * @return the plugin setting local service
401             */
402            public com.liferay.portal.service.PluginSettingLocalService getPluginSettingLocalService() {
403                    return pluginSettingLocalService;
404            }
405    
406            /**
407             * Sets the plugin setting local service.
408             *
409             * @param pluginSettingLocalService the plugin setting local service
410             */
411            public void setPluginSettingLocalService(
412                    com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService) {
413                    this.pluginSettingLocalService = pluginSettingLocalService;
414            }
415    
416            /**
417             * Returns the plugin setting remote service.
418             *
419             * @return the plugin setting remote service
420             */
421            public com.liferay.portal.service.PluginSettingService getPluginSettingService() {
422                    return pluginSettingService;
423            }
424    
425            /**
426             * Sets the plugin setting remote service.
427             *
428             * @param pluginSettingService the plugin setting remote service
429             */
430            public void setPluginSettingService(
431                    com.liferay.portal.service.PluginSettingService pluginSettingService) {
432                    this.pluginSettingService = pluginSettingService;
433            }
434    
435            /**
436             * Returns the plugin setting persistence.
437             *
438             * @return the plugin setting persistence
439             */
440            public PluginSettingPersistence getPluginSettingPersistence() {
441                    return pluginSettingPersistence;
442            }
443    
444            /**
445             * Sets the plugin setting persistence.
446             *
447             * @param pluginSettingPersistence the plugin setting persistence
448             */
449            public void setPluginSettingPersistence(
450                    PluginSettingPersistence pluginSettingPersistence) {
451                    this.pluginSettingPersistence = pluginSettingPersistence;
452            }
453    
454            /**
455             * Returns the virtual host local service.
456             *
457             * @return the virtual host local service
458             */
459            public com.liferay.portal.service.VirtualHostLocalService getVirtualHostLocalService() {
460                    return virtualHostLocalService;
461            }
462    
463            /**
464             * Sets the virtual host local service.
465             *
466             * @param virtualHostLocalService the virtual host local service
467             */
468            public void setVirtualHostLocalService(
469                    com.liferay.portal.service.VirtualHostLocalService virtualHostLocalService) {
470                    this.virtualHostLocalService = virtualHostLocalService;
471            }
472    
473            /**
474             * Returns the virtual host persistence.
475             *
476             * @return the virtual host persistence
477             */
478            public VirtualHostPersistence getVirtualHostPersistence() {
479                    return virtualHostPersistence;
480            }
481    
482            /**
483             * Sets the virtual host persistence.
484             *
485             * @param virtualHostPersistence the virtual host persistence
486             */
487            public void setVirtualHostPersistence(
488                    VirtualHostPersistence virtualHostPersistence) {
489                    this.virtualHostPersistence = virtualHostPersistence;
490            }
491    
492            public void afterPropertiesSet() {
493            }
494    
495            public void destroy() {
496            }
497    
498            /**
499             * Returns the Spring bean ID for this bean.
500             *
501             * @return the Spring bean ID for this bean
502             */
503            @Override
504            public String getBeanIdentifier() {
505                    return _beanIdentifier;
506            }
507    
508            /**
509             * Sets the Spring bean ID for this bean.
510             *
511             * @param beanIdentifier the Spring bean ID for this bean
512             */
513            @Override
514            public void setBeanIdentifier(String beanIdentifier) {
515                    _beanIdentifier = beanIdentifier;
516            }
517    
518            protected Class<?> getModelClass() {
519                    return LayoutSet.class;
520            }
521    
522            protected String getModelClassName() {
523                    return LayoutSet.class.getName();
524            }
525    
526            /**
527             * Performs a SQL query.
528             *
529             * @param sql the sql query
530             */
531            protected void runSQL(String sql) {
532                    try {
533                            DataSource dataSource = layoutSetPersistence.getDataSource();
534    
535                            DB db = DBFactoryUtil.getDB();
536    
537                            sql = db.buildSQL(sql);
538                            sql = PortalUtil.transformSQL(sql);
539    
540                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
541                                            sql, new int[0]);
542    
543                            sqlUpdate.update();
544                    }
545                    catch (Exception e) {
546                            throw new SystemException(e);
547                    }
548            }
549    
550            @BeanReference(type = com.liferay.portal.service.LayoutSetLocalService.class)
551            protected com.liferay.portal.service.LayoutSetLocalService layoutSetLocalService;
552            @BeanReference(type = com.liferay.portal.service.LayoutSetService.class)
553            protected com.liferay.portal.service.LayoutSetService layoutSetService;
554            @BeanReference(type = LayoutSetPersistence.class)
555            protected LayoutSetPersistence layoutSetPersistence;
556            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
557            protected com.liferay.counter.service.CounterLocalService counterLocalService;
558            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
559            protected com.liferay.portal.service.GroupLocalService groupLocalService;
560            @BeanReference(type = com.liferay.portal.service.GroupService.class)
561            protected com.liferay.portal.service.GroupService groupService;
562            @BeanReference(type = GroupPersistence.class)
563            protected GroupPersistence groupPersistence;
564            @BeanReference(type = GroupFinder.class)
565            protected GroupFinder groupFinder;
566            @BeanReference(type = com.liferay.portal.service.ImageLocalService.class)
567            protected com.liferay.portal.service.ImageLocalService imageLocalService;
568            @BeanReference(type = com.liferay.portal.service.ImageService.class)
569            protected com.liferay.portal.service.ImageService imageService;
570            @BeanReference(type = ImagePersistence.class)
571            protected ImagePersistence imagePersistence;
572            @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class)
573            protected com.liferay.portal.service.LayoutLocalService layoutLocalService;
574            @BeanReference(type = com.liferay.portal.service.LayoutService.class)
575            protected com.liferay.portal.service.LayoutService layoutService;
576            @BeanReference(type = LayoutPersistence.class)
577            protected LayoutPersistence layoutPersistence;
578            @BeanReference(type = LayoutFinder.class)
579            protected LayoutFinder layoutFinder;
580            @BeanReference(type = com.liferay.portal.service.LayoutSetBranchLocalService.class)
581            protected com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService;
582            @BeanReference(type = com.liferay.portal.service.LayoutSetBranchService.class)
583            protected com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService;
584            @BeanReference(type = LayoutSetBranchPersistence.class)
585            protected LayoutSetBranchPersistence layoutSetBranchPersistence;
586            @BeanReference(type = com.liferay.portal.service.PluginSettingLocalService.class)
587            protected com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService;
588            @BeanReference(type = com.liferay.portal.service.PluginSettingService.class)
589            protected com.liferay.portal.service.PluginSettingService pluginSettingService;
590            @BeanReference(type = PluginSettingPersistence.class)
591            protected PluginSettingPersistence pluginSettingPersistence;
592            @BeanReference(type = com.liferay.portal.service.VirtualHostLocalService.class)
593            protected com.liferay.portal.service.VirtualHostLocalService virtualHostLocalService;
594            @BeanReference(type = VirtualHostPersistence.class)
595            protected VirtualHostPersistence virtualHostPersistence;
596            private String _beanIdentifier;
597    }