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