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