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.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, IdentifiableBean {
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 com.liferay.portal.service.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(
090                    com.liferay.portal.service.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 user local service.
248             *
249             * @return the user local service
250             */
251            public com.liferay.portal.service.UserLocalService getUserLocalService() {
252                    return userLocalService;
253            }
254    
255            /**
256             * Sets the user local service.
257             *
258             * @param userLocalService the user local service
259             */
260            public void setUserLocalService(
261                    com.liferay.portal.service.UserLocalService userLocalService) {
262                    this.userLocalService = userLocalService;
263            }
264    
265            /**
266             * Returns the user remote service.
267             *
268             * @return the user remote service
269             */
270            public com.liferay.portal.service.UserService getUserService() {
271                    return userService;
272            }
273    
274            /**
275             * Sets the user remote service.
276             *
277             * @param userService the user remote service
278             */
279            public void setUserService(
280                    com.liferay.portal.service.UserService userService) {
281                    this.userService = userService;
282            }
283    
284            /**
285             * Returns the user persistence.
286             *
287             * @return the user persistence
288             */
289            public UserPersistence getUserPersistence() {
290                    return userPersistence;
291            }
292    
293            /**
294             * Sets the user persistence.
295             *
296             * @param userPersistence the user persistence
297             */
298            public void setUserPersistence(UserPersistence userPersistence) {
299                    this.userPersistence = userPersistence;
300            }
301    
302            /**
303             * Returns the user finder.
304             *
305             * @return the user finder
306             */
307            public UserFinder getUserFinder() {
308                    return userFinder;
309            }
310    
311            /**
312             * Sets the user finder.
313             *
314             * @param userFinder the user finder
315             */
316            public void setUserFinder(UserFinder userFinder) {
317                    this.userFinder = userFinder;
318            }
319    
320            public void afterPropertiesSet() {
321            }
322    
323            public void destroy() {
324            }
325    
326            /**
327             * Returns the Spring bean ID for this bean.
328             *
329             * @return the Spring bean ID for this bean
330             */
331            @Override
332            public String getBeanIdentifier() {
333                    return _beanIdentifier;
334            }
335    
336            /**
337             * Sets the Spring bean ID for this bean.
338             *
339             * @param beanIdentifier the Spring bean ID for this bean
340             */
341            @Override
342            public void setBeanIdentifier(String beanIdentifier) {
343                    _beanIdentifier = beanIdentifier;
344            }
345    
346            protected Class<?> getModelClass() {
347                    return LayoutBranch.class;
348            }
349    
350            protected String getModelClassName() {
351                    return LayoutBranch.class.getName();
352            }
353    
354            /**
355             * Performs a SQL query.
356             *
357             * @param sql the sql query
358             */
359            protected void runSQL(String sql) {
360                    try {
361                            DataSource dataSource = layoutBranchPersistence.getDataSource();
362    
363                            DB db = DBFactoryUtil.getDB();
364    
365                            sql = db.buildSQL(sql);
366                            sql = PortalUtil.transformSQL(sql);
367    
368                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
369                                            sql, new int[0]);
370    
371                            sqlUpdate.update();
372                    }
373                    catch (Exception e) {
374                            throw new SystemException(e);
375                    }
376            }
377    
378            @BeanReference(type = com.liferay.portal.service.LayoutBranchLocalService.class)
379            protected com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService;
380            @BeanReference(type = com.liferay.portal.service.LayoutBranchService.class)
381            protected com.liferay.portal.service.LayoutBranchService layoutBranchService;
382            @BeanReference(type = LayoutBranchPersistence.class)
383            protected LayoutBranchPersistence layoutBranchPersistence;
384            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
385            protected com.liferay.counter.service.CounterLocalService counterLocalService;
386            @BeanReference(type = com.liferay.portal.service.LayoutRevisionLocalService.class)
387            protected com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService;
388            @BeanReference(type = com.liferay.portal.service.LayoutRevisionService.class)
389            protected com.liferay.portal.service.LayoutRevisionService layoutRevisionService;
390            @BeanReference(type = LayoutRevisionPersistence.class)
391            protected LayoutRevisionPersistence layoutRevisionPersistence;
392            @BeanReference(type = com.liferay.portal.service.LayoutSetBranchLocalService.class)
393            protected com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService;
394            @BeanReference(type = com.liferay.portal.service.LayoutSetBranchService.class)
395            protected com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService;
396            @BeanReference(type = LayoutSetBranchPersistence.class)
397            protected LayoutSetBranchPersistence layoutSetBranchPersistence;
398            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
399            protected com.liferay.portal.service.UserLocalService userLocalService;
400            @BeanReference(type = com.liferay.portal.service.UserService.class)
401            protected com.liferay.portal.service.UserService userService;
402            @BeanReference(type = UserPersistence.class)
403            protected UserPersistence userPersistence;
404            @BeanReference(type = UserFinder.class)
405            protected UserFinder userFinder;
406            private String _beanIdentifier;
407    }