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.PermissionService;
027    import com.liferay.portal.service.persistence.ResourceBlockFinder;
028    import com.liferay.portal.service.persistence.ResourceBlockPersistence;
029    import com.liferay.portal.service.persistence.ResourcePermissionFinder;
030    import com.liferay.portal.service.persistence.ResourcePermissionPersistence;
031    import com.liferay.portal.service.persistence.RoleFinder;
032    import com.liferay.portal.service.persistence.RolePersistence;
033    import com.liferay.portal.service.persistence.TeamFinder;
034    import com.liferay.portal.service.persistence.TeamPersistence;
035    import com.liferay.portal.service.persistence.UserFinder;
036    import com.liferay.portal.service.persistence.UserPersistence;
037    import com.liferay.portal.util.PortalUtil;
038    
039    import javax.sql.DataSource;
040    
041    /**
042     * Provides the base implementation for the permission remote service.
043     *
044     * <p>
045     * 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.PermissionServiceImpl}.
046     * </p>
047     *
048     * @author Brian Wing Shun Chan
049     * @see com.liferay.portal.service.impl.PermissionServiceImpl
050     * @see com.liferay.portal.service.PermissionServiceUtil
051     * @generated
052     */
053    public abstract class PermissionServiceBaseImpl extends BaseServiceImpl
054            implements PermissionService, IdentifiableBean {
055            /*
056             * NOTE FOR DEVELOPERS:
057             *
058             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.PermissionServiceUtil} to access the permission remote service.
059             */
060    
061            /**
062             * Returns the permission remote service.
063             *
064             * @return the permission remote service
065             */
066            public com.liferay.portal.service.PermissionService getPermissionService() {
067                    return permissionService;
068            }
069    
070            /**
071             * Sets the permission remote service.
072             *
073             * @param permissionService the permission remote service
074             */
075            public void setPermissionService(
076                    com.liferay.portal.service.PermissionService permissionService) {
077                    this.permissionService = permissionService;
078            }
079    
080            /**
081             * Returns the counter local service.
082             *
083             * @return the counter local service
084             */
085            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
086                    return counterLocalService;
087            }
088    
089            /**
090             * Sets the counter local service.
091             *
092             * @param counterLocalService the counter local service
093             */
094            public void setCounterLocalService(
095                    com.liferay.counter.service.CounterLocalService counterLocalService) {
096                    this.counterLocalService = counterLocalService;
097            }
098    
099            /**
100             * Returns the resource block local service.
101             *
102             * @return the resource block local service
103             */
104            public com.liferay.portal.service.ResourceBlockLocalService getResourceBlockLocalService() {
105                    return resourceBlockLocalService;
106            }
107    
108            /**
109             * Sets the resource block local service.
110             *
111             * @param resourceBlockLocalService the resource block local service
112             */
113            public void setResourceBlockLocalService(
114                    com.liferay.portal.service.ResourceBlockLocalService resourceBlockLocalService) {
115                    this.resourceBlockLocalService = resourceBlockLocalService;
116            }
117    
118            /**
119             * Returns the resource block remote service.
120             *
121             * @return the resource block remote service
122             */
123            public com.liferay.portal.service.ResourceBlockService getResourceBlockService() {
124                    return resourceBlockService;
125            }
126    
127            /**
128             * Sets the resource block remote service.
129             *
130             * @param resourceBlockService the resource block remote service
131             */
132            public void setResourceBlockService(
133                    com.liferay.portal.service.ResourceBlockService resourceBlockService) {
134                    this.resourceBlockService = resourceBlockService;
135            }
136    
137            /**
138             * Returns the resource block persistence.
139             *
140             * @return the resource block persistence
141             */
142            public ResourceBlockPersistence getResourceBlockPersistence() {
143                    return resourceBlockPersistence;
144            }
145    
146            /**
147             * Sets the resource block persistence.
148             *
149             * @param resourceBlockPersistence the resource block persistence
150             */
151            public void setResourceBlockPersistence(
152                    ResourceBlockPersistence resourceBlockPersistence) {
153                    this.resourceBlockPersistence = resourceBlockPersistence;
154            }
155    
156            /**
157             * Returns the resource block finder.
158             *
159             * @return the resource block finder
160             */
161            public ResourceBlockFinder getResourceBlockFinder() {
162                    return resourceBlockFinder;
163            }
164    
165            /**
166             * Sets the resource block finder.
167             *
168             * @param resourceBlockFinder the resource block finder
169             */
170            public void setResourceBlockFinder(ResourceBlockFinder resourceBlockFinder) {
171                    this.resourceBlockFinder = resourceBlockFinder;
172            }
173    
174            /**
175             * Returns the resource permission local service.
176             *
177             * @return the resource permission local service
178             */
179            public com.liferay.portal.service.ResourcePermissionLocalService getResourcePermissionLocalService() {
180                    return resourcePermissionLocalService;
181            }
182    
183            /**
184             * Sets the resource permission local service.
185             *
186             * @param resourcePermissionLocalService the resource permission local service
187             */
188            public void setResourcePermissionLocalService(
189                    com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService) {
190                    this.resourcePermissionLocalService = resourcePermissionLocalService;
191            }
192    
193            /**
194             * Returns the resource permission remote service.
195             *
196             * @return the resource permission remote service
197             */
198            public com.liferay.portal.service.ResourcePermissionService getResourcePermissionService() {
199                    return resourcePermissionService;
200            }
201    
202            /**
203             * Sets the resource permission remote service.
204             *
205             * @param resourcePermissionService the resource permission remote service
206             */
207            public void setResourcePermissionService(
208                    com.liferay.portal.service.ResourcePermissionService resourcePermissionService) {
209                    this.resourcePermissionService = resourcePermissionService;
210            }
211    
212            /**
213             * Returns the resource permission persistence.
214             *
215             * @return the resource permission persistence
216             */
217            public ResourcePermissionPersistence getResourcePermissionPersistence() {
218                    return resourcePermissionPersistence;
219            }
220    
221            /**
222             * Sets the resource permission persistence.
223             *
224             * @param resourcePermissionPersistence the resource permission persistence
225             */
226            public void setResourcePermissionPersistence(
227                    ResourcePermissionPersistence resourcePermissionPersistence) {
228                    this.resourcePermissionPersistence = resourcePermissionPersistence;
229            }
230    
231            /**
232             * Returns the resource permission finder.
233             *
234             * @return the resource permission finder
235             */
236            public ResourcePermissionFinder getResourcePermissionFinder() {
237                    return resourcePermissionFinder;
238            }
239    
240            /**
241             * Sets the resource permission finder.
242             *
243             * @param resourcePermissionFinder the resource permission finder
244             */
245            public void setResourcePermissionFinder(
246                    ResourcePermissionFinder resourcePermissionFinder) {
247                    this.resourcePermissionFinder = resourcePermissionFinder;
248            }
249    
250            /**
251             * Returns the role local service.
252             *
253             * @return the role local service
254             */
255            public com.liferay.portal.service.RoleLocalService getRoleLocalService() {
256                    return roleLocalService;
257            }
258    
259            /**
260             * Sets the role local service.
261             *
262             * @param roleLocalService the role local service
263             */
264            public void setRoleLocalService(
265                    com.liferay.portal.service.RoleLocalService roleLocalService) {
266                    this.roleLocalService = roleLocalService;
267            }
268    
269            /**
270             * Returns the role remote service.
271             *
272             * @return the role remote service
273             */
274            public com.liferay.portal.service.RoleService getRoleService() {
275                    return roleService;
276            }
277    
278            /**
279             * Sets the role remote service.
280             *
281             * @param roleService the role remote service
282             */
283            public void setRoleService(
284                    com.liferay.portal.service.RoleService roleService) {
285                    this.roleService = roleService;
286            }
287    
288            /**
289             * Returns the role persistence.
290             *
291             * @return the role persistence
292             */
293            public RolePersistence getRolePersistence() {
294                    return rolePersistence;
295            }
296    
297            /**
298             * Sets the role persistence.
299             *
300             * @param rolePersistence the role persistence
301             */
302            public void setRolePersistence(RolePersistence rolePersistence) {
303                    this.rolePersistence = rolePersistence;
304            }
305    
306            /**
307             * Returns the role finder.
308             *
309             * @return the role finder
310             */
311            public RoleFinder getRoleFinder() {
312                    return roleFinder;
313            }
314    
315            /**
316             * Sets the role finder.
317             *
318             * @param roleFinder the role finder
319             */
320            public void setRoleFinder(RoleFinder roleFinder) {
321                    this.roleFinder = roleFinder;
322            }
323    
324            /**
325             * Returns the team local service.
326             *
327             * @return the team local service
328             */
329            public com.liferay.portal.service.TeamLocalService getTeamLocalService() {
330                    return teamLocalService;
331            }
332    
333            /**
334             * Sets the team local service.
335             *
336             * @param teamLocalService the team local service
337             */
338            public void setTeamLocalService(
339                    com.liferay.portal.service.TeamLocalService teamLocalService) {
340                    this.teamLocalService = teamLocalService;
341            }
342    
343            /**
344             * Returns the team remote service.
345             *
346             * @return the team remote service
347             */
348            public com.liferay.portal.service.TeamService getTeamService() {
349                    return teamService;
350            }
351    
352            /**
353             * Sets the team remote service.
354             *
355             * @param teamService the team remote service
356             */
357            public void setTeamService(
358                    com.liferay.portal.service.TeamService teamService) {
359                    this.teamService = teamService;
360            }
361    
362            /**
363             * Returns the team persistence.
364             *
365             * @return the team persistence
366             */
367            public TeamPersistence getTeamPersistence() {
368                    return teamPersistence;
369            }
370    
371            /**
372             * Sets the team persistence.
373             *
374             * @param teamPersistence the team persistence
375             */
376            public void setTeamPersistence(TeamPersistence teamPersistence) {
377                    this.teamPersistence = teamPersistence;
378            }
379    
380            /**
381             * Returns the team finder.
382             *
383             * @return the team finder
384             */
385            public TeamFinder getTeamFinder() {
386                    return teamFinder;
387            }
388    
389            /**
390             * Sets the team finder.
391             *
392             * @param teamFinder the team finder
393             */
394            public void setTeamFinder(TeamFinder teamFinder) {
395                    this.teamFinder = teamFinder;
396            }
397    
398            /**
399             * Returns the user local service.
400             *
401             * @return the user local service
402             */
403            public com.liferay.portal.service.UserLocalService getUserLocalService() {
404                    return userLocalService;
405            }
406    
407            /**
408             * Sets the user local service.
409             *
410             * @param userLocalService the user local service
411             */
412            public void setUserLocalService(
413                    com.liferay.portal.service.UserLocalService userLocalService) {
414                    this.userLocalService = userLocalService;
415            }
416    
417            /**
418             * Returns the user remote service.
419             *
420             * @return the user remote service
421             */
422            public com.liferay.portal.service.UserService getUserService() {
423                    return userService;
424            }
425    
426            /**
427             * Sets the user remote service.
428             *
429             * @param userService the user remote service
430             */
431            public void setUserService(
432                    com.liferay.portal.service.UserService userService) {
433                    this.userService = userService;
434            }
435    
436            /**
437             * Returns the user persistence.
438             *
439             * @return the user persistence
440             */
441            public UserPersistence getUserPersistence() {
442                    return userPersistence;
443            }
444    
445            /**
446             * Sets the user persistence.
447             *
448             * @param userPersistence the user persistence
449             */
450            public void setUserPersistence(UserPersistence userPersistence) {
451                    this.userPersistence = userPersistence;
452            }
453    
454            /**
455             * Returns the user finder.
456             *
457             * @return the user finder
458             */
459            public UserFinder getUserFinder() {
460                    return userFinder;
461            }
462    
463            /**
464             * Sets the user finder.
465             *
466             * @param userFinder the user finder
467             */
468            public void setUserFinder(UserFinder userFinder) {
469                    this.userFinder = userFinder;
470            }
471    
472            public void afterPropertiesSet() {
473            }
474    
475            public void destroy() {
476            }
477    
478            /**
479             * Returns the Spring bean ID for this bean.
480             *
481             * @return the Spring bean ID for this bean
482             */
483            @Override
484            public String getBeanIdentifier() {
485                    return _beanIdentifier;
486            }
487    
488            /**
489             * Sets the Spring bean ID for this bean.
490             *
491             * @param beanIdentifier the Spring bean ID for this bean
492             */
493            @Override
494            public void setBeanIdentifier(String beanIdentifier) {
495                    _beanIdentifier = beanIdentifier;
496            }
497    
498            /**
499             * Performs a SQL query.
500             *
501             * @param sql the sql query
502             */
503            protected void runSQL(String sql) {
504                    try {
505                            DataSource dataSource = InfrastructureUtil.getDataSource();
506    
507                            DB db = DBFactoryUtil.getDB();
508    
509                            sql = db.buildSQL(sql);
510                            sql = PortalUtil.transformSQL(sql);
511    
512                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
513                                            sql, new int[0]);
514    
515                            sqlUpdate.update();
516                    }
517                    catch (Exception e) {
518                            throw new SystemException(e);
519                    }
520            }
521    
522            @BeanReference(type = com.liferay.portal.service.PermissionService.class)
523            protected com.liferay.portal.service.PermissionService permissionService;
524            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
525            protected com.liferay.counter.service.CounterLocalService counterLocalService;
526            @BeanReference(type = com.liferay.portal.service.ResourceBlockLocalService.class)
527            protected com.liferay.portal.service.ResourceBlockLocalService resourceBlockLocalService;
528            @BeanReference(type = com.liferay.portal.service.ResourceBlockService.class)
529            protected com.liferay.portal.service.ResourceBlockService resourceBlockService;
530            @BeanReference(type = ResourceBlockPersistence.class)
531            protected ResourceBlockPersistence resourceBlockPersistence;
532            @BeanReference(type = ResourceBlockFinder.class)
533            protected ResourceBlockFinder resourceBlockFinder;
534            @BeanReference(type = com.liferay.portal.service.ResourcePermissionLocalService.class)
535            protected com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService;
536            @BeanReference(type = com.liferay.portal.service.ResourcePermissionService.class)
537            protected com.liferay.portal.service.ResourcePermissionService resourcePermissionService;
538            @BeanReference(type = ResourcePermissionPersistence.class)
539            protected ResourcePermissionPersistence resourcePermissionPersistence;
540            @BeanReference(type = ResourcePermissionFinder.class)
541            protected ResourcePermissionFinder resourcePermissionFinder;
542            @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
543            protected com.liferay.portal.service.RoleLocalService roleLocalService;
544            @BeanReference(type = com.liferay.portal.service.RoleService.class)
545            protected com.liferay.portal.service.RoleService roleService;
546            @BeanReference(type = RolePersistence.class)
547            protected RolePersistence rolePersistence;
548            @BeanReference(type = RoleFinder.class)
549            protected RoleFinder roleFinder;
550            @BeanReference(type = com.liferay.portal.service.TeamLocalService.class)
551            protected com.liferay.portal.service.TeamLocalService teamLocalService;
552            @BeanReference(type = com.liferay.portal.service.TeamService.class)
553            protected com.liferay.portal.service.TeamService teamService;
554            @BeanReference(type = TeamPersistence.class)
555            protected TeamPersistence teamPersistence;
556            @BeanReference(type = TeamFinder.class)
557            protected TeamFinder teamFinder;
558            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
559            protected com.liferay.portal.service.UserLocalService userLocalService;
560            @BeanReference(type = com.liferay.portal.service.UserService.class)
561            protected com.liferay.portal.service.UserService userService;
562            @BeanReference(type = UserPersistence.class)
563            protected UserPersistence userPersistence;
564            @BeanReference(type = UserFinder.class)
565            protected UserFinder userFinder;
566            private String _beanIdentifier;
567    }