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.UserGroup;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.UserGroupService;
027    import com.liferay.portal.service.persistence.GroupFinder;
028    import com.liferay.portal.service.persistence.GroupPersistence;
029    import com.liferay.portal.service.persistence.LayoutFinder;
030    import com.liferay.portal.service.persistence.LayoutPersistence;
031    import com.liferay.portal.service.persistence.TeamFinder;
032    import com.liferay.portal.service.persistence.TeamPersistence;
033    import com.liferay.portal.service.persistence.UserFinder;
034    import com.liferay.portal.service.persistence.UserGroupFinder;
035    import com.liferay.portal.service.persistence.UserGroupGroupRoleFinder;
036    import com.liferay.portal.service.persistence.UserGroupGroupRolePersistence;
037    import com.liferay.portal.service.persistence.UserGroupPersistence;
038    import com.liferay.portal.service.persistence.UserPersistence;
039    import com.liferay.portal.util.PortalUtil;
040    
041    import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
042    
043    import javax.sql.DataSource;
044    
045    /**
046     * Provides the base implementation for the user group remote service.
047     *
048     * <p>
049     * 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.UserGroupServiceImpl}.
050     * </p>
051     *
052     * @author Brian Wing Shun Chan
053     * @see com.liferay.portal.service.impl.UserGroupServiceImpl
054     * @see com.liferay.portal.service.UserGroupServiceUtil
055     * @generated
056     */
057    public abstract class UserGroupServiceBaseImpl extends BaseServiceImpl
058            implements UserGroupService, IdentifiableBean {
059            /*
060             * NOTE FOR DEVELOPERS:
061             *
062             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.UserGroupServiceUtil} to access the user group remote service.
063             */
064    
065            /**
066             * Returns the user group local service.
067             *
068             * @return the user group local service
069             */
070            public com.liferay.portal.service.UserGroupLocalService getUserGroupLocalService() {
071                    return userGroupLocalService;
072            }
073    
074            /**
075             * Sets the user group local service.
076             *
077             * @param userGroupLocalService the user group local service
078             */
079            public void setUserGroupLocalService(
080                    com.liferay.portal.service.UserGroupLocalService userGroupLocalService) {
081                    this.userGroupLocalService = userGroupLocalService;
082            }
083    
084            /**
085             * Returns the user group remote service.
086             *
087             * @return the user group remote service
088             */
089            public com.liferay.portal.service.UserGroupService getUserGroupService() {
090                    return userGroupService;
091            }
092    
093            /**
094             * Sets the user group remote service.
095             *
096             * @param userGroupService the user group remote service
097             */
098            public void setUserGroupService(
099                    com.liferay.portal.service.UserGroupService userGroupService) {
100                    this.userGroupService = userGroupService;
101            }
102    
103            /**
104             * Returns the user group persistence.
105             *
106             * @return the user group persistence
107             */
108            public UserGroupPersistence getUserGroupPersistence() {
109                    return userGroupPersistence;
110            }
111    
112            /**
113             * Sets the user group persistence.
114             *
115             * @param userGroupPersistence the user group persistence
116             */
117            public void setUserGroupPersistence(
118                    UserGroupPersistence userGroupPersistence) {
119                    this.userGroupPersistence = userGroupPersistence;
120            }
121    
122            /**
123             * Returns the user group finder.
124             *
125             * @return the user group finder
126             */
127            public UserGroupFinder getUserGroupFinder() {
128                    return userGroupFinder;
129            }
130    
131            /**
132             * Sets the user group finder.
133             *
134             * @param userGroupFinder the user group finder
135             */
136            public void setUserGroupFinder(UserGroupFinder userGroupFinder) {
137                    this.userGroupFinder = userGroupFinder;
138            }
139    
140            /**
141             * Returns the counter local service.
142             *
143             * @return the counter local service
144             */
145            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
146                    return counterLocalService;
147            }
148    
149            /**
150             * Sets the counter local service.
151             *
152             * @param counterLocalService the counter local service
153             */
154            public void setCounterLocalService(
155                    com.liferay.counter.service.CounterLocalService counterLocalService) {
156                    this.counterLocalService = counterLocalService;
157            }
158    
159            /**
160             * Returns the group local service.
161             *
162             * @return the group local service
163             */
164            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
165                    return groupLocalService;
166            }
167    
168            /**
169             * Sets the group local service.
170             *
171             * @param groupLocalService the group local service
172             */
173            public void setGroupLocalService(
174                    com.liferay.portal.service.GroupLocalService groupLocalService) {
175                    this.groupLocalService = groupLocalService;
176            }
177    
178            /**
179             * Returns the group remote service.
180             *
181             * @return the group remote service
182             */
183            public com.liferay.portal.service.GroupService getGroupService() {
184                    return groupService;
185            }
186    
187            /**
188             * Sets the group remote service.
189             *
190             * @param groupService the group remote service
191             */
192            public void setGroupService(
193                    com.liferay.portal.service.GroupService groupService) {
194                    this.groupService = groupService;
195            }
196    
197            /**
198             * Returns the group persistence.
199             *
200             * @return the group persistence
201             */
202            public GroupPersistence getGroupPersistence() {
203                    return groupPersistence;
204            }
205    
206            /**
207             * Sets the group persistence.
208             *
209             * @param groupPersistence the group persistence
210             */
211            public void setGroupPersistence(GroupPersistence groupPersistence) {
212                    this.groupPersistence = groupPersistence;
213            }
214    
215            /**
216             * Returns the group finder.
217             *
218             * @return the group finder
219             */
220            public GroupFinder getGroupFinder() {
221                    return groupFinder;
222            }
223    
224            /**
225             * Sets the group finder.
226             *
227             * @param groupFinder the group finder
228             */
229            public void setGroupFinder(GroupFinder groupFinder) {
230                    this.groupFinder = groupFinder;
231            }
232    
233            /**
234             * Returns the layout local service.
235             *
236             * @return the layout local service
237             */
238            public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() {
239                    return layoutLocalService;
240            }
241    
242            /**
243             * Sets the layout local service.
244             *
245             * @param layoutLocalService the layout local service
246             */
247            public void setLayoutLocalService(
248                    com.liferay.portal.service.LayoutLocalService layoutLocalService) {
249                    this.layoutLocalService = layoutLocalService;
250            }
251    
252            /**
253             * Returns the layout remote service.
254             *
255             * @return the layout remote service
256             */
257            public com.liferay.portal.service.LayoutService getLayoutService() {
258                    return layoutService;
259            }
260    
261            /**
262             * Sets the layout remote service.
263             *
264             * @param layoutService the layout remote service
265             */
266            public void setLayoutService(
267                    com.liferay.portal.service.LayoutService layoutService) {
268                    this.layoutService = layoutService;
269            }
270    
271            /**
272             * Returns the layout persistence.
273             *
274             * @return the layout persistence
275             */
276            public LayoutPersistence getLayoutPersistence() {
277                    return layoutPersistence;
278            }
279    
280            /**
281             * Sets the layout persistence.
282             *
283             * @param layoutPersistence the layout persistence
284             */
285            public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
286                    this.layoutPersistence = layoutPersistence;
287            }
288    
289            /**
290             * Returns the layout finder.
291             *
292             * @return the layout finder
293             */
294            public LayoutFinder getLayoutFinder() {
295                    return layoutFinder;
296            }
297    
298            /**
299             * Sets the layout finder.
300             *
301             * @param layoutFinder the layout finder
302             */
303            public void setLayoutFinder(LayoutFinder layoutFinder) {
304                    this.layoutFinder = layoutFinder;
305            }
306    
307            /**
308             * Returns the resource local service.
309             *
310             * @return the resource local service
311             */
312            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
313                    return resourceLocalService;
314            }
315    
316            /**
317             * Sets the resource local service.
318             *
319             * @param resourceLocalService the resource local service
320             */
321            public void setResourceLocalService(
322                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
323                    this.resourceLocalService = resourceLocalService;
324            }
325    
326            /**
327             * Returns the team local service.
328             *
329             * @return the team local service
330             */
331            public com.liferay.portal.service.TeamLocalService getTeamLocalService() {
332                    return teamLocalService;
333            }
334    
335            /**
336             * Sets the team local service.
337             *
338             * @param teamLocalService the team local service
339             */
340            public void setTeamLocalService(
341                    com.liferay.portal.service.TeamLocalService teamLocalService) {
342                    this.teamLocalService = teamLocalService;
343            }
344    
345            /**
346             * Returns the team remote service.
347             *
348             * @return the team remote service
349             */
350            public com.liferay.portal.service.TeamService getTeamService() {
351                    return teamService;
352            }
353    
354            /**
355             * Sets the team remote service.
356             *
357             * @param teamService the team remote service
358             */
359            public void setTeamService(
360                    com.liferay.portal.service.TeamService teamService) {
361                    this.teamService = teamService;
362            }
363    
364            /**
365             * Returns the team persistence.
366             *
367             * @return the team persistence
368             */
369            public TeamPersistence getTeamPersistence() {
370                    return teamPersistence;
371            }
372    
373            /**
374             * Sets the team persistence.
375             *
376             * @param teamPersistence the team persistence
377             */
378            public void setTeamPersistence(TeamPersistence teamPersistence) {
379                    this.teamPersistence = teamPersistence;
380            }
381    
382            /**
383             * Returns the team finder.
384             *
385             * @return the team finder
386             */
387            public TeamFinder getTeamFinder() {
388                    return teamFinder;
389            }
390    
391            /**
392             * Sets the team finder.
393             *
394             * @param teamFinder the team finder
395             */
396            public void setTeamFinder(TeamFinder teamFinder) {
397                    this.teamFinder = teamFinder;
398            }
399    
400            /**
401             * Returns the user local service.
402             *
403             * @return the user local service
404             */
405            public com.liferay.portal.service.UserLocalService getUserLocalService() {
406                    return userLocalService;
407            }
408    
409            /**
410             * Sets the user local service.
411             *
412             * @param userLocalService the user local service
413             */
414            public void setUserLocalService(
415                    com.liferay.portal.service.UserLocalService userLocalService) {
416                    this.userLocalService = userLocalService;
417            }
418    
419            /**
420             * Returns the user remote service.
421             *
422             * @return the user remote service
423             */
424            public com.liferay.portal.service.UserService getUserService() {
425                    return userService;
426            }
427    
428            /**
429             * Sets the user remote service.
430             *
431             * @param userService the user remote service
432             */
433            public void setUserService(
434                    com.liferay.portal.service.UserService userService) {
435                    this.userService = userService;
436            }
437    
438            /**
439             * Returns the user persistence.
440             *
441             * @return the user persistence
442             */
443            public UserPersistence getUserPersistence() {
444                    return userPersistence;
445            }
446    
447            /**
448             * Sets the user persistence.
449             *
450             * @param userPersistence the user persistence
451             */
452            public void setUserPersistence(UserPersistence userPersistence) {
453                    this.userPersistence = userPersistence;
454            }
455    
456            /**
457             * Returns the user finder.
458             *
459             * @return the user finder
460             */
461            public UserFinder getUserFinder() {
462                    return userFinder;
463            }
464    
465            /**
466             * Sets the user finder.
467             *
468             * @param userFinder the user finder
469             */
470            public void setUserFinder(UserFinder userFinder) {
471                    this.userFinder = userFinder;
472            }
473    
474            /**
475             * Returns the expando row local service.
476             *
477             * @return the expando row local service
478             */
479            public com.liferay.portlet.expando.service.ExpandoRowLocalService getExpandoRowLocalService() {
480                    return expandoRowLocalService;
481            }
482    
483            /**
484             * Sets the expando row local service.
485             *
486             * @param expandoRowLocalService the expando row local service
487             */
488            public void setExpandoRowLocalService(
489                    com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService) {
490                    this.expandoRowLocalService = expandoRowLocalService;
491            }
492    
493            /**
494             * Returns the expando row persistence.
495             *
496             * @return the expando row persistence
497             */
498            public ExpandoRowPersistence getExpandoRowPersistence() {
499                    return expandoRowPersistence;
500            }
501    
502            /**
503             * Sets the expando row persistence.
504             *
505             * @param expandoRowPersistence the expando row persistence
506             */
507            public void setExpandoRowPersistence(
508                    ExpandoRowPersistence expandoRowPersistence) {
509                    this.expandoRowPersistence = expandoRowPersistence;
510            }
511    
512            /**
513             * Returns the user group group role local service.
514             *
515             * @return the user group group role local service
516             */
517            public com.liferay.portal.service.UserGroupGroupRoleLocalService getUserGroupGroupRoleLocalService() {
518                    return userGroupGroupRoleLocalService;
519            }
520    
521            /**
522             * Sets the user group group role local service.
523             *
524             * @param userGroupGroupRoleLocalService the user group group role local service
525             */
526            public void setUserGroupGroupRoleLocalService(
527                    com.liferay.portal.service.UserGroupGroupRoleLocalService userGroupGroupRoleLocalService) {
528                    this.userGroupGroupRoleLocalService = userGroupGroupRoleLocalService;
529            }
530    
531            /**
532             * Returns the user group group role remote service.
533             *
534             * @return the user group group role remote service
535             */
536            public com.liferay.portal.service.UserGroupGroupRoleService getUserGroupGroupRoleService() {
537                    return userGroupGroupRoleService;
538            }
539    
540            /**
541             * Sets the user group group role remote service.
542             *
543             * @param userGroupGroupRoleService the user group group role remote service
544             */
545            public void setUserGroupGroupRoleService(
546                    com.liferay.portal.service.UserGroupGroupRoleService userGroupGroupRoleService) {
547                    this.userGroupGroupRoleService = userGroupGroupRoleService;
548            }
549    
550            /**
551             * Returns the user group group role persistence.
552             *
553             * @return the user group group role persistence
554             */
555            public UserGroupGroupRolePersistence getUserGroupGroupRolePersistence() {
556                    return userGroupGroupRolePersistence;
557            }
558    
559            /**
560             * Sets the user group group role persistence.
561             *
562             * @param userGroupGroupRolePersistence the user group group role persistence
563             */
564            public void setUserGroupGroupRolePersistence(
565                    UserGroupGroupRolePersistence userGroupGroupRolePersistence) {
566                    this.userGroupGroupRolePersistence = userGroupGroupRolePersistence;
567            }
568    
569            /**
570             * Returns the user group group role finder.
571             *
572             * @return the user group group role finder
573             */
574            public UserGroupGroupRoleFinder getUserGroupGroupRoleFinder() {
575                    return userGroupGroupRoleFinder;
576            }
577    
578            /**
579             * Sets the user group group role finder.
580             *
581             * @param userGroupGroupRoleFinder the user group group role finder
582             */
583            public void setUserGroupGroupRoleFinder(
584                    UserGroupGroupRoleFinder userGroupGroupRoleFinder) {
585                    this.userGroupGroupRoleFinder = userGroupGroupRoleFinder;
586            }
587    
588            public void afterPropertiesSet() {
589            }
590    
591            public void destroy() {
592            }
593    
594            /**
595             * Returns the Spring bean ID for this bean.
596             *
597             * @return the Spring bean ID for this bean
598             */
599            @Override
600            public String getBeanIdentifier() {
601                    return _beanIdentifier;
602            }
603    
604            /**
605             * Sets the Spring bean ID for this bean.
606             *
607             * @param beanIdentifier the Spring bean ID for this bean
608             */
609            @Override
610            public void setBeanIdentifier(String beanIdentifier) {
611                    _beanIdentifier = beanIdentifier;
612            }
613    
614            protected Class<?> getModelClass() {
615                    return UserGroup.class;
616            }
617    
618            protected String getModelClassName() {
619                    return UserGroup.class.getName();
620            }
621    
622            /**
623             * Performs a SQL query.
624             *
625             * @param sql the sql query
626             */
627            protected void runSQL(String sql) {
628                    try {
629                            DataSource dataSource = userGroupPersistence.getDataSource();
630    
631                            DB db = DBFactoryUtil.getDB();
632    
633                            sql = db.buildSQL(sql);
634                            sql = PortalUtil.transformSQL(sql);
635    
636                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
637                                            sql, new int[0]);
638    
639                            sqlUpdate.update();
640                    }
641                    catch (Exception e) {
642                            throw new SystemException(e);
643                    }
644            }
645    
646            @BeanReference(type = com.liferay.portal.service.UserGroupLocalService.class)
647            protected com.liferay.portal.service.UserGroupLocalService userGroupLocalService;
648            @BeanReference(type = com.liferay.portal.service.UserGroupService.class)
649            protected com.liferay.portal.service.UserGroupService userGroupService;
650            @BeanReference(type = UserGroupPersistence.class)
651            protected UserGroupPersistence userGroupPersistence;
652            @BeanReference(type = UserGroupFinder.class)
653            protected UserGroupFinder userGroupFinder;
654            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
655            protected com.liferay.counter.service.CounterLocalService counterLocalService;
656            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
657            protected com.liferay.portal.service.GroupLocalService groupLocalService;
658            @BeanReference(type = com.liferay.portal.service.GroupService.class)
659            protected com.liferay.portal.service.GroupService groupService;
660            @BeanReference(type = GroupPersistence.class)
661            protected GroupPersistence groupPersistence;
662            @BeanReference(type = GroupFinder.class)
663            protected GroupFinder groupFinder;
664            @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class)
665            protected com.liferay.portal.service.LayoutLocalService layoutLocalService;
666            @BeanReference(type = com.liferay.portal.service.LayoutService.class)
667            protected com.liferay.portal.service.LayoutService layoutService;
668            @BeanReference(type = LayoutPersistence.class)
669            protected LayoutPersistence layoutPersistence;
670            @BeanReference(type = LayoutFinder.class)
671            protected LayoutFinder layoutFinder;
672            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
673            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
674            @BeanReference(type = com.liferay.portal.service.TeamLocalService.class)
675            protected com.liferay.portal.service.TeamLocalService teamLocalService;
676            @BeanReference(type = com.liferay.portal.service.TeamService.class)
677            protected com.liferay.portal.service.TeamService teamService;
678            @BeanReference(type = TeamPersistence.class)
679            protected TeamPersistence teamPersistence;
680            @BeanReference(type = TeamFinder.class)
681            protected TeamFinder teamFinder;
682            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
683            protected com.liferay.portal.service.UserLocalService userLocalService;
684            @BeanReference(type = com.liferay.portal.service.UserService.class)
685            protected com.liferay.portal.service.UserService userService;
686            @BeanReference(type = UserPersistence.class)
687            protected UserPersistence userPersistence;
688            @BeanReference(type = UserFinder.class)
689            protected UserFinder userFinder;
690            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class)
691            protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService;
692            @BeanReference(type = ExpandoRowPersistence.class)
693            protected ExpandoRowPersistence expandoRowPersistence;
694            @BeanReference(type = com.liferay.portal.service.UserGroupGroupRoleLocalService.class)
695            protected com.liferay.portal.service.UserGroupGroupRoleLocalService userGroupGroupRoleLocalService;
696            @BeanReference(type = com.liferay.portal.service.UserGroupGroupRoleService.class)
697            protected com.liferay.portal.service.UserGroupGroupRoleService userGroupGroupRoleService;
698            @BeanReference(type = UserGroupGroupRolePersistence.class)
699            protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
700            @BeanReference(type = UserGroupGroupRoleFinder.class)
701            protected UserGroupGroupRoleFinder userGroupGroupRoleFinder;
702            private String _beanIdentifier;
703    }