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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.exception.SystemException;
026    import com.liferay.portal.kernel.util.InfrastructureUtil;
027    import com.liferay.portal.service.BaseLocalServiceImpl;
028    import com.liferay.portal.service.ResourceLocalService;
029    import com.liferay.portal.service.persistence.ResourceBlockFinder;
030    import com.liferay.portal.service.persistence.ResourceBlockPersistence;
031    import com.liferay.portal.service.persistence.ResourcePermissionFinder;
032    import com.liferay.portal.service.persistence.ResourcePermissionPersistence;
033    import com.liferay.portal.service.persistence.RoleFinder;
034    import com.liferay.portal.service.persistence.RolePersistence;
035    import com.liferay.portal.util.PortalUtil;
036    
037    import javax.sql.DataSource;
038    
039    /**
040     * Provides the base implementation for the resource local service.
041     *
042     * <p>
043     * 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.ResourceLocalServiceImpl}.
044     * </p>
045     *
046     * @author Brian Wing Shun Chan
047     * @see com.liferay.portal.service.impl.ResourceLocalServiceImpl
048     * @see com.liferay.portal.service.ResourceLocalServiceUtil
049     * @generated
050     */
051    @ProviderType
052    public abstract class ResourceLocalServiceBaseImpl extends BaseLocalServiceImpl
053            implements ResourceLocalService, IdentifiableBean {
054            /*
055             * NOTE FOR DEVELOPERS:
056             *
057             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.ResourceLocalServiceUtil} to access the resource local service.
058             */
059    
060            /**
061             * Returns the resource local service.
062             *
063             * @return the resource local service
064             */
065            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
066                    return resourceLocalService;
067            }
068    
069            /**
070             * Sets the resource local service.
071             *
072             * @param resourceLocalService the resource local service
073             */
074            public void setResourceLocalService(
075                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
076                    this.resourceLocalService = resourceLocalService;
077            }
078    
079            /**
080             * Returns the counter local service.
081             *
082             * @return the counter local service
083             */
084            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
085                    return counterLocalService;
086            }
087    
088            /**
089             * Sets the counter local service.
090             *
091             * @param counterLocalService the counter local service
092             */
093            public void setCounterLocalService(
094                    com.liferay.counter.service.CounterLocalService counterLocalService) {
095                    this.counterLocalService = counterLocalService;
096            }
097    
098            /**
099             * Returns the resource block local service.
100             *
101             * @return the resource block local service
102             */
103            public com.liferay.portal.service.ResourceBlockLocalService getResourceBlockLocalService() {
104                    return resourceBlockLocalService;
105            }
106    
107            /**
108             * Sets the resource block local service.
109             *
110             * @param resourceBlockLocalService the resource block local service
111             */
112            public void setResourceBlockLocalService(
113                    com.liferay.portal.service.ResourceBlockLocalService resourceBlockLocalService) {
114                    this.resourceBlockLocalService = resourceBlockLocalService;
115            }
116    
117            /**
118             * Returns the resource block remote service.
119             *
120             * @return the resource block remote service
121             */
122            public com.liferay.portal.service.ResourceBlockService getResourceBlockService() {
123                    return resourceBlockService;
124            }
125    
126            /**
127             * Sets the resource block remote service.
128             *
129             * @param resourceBlockService the resource block remote service
130             */
131            public void setResourceBlockService(
132                    com.liferay.portal.service.ResourceBlockService resourceBlockService) {
133                    this.resourceBlockService = resourceBlockService;
134            }
135    
136            /**
137             * Returns the resource block persistence.
138             *
139             * @return the resource block persistence
140             */
141            public ResourceBlockPersistence getResourceBlockPersistence() {
142                    return resourceBlockPersistence;
143            }
144    
145            /**
146             * Sets the resource block persistence.
147             *
148             * @param resourceBlockPersistence the resource block persistence
149             */
150            public void setResourceBlockPersistence(
151                    ResourceBlockPersistence resourceBlockPersistence) {
152                    this.resourceBlockPersistence = resourceBlockPersistence;
153            }
154    
155            /**
156             * Returns the resource block finder.
157             *
158             * @return the resource block finder
159             */
160            public ResourceBlockFinder getResourceBlockFinder() {
161                    return resourceBlockFinder;
162            }
163    
164            /**
165             * Sets the resource block finder.
166             *
167             * @param resourceBlockFinder the resource block finder
168             */
169            public void setResourceBlockFinder(ResourceBlockFinder resourceBlockFinder) {
170                    this.resourceBlockFinder = resourceBlockFinder;
171            }
172    
173            /**
174             * Returns the resource permission local service.
175             *
176             * @return the resource permission local service
177             */
178            public com.liferay.portal.service.ResourcePermissionLocalService getResourcePermissionLocalService() {
179                    return resourcePermissionLocalService;
180            }
181    
182            /**
183             * Sets the resource permission local service.
184             *
185             * @param resourcePermissionLocalService the resource permission local service
186             */
187            public void setResourcePermissionLocalService(
188                    com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService) {
189                    this.resourcePermissionLocalService = resourcePermissionLocalService;
190            }
191    
192            /**
193             * Returns the resource permission remote service.
194             *
195             * @return the resource permission remote service
196             */
197            public com.liferay.portal.service.ResourcePermissionService getResourcePermissionService() {
198                    return resourcePermissionService;
199            }
200    
201            /**
202             * Sets the resource permission remote service.
203             *
204             * @param resourcePermissionService the resource permission remote service
205             */
206            public void setResourcePermissionService(
207                    com.liferay.portal.service.ResourcePermissionService resourcePermissionService) {
208                    this.resourcePermissionService = resourcePermissionService;
209            }
210    
211            /**
212             * Returns the resource permission persistence.
213             *
214             * @return the resource permission persistence
215             */
216            public ResourcePermissionPersistence getResourcePermissionPersistence() {
217                    return resourcePermissionPersistence;
218            }
219    
220            /**
221             * Sets the resource permission persistence.
222             *
223             * @param resourcePermissionPersistence the resource permission persistence
224             */
225            public void setResourcePermissionPersistence(
226                    ResourcePermissionPersistence resourcePermissionPersistence) {
227                    this.resourcePermissionPersistence = resourcePermissionPersistence;
228            }
229    
230            /**
231             * Returns the resource permission finder.
232             *
233             * @return the resource permission finder
234             */
235            public ResourcePermissionFinder getResourcePermissionFinder() {
236                    return resourcePermissionFinder;
237            }
238    
239            /**
240             * Sets the resource permission finder.
241             *
242             * @param resourcePermissionFinder the resource permission finder
243             */
244            public void setResourcePermissionFinder(
245                    ResourcePermissionFinder resourcePermissionFinder) {
246                    this.resourcePermissionFinder = resourcePermissionFinder;
247            }
248    
249            /**
250             * Returns the role local service.
251             *
252             * @return the role local service
253             */
254            public com.liferay.portal.service.RoleLocalService getRoleLocalService() {
255                    return roleLocalService;
256            }
257    
258            /**
259             * Sets the role local service.
260             *
261             * @param roleLocalService the role local service
262             */
263            public void setRoleLocalService(
264                    com.liferay.portal.service.RoleLocalService roleLocalService) {
265                    this.roleLocalService = roleLocalService;
266            }
267    
268            /**
269             * Returns the role remote service.
270             *
271             * @return the role remote service
272             */
273            public com.liferay.portal.service.RoleService getRoleService() {
274                    return roleService;
275            }
276    
277            /**
278             * Sets the role remote service.
279             *
280             * @param roleService the role remote service
281             */
282            public void setRoleService(
283                    com.liferay.portal.service.RoleService roleService) {
284                    this.roleService = roleService;
285            }
286    
287            /**
288             * Returns the role persistence.
289             *
290             * @return the role persistence
291             */
292            public RolePersistence getRolePersistence() {
293                    return rolePersistence;
294            }
295    
296            /**
297             * Sets the role persistence.
298             *
299             * @param rolePersistence the role persistence
300             */
301            public void setRolePersistence(RolePersistence rolePersistence) {
302                    this.rolePersistence = rolePersistence;
303            }
304    
305            /**
306             * Returns the role finder.
307             *
308             * @return the role finder
309             */
310            public RoleFinder getRoleFinder() {
311                    return roleFinder;
312            }
313    
314            /**
315             * Sets the role finder.
316             *
317             * @param roleFinder the role finder
318             */
319            public void setRoleFinder(RoleFinder roleFinder) {
320                    this.roleFinder = roleFinder;
321            }
322    
323            public void afterPropertiesSet() {
324            }
325    
326            public void destroy() {
327            }
328    
329            /**
330             * Returns the Spring bean ID for this bean.
331             *
332             * @return the Spring bean ID for this bean
333             */
334            @Override
335            public String getBeanIdentifier() {
336                    return _beanIdentifier;
337            }
338    
339            /**
340             * Sets the Spring bean ID for this bean.
341             *
342             * @param beanIdentifier the Spring bean ID for this bean
343             */
344            @Override
345            public void setBeanIdentifier(String beanIdentifier) {
346                    _beanIdentifier = beanIdentifier;
347            }
348    
349            /**
350             * Performs a SQL query.
351             *
352             * @param sql the sql query
353             */
354            protected void runSQL(String sql) {
355                    try {
356                            DataSource dataSource = InfrastructureUtil.getDataSource();
357    
358                            DB db = DBFactoryUtil.getDB();
359    
360                            sql = db.buildSQL(sql);
361                            sql = PortalUtil.transformSQL(sql);
362    
363                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
364                                            sql, new int[0]);
365    
366                            sqlUpdate.update();
367                    }
368                    catch (Exception e) {
369                            throw new SystemException(e);
370                    }
371            }
372    
373            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
374            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
375            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
376            protected com.liferay.counter.service.CounterLocalService counterLocalService;
377            @BeanReference(type = com.liferay.portal.service.ResourceBlockLocalService.class)
378            protected com.liferay.portal.service.ResourceBlockLocalService resourceBlockLocalService;
379            @BeanReference(type = com.liferay.portal.service.ResourceBlockService.class)
380            protected com.liferay.portal.service.ResourceBlockService resourceBlockService;
381            @BeanReference(type = ResourceBlockPersistence.class)
382            protected ResourceBlockPersistence resourceBlockPersistence;
383            @BeanReference(type = ResourceBlockFinder.class)
384            protected ResourceBlockFinder resourceBlockFinder;
385            @BeanReference(type = com.liferay.portal.service.ResourcePermissionLocalService.class)
386            protected com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService;
387            @BeanReference(type = com.liferay.portal.service.ResourcePermissionService.class)
388            protected com.liferay.portal.service.ResourcePermissionService resourcePermissionService;
389            @BeanReference(type = ResourcePermissionPersistence.class)
390            protected ResourcePermissionPersistence resourcePermissionPersistence;
391            @BeanReference(type = ResourcePermissionFinder.class)
392            protected ResourcePermissionFinder resourcePermissionFinder;
393            @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
394            protected com.liferay.portal.service.RoleLocalService roleLocalService;
395            @BeanReference(type = com.liferay.portal.service.RoleService.class)
396            protected com.liferay.portal.service.RoleService roleService;
397            @BeanReference(type = RolePersistence.class)
398            protected RolePersistence rolePersistence;
399            @BeanReference(type = RoleFinder.class)
400            protected RoleFinder roleFinder;
401            private String _beanIdentifier;
402    }