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.LayoutBranch;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.LayoutBranchService;
027    import com.liferay.portal.service.persistence.LayoutBranchPersistence;
028    import com.liferay.portal.service.persistence.LayoutRevisionPersistence;
029    import com.liferay.portal.service.persistence.LayoutSetBranchPersistence;
030    import com.liferay.portal.service.persistence.RecentLayoutBranchPersistence;
031    import com.liferay.portal.service.persistence.UserFinder;
032    import com.liferay.portal.service.persistence.UserPersistence;
033    import com.liferay.portal.util.PortalUtil;
034    
035    import javax.sql.DataSource;
036    
037    /**
038     * Provides the base implementation for the layout branch remote service.
039     *
040     * <p>
041     * 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.LayoutBranchServiceImpl}.
042     * </p>
043     *
044     * @author Brian Wing Shun Chan
045     * @see com.liferay.portal.service.impl.LayoutBranchServiceImpl
046     * @see com.liferay.portal.service.LayoutBranchServiceUtil
047     * @generated
048     */
049    public abstract class LayoutBranchServiceBaseImpl extends BaseServiceImpl
050            implements LayoutBranchService, IdentifiableOSGiService {
051            /*
052             * NOTE FOR DEVELOPERS:
053             *
054             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.LayoutBranchServiceUtil} to access the layout branch remote service.
055             */
056    
057            /**
058             * Returns the layout branch local service.
059             *
060             * @return the layout branch local service
061             */
062            public com.liferay.portal.service.LayoutBranchLocalService getLayoutBranchLocalService() {
063                    return layoutBranchLocalService;
064            }
065    
066            /**
067             * Sets the layout branch local service.
068             *
069             * @param layoutBranchLocalService the layout branch local service
070             */
071            public void setLayoutBranchLocalService(
072                    com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService) {
073                    this.layoutBranchLocalService = layoutBranchLocalService;
074            }
075    
076            /**
077             * Returns the layout branch remote service.
078             *
079             * @return the layout branch remote service
080             */
081            public LayoutBranchService getLayoutBranchService() {
082                    return layoutBranchService;
083            }
084    
085            /**
086             * Sets the layout branch remote service.
087             *
088             * @param layoutBranchService the layout branch remote service
089             */
090            public void setLayoutBranchService(LayoutBranchService layoutBranchService) {
091                    this.layoutBranchService = layoutBranchService;
092            }
093    
094            /**
095             * Returns the layout branch persistence.
096             *
097             * @return the layout branch persistence
098             */
099            public LayoutBranchPersistence getLayoutBranchPersistence() {
100                    return layoutBranchPersistence;
101            }
102    
103            /**
104             * Sets the layout branch persistence.
105             *
106             * @param layoutBranchPersistence the layout branch persistence
107             */
108            public void setLayoutBranchPersistence(
109                    LayoutBranchPersistence layoutBranchPersistence) {
110                    this.layoutBranchPersistence = layoutBranchPersistence;
111            }
112    
113            /**
114             * Returns the counter local service.
115             *
116             * @return the counter local service
117             */
118            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
119                    return counterLocalService;
120            }
121    
122            /**
123             * Sets the counter local service.
124             *
125             * @param counterLocalService the counter local service
126             */
127            public void setCounterLocalService(
128                    com.liferay.counter.service.CounterLocalService counterLocalService) {
129                    this.counterLocalService = counterLocalService;
130            }
131    
132            /**
133             * Returns the layout revision local service.
134             *
135             * @return the layout revision local service
136             */
137            public com.liferay.portal.service.LayoutRevisionLocalService getLayoutRevisionLocalService() {
138                    return layoutRevisionLocalService;
139            }
140    
141            /**
142             * Sets the layout revision local service.
143             *
144             * @param layoutRevisionLocalService the layout revision local service
145             */
146            public void setLayoutRevisionLocalService(
147                    com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService) {
148                    this.layoutRevisionLocalService = layoutRevisionLocalService;
149            }
150    
151            /**
152             * Returns the layout revision remote service.
153             *
154             * @return the layout revision remote service
155             */
156            public com.liferay.portal.service.LayoutRevisionService getLayoutRevisionService() {
157                    return layoutRevisionService;
158            }
159    
160            /**
161             * Sets the layout revision remote service.
162             *
163             * @param layoutRevisionService the layout revision remote service
164             */
165            public void setLayoutRevisionService(
166                    com.liferay.portal.service.LayoutRevisionService layoutRevisionService) {
167                    this.layoutRevisionService = layoutRevisionService;
168            }
169    
170            /**
171             * Returns the layout revision persistence.
172             *
173             * @return the layout revision persistence
174             */
175            public LayoutRevisionPersistence getLayoutRevisionPersistence() {
176                    return layoutRevisionPersistence;
177            }
178    
179            /**
180             * Sets the layout revision persistence.
181             *
182             * @param layoutRevisionPersistence the layout revision persistence
183             */
184            public void setLayoutRevisionPersistence(
185                    LayoutRevisionPersistence layoutRevisionPersistence) {
186                    this.layoutRevisionPersistence = layoutRevisionPersistence;
187            }
188    
189            /**
190             * Returns the layout set branch local service.
191             *
192             * @return the layout set branch local service
193             */
194            public com.liferay.portal.service.LayoutSetBranchLocalService getLayoutSetBranchLocalService() {
195                    return layoutSetBranchLocalService;
196            }
197    
198            /**
199             * Sets the layout set branch local service.
200             *
201             * @param layoutSetBranchLocalService the layout set branch local service
202             */
203            public void setLayoutSetBranchLocalService(
204                    com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService) {
205                    this.layoutSetBranchLocalService = layoutSetBranchLocalService;
206            }
207    
208            /**
209             * Returns the layout set branch remote service.
210             *
211             * @return the layout set branch remote service
212             */
213            public com.liferay.portal.service.LayoutSetBranchService getLayoutSetBranchService() {
214                    return layoutSetBranchService;
215            }
216    
217            /**
218             * Sets the layout set branch remote service.
219             *
220             * @param layoutSetBranchService the layout set branch remote service
221             */
222            public void setLayoutSetBranchService(
223                    com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService) {
224                    this.layoutSetBranchService = layoutSetBranchService;
225            }
226    
227            /**
228             * Returns the layout set branch persistence.
229             *
230             * @return the layout set branch persistence
231             */
232            public LayoutSetBranchPersistence getLayoutSetBranchPersistence() {
233                    return layoutSetBranchPersistence;
234            }
235    
236            /**
237             * Sets the layout set branch persistence.
238             *
239             * @param layoutSetBranchPersistence the layout set branch persistence
240             */
241            public void setLayoutSetBranchPersistence(
242                    LayoutSetBranchPersistence layoutSetBranchPersistence) {
243                    this.layoutSetBranchPersistence = layoutSetBranchPersistence;
244            }
245    
246            /**
247             * Returns the recent layout branch local service.
248             *
249             * @return the recent layout branch local service
250             */
251            public com.liferay.portal.service.RecentLayoutBranchLocalService getRecentLayoutBranchLocalService() {
252                    return recentLayoutBranchLocalService;
253            }
254    
255            /**
256             * Sets the recent layout branch local service.
257             *
258             * @param recentLayoutBranchLocalService the recent layout branch local service
259             */
260            public void setRecentLayoutBranchLocalService(
261                    com.liferay.portal.service.RecentLayoutBranchLocalService recentLayoutBranchLocalService) {
262                    this.recentLayoutBranchLocalService = recentLayoutBranchLocalService;
263            }
264    
265            /**
266             * Returns the recent layout branch persistence.
267             *
268             * @return the recent layout branch persistence
269             */
270            public RecentLayoutBranchPersistence getRecentLayoutBranchPersistence() {
271                    return recentLayoutBranchPersistence;
272            }
273    
274            /**
275             * Sets the recent layout branch persistence.
276             *
277             * @param recentLayoutBranchPersistence the recent layout branch persistence
278             */
279            public void setRecentLayoutBranchPersistence(
280                    RecentLayoutBranchPersistence recentLayoutBranchPersistence) {
281                    this.recentLayoutBranchPersistence = recentLayoutBranchPersistence;
282            }
283    
284            /**
285             * Returns the user local service.
286             *
287             * @return the user local service
288             */
289            public com.liferay.portal.service.UserLocalService getUserLocalService() {
290                    return userLocalService;
291            }
292    
293            /**
294             * Sets the user local service.
295             *
296             * @param userLocalService the user local service
297             */
298            public void setUserLocalService(
299                    com.liferay.portal.service.UserLocalService userLocalService) {
300                    this.userLocalService = userLocalService;
301            }
302    
303            /**
304             * Returns the user remote service.
305             *
306             * @return the user remote service
307             */
308            public com.liferay.portal.service.UserService getUserService() {
309                    return userService;
310            }
311    
312            /**
313             * Sets the user remote service.
314             *
315             * @param userService the user remote service
316             */
317            public void setUserService(
318                    com.liferay.portal.service.UserService userService) {
319                    this.userService = userService;
320            }
321    
322            /**
323             * Returns the user persistence.
324             *
325             * @return the user persistence
326             */
327            public UserPersistence getUserPersistence() {
328                    return userPersistence;
329            }
330    
331            /**
332             * Sets the user persistence.
333             *
334             * @param userPersistence the user persistence
335             */
336            public void setUserPersistence(UserPersistence userPersistence) {
337                    this.userPersistence = userPersistence;
338            }
339    
340            /**
341             * Returns the user finder.
342             *
343             * @return the user finder
344             */
345            public UserFinder getUserFinder() {
346                    return userFinder;
347            }
348    
349            /**
350             * Sets the user finder.
351             *
352             * @param userFinder the user finder
353             */
354            public void setUserFinder(UserFinder userFinder) {
355                    this.userFinder = userFinder;
356            }
357    
358            public void afterPropertiesSet() {
359            }
360    
361            public void destroy() {
362            }
363    
364            /**
365             * Returns the OSGi service identifier.
366             *
367             * @return the OSGi service identifier
368             */
369            @Override
370            public String getOSGiServiceIdentifier() {
371                    return LayoutBranchService.class.getName();
372            }
373    
374            protected Class<?> getModelClass() {
375                    return LayoutBranch.class;
376            }
377    
378            protected String getModelClassName() {
379                    return LayoutBranch.class.getName();
380            }
381    
382            /**
383             * Performs a SQL query.
384             *
385             * @param sql the sql query
386             */
387            protected void runSQL(String sql) {
388                    try {
389                            DataSource dataSource = layoutBranchPersistence.getDataSource();
390    
391                            DB db = DBManagerUtil.getDB();
392    
393                            sql = db.buildSQL(sql);
394                            sql = PortalUtil.transformSQL(sql);
395    
396                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
397                                            sql, new int[0]);
398    
399                            sqlUpdate.update();
400                    }
401                    catch (Exception e) {
402                            throw new SystemException(e);
403                    }
404            }
405    
406            @BeanReference(type = com.liferay.portal.service.LayoutBranchLocalService.class)
407            protected com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService;
408            @BeanReference(type = com.liferay.portal.service.LayoutBranchService.class)
409            protected LayoutBranchService layoutBranchService;
410            @BeanReference(type = LayoutBranchPersistence.class)
411            protected LayoutBranchPersistence layoutBranchPersistence;
412            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
413            protected com.liferay.counter.service.CounterLocalService counterLocalService;
414            @BeanReference(type = com.liferay.portal.service.LayoutRevisionLocalService.class)
415            protected com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService;
416            @BeanReference(type = com.liferay.portal.service.LayoutRevisionService.class)
417            protected com.liferay.portal.service.LayoutRevisionService layoutRevisionService;
418            @BeanReference(type = LayoutRevisionPersistence.class)
419            protected LayoutRevisionPersistence layoutRevisionPersistence;
420            @BeanReference(type = com.liferay.portal.service.LayoutSetBranchLocalService.class)
421            protected com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService;
422            @BeanReference(type = com.liferay.portal.service.LayoutSetBranchService.class)
423            protected com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService;
424            @BeanReference(type = LayoutSetBranchPersistence.class)
425            protected LayoutSetBranchPersistence layoutSetBranchPersistence;
426            @BeanReference(type = com.liferay.portal.service.RecentLayoutBranchLocalService.class)
427            protected com.liferay.portal.service.RecentLayoutBranchLocalService recentLayoutBranchLocalService;
428            @BeanReference(type = RecentLayoutBranchPersistence.class)
429            protected RecentLayoutBranchPersistence recentLayoutBranchPersistence;
430            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
431            protected com.liferay.portal.service.UserLocalService userLocalService;
432            @BeanReference(type = com.liferay.portal.service.UserService.class)
433            protected com.liferay.portal.service.UserService userService;
434            @BeanReference(type = UserPersistence.class)
435            protected UserPersistence userPersistence;
436            @BeanReference(type = UserFinder.class)
437            protected UserFinder userFinder;
438    }