001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
029    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
030    import com.liferay.portal.kernel.dao.orm.Projection;
031    import com.liferay.portal.kernel.dao.orm.Property;
032    import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil;
033    import com.liferay.portal.kernel.exception.PortalException;
034    import com.liferay.portal.kernel.exception.SystemException;
035    import com.liferay.portal.kernel.lar.ExportImportHelperUtil;
036    import com.liferay.portal.kernel.lar.ManifestSummary;
037    import com.liferay.portal.kernel.lar.PortletDataContext;
038    import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil;
039    import com.liferay.portal.kernel.lar.StagedModelType;
040    import com.liferay.portal.kernel.search.Indexable;
041    import com.liferay.portal.kernel.search.IndexableType;
042    import com.liferay.portal.kernel.util.OrderByComparator;
043    import com.liferay.portal.model.PersistedModel;
044    import com.liferay.portal.model.Role;
045    import com.liferay.portal.service.BaseLocalServiceImpl;
046    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
047    import com.liferay.portal.service.RoleLocalService;
048    import com.liferay.portal.service.persistence.ClassNamePersistence;
049    import com.liferay.portal.service.persistence.CompanyPersistence;
050    import com.liferay.portal.service.persistence.GroupFinder;
051    import com.liferay.portal.service.persistence.GroupPersistence;
052    import com.liferay.portal.service.persistence.LayoutFinder;
053    import com.liferay.portal.service.persistence.LayoutPersistence;
054    import com.liferay.portal.service.persistence.ResourceActionPersistence;
055    import com.liferay.portal.service.persistence.ResourceBlockFinder;
056    import com.liferay.portal.service.persistence.ResourceBlockPermissionPersistence;
057    import com.liferay.portal.service.persistence.ResourceBlockPersistence;
058    import com.liferay.portal.service.persistence.ResourcePermissionFinder;
059    import com.liferay.portal.service.persistence.ResourcePermissionPersistence;
060    import com.liferay.portal.service.persistence.ResourceTypePermissionFinder;
061    import com.liferay.portal.service.persistence.ResourceTypePermissionPersistence;
062    import com.liferay.portal.service.persistence.RoleFinder;
063    import com.liferay.portal.service.persistence.RolePersistence;
064    import com.liferay.portal.service.persistence.ShardPersistence;
065    import com.liferay.portal.service.persistence.TeamFinder;
066    import com.liferay.portal.service.persistence.TeamPersistence;
067    import com.liferay.portal.service.persistence.UserFinder;
068    import com.liferay.portal.service.persistence.UserGroupGroupRoleFinder;
069    import com.liferay.portal.service.persistence.UserGroupGroupRolePersistence;
070    import com.liferay.portal.service.persistence.UserGroupRoleFinder;
071    import com.liferay.portal.service.persistence.UserGroupRolePersistence;
072    import com.liferay.portal.service.persistence.UserPersistence;
073    import com.liferay.portal.util.PortalUtil;
074    
075    import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
076    
077    import java.io.Serializable;
078    
079    import java.util.List;
080    
081    import javax.sql.DataSource;
082    
083    /**
084     * Provides the base implementation for the role local service.
085     *
086     * <p>
087     * 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.RoleLocalServiceImpl}.
088     * </p>
089     *
090     * @author Brian Wing Shun Chan
091     * @see com.liferay.portal.service.impl.RoleLocalServiceImpl
092     * @see com.liferay.portal.service.RoleLocalServiceUtil
093     * @generated
094     */
095    @ProviderType
096    public abstract class RoleLocalServiceBaseImpl extends BaseLocalServiceImpl
097            implements RoleLocalService, IdentifiableBean {
098            /*
099             * NOTE FOR DEVELOPERS:
100             *
101             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.RoleLocalServiceUtil} to access the role local service.
102             */
103    
104            /**
105             * Adds the role to the database. Also notifies the appropriate model listeners.
106             *
107             * @param role the role
108             * @return the role that was added
109             */
110            @Indexable(type = IndexableType.REINDEX)
111            @Override
112            public Role addRole(Role role) {
113                    role.setNew(true);
114    
115                    return rolePersistence.update(role);
116            }
117    
118            /**
119             * Creates a new role with the primary key. Does not add the role to the database.
120             *
121             * @param roleId the primary key for the new role
122             * @return the new role
123             */
124            @Override
125            public Role createRole(long roleId) {
126                    return rolePersistence.create(roleId);
127            }
128    
129            /**
130             * Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.
131             *
132             * @param roleId the primary key of the role
133             * @return the role that was removed
134             * @throws PortalException if a role with the primary key could not be found
135             */
136            @Indexable(type = IndexableType.DELETE)
137            @Override
138            public Role deleteRole(long roleId) throws PortalException {
139                    return rolePersistence.remove(roleId);
140            }
141    
142            /**
143             * Deletes the role from the database. Also notifies the appropriate model listeners.
144             *
145             * @param role the role
146             * @return the role that was removed
147             * @throws PortalException
148             */
149            @Indexable(type = IndexableType.DELETE)
150            @Override
151            public Role deleteRole(Role role) throws PortalException {
152                    return rolePersistence.remove(role);
153            }
154    
155            @Override
156            public DynamicQuery dynamicQuery() {
157                    Class<?> clazz = getClass();
158    
159                    return DynamicQueryFactoryUtil.forClass(Role.class,
160                            clazz.getClassLoader());
161            }
162    
163            /**
164             * Performs a dynamic query on the database and returns the matching rows.
165             *
166             * @param dynamicQuery the dynamic query
167             * @return the matching rows
168             */
169            @Override
170            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
171                    return rolePersistence.findWithDynamicQuery(dynamicQuery);
172            }
173    
174            /**
175             * Performs a dynamic query on the database and returns a range of the matching rows.
176             *
177             * <p>
178             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
179             * </p>
180             *
181             * @param dynamicQuery the dynamic query
182             * @param start the lower bound of the range of model instances
183             * @param end the upper bound of the range of model instances (not inclusive)
184             * @return the range of matching rows
185             */
186            @Override
187            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
188                    int end) {
189                    return rolePersistence.findWithDynamicQuery(dynamicQuery, start, end);
190            }
191    
192            /**
193             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
194             *
195             * <p>
196             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
197             * </p>
198             *
199             * @param dynamicQuery the dynamic query
200             * @param start the lower bound of the range of model instances
201             * @param end the upper bound of the range of model instances (not inclusive)
202             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
203             * @return the ordered range of matching rows
204             */
205            @Override
206            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
207                    int end, OrderByComparator<T> orderByComparator) {
208                    return rolePersistence.findWithDynamicQuery(dynamicQuery, start, end,
209                            orderByComparator);
210            }
211    
212            /**
213             * Returns the number of rows matching the dynamic query.
214             *
215             * @param dynamicQuery the dynamic query
216             * @return the number of rows matching the dynamic query
217             */
218            @Override
219            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
220                    return rolePersistence.countWithDynamicQuery(dynamicQuery);
221            }
222    
223            /**
224             * Returns the number of rows matching the dynamic query.
225             *
226             * @param dynamicQuery the dynamic query
227             * @param projection the projection to apply to the query
228             * @return the number of rows matching the dynamic query
229             */
230            @Override
231            public long dynamicQueryCount(DynamicQuery dynamicQuery,
232                    Projection projection) {
233                    return rolePersistence.countWithDynamicQuery(dynamicQuery, projection);
234            }
235    
236            @Override
237            public Role fetchRole(long roleId) {
238                    return rolePersistence.fetchByPrimaryKey(roleId);
239            }
240    
241            /**
242             * Returns the role with the matching UUID and company.
243             *
244             * @param uuid the role's UUID
245             * @param companyId the primary key of the company
246             * @return the matching role, or <code>null</code> if a matching role could not be found
247             */
248            @Override
249            public Role fetchRoleByUuidAndCompanyId(String uuid, long companyId) {
250                    return rolePersistence.fetchByUuid_C_First(uuid, companyId, null);
251            }
252    
253            /**
254             * Returns the role with the primary key.
255             *
256             * @param roleId the primary key of the role
257             * @return the role
258             * @throws PortalException if a role with the primary key could not be found
259             */
260            @Override
261            public Role getRole(long roleId) throws PortalException {
262                    return rolePersistence.findByPrimaryKey(roleId);
263            }
264    
265            @Override
266            public ActionableDynamicQuery getActionableDynamicQuery() {
267                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
268    
269                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.RoleLocalServiceUtil.getService());
270                    actionableDynamicQuery.setClass(Role.class);
271                    actionableDynamicQuery.setClassLoader(getClassLoader());
272    
273                    actionableDynamicQuery.setPrimaryKeyPropertyName("roleId");
274    
275                    return actionableDynamicQuery;
276            }
277    
278            protected void initActionableDynamicQuery(
279                    ActionableDynamicQuery actionableDynamicQuery) {
280                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.RoleLocalServiceUtil.getService());
281                    actionableDynamicQuery.setClass(Role.class);
282                    actionableDynamicQuery.setClassLoader(getClassLoader());
283    
284                    actionableDynamicQuery.setPrimaryKeyPropertyName("roleId");
285            }
286    
287            @Override
288            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
289                    final PortletDataContext portletDataContext) {
290                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
291                                    @Override
292                                    public long performCount() throws PortalException {
293                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
294    
295                                            StagedModelType stagedModelType = getStagedModelType();
296    
297                                            long modelAdditionCount = super.performCount();
298    
299                                            manifestSummary.addModelAdditionCount(stagedModelType.toString(),
300                                                    modelAdditionCount);
301    
302                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
303                                                            stagedModelType);
304    
305                                            manifestSummary.addModelDeletionCount(stagedModelType.toString(),
306                                                    modelDeletionCount);
307    
308                                            return modelAdditionCount;
309                                    }
310                            };
311    
312                    initActionableDynamicQuery(exportActionableDynamicQuery);
313    
314                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
315                                    @Override
316                                    public void addCriteria(DynamicQuery dynamicQuery) {
317                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
318                                                    "modifiedDate");
319    
320                                            StagedModelType stagedModelType = exportActionableDynamicQuery.getStagedModelType();
321    
322                                            if (stagedModelType.getReferrerClassNameId() >= 0) {
323                                                    Property classNameIdProperty = PropertyFactoryUtil.forName(
324                                                                    "classNameId");
325    
326                                                    dynamicQuery.add(classNameIdProperty.eq(
327                                                                    stagedModelType.getReferrerClassNameId()));
328                                            }
329                                    }
330                            });
331    
332                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
333    
334                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
335                                    @Override
336                                    public void performAction(Object object)
337                                            throws PortalException {
338                                            Role stagedModel = (Role)object;
339    
340                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
341                                                    stagedModel);
342                                    }
343                            });
344                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
345                                    PortalUtil.getClassNameId(Role.class.getName())));
346    
347                    return exportActionableDynamicQuery;
348            }
349    
350            /**
351             * @throws PortalException
352             */
353            @Override
354            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
355                    throws PortalException {
356                    return roleLocalService.deleteRole((Role)persistedModel);
357            }
358    
359            @Override
360            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
361                    throws PortalException {
362                    return rolePersistence.findByPrimaryKey(primaryKeyObj);
363            }
364    
365            /**
366             * Returns the role with the matching UUID and company.
367             *
368             * @param uuid the role's UUID
369             * @param companyId the primary key of the company
370             * @return the matching role
371             * @throws PortalException if a matching role could not be found
372             */
373            @Override
374            public Role getRoleByUuidAndCompanyId(String uuid, long companyId)
375                    throws PortalException {
376                    return rolePersistence.findByUuid_C_First(uuid, companyId, null);
377            }
378    
379            /**
380             * Returns a range of all the roles.
381             *
382             * <p>
383             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
384             * </p>
385             *
386             * @param start the lower bound of the range of roles
387             * @param end the upper bound of the range of roles (not inclusive)
388             * @return the range of roles
389             */
390            @Override
391            public List<Role> getRoles(int start, int end) {
392                    return rolePersistence.findAll(start, end);
393            }
394    
395            /**
396             * Returns the number of roles.
397             *
398             * @return the number of roles
399             */
400            @Override
401            public int getRolesCount() {
402                    return rolePersistence.countAll();
403            }
404    
405            /**
406             * Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
407             *
408             * @param role the role
409             * @return the role that was updated
410             */
411            @Indexable(type = IndexableType.REINDEX)
412            @Override
413            public Role updateRole(Role role) {
414                    return rolePersistence.update(role);
415            }
416    
417            /**
418             */
419            @Override
420            public void addGroupRole(long groupId, long roleId) {
421                    groupPersistence.addRole(groupId, roleId);
422            }
423    
424            /**
425             */
426            @Override
427            public void addGroupRole(long groupId, Role role) {
428                    groupPersistence.addRole(groupId, role);
429            }
430    
431            /**
432             */
433            @Override
434            public void addGroupRoles(long groupId, long[] roleIds) {
435                    groupPersistence.addRoles(groupId, roleIds);
436            }
437    
438            /**
439             */
440            @Override
441            public void addGroupRoles(long groupId, List<Role> Roles) {
442                    groupPersistence.addRoles(groupId, Roles);
443            }
444    
445            /**
446             */
447            @Override
448            public void clearGroupRoles(long groupId) {
449                    groupPersistence.clearRoles(groupId);
450            }
451    
452            /**
453             */
454            @Override
455            public void deleteGroupRole(long groupId, long roleId) {
456                    groupPersistence.removeRole(groupId, roleId);
457            }
458    
459            /**
460             */
461            @Override
462            public void deleteGroupRole(long groupId, Role role) {
463                    groupPersistence.removeRole(groupId, role);
464            }
465    
466            /**
467             */
468            @Override
469            public void deleteGroupRoles(long groupId, long[] roleIds) {
470                    groupPersistence.removeRoles(groupId, roleIds);
471            }
472    
473            /**
474             */
475            @Override
476            public void deleteGroupRoles(long groupId, List<Role> Roles) {
477                    groupPersistence.removeRoles(groupId, Roles);
478            }
479    
480            /**
481             * Returns the groupIds of the groups associated with the role.
482             *
483             * @param roleId the roleId of the role
484             * @return long[] the groupIds of groups associated with the role
485             */
486            @Override
487            public long[] getGroupPrimaryKeys(long roleId) {
488                    return rolePersistence.getGroupPrimaryKeys(roleId);
489            }
490    
491            /**
492             */
493            @Override
494            public List<Role> getGroupRoles(long groupId) {
495                    return groupPersistence.getRoles(groupId);
496            }
497    
498            /**
499             */
500            @Override
501            public List<Role> getGroupRoles(long groupId, int start, int end) {
502                    return groupPersistence.getRoles(groupId, start, end);
503            }
504    
505            /**
506             */
507            @Override
508            public List<Role> getGroupRoles(long groupId, int start, int end,
509                    OrderByComparator<Role> orderByComparator) {
510                    return groupPersistence.getRoles(groupId, start, end, orderByComparator);
511            }
512    
513            /**
514             */
515            @Override
516            public int getGroupRolesCount(long groupId) {
517                    return groupPersistence.getRolesSize(groupId);
518            }
519    
520            /**
521             */
522            @Override
523            public boolean hasGroupRole(long groupId, long roleId) {
524                    return groupPersistence.containsRole(groupId, roleId);
525            }
526    
527            /**
528             */
529            @Override
530            public boolean hasGroupRoles(long groupId) {
531                    return groupPersistence.containsRoles(groupId);
532            }
533    
534            /**
535             */
536            @Override
537            public void setGroupRoles(long groupId, long[] roleIds) {
538                    groupPersistence.setRoles(groupId, roleIds);
539            }
540    
541            /**
542             */
543            @Override
544            public void addUserRole(long userId, long roleId) {
545                    userPersistence.addRole(userId, roleId);
546            }
547    
548            /**
549             */
550            @Override
551            public void addUserRole(long userId, Role role) {
552                    userPersistence.addRole(userId, role);
553            }
554    
555            /**
556             * @throws PortalException
557             */
558            @Override
559            public void addUserRoles(long userId, long[] roleIds)
560                    throws PortalException {
561                    userPersistence.addRoles(userId, roleIds);
562            }
563    
564            /**
565             * @throws PortalException
566             */
567            @Override
568            public void addUserRoles(long userId, List<Role> Roles)
569                    throws PortalException {
570                    userPersistence.addRoles(userId, Roles);
571            }
572    
573            /**
574             */
575            @Override
576            public void clearUserRoles(long userId) {
577                    userPersistence.clearRoles(userId);
578            }
579    
580            /**
581             */
582            @Override
583            public void deleteUserRole(long userId, long roleId) {
584                    userPersistence.removeRole(userId, roleId);
585            }
586    
587            /**
588             */
589            @Override
590            public void deleteUserRole(long userId, Role role) {
591                    userPersistence.removeRole(userId, role);
592            }
593    
594            /**
595             */
596            @Override
597            public void deleteUserRoles(long userId, long[] roleIds) {
598                    userPersistence.removeRoles(userId, roleIds);
599            }
600    
601            /**
602             */
603            @Override
604            public void deleteUserRoles(long userId, List<Role> Roles) {
605                    userPersistence.removeRoles(userId, Roles);
606            }
607    
608            /**
609             * Returns the userIds of the users associated with the role.
610             *
611             * @param roleId the roleId of the role
612             * @return long[] the userIds of users associated with the role
613             */
614            @Override
615            public long[] getUserPrimaryKeys(long roleId) {
616                    return rolePersistence.getUserPrimaryKeys(roleId);
617            }
618    
619            /**
620             */
621            @Override
622            public List<Role> getUserRoles(long userId) {
623                    return userPersistence.getRoles(userId);
624            }
625    
626            /**
627             */
628            @Override
629            public List<Role> getUserRoles(long userId, int start, int end) {
630                    return userPersistence.getRoles(userId, start, end);
631            }
632    
633            /**
634             */
635            @Override
636            public List<Role> getUserRoles(long userId, int start, int end,
637                    OrderByComparator<Role> orderByComparator) {
638                    return userPersistence.getRoles(userId, start, end, orderByComparator);
639            }
640    
641            /**
642             */
643            @Override
644            public int getUserRolesCount(long userId) {
645                    return userPersistence.getRolesSize(userId);
646            }
647    
648            /**
649             */
650            @Override
651            public boolean hasUserRole(long userId, long roleId) {
652                    return userPersistence.containsRole(userId, roleId);
653            }
654    
655            /**
656             */
657            @Override
658            public boolean hasUserRoles(long userId) {
659                    return userPersistence.containsRoles(userId);
660            }
661    
662            /**
663             * @throws PortalException
664             */
665            @Override
666            public void setUserRoles(long userId, long[] roleIds)
667                    throws PortalException {
668                    userPersistence.setRoles(userId, roleIds);
669            }
670    
671            /**
672             * Returns the role local service.
673             *
674             * @return the role local service
675             */
676            public com.liferay.portal.service.RoleLocalService getRoleLocalService() {
677                    return roleLocalService;
678            }
679    
680            /**
681             * Sets the role local service.
682             *
683             * @param roleLocalService the role local service
684             */
685            public void setRoleLocalService(
686                    com.liferay.portal.service.RoleLocalService roleLocalService) {
687                    this.roleLocalService = roleLocalService;
688            }
689    
690            /**
691             * Returns the role remote service.
692             *
693             * @return the role remote service
694             */
695            public com.liferay.portal.service.RoleService getRoleService() {
696                    return roleService;
697            }
698    
699            /**
700             * Sets the role remote service.
701             *
702             * @param roleService the role remote service
703             */
704            public void setRoleService(
705                    com.liferay.portal.service.RoleService roleService) {
706                    this.roleService = roleService;
707            }
708    
709            /**
710             * Returns the role persistence.
711             *
712             * @return the role persistence
713             */
714            public RolePersistence getRolePersistence() {
715                    return rolePersistence;
716            }
717    
718            /**
719             * Sets the role persistence.
720             *
721             * @param rolePersistence the role persistence
722             */
723            public void setRolePersistence(RolePersistence rolePersistence) {
724                    this.rolePersistence = rolePersistence;
725            }
726    
727            /**
728             * Returns the role finder.
729             *
730             * @return the role finder
731             */
732            public RoleFinder getRoleFinder() {
733                    return roleFinder;
734            }
735    
736            /**
737             * Sets the role finder.
738             *
739             * @param roleFinder the role finder
740             */
741            public void setRoleFinder(RoleFinder roleFinder) {
742                    this.roleFinder = roleFinder;
743            }
744    
745            /**
746             * Returns the counter local service.
747             *
748             * @return the counter local service
749             */
750            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
751                    return counterLocalService;
752            }
753    
754            /**
755             * Sets the counter local service.
756             *
757             * @param counterLocalService the counter local service
758             */
759            public void setCounterLocalService(
760                    com.liferay.counter.service.CounterLocalService counterLocalService) {
761                    this.counterLocalService = counterLocalService;
762            }
763    
764            /**
765             * Returns the class name local service.
766             *
767             * @return the class name local service
768             */
769            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
770                    return classNameLocalService;
771            }
772    
773            /**
774             * Sets the class name local service.
775             *
776             * @param classNameLocalService the class name local service
777             */
778            public void setClassNameLocalService(
779                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
780                    this.classNameLocalService = classNameLocalService;
781            }
782    
783            /**
784             * Returns the class name remote service.
785             *
786             * @return the class name remote service
787             */
788            public com.liferay.portal.service.ClassNameService getClassNameService() {
789                    return classNameService;
790            }
791    
792            /**
793             * Sets the class name remote service.
794             *
795             * @param classNameService the class name remote service
796             */
797            public void setClassNameService(
798                    com.liferay.portal.service.ClassNameService classNameService) {
799                    this.classNameService = classNameService;
800            }
801    
802            /**
803             * Returns the class name persistence.
804             *
805             * @return the class name persistence
806             */
807            public ClassNamePersistence getClassNamePersistence() {
808                    return classNamePersistence;
809            }
810    
811            /**
812             * Sets the class name persistence.
813             *
814             * @param classNamePersistence the class name persistence
815             */
816            public void setClassNamePersistence(
817                    ClassNamePersistence classNamePersistence) {
818                    this.classNamePersistence = classNamePersistence;
819            }
820    
821            /**
822             * Returns the company local service.
823             *
824             * @return the company local service
825             */
826            public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() {
827                    return companyLocalService;
828            }
829    
830            /**
831             * Sets the company local service.
832             *
833             * @param companyLocalService the company local service
834             */
835            public void setCompanyLocalService(
836                    com.liferay.portal.service.CompanyLocalService companyLocalService) {
837                    this.companyLocalService = companyLocalService;
838            }
839    
840            /**
841             * Returns the company remote service.
842             *
843             * @return the company remote service
844             */
845            public com.liferay.portal.service.CompanyService getCompanyService() {
846                    return companyService;
847            }
848    
849            /**
850             * Sets the company remote service.
851             *
852             * @param companyService the company remote service
853             */
854            public void setCompanyService(
855                    com.liferay.portal.service.CompanyService companyService) {
856                    this.companyService = companyService;
857            }
858    
859            /**
860             * Returns the company persistence.
861             *
862             * @return the company persistence
863             */
864            public CompanyPersistence getCompanyPersistence() {
865                    return companyPersistence;
866            }
867    
868            /**
869             * Sets the company persistence.
870             *
871             * @param companyPersistence the company persistence
872             */
873            public void setCompanyPersistence(CompanyPersistence companyPersistence) {
874                    this.companyPersistence = companyPersistence;
875            }
876    
877            /**
878             * Returns the group local service.
879             *
880             * @return the group local service
881             */
882            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
883                    return groupLocalService;
884            }
885    
886            /**
887             * Sets the group local service.
888             *
889             * @param groupLocalService the group local service
890             */
891            public void setGroupLocalService(
892                    com.liferay.portal.service.GroupLocalService groupLocalService) {
893                    this.groupLocalService = groupLocalService;
894            }
895    
896            /**
897             * Returns the group remote service.
898             *
899             * @return the group remote service
900             */
901            public com.liferay.portal.service.GroupService getGroupService() {
902                    return groupService;
903            }
904    
905            /**
906             * Sets the group remote service.
907             *
908             * @param groupService the group remote service
909             */
910            public void setGroupService(
911                    com.liferay.portal.service.GroupService groupService) {
912                    this.groupService = groupService;
913            }
914    
915            /**
916             * Returns the group persistence.
917             *
918             * @return the group persistence
919             */
920            public GroupPersistence getGroupPersistence() {
921                    return groupPersistence;
922            }
923    
924            /**
925             * Sets the group persistence.
926             *
927             * @param groupPersistence the group persistence
928             */
929            public void setGroupPersistence(GroupPersistence groupPersistence) {
930                    this.groupPersistence = groupPersistence;
931            }
932    
933            /**
934             * Returns the group finder.
935             *
936             * @return the group finder
937             */
938            public GroupFinder getGroupFinder() {
939                    return groupFinder;
940            }
941    
942            /**
943             * Sets the group finder.
944             *
945             * @param groupFinder the group finder
946             */
947            public void setGroupFinder(GroupFinder groupFinder) {
948                    this.groupFinder = groupFinder;
949            }
950    
951            /**
952             * Returns the layout local service.
953             *
954             * @return the layout local service
955             */
956            public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() {
957                    return layoutLocalService;
958            }
959    
960            /**
961             * Sets the layout local service.
962             *
963             * @param layoutLocalService the layout local service
964             */
965            public void setLayoutLocalService(
966                    com.liferay.portal.service.LayoutLocalService layoutLocalService) {
967                    this.layoutLocalService = layoutLocalService;
968            }
969    
970            /**
971             * Returns the layout remote service.
972             *
973             * @return the layout remote service
974             */
975            public com.liferay.portal.service.LayoutService getLayoutService() {
976                    return layoutService;
977            }
978    
979            /**
980             * Sets the layout remote service.
981             *
982             * @param layoutService the layout remote service
983             */
984            public void setLayoutService(
985                    com.liferay.portal.service.LayoutService layoutService) {
986                    this.layoutService = layoutService;
987            }
988    
989            /**
990             * Returns the layout persistence.
991             *
992             * @return the layout persistence
993             */
994            public LayoutPersistence getLayoutPersistence() {
995                    return layoutPersistence;
996            }
997    
998            /**
999             * Sets the layout persistence.
1000             *
1001             * @param layoutPersistence the layout persistence
1002             */
1003            public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
1004                    this.layoutPersistence = layoutPersistence;
1005            }
1006    
1007            /**
1008             * Returns the layout finder.
1009             *
1010             * @return the layout finder
1011             */
1012            public LayoutFinder getLayoutFinder() {
1013                    return layoutFinder;
1014            }
1015    
1016            /**
1017             * Sets the layout finder.
1018             *
1019             * @param layoutFinder the layout finder
1020             */
1021            public void setLayoutFinder(LayoutFinder layoutFinder) {
1022                    this.layoutFinder = layoutFinder;
1023            }
1024    
1025            /**
1026             * Returns the resource local service.
1027             *
1028             * @return the resource local service
1029             */
1030            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
1031                    return resourceLocalService;
1032            }
1033    
1034            /**
1035             * Sets the resource local service.
1036             *
1037             * @param resourceLocalService the resource local service
1038             */
1039            public void setResourceLocalService(
1040                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
1041                    this.resourceLocalService = resourceLocalService;
1042            }
1043    
1044            /**
1045             * Returns the resource action local service.
1046             *
1047             * @return the resource action local service
1048             */
1049            public com.liferay.portal.service.ResourceActionLocalService getResourceActionLocalService() {
1050                    return resourceActionLocalService;
1051            }
1052    
1053            /**
1054             * Sets the resource action local service.
1055             *
1056             * @param resourceActionLocalService the resource action local service
1057             */
1058            public void setResourceActionLocalService(
1059                    com.liferay.portal.service.ResourceActionLocalService resourceActionLocalService) {
1060                    this.resourceActionLocalService = resourceActionLocalService;
1061            }
1062    
1063            /**
1064             * Returns the resource action persistence.
1065             *
1066             * @return the resource action persistence
1067             */
1068            public ResourceActionPersistence getResourceActionPersistence() {
1069                    return resourceActionPersistence;
1070            }
1071    
1072            /**
1073             * Sets the resource action persistence.
1074             *
1075             * @param resourceActionPersistence the resource action persistence
1076             */
1077            public void setResourceActionPersistence(
1078                    ResourceActionPersistence resourceActionPersistence) {
1079                    this.resourceActionPersistence = resourceActionPersistence;
1080            }
1081    
1082            /**
1083             * Returns the resource block local service.
1084             *
1085             * @return the resource block local service
1086             */
1087            public com.liferay.portal.service.ResourceBlockLocalService getResourceBlockLocalService() {
1088                    return resourceBlockLocalService;
1089            }
1090    
1091            /**
1092             * Sets the resource block local service.
1093             *
1094             * @param resourceBlockLocalService the resource block local service
1095             */
1096            public void setResourceBlockLocalService(
1097                    com.liferay.portal.service.ResourceBlockLocalService resourceBlockLocalService) {
1098                    this.resourceBlockLocalService = resourceBlockLocalService;
1099            }
1100    
1101            /**
1102             * Returns the resource block remote service.
1103             *
1104             * @return the resource block remote service
1105             */
1106            public com.liferay.portal.service.ResourceBlockService getResourceBlockService() {
1107                    return resourceBlockService;
1108            }
1109    
1110            /**
1111             * Sets the resource block remote service.
1112             *
1113             * @param resourceBlockService the resource block remote service
1114             */
1115            public void setResourceBlockService(
1116                    com.liferay.portal.service.ResourceBlockService resourceBlockService) {
1117                    this.resourceBlockService = resourceBlockService;
1118            }
1119    
1120            /**
1121             * Returns the resource block persistence.
1122             *
1123             * @return the resource block persistence
1124             */
1125            public ResourceBlockPersistence getResourceBlockPersistence() {
1126                    return resourceBlockPersistence;
1127            }
1128    
1129            /**
1130             * Sets the resource block persistence.
1131             *
1132             * @param resourceBlockPersistence the resource block persistence
1133             */
1134            public void setResourceBlockPersistence(
1135                    ResourceBlockPersistence resourceBlockPersistence) {
1136                    this.resourceBlockPersistence = resourceBlockPersistence;
1137            }
1138    
1139            /**
1140             * Returns the resource block finder.
1141             *
1142             * @return the resource block finder
1143             */
1144            public ResourceBlockFinder getResourceBlockFinder() {
1145                    return resourceBlockFinder;
1146            }
1147    
1148            /**
1149             * Sets the resource block finder.
1150             *
1151             * @param resourceBlockFinder the resource block finder
1152             */
1153            public void setResourceBlockFinder(ResourceBlockFinder resourceBlockFinder) {
1154                    this.resourceBlockFinder = resourceBlockFinder;
1155            }
1156    
1157            /**
1158             * Returns the resource block permission local service.
1159             *
1160             * @return the resource block permission local service
1161             */
1162            public com.liferay.portal.service.ResourceBlockPermissionLocalService getResourceBlockPermissionLocalService() {
1163                    return resourceBlockPermissionLocalService;
1164            }
1165    
1166            /**
1167             * Sets the resource block permission local service.
1168             *
1169             * @param resourceBlockPermissionLocalService the resource block permission local service
1170             */
1171            public void setResourceBlockPermissionLocalService(
1172                    com.liferay.portal.service.ResourceBlockPermissionLocalService resourceBlockPermissionLocalService) {
1173                    this.resourceBlockPermissionLocalService = resourceBlockPermissionLocalService;
1174            }
1175    
1176            /**
1177             * Returns the resource block permission persistence.
1178             *
1179             * @return the resource block permission persistence
1180             */
1181            public ResourceBlockPermissionPersistence getResourceBlockPermissionPersistence() {
1182                    return resourceBlockPermissionPersistence;
1183            }
1184    
1185            /**
1186             * Sets the resource block permission persistence.
1187             *
1188             * @param resourceBlockPermissionPersistence the resource block permission persistence
1189             */
1190            public void setResourceBlockPermissionPersistence(
1191                    ResourceBlockPermissionPersistence resourceBlockPermissionPersistence) {
1192                    this.resourceBlockPermissionPersistence = resourceBlockPermissionPersistence;
1193            }
1194    
1195            /**
1196             * Returns the resource permission local service.
1197             *
1198             * @return the resource permission local service
1199             */
1200            public com.liferay.portal.service.ResourcePermissionLocalService getResourcePermissionLocalService() {
1201                    return resourcePermissionLocalService;
1202            }
1203    
1204            /**
1205             * Sets the resource permission local service.
1206             *
1207             * @param resourcePermissionLocalService the resource permission local service
1208             */
1209            public void setResourcePermissionLocalService(
1210                    com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService) {
1211                    this.resourcePermissionLocalService = resourcePermissionLocalService;
1212            }
1213    
1214            /**
1215             * Returns the resource permission remote service.
1216             *
1217             * @return the resource permission remote service
1218             */
1219            public com.liferay.portal.service.ResourcePermissionService getResourcePermissionService() {
1220                    return resourcePermissionService;
1221            }
1222    
1223            /**
1224             * Sets the resource permission remote service.
1225             *
1226             * @param resourcePermissionService the resource permission remote service
1227             */
1228            public void setResourcePermissionService(
1229                    com.liferay.portal.service.ResourcePermissionService resourcePermissionService) {
1230                    this.resourcePermissionService = resourcePermissionService;
1231            }
1232    
1233            /**
1234             * Returns the resource permission persistence.
1235             *
1236             * @return the resource permission persistence
1237             */
1238            public ResourcePermissionPersistence getResourcePermissionPersistence() {
1239                    return resourcePermissionPersistence;
1240            }
1241    
1242            /**
1243             * Sets the resource permission persistence.
1244             *
1245             * @param resourcePermissionPersistence the resource permission persistence
1246             */
1247            public void setResourcePermissionPersistence(
1248                    ResourcePermissionPersistence resourcePermissionPersistence) {
1249                    this.resourcePermissionPersistence = resourcePermissionPersistence;
1250            }
1251    
1252            /**
1253             * Returns the resource permission finder.
1254             *
1255             * @return the resource permission finder
1256             */
1257            public ResourcePermissionFinder getResourcePermissionFinder() {
1258                    return resourcePermissionFinder;
1259            }
1260    
1261            /**
1262             * Sets the resource permission finder.
1263             *
1264             * @param resourcePermissionFinder the resource permission finder
1265             */
1266            public void setResourcePermissionFinder(
1267                    ResourcePermissionFinder resourcePermissionFinder) {
1268                    this.resourcePermissionFinder = resourcePermissionFinder;
1269            }
1270    
1271            /**
1272             * Returns the resource type permission local service.
1273             *
1274             * @return the resource type permission local service
1275             */
1276            public com.liferay.portal.service.ResourceTypePermissionLocalService getResourceTypePermissionLocalService() {
1277                    return resourceTypePermissionLocalService;
1278            }
1279    
1280            /**
1281             * Sets the resource type permission local service.
1282             *
1283             * @param resourceTypePermissionLocalService the resource type permission local service
1284             */
1285            public void setResourceTypePermissionLocalService(
1286                    com.liferay.portal.service.ResourceTypePermissionLocalService resourceTypePermissionLocalService) {
1287                    this.resourceTypePermissionLocalService = resourceTypePermissionLocalService;
1288            }
1289    
1290            /**
1291             * Returns the resource type permission persistence.
1292             *
1293             * @return the resource type permission persistence
1294             */
1295            public ResourceTypePermissionPersistence getResourceTypePermissionPersistence() {
1296                    return resourceTypePermissionPersistence;
1297            }
1298    
1299            /**
1300             * Sets the resource type permission persistence.
1301             *
1302             * @param resourceTypePermissionPersistence the resource type permission persistence
1303             */
1304            public void setResourceTypePermissionPersistence(
1305                    ResourceTypePermissionPersistence resourceTypePermissionPersistence) {
1306                    this.resourceTypePermissionPersistence = resourceTypePermissionPersistence;
1307            }
1308    
1309            /**
1310             * Returns the resource type permission finder.
1311             *
1312             * @return the resource type permission finder
1313             */
1314            public ResourceTypePermissionFinder getResourceTypePermissionFinder() {
1315                    return resourceTypePermissionFinder;
1316            }
1317    
1318            /**
1319             * Sets the resource type permission finder.
1320             *
1321             * @param resourceTypePermissionFinder the resource type permission finder
1322             */
1323            public void setResourceTypePermissionFinder(
1324                    ResourceTypePermissionFinder resourceTypePermissionFinder) {
1325                    this.resourceTypePermissionFinder = resourceTypePermissionFinder;
1326            }
1327    
1328            /**
1329             * Returns the expando row local service.
1330             *
1331             * @return the expando row local service
1332             */
1333            public com.liferay.portlet.expando.service.ExpandoRowLocalService getExpandoRowLocalService() {
1334                    return expandoRowLocalService;
1335            }
1336    
1337            /**
1338             * Sets the expando row local service.
1339             *
1340             * @param expandoRowLocalService the expando row local service
1341             */
1342            public void setExpandoRowLocalService(
1343                    com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService) {
1344                    this.expandoRowLocalService = expandoRowLocalService;
1345            }
1346    
1347            /**
1348             * Returns the expando row persistence.
1349             *
1350             * @return the expando row persistence
1351             */
1352            public ExpandoRowPersistence getExpandoRowPersistence() {
1353                    return expandoRowPersistence;
1354            }
1355    
1356            /**
1357             * Sets the expando row persistence.
1358             *
1359             * @param expandoRowPersistence the expando row persistence
1360             */
1361            public void setExpandoRowPersistence(
1362                    ExpandoRowPersistence expandoRowPersistence) {
1363                    this.expandoRowPersistence = expandoRowPersistence;
1364            }
1365    
1366            /**
1367             * Returns the shard local service.
1368             *
1369             * @return the shard local service
1370             */
1371            public com.liferay.portal.service.ShardLocalService getShardLocalService() {
1372                    return shardLocalService;
1373            }
1374    
1375            /**
1376             * Sets the shard local service.
1377             *
1378             * @param shardLocalService the shard local service
1379             */
1380            public void setShardLocalService(
1381                    com.liferay.portal.service.ShardLocalService shardLocalService) {
1382                    this.shardLocalService = shardLocalService;
1383            }
1384    
1385            /**
1386             * Returns the shard persistence.
1387             *
1388             * @return the shard persistence
1389             */
1390            public ShardPersistence getShardPersistence() {
1391                    return shardPersistence;
1392            }
1393    
1394            /**
1395             * Sets the shard persistence.
1396             *
1397             * @param shardPersistence the shard persistence
1398             */
1399            public void setShardPersistence(ShardPersistence shardPersistence) {
1400                    this.shardPersistence = shardPersistence;
1401            }
1402    
1403            /**
1404             * Returns the team local service.
1405             *
1406             * @return the team local service
1407             */
1408            public com.liferay.portal.service.TeamLocalService getTeamLocalService() {
1409                    return teamLocalService;
1410            }
1411    
1412            /**
1413             * Sets the team local service.
1414             *
1415             * @param teamLocalService the team local service
1416             */
1417            public void setTeamLocalService(
1418                    com.liferay.portal.service.TeamLocalService teamLocalService) {
1419                    this.teamLocalService = teamLocalService;
1420            }
1421    
1422            /**
1423             * Returns the team remote service.
1424             *
1425             * @return the team remote service
1426             */
1427            public com.liferay.portal.service.TeamService getTeamService() {
1428                    return teamService;
1429            }
1430    
1431            /**
1432             * Sets the team remote service.
1433             *
1434             * @param teamService the team remote service
1435             */
1436            public void setTeamService(
1437                    com.liferay.portal.service.TeamService teamService) {
1438                    this.teamService = teamService;
1439            }
1440    
1441            /**
1442             * Returns the team persistence.
1443             *
1444             * @return the team persistence
1445             */
1446            public TeamPersistence getTeamPersistence() {
1447                    return teamPersistence;
1448            }
1449    
1450            /**
1451             * Sets the team persistence.
1452             *
1453             * @param teamPersistence the team persistence
1454             */
1455            public void setTeamPersistence(TeamPersistence teamPersistence) {
1456                    this.teamPersistence = teamPersistence;
1457            }
1458    
1459            /**
1460             * Returns the team finder.
1461             *
1462             * @return the team finder
1463             */
1464            public TeamFinder getTeamFinder() {
1465                    return teamFinder;
1466            }
1467    
1468            /**
1469             * Sets the team finder.
1470             *
1471             * @param teamFinder the team finder
1472             */
1473            public void setTeamFinder(TeamFinder teamFinder) {
1474                    this.teamFinder = teamFinder;
1475            }
1476    
1477            /**
1478             * Returns the user local service.
1479             *
1480             * @return the user local service
1481             */
1482            public com.liferay.portal.service.UserLocalService getUserLocalService() {
1483                    return userLocalService;
1484            }
1485    
1486            /**
1487             * Sets the user local service.
1488             *
1489             * @param userLocalService the user local service
1490             */
1491            public void setUserLocalService(
1492                    com.liferay.portal.service.UserLocalService userLocalService) {
1493                    this.userLocalService = userLocalService;
1494            }
1495    
1496            /**
1497             * Returns the user remote service.
1498             *
1499             * @return the user remote service
1500             */
1501            public com.liferay.portal.service.UserService getUserService() {
1502                    return userService;
1503            }
1504    
1505            /**
1506             * Sets the user remote service.
1507             *
1508             * @param userService the user remote service
1509             */
1510            public void setUserService(
1511                    com.liferay.portal.service.UserService userService) {
1512                    this.userService = userService;
1513            }
1514    
1515            /**
1516             * Returns the user persistence.
1517             *
1518             * @return the user persistence
1519             */
1520            public UserPersistence getUserPersistence() {
1521                    return userPersistence;
1522            }
1523    
1524            /**
1525             * Sets the user persistence.
1526             *
1527             * @param userPersistence the user persistence
1528             */
1529            public void setUserPersistence(UserPersistence userPersistence) {
1530                    this.userPersistence = userPersistence;
1531            }
1532    
1533            /**
1534             * Returns the user finder.
1535             *
1536             * @return the user finder
1537             */
1538            public UserFinder getUserFinder() {
1539                    return userFinder;
1540            }
1541    
1542            /**
1543             * Sets the user finder.
1544             *
1545             * @param userFinder the user finder
1546             */
1547            public void setUserFinder(UserFinder userFinder) {
1548                    this.userFinder = userFinder;
1549            }
1550    
1551            /**
1552             * Returns the user group group role local service.
1553             *
1554             * @return the user group group role local service
1555             */
1556            public com.liferay.portal.service.UserGroupGroupRoleLocalService getUserGroupGroupRoleLocalService() {
1557                    return userGroupGroupRoleLocalService;
1558            }
1559    
1560            /**
1561             * Sets the user group group role local service.
1562             *
1563             * @param userGroupGroupRoleLocalService the user group group role local service
1564             */
1565            public void setUserGroupGroupRoleLocalService(
1566                    com.liferay.portal.service.UserGroupGroupRoleLocalService userGroupGroupRoleLocalService) {
1567                    this.userGroupGroupRoleLocalService = userGroupGroupRoleLocalService;
1568            }
1569    
1570            /**
1571             * Returns the user group group role remote service.
1572             *
1573             * @return the user group group role remote service
1574             */
1575            public com.liferay.portal.service.UserGroupGroupRoleService getUserGroupGroupRoleService() {
1576                    return userGroupGroupRoleService;
1577            }
1578    
1579            /**
1580             * Sets the user group group role remote service.
1581             *
1582             * @param userGroupGroupRoleService the user group group role remote service
1583             */
1584            public void setUserGroupGroupRoleService(
1585                    com.liferay.portal.service.UserGroupGroupRoleService userGroupGroupRoleService) {
1586                    this.userGroupGroupRoleService = userGroupGroupRoleService;
1587            }
1588    
1589            /**
1590             * Returns the user group group role persistence.
1591             *
1592             * @return the user group group role persistence
1593             */
1594            public UserGroupGroupRolePersistence getUserGroupGroupRolePersistence() {
1595                    return userGroupGroupRolePersistence;
1596            }
1597    
1598            /**
1599             * Sets the user group group role persistence.
1600             *
1601             * @param userGroupGroupRolePersistence the user group group role persistence
1602             */
1603            public void setUserGroupGroupRolePersistence(
1604                    UserGroupGroupRolePersistence userGroupGroupRolePersistence) {
1605                    this.userGroupGroupRolePersistence = userGroupGroupRolePersistence;
1606            }
1607    
1608            /**
1609             * Returns the user group group role finder.
1610             *
1611             * @return the user group group role finder
1612             */
1613            public UserGroupGroupRoleFinder getUserGroupGroupRoleFinder() {
1614                    return userGroupGroupRoleFinder;
1615            }
1616    
1617            /**
1618             * Sets the user group group role finder.
1619             *
1620             * @param userGroupGroupRoleFinder the user group group role finder
1621             */
1622            public void setUserGroupGroupRoleFinder(
1623                    UserGroupGroupRoleFinder userGroupGroupRoleFinder) {
1624                    this.userGroupGroupRoleFinder = userGroupGroupRoleFinder;
1625            }
1626    
1627            /**
1628             * Returns the user group role local service.
1629             *
1630             * @return the user group role local service
1631             */
1632            public com.liferay.portal.service.UserGroupRoleLocalService getUserGroupRoleLocalService() {
1633                    return userGroupRoleLocalService;
1634            }
1635    
1636            /**
1637             * Sets the user group role local service.
1638             *
1639             * @param userGroupRoleLocalService the user group role local service
1640             */
1641            public void setUserGroupRoleLocalService(
1642                    com.liferay.portal.service.UserGroupRoleLocalService userGroupRoleLocalService) {
1643                    this.userGroupRoleLocalService = userGroupRoleLocalService;
1644            }
1645    
1646            /**
1647             * Returns the user group role remote service.
1648             *
1649             * @return the user group role remote service
1650             */
1651            public com.liferay.portal.service.UserGroupRoleService getUserGroupRoleService() {
1652                    return userGroupRoleService;
1653            }
1654    
1655            /**
1656             * Sets the user group role remote service.
1657             *
1658             * @param userGroupRoleService the user group role remote service
1659             */
1660            public void setUserGroupRoleService(
1661                    com.liferay.portal.service.UserGroupRoleService userGroupRoleService) {
1662                    this.userGroupRoleService = userGroupRoleService;
1663            }
1664    
1665            /**
1666             * Returns the user group role persistence.
1667             *
1668             * @return the user group role persistence
1669             */
1670            public UserGroupRolePersistence getUserGroupRolePersistence() {
1671                    return userGroupRolePersistence;
1672            }
1673    
1674            /**
1675             * Sets the user group role persistence.
1676             *
1677             * @param userGroupRolePersistence the user group role persistence
1678             */
1679            public void setUserGroupRolePersistence(
1680                    UserGroupRolePersistence userGroupRolePersistence) {
1681                    this.userGroupRolePersistence = userGroupRolePersistence;
1682            }
1683    
1684            /**
1685             * Returns the user group role finder.
1686             *
1687             * @return the user group role finder
1688             */
1689            public UserGroupRoleFinder getUserGroupRoleFinder() {
1690                    return userGroupRoleFinder;
1691            }
1692    
1693            /**
1694             * Sets the user group role finder.
1695             *
1696             * @param userGroupRoleFinder the user group role finder
1697             */
1698            public void setUserGroupRoleFinder(UserGroupRoleFinder userGroupRoleFinder) {
1699                    this.userGroupRoleFinder = userGroupRoleFinder;
1700            }
1701    
1702            public void afterPropertiesSet() {
1703                    persistedModelLocalServiceRegistry.register("com.liferay.portal.model.Role",
1704                            roleLocalService);
1705            }
1706    
1707            public void destroy() {
1708                    persistedModelLocalServiceRegistry.unregister(
1709                            "com.liferay.portal.model.Role");
1710            }
1711    
1712            /**
1713             * Returns the Spring bean ID for this bean.
1714             *
1715             * @return the Spring bean ID for this bean
1716             */
1717            @Override
1718            public String getBeanIdentifier() {
1719                    return _beanIdentifier;
1720            }
1721    
1722            /**
1723             * Sets the Spring bean ID for this bean.
1724             *
1725             * @param beanIdentifier the Spring bean ID for this bean
1726             */
1727            @Override
1728            public void setBeanIdentifier(String beanIdentifier) {
1729                    _beanIdentifier = beanIdentifier;
1730            }
1731    
1732            protected Class<?> getModelClass() {
1733                    return Role.class;
1734            }
1735    
1736            protected String getModelClassName() {
1737                    return Role.class.getName();
1738            }
1739    
1740            /**
1741             * Performs a SQL query.
1742             *
1743             * @param sql the sql query
1744             */
1745            protected void runSQL(String sql) {
1746                    try {
1747                            DataSource dataSource = rolePersistence.getDataSource();
1748    
1749                            DB db = DBFactoryUtil.getDB();
1750    
1751                            sql = db.buildSQL(sql);
1752                            sql = PortalUtil.transformSQL(sql);
1753    
1754                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1755                                            sql, new int[0]);
1756    
1757                            sqlUpdate.update();
1758                    }
1759                    catch (Exception e) {
1760                            throw new SystemException(e);
1761                    }
1762            }
1763    
1764            @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
1765            protected com.liferay.portal.service.RoleLocalService roleLocalService;
1766            @BeanReference(type = com.liferay.portal.service.RoleService.class)
1767            protected com.liferay.portal.service.RoleService roleService;
1768            @BeanReference(type = RolePersistence.class)
1769            protected RolePersistence rolePersistence;
1770            @BeanReference(type = RoleFinder.class)
1771            protected RoleFinder roleFinder;
1772            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1773            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1774            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
1775            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
1776            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
1777            protected com.liferay.portal.service.ClassNameService classNameService;
1778            @BeanReference(type = ClassNamePersistence.class)
1779            protected ClassNamePersistence classNamePersistence;
1780            @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class)
1781            protected com.liferay.portal.service.CompanyLocalService companyLocalService;
1782            @BeanReference(type = com.liferay.portal.service.CompanyService.class)
1783            protected com.liferay.portal.service.CompanyService companyService;
1784            @BeanReference(type = CompanyPersistence.class)
1785            protected CompanyPersistence companyPersistence;
1786            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
1787            protected com.liferay.portal.service.GroupLocalService groupLocalService;
1788            @BeanReference(type = com.liferay.portal.service.GroupService.class)
1789            protected com.liferay.portal.service.GroupService groupService;
1790            @BeanReference(type = GroupPersistence.class)
1791            protected GroupPersistence groupPersistence;
1792            @BeanReference(type = GroupFinder.class)
1793            protected GroupFinder groupFinder;
1794            @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class)
1795            protected com.liferay.portal.service.LayoutLocalService layoutLocalService;
1796            @BeanReference(type = com.liferay.portal.service.LayoutService.class)
1797            protected com.liferay.portal.service.LayoutService layoutService;
1798            @BeanReference(type = LayoutPersistence.class)
1799            protected LayoutPersistence layoutPersistence;
1800            @BeanReference(type = LayoutFinder.class)
1801            protected LayoutFinder layoutFinder;
1802            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1803            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1804            @BeanReference(type = com.liferay.portal.service.ResourceActionLocalService.class)
1805            protected com.liferay.portal.service.ResourceActionLocalService resourceActionLocalService;
1806            @BeanReference(type = ResourceActionPersistence.class)
1807            protected ResourceActionPersistence resourceActionPersistence;
1808            @BeanReference(type = com.liferay.portal.service.ResourceBlockLocalService.class)
1809            protected com.liferay.portal.service.ResourceBlockLocalService resourceBlockLocalService;
1810            @BeanReference(type = com.liferay.portal.service.ResourceBlockService.class)
1811            protected com.liferay.portal.service.ResourceBlockService resourceBlockService;
1812            @BeanReference(type = ResourceBlockPersistence.class)
1813            protected ResourceBlockPersistence resourceBlockPersistence;
1814            @BeanReference(type = ResourceBlockFinder.class)
1815            protected ResourceBlockFinder resourceBlockFinder;
1816            @BeanReference(type = com.liferay.portal.service.ResourceBlockPermissionLocalService.class)
1817            protected com.liferay.portal.service.ResourceBlockPermissionLocalService resourceBlockPermissionLocalService;
1818            @BeanReference(type = ResourceBlockPermissionPersistence.class)
1819            protected ResourceBlockPermissionPersistence resourceBlockPermissionPersistence;
1820            @BeanReference(type = com.liferay.portal.service.ResourcePermissionLocalService.class)
1821            protected com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService;
1822            @BeanReference(type = com.liferay.portal.service.ResourcePermissionService.class)
1823            protected com.liferay.portal.service.ResourcePermissionService resourcePermissionService;
1824            @BeanReference(type = ResourcePermissionPersistence.class)
1825            protected ResourcePermissionPersistence resourcePermissionPersistence;
1826            @BeanReference(type = ResourcePermissionFinder.class)
1827            protected ResourcePermissionFinder resourcePermissionFinder;
1828            @BeanReference(type = com.liferay.portal.service.ResourceTypePermissionLocalService.class)
1829            protected com.liferay.portal.service.ResourceTypePermissionLocalService resourceTypePermissionLocalService;
1830            @BeanReference(type = ResourceTypePermissionPersistence.class)
1831            protected ResourceTypePermissionPersistence resourceTypePermissionPersistence;
1832            @BeanReference(type = ResourceTypePermissionFinder.class)
1833            protected ResourceTypePermissionFinder resourceTypePermissionFinder;
1834            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class)
1835            protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService;
1836            @BeanReference(type = ExpandoRowPersistence.class)
1837            protected ExpandoRowPersistence expandoRowPersistence;
1838            @BeanReference(type = com.liferay.portal.service.ShardLocalService.class)
1839            protected com.liferay.portal.service.ShardLocalService shardLocalService;
1840            @BeanReference(type = ShardPersistence.class)
1841            protected ShardPersistence shardPersistence;
1842            @BeanReference(type = com.liferay.portal.service.TeamLocalService.class)
1843            protected com.liferay.portal.service.TeamLocalService teamLocalService;
1844            @BeanReference(type = com.liferay.portal.service.TeamService.class)
1845            protected com.liferay.portal.service.TeamService teamService;
1846            @BeanReference(type = TeamPersistence.class)
1847            protected TeamPersistence teamPersistence;
1848            @BeanReference(type = TeamFinder.class)
1849            protected TeamFinder teamFinder;
1850            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1851            protected com.liferay.portal.service.UserLocalService userLocalService;
1852            @BeanReference(type = com.liferay.portal.service.UserService.class)
1853            protected com.liferay.portal.service.UserService userService;
1854            @BeanReference(type = UserPersistence.class)
1855            protected UserPersistence userPersistence;
1856            @BeanReference(type = UserFinder.class)
1857            protected UserFinder userFinder;
1858            @BeanReference(type = com.liferay.portal.service.UserGroupGroupRoleLocalService.class)
1859            protected com.liferay.portal.service.UserGroupGroupRoleLocalService userGroupGroupRoleLocalService;
1860            @BeanReference(type = com.liferay.portal.service.UserGroupGroupRoleService.class)
1861            protected com.liferay.portal.service.UserGroupGroupRoleService userGroupGroupRoleService;
1862            @BeanReference(type = UserGroupGroupRolePersistence.class)
1863            protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
1864            @BeanReference(type = UserGroupGroupRoleFinder.class)
1865            protected UserGroupGroupRoleFinder userGroupGroupRoleFinder;
1866            @BeanReference(type = com.liferay.portal.service.UserGroupRoleLocalService.class)
1867            protected com.liferay.portal.service.UserGroupRoleLocalService userGroupRoleLocalService;
1868            @BeanReference(type = com.liferay.portal.service.UserGroupRoleService.class)
1869            protected com.liferay.portal.service.UserGroupRoleService userGroupRoleService;
1870            @BeanReference(type = UserGroupRolePersistence.class)
1871            protected UserGroupRolePersistence userGroupRolePersistence;
1872            @BeanReference(type = UserGroupRoleFinder.class)
1873            protected UserGroupRoleFinder userGroupRoleFinder;
1874            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1875            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1876            private String _beanIdentifier;
1877    }