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