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.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, IdentifiableOSGiService {
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 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(PermissionService permissionService) {
076                    this.permissionService = permissionService;
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            /**
324             * Returns the team local service.
325             *
326             * @return the team local service
327             */
328            public com.liferay.portal.service.TeamLocalService getTeamLocalService() {
329                    return teamLocalService;
330            }
331    
332            /**
333             * Sets the team local service.
334             *
335             * @param teamLocalService the team local service
336             */
337            public void setTeamLocalService(
338                    com.liferay.portal.service.TeamLocalService teamLocalService) {
339                    this.teamLocalService = teamLocalService;
340            }
341    
342            /**
343             * Returns the team remote service.
344             *
345             * @return the team remote service
346             */
347            public com.liferay.portal.service.TeamService getTeamService() {
348                    return teamService;
349            }
350    
351            /**
352             * Sets the team remote service.
353             *
354             * @param teamService the team remote service
355             */
356            public void setTeamService(
357                    com.liferay.portal.service.TeamService teamService) {
358                    this.teamService = teamService;
359            }
360    
361            /**
362             * Returns the team persistence.
363             *
364             * @return the team persistence
365             */
366            public TeamPersistence getTeamPersistence() {
367                    return teamPersistence;
368            }
369    
370            /**
371             * Sets the team persistence.
372             *
373             * @param teamPersistence the team persistence
374             */
375            public void setTeamPersistence(TeamPersistence teamPersistence) {
376                    this.teamPersistence = teamPersistence;
377            }
378    
379            /**
380             * Returns the team finder.
381             *
382             * @return the team finder
383             */
384            public TeamFinder getTeamFinder() {
385                    return teamFinder;
386            }
387    
388            /**
389             * Sets the team finder.
390             *
391             * @param teamFinder the team finder
392             */
393            public void setTeamFinder(TeamFinder teamFinder) {
394                    this.teamFinder = teamFinder;
395            }
396    
397            /**
398             * Returns the user local service.
399             *
400             * @return the user local service
401             */
402            public com.liferay.portal.service.UserLocalService getUserLocalService() {
403                    return userLocalService;
404            }
405    
406            /**
407             * Sets the user local service.
408             *
409             * @param userLocalService the user local service
410             */
411            public void setUserLocalService(
412                    com.liferay.portal.service.UserLocalService userLocalService) {
413                    this.userLocalService = userLocalService;
414            }
415    
416            /**
417             * Returns the user remote service.
418             *
419             * @return the user remote service
420             */
421            public com.liferay.portal.service.UserService getUserService() {
422                    return userService;
423            }
424    
425            /**
426             * Sets the user remote service.
427             *
428             * @param userService the user remote service
429             */
430            public void setUserService(
431                    com.liferay.portal.service.UserService userService) {
432                    this.userService = userService;
433            }
434    
435            /**
436             * Returns the user persistence.
437             *
438             * @return the user persistence
439             */
440            public UserPersistence getUserPersistence() {
441                    return userPersistence;
442            }
443    
444            /**
445             * Sets the user persistence.
446             *
447             * @param userPersistence the user persistence
448             */
449            public void setUserPersistence(UserPersistence userPersistence) {
450                    this.userPersistence = userPersistence;
451            }
452    
453            /**
454             * Returns the user finder.
455             *
456             * @return the user finder
457             */
458            public UserFinder getUserFinder() {
459                    return userFinder;
460            }
461    
462            /**
463             * Sets the user finder.
464             *
465             * @param userFinder the user finder
466             */
467            public void setUserFinder(UserFinder userFinder) {
468                    this.userFinder = userFinder;
469            }
470    
471            public void afterPropertiesSet() {
472            }
473    
474            public void destroy() {
475            }
476    
477            /**
478             * Returns the OSGi service identifier.
479             *
480             * @return the OSGi service identifier
481             */
482            @Override
483            public String getOSGiServiceIdentifier() {
484                    return PermissionService.class.getName();
485            }
486    
487            /**
488             * Performs a SQL query.
489             *
490             * @param sql the sql query
491             */
492            protected void runSQL(String sql) {
493                    try {
494                            DataSource dataSource = InfrastructureUtil.getDataSource();
495    
496                            DB db = DBManagerUtil.getDB();
497    
498                            sql = db.buildSQL(sql);
499                            sql = PortalUtil.transformSQL(sql);
500    
501                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
502                                            sql, new int[0]);
503    
504                            sqlUpdate.update();
505                    }
506                    catch (Exception e) {
507                            throw new SystemException(e);
508                    }
509            }
510    
511            @BeanReference(type = com.liferay.portal.service.PermissionService.class)
512            protected PermissionService permissionService;
513            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
514            protected com.liferay.counter.service.CounterLocalService counterLocalService;
515            @BeanReference(type = com.liferay.portal.service.ResourceBlockLocalService.class)
516            protected com.liferay.portal.service.ResourceBlockLocalService resourceBlockLocalService;
517            @BeanReference(type = com.liferay.portal.service.ResourceBlockService.class)
518            protected com.liferay.portal.service.ResourceBlockService resourceBlockService;
519            @BeanReference(type = ResourceBlockPersistence.class)
520            protected ResourceBlockPersistence resourceBlockPersistence;
521            @BeanReference(type = ResourceBlockFinder.class)
522            protected ResourceBlockFinder resourceBlockFinder;
523            @BeanReference(type = com.liferay.portal.service.ResourcePermissionLocalService.class)
524            protected com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService;
525            @BeanReference(type = com.liferay.portal.service.ResourcePermissionService.class)
526            protected com.liferay.portal.service.ResourcePermissionService resourcePermissionService;
527            @BeanReference(type = ResourcePermissionPersistence.class)
528            protected ResourcePermissionPersistence resourcePermissionPersistence;
529            @BeanReference(type = ResourcePermissionFinder.class)
530            protected ResourcePermissionFinder resourcePermissionFinder;
531            @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
532            protected com.liferay.portal.service.RoleLocalService roleLocalService;
533            @BeanReference(type = com.liferay.portal.service.RoleService.class)
534            protected com.liferay.portal.service.RoleService roleService;
535            @BeanReference(type = RolePersistence.class)
536            protected RolePersistence rolePersistence;
537            @BeanReference(type = RoleFinder.class)
538            protected RoleFinder roleFinder;
539            @BeanReference(type = com.liferay.portal.service.TeamLocalService.class)
540            protected com.liferay.portal.service.TeamLocalService teamLocalService;
541            @BeanReference(type = com.liferay.portal.service.TeamService.class)
542            protected com.liferay.portal.service.TeamService teamService;
543            @BeanReference(type = TeamPersistence.class)
544            protected TeamPersistence teamPersistence;
545            @BeanReference(type = TeamFinder.class)
546            protected TeamFinder teamFinder;
547            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
548            protected com.liferay.portal.service.UserLocalService userLocalService;
549            @BeanReference(type = com.liferay.portal.service.UserService.class)
550            protected com.liferay.portal.service.UserService userService;
551            @BeanReference(type = UserPersistence.class)
552            protected UserPersistence userPersistence;
553            @BeanReference(type = UserFinder.class)
554            protected UserFinder userFinder;
555    }