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.model.UserGroupRole;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.UserGroupRoleService;
027    import com.liferay.portal.service.persistence.GroupFinder;
028    import com.liferay.portal.service.persistence.GroupPersistence;
029    import com.liferay.portal.service.persistence.RoleFinder;
030    import com.liferay.portal.service.persistence.RolePersistence;
031    import com.liferay.portal.service.persistence.UserFinder;
032    import com.liferay.portal.service.persistence.UserGroupRoleFinder;
033    import com.liferay.portal.service.persistence.UserGroupRolePersistence;
034    import com.liferay.portal.service.persistence.UserPersistence;
035    import com.liferay.portal.util.PortalUtil;
036    
037    import javax.sql.DataSource;
038    
039    /**
040     * Provides the base implementation for the user group role remote 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.UserGroupRoleServiceImpl}.
044     * </p>
045     *
046     * @author Brian Wing Shun Chan
047     * @see com.liferay.portal.service.impl.UserGroupRoleServiceImpl
048     * @see com.liferay.portal.service.UserGroupRoleServiceUtil
049     * @generated
050     */
051    public abstract class UserGroupRoleServiceBaseImpl extends BaseServiceImpl
052            implements UserGroupRoleService, IdentifiableOSGiService {
053            /*
054             * NOTE FOR DEVELOPERS:
055             *
056             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.UserGroupRoleServiceUtil} to access the user group role remote service.
057             */
058    
059            /**
060             * Returns the user group role local service.
061             *
062             * @return the user group role local service
063             */
064            public com.liferay.portal.service.UserGroupRoleLocalService getUserGroupRoleLocalService() {
065                    return userGroupRoleLocalService;
066            }
067    
068            /**
069             * Sets the user group role local service.
070             *
071             * @param userGroupRoleLocalService the user group role local service
072             */
073            public void setUserGroupRoleLocalService(
074                    com.liferay.portal.service.UserGroupRoleLocalService userGroupRoleLocalService) {
075                    this.userGroupRoleLocalService = userGroupRoleLocalService;
076            }
077    
078            /**
079             * Returns the user group role remote service.
080             *
081             * @return the user group role remote service
082             */
083            public UserGroupRoleService getUserGroupRoleService() {
084                    return userGroupRoleService;
085            }
086    
087            /**
088             * Sets the user group role remote service.
089             *
090             * @param userGroupRoleService the user group role remote service
091             */
092            public void setUserGroupRoleService(
093                    UserGroupRoleService userGroupRoleService) {
094                    this.userGroupRoleService = userGroupRoleService;
095            }
096    
097            /**
098             * Returns the user group role persistence.
099             *
100             * @return the user group role persistence
101             */
102            public UserGroupRolePersistence getUserGroupRolePersistence() {
103                    return userGroupRolePersistence;
104            }
105    
106            /**
107             * Sets the user group role persistence.
108             *
109             * @param userGroupRolePersistence the user group role persistence
110             */
111            public void setUserGroupRolePersistence(
112                    UserGroupRolePersistence userGroupRolePersistence) {
113                    this.userGroupRolePersistence = userGroupRolePersistence;
114            }
115    
116            /**
117             * Returns the user group role finder.
118             *
119             * @return the user group role finder
120             */
121            public UserGroupRoleFinder getUserGroupRoleFinder() {
122                    return userGroupRoleFinder;
123            }
124    
125            /**
126             * Sets the user group role finder.
127             *
128             * @param userGroupRoleFinder the user group role finder
129             */
130            public void setUserGroupRoleFinder(UserGroupRoleFinder userGroupRoleFinder) {
131                    this.userGroupRoleFinder = userGroupRoleFinder;
132            }
133    
134            /**
135             * Returns the counter local service.
136             *
137             * @return the counter local service
138             */
139            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
140                    return counterLocalService;
141            }
142    
143            /**
144             * Sets the counter local service.
145             *
146             * @param counterLocalService the counter local service
147             */
148            public void setCounterLocalService(
149                    com.liferay.counter.service.CounterLocalService counterLocalService) {
150                    this.counterLocalService = counterLocalService;
151            }
152    
153            /**
154             * Returns the group local service.
155             *
156             * @return the group local service
157             */
158            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
159                    return groupLocalService;
160            }
161    
162            /**
163             * Sets the group local service.
164             *
165             * @param groupLocalService the group local service
166             */
167            public void setGroupLocalService(
168                    com.liferay.portal.service.GroupLocalService groupLocalService) {
169                    this.groupLocalService = groupLocalService;
170            }
171    
172            /**
173             * Returns the group remote service.
174             *
175             * @return the group remote service
176             */
177            public com.liferay.portal.service.GroupService getGroupService() {
178                    return groupService;
179            }
180    
181            /**
182             * Sets the group remote service.
183             *
184             * @param groupService the group remote service
185             */
186            public void setGroupService(
187                    com.liferay.portal.service.GroupService groupService) {
188                    this.groupService = groupService;
189            }
190    
191            /**
192             * Returns the group persistence.
193             *
194             * @return the group persistence
195             */
196            public GroupPersistence getGroupPersistence() {
197                    return groupPersistence;
198            }
199    
200            /**
201             * Sets the group persistence.
202             *
203             * @param groupPersistence the group persistence
204             */
205            public void setGroupPersistence(GroupPersistence groupPersistence) {
206                    this.groupPersistence = groupPersistence;
207            }
208    
209            /**
210             * Returns the group finder.
211             *
212             * @return the group finder
213             */
214            public GroupFinder getGroupFinder() {
215                    return groupFinder;
216            }
217    
218            /**
219             * Sets the group finder.
220             *
221             * @param groupFinder the group finder
222             */
223            public void setGroupFinder(GroupFinder groupFinder) {
224                    this.groupFinder = groupFinder;
225            }
226    
227            /**
228             * Returns the role local service.
229             *
230             * @return the role local service
231             */
232            public com.liferay.portal.service.RoleLocalService getRoleLocalService() {
233                    return roleLocalService;
234            }
235    
236            /**
237             * Sets the role local service.
238             *
239             * @param roleLocalService the role local service
240             */
241            public void setRoleLocalService(
242                    com.liferay.portal.service.RoleLocalService roleLocalService) {
243                    this.roleLocalService = roleLocalService;
244            }
245    
246            /**
247             * Returns the role remote service.
248             *
249             * @return the role remote service
250             */
251            public com.liferay.portal.service.RoleService getRoleService() {
252                    return roleService;
253            }
254    
255            /**
256             * Sets the role remote service.
257             *
258             * @param roleService the role remote service
259             */
260            public void setRoleService(
261                    com.liferay.portal.service.RoleService roleService) {
262                    this.roleService = roleService;
263            }
264    
265            /**
266             * Returns the role persistence.
267             *
268             * @return the role persistence
269             */
270            public RolePersistence getRolePersistence() {
271                    return rolePersistence;
272            }
273    
274            /**
275             * Sets the role persistence.
276             *
277             * @param rolePersistence the role persistence
278             */
279            public void setRolePersistence(RolePersistence rolePersistence) {
280                    this.rolePersistence = rolePersistence;
281            }
282    
283            /**
284             * Returns the role finder.
285             *
286             * @return the role finder
287             */
288            public RoleFinder getRoleFinder() {
289                    return roleFinder;
290            }
291    
292            /**
293             * Sets the role finder.
294             *
295             * @param roleFinder the role finder
296             */
297            public void setRoleFinder(RoleFinder roleFinder) {
298                    this.roleFinder = roleFinder;
299            }
300    
301            /**
302             * Returns the user local service.
303             *
304             * @return the user local service
305             */
306            public com.liferay.portal.service.UserLocalService getUserLocalService() {
307                    return userLocalService;
308            }
309    
310            /**
311             * Sets the user local service.
312             *
313             * @param userLocalService the user local service
314             */
315            public void setUserLocalService(
316                    com.liferay.portal.service.UserLocalService userLocalService) {
317                    this.userLocalService = userLocalService;
318            }
319    
320            /**
321             * Returns the user remote service.
322             *
323             * @return the user remote service
324             */
325            public com.liferay.portal.service.UserService getUserService() {
326                    return userService;
327            }
328    
329            /**
330             * Sets the user remote service.
331             *
332             * @param userService the user remote service
333             */
334            public void setUserService(
335                    com.liferay.portal.service.UserService userService) {
336                    this.userService = userService;
337            }
338    
339            /**
340             * Returns the user persistence.
341             *
342             * @return the user persistence
343             */
344            public UserPersistence getUserPersistence() {
345                    return userPersistence;
346            }
347    
348            /**
349             * Sets the user persistence.
350             *
351             * @param userPersistence the user persistence
352             */
353            public void setUserPersistence(UserPersistence userPersistence) {
354                    this.userPersistence = userPersistence;
355            }
356    
357            /**
358             * Returns the user finder.
359             *
360             * @return the user finder
361             */
362            public UserFinder getUserFinder() {
363                    return userFinder;
364            }
365    
366            /**
367             * Sets the user finder.
368             *
369             * @param userFinder the user finder
370             */
371            public void setUserFinder(UserFinder userFinder) {
372                    this.userFinder = userFinder;
373            }
374    
375            public void afterPropertiesSet() {
376            }
377    
378            public void destroy() {
379            }
380    
381            /**
382             * Returns the OSGi service identifier.
383             *
384             * @return the OSGi service identifier
385             */
386            @Override
387            public String getOSGiServiceIdentifier() {
388                    return UserGroupRoleService.class.getName();
389            }
390    
391            protected Class<?> getModelClass() {
392                    return UserGroupRole.class;
393            }
394    
395            protected String getModelClassName() {
396                    return UserGroupRole.class.getName();
397            }
398    
399            /**
400             * Performs a SQL query.
401             *
402             * @param sql the sql query
403             */
404            protected void runSQL(String sql) {
405                    try {
406                            DataSource dataSource = userGroupRolePersistence.getDataSource();
407    
408                            DB db = DBManagerUtil.getDB();
409    
410                            sql = db.buildSQL(sql);
411                            sql = PortalUtil.transformSQL(sql);
412    
413                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
414                                            sql, new int[0]);
415    
416                            sqlUpdate.update();
417                    }
418                    catch (Exception e) {
419                            throw new SystemException(e);
420                    }
421            }
422    
423            @BeanReference(type = com.liferay.portal.service.UserGroupRoleLocalService.class)
424            protected com.liferay.portal.service.UserGroupRoleLocalService userGroupRoleLocalService;
425            @BeanReference(type = com.liferay.portal.service.UserGroupRoleService.class)
426            protected UserGroupRoleService userGroupRoleService;
427            @BeanReference(type = UserGroupRolePersistence.class)
428            protected UserGroupRolePersistence userGroupRolePersistence;
429            @BeanReference(type = UserGroupRoleFinder.class)
430            protected UserGroupRoleFinder userGroupRoleFinder;
431            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
432            protected com.liferay.counter.service.CounterLocalService counterLocalService;
433            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
434            protected com.liferay.portal.service.GroupLocalService groupLocalService;
435            @BeanReference(type = com.liferay.portal.service.GroupService.class)
436            protected com.liferay.portal.service.GroupService groupService;
437            @BeanReference(type = GroupPersistence.class)
438            protected GroupPersistence groupPersistence;
439            @BeanReference(type = GroupFinder.class)
440            protected GroupFinder groupFinder;
441            @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
442            protected com.liferay.portal.service.RoleLocalService roleLocalService;
443            @BeanReference(type = com.liferay.portal.service.RoleService.class)
444            protected com.liferay.portal.service.RoleService roleService;
445            @BeanReference(type = RolePersistence.class)
446            protected RolePersistence rolePersistence;
447            @BeanReference(type = RoleFinder.class)
448            protected RoleFinder roleFinder;
449            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
450            protected com.liferay.portal.service.UserLocalService userLocalService;
451            @BeanReference(type = com.liferay.portal.service.UserService.class)
452            protected com.liferay.portal.service.UserService userService;
453            @BeanReference(type = UserPersistence.class)
454            protected UserPersistence userPersistence;
455            @BeanReference(type = UserFinder.class)
456            protected UserFinder userFinder;
457    }